marcelo_20xx 17 #1 Posted June 28, 2008 Im not used in making tutorials so please bare with me. For me Battle Realms can be widely modded via two files that if you want to be a modder must understand fully, the first one is of course Battle_Realms_F.exe and its dependant dlls namely the scripts folders that contain all the campaigns scripts, you can change some of the game aspect using Ollydbg (a free win 32 aplication debbugger and assembler-dissasembler) and the other file is Battlerealms.dat, like the name said it stores all the data that was compiled and the exe will call it when needing values for the game itself and its internal functions. This second file is the one we will discuss here. General Tips ============ First please download XVI32 a free hex editor from the link: <a href="http://www.chmaas.handshake.de/delphi/free...32.htm#download" target="_blank">http://www.chmaas.handshake.de/delphi/free...32.htm#download</a> Next we need to configure the editor to suit our needs like this: Go to Tools-->Options-->Appearance and check "Use blank to display control characters", I cant stress this enough since it will make your life easier when you are browsing the file. If you want to find a section quicker press Crl+F and put whatever you want in the text box, them push "convert text to hex", you will get something like this 42 61 64 08 but to actually find the text fill with 00 like this 42 00 61 00 64 00 08, remember that the text strings are filled with controls characters. The Windows Scientific Calculator is your best friend if you are not used with hex values. Then the real works begin, I post a pic to show the data and painted in two colors, red and green, to divide the values in segments that I will explain step by step. I will begin with the block marked blue, it separates our code data from the previous entry and thus is the beggining of the code we will inspect, the next sections are marked red and green and I will ONLY describe the values of the marked segments starting from the: Value 00 Entry ID ======================== Dont change this as you can get a crash window. Value 11 to 74 Building name ============================= Check out for the first 11, its a fixed value that indicate the lenght of the ASCII string, if you change this value you will get an out of memory error. Although in theory it cant be changed is useful whe you want to find a section fast, I will explain the technique later. Value 7D Model Type =================== As it name states its the entry for the 3d model to use, you can freely change this value to make your building look like other buildings, even more you can input values from other clans buildings too! Value 06 Tech Level =================== Or in other words needed tech level to have the building available, pretty useless as for multiplayers games there dont seem to be a way to set the starting tech level, but for the campaigns maps they are set in each map to disable some buildings at the begginning. Value 80 to 3F Building`s Armor ================================ This one is a big segment, its holds the Data for the Buildings Armor in the following order Cutting, Piercing, Blunt, Fire, Explosive and Magical. Take a look for the Cutting values and you will see that the data is arranged in this way 80 3F, the first value is the one we want to change. Raising the 80 to its max value FE will make the building extremely vulnerable to cutting attacks, on the other hand lowering to 01 will make it harder to this type of attack and last filling the values with 00 00 will make the building invulnerable to this type of attacks and will display "the selected unit cannot attack this building", that explain why only sledgers can break the pile of rocks blocking your path in the Graybacks journey. Value 64 to 32 Building Cost and Refund ======================================= The first two 64s (100 in decimal) are the hex value for the Rice and Water cost respectively and the followings 32 are the values for the resource refund when you destroy the building, this way you can make your building generate tons of resources with just only rising the values for the refund data. Value 05 to 19 Unit1 Training ============================= This part is where it becomes more interesting (if you arent tired or bored of reading this yet), I will explain this part to the best I can. The value 05 holds the entry for the unit allowed to enter the building and the next 01 the unit that will generate after the training. Imagine what you can do with this!, make a peasant train in a building and it becomes a Hero unit and even change for other clans units. Well posibly values are: Dragon ====== PUSH 0 Archer PUSH 1 Chemist PUSH 2 Dragon Warrior PUSH 3 Geisha PUSH 4 Kabuki PUSH 5 Peasant PUSH 6 Sumo Canonneer PUSH 7 Samurai PUSH 8 Spearman Serpent ======= PUSH 13 Bandit PUSH 14 Cannoneer PUSH 15 Crossbowman PUSH 16 Geisha PUSH 17 Musketeer PUSH 18 Peasant PUSH 19 Raider PUSH 1A Ronin PUSH 1B Spirit Warrior PUSH 1C Spirit Warrior PUSH 1D Swordman Lotus ===== PUSH 1E Blade Acolyte PUSH 20 Tausil PUSH 23 PUSH 24 PUSH 25 PUSH 26 PUSH 27 PUSH 28 PUSH 29 PUSH 2A Unclean PUSH 2B Warlock WolF ==== PUSH 2C Ballista Man PUSH 2D Berserker PUSH 2E Brawler PUSH 2F Druidess PUSH 30 Hurler PUSH 31 Mauler PUSH 32 Pack Master PUSH 33 Peasant PUSH 34 Pitch Slinger PUSH 35 Sledger PUSH 36 Werewolf Misc ==== PUSH 39 Dragon PUSH 40 Original Prince Taro, crash the game PUSH 42 Monk PUSH 43 Nightvol PUSH 44 Ninja PUSH 4F Horse PUSH 53 Zombie Heroes ====== PUSH 55 Arah PUSH 56 Budo PUSH 57 Gaihla PUSH 58 Garrin PUSH 59 Grayback PUSH 5A Issyl PUSH 5B Kazan PUSH 5C Kenji_Dragon PUSH 5D Kenji_No Sword PUSH 5E Kenji_Serpent PUSH 5F Kenji_Young PUSH 60 Kenji_2 Dragon PUSH 61 Kenji_2 No Sword PUSH 62 Kenji_2 Serpent PUSH 63 Kenji_Dragon 3 PUSH 64 Kenji one with the dragon PUSH 65 Kenji_Serpent 3 PUSH 66 Koryl PUSH 67 Long Tooth PUSH 68 Necromancer PUSH 69 Otomo Serpent PUSH 6A Otomo Dragon PUSH 6B Shinja Serpent PUSH 6C Shinja Dragon PUSH 6D Soban PUSH 6E Tao PUSH 6F Shale Lord PUSH 70 Utara PUSH 71 Vetkin PUSH 72 Zymeth PUSH 73 Zymeth one with the orb Forget about the PUSH word (its just that the list was too big that I copy paste from my debbugger doc info) also since the values are arranged in alfabetical order you can fill the missing spaces by yourself. I recommend memorizing this table or have it handy since you will need it if you want to understand how the Keeps summons the Heroes, which units are affected with a certain technique and so on. I may consider the values as ID pointers since the exe calls it whenever a unit is generated. Returning to the matter at hand, the last 19 is the training time. If you want to make your unit train almost instantly put a 01 here. Value 08 to 1E Unit 2 Training ============================== Only with data if the building allows more than one training, same as above but for the second training, i.e. the training a chemist do when entering a dojo. Value 02 to 2D Unit 3 Training ============================== Only with data if the building allows more than one training, same as above but for the third training, i.e. the training a kabuki do when entering a dojo. Value 10 to 03 Button Upgrades ============================== This data store the internal entry ID for the buttons upgrades available to this building. The value 14 03 refers to the Tempered Steel the only value you can change here is the 14 as the 03 seems to be fixed, the game is very tricky in this part like you can have the same upgrades in every building but for the CURRENT clan only. For example you cant make the Tempered Steel to be available in the Serpent Alchemist Hut but you can have it in a Dragon Bath House. Also this segment works completely different in some buildings, like the Keep, where the upgrades buttons are exchanged for the heroes buttons. The Dragon Keep =============== I have seen some people who ask how a Hero can be included in the multiplayer and so on, is really easy, just look at the picture. You will see the values 69,5B,55,58,6E and 8D and if you see the units table you will find that correspond to Otomo, Kazan, Arah, Garrin, Tao and Teppo in this order. You can freely change this values to make whatever hero or unit to be available at the keep just take notice that the last slot only works for WOTW. I dont know what 80 3F 2D do though. Value 20 42 Building time ========================= Not quite the truth, it seems more or less to work like the health and stamina regeneration system but the difference that you need a peasant to make it work and the other is automatic. If you want to make your building be constructed "somewhat" faster lower the value 20 to 01. Dont touch the 42 as IS a fixed multiplier and can crash the game. ...to be continued Since I am a little tired I will continue in the Next Chapter. Then I will explain the buildings pre-requisites, all about the units and techniques, but for the people that dont like to wait I will give you the next addresses. Here you can see how the data is organized in big chunk of segments and what values correspond to what function. The list of funtions for the buildings begin at the address FC4C2 and the actual data at the adress 133A7C. Investigate them to understand more the code and dont forget to put your findings here. 16 Quote Share this post Link to post Share on other sites
{{clan}}MeD 1 #2 Posted June 29, 2008 Lotus >>>> 21 = Sehk 22 = Channeler 23 = diseased one 24 = Golem 25 = Infested one 26 = leaf disciple 27 = master warlock 28 = Peasant 1F = Lythis 7C = Overseer 7D = Reaper Edit your post. And Nice Job, that's good Explaining. 1 Quote Share this post Link to post Share on other sites
Speedy 11 #3 Posted June 29, 2008 nice, I'll try and get my head around this later. Quote Share this post Link to post Share on other sites
ribesg 17 #4 Posted June 29, 2008 Here's the really complete list Original Battle Realms ====================== ====================== Dragon ====== 00 Archer 01 Chemist 02 Dragon Warrior 03 Geisha 04 Kabuki 05 Peasant 06 Sumo Canonneer 07 Samurai 08 Spearman Reserved's ========== 09 0A 0B 0C 0D 0E 0F 10 11 12 Serpent ======= 13 Bandit 14 Cannoneer 15 Crossbowman 16 Geisha 17 Musketeer 18 Peasant 19 Raider 1A Ronin 1B Spirit Warrior 1C Spirit Warrior 2 1D Swordman Lotus ===== 1E Blade Acolyte 1F Lythis 20 Tausil 21 Sehk 22 Channeler 23 Diseased one 24 Golem 25 Infested one 26 Leaf disciple 27 Master warlock 28 Peasant 29 Staff Adept 2A Unclean 2B Warlock Wolf ==== 2C Ballista Man 2D Berserker 2E Brawler 2F Druidess 30 Hurler 31 Mauler 32 Pack Master 33 Peasant 34 Pitch Slinger 35 Sledger 36 Werewolf Misc ==== 37 Bat 38 Butterfly 39 The Dragon 3A Dragonfly 3B Fish 3C Fly 3D Frog 3E Hawk 3F Hordeling 40 Original Prince Taro (crash the game) 41 Lilypad Frog 42 Monk 43 Nightvol 44 Ninja 45 Owl 46 Rabbit 47 Rat 48 Raven 49 Scorpion 4A Seagull 4B Snake 4C Songbird 4D Squirrel 4E Tarrant 4F Trained Horse 50 Vulture 51 Horse 52 Wolf 53 Zombie 54 Zombie 2 Heroes ====== 55 Arah 56 Budo 57 Gaihla 58 Garrin 59 Grayback 5A Issyl 5B Kazan 5C Kenji_Dragon 5D Kenji_No Sword (crash the game) 5E Kenji_Serpent 5F Kenji_Young (crash the game) 60 Kenji_2 Dragon 61 Kenji_2 No Sword (crash the game) 62 Kenji_2 Serpent 63 Kenji_Dragon 3 64 Kenji one with the dragon 65 Kenji_Serpent 3 66 Koryl 67 LongTooth 68 Necromancer 69 Otomo Serpent 6A Otomo Dragon 6B Shinja Serpent 6C Shinja Dragon 6D Soban 6E Tao 6F Shale Lord 70 Utara 71 Vetkin 72 Zymeth 73 Zymeth one with the orb Winter of the Wolf ================== ================== Dragon ====== 74 Chakram Maiden 75 Chakram Maiden Doppleganger 76 Guardian 77 Guardian (Dying) Serpent ======= 78 Enforcer 79 Witch 7A Witch (Demon Form) 7B Witch (Demon Form 2) Lotus ===== 7C Overseer 7D Reaper Wolf ==== 7E Digger 7F Dryad Misc ====== 80 Arctic Fox 81 Shale Spider 82 Shambler 83 Shambler 2 84 Snowy Owl 85 Spirit wolf 86 White Wolf (From Wildeye) 87 Winter Rabbit Heroes ====== 88 Graybak (Endgame) 89 Grayback (Middle) 8A Grayback (Slave) 8B LongTooth (Slave) 8C Taro 8D Teppo 8E Wildeye 8F Yvaine 90 Yvaine (Ungodly Power) Reserved's ========== 91 92 93 94 95 96 97 98 99 9A Quote Share this post Link to post Share on other sites
Asmoiha 1 #5 Posted June 30, 2008 hey i've tried to do that thing with heroes. but isn't it strange that i foud dragon, serpent and wolf heroes with 80 3F 2D and i only found lotus heroes with 80 3F 3C Quote Share this post Link to post Share on other sites
Asmoiha 1 #6 Posted June 30, 2008 and even stranger that yvaine was 80 3F 2D... anyone noticed that too Quote Share this post Link to post Share on other sites
♦ kevlahnota ♦ 5 #7 Posted June 30, 2008 and even stranger that yvaine was 80 3F 2D... anyone noticed that too 2d = 45 decimal value 3c = 60 decimal value that is the training time, but the hero instantly comes out when you click on their portrait because that is the way the keep is designed for all clans. however, in other buildings, it will activate their training time. example the dojo, alchemist hut, etc. Quote Share this post Link to post Share on other sites
Roxas 0 #8 Posted June 30, 2008 ribesg what do you mean with "Reserved's"? Quote Share this post Link to post Share on other sites
marcelo_20xx 17 #9 Posted July 1, 2008 Reserved as far as I know are special slots the programmers left intentionally empty to have it filled either with Battlepacks or Expansions, this is how they included some of the new units in the expansion. And thx ribesg for the complete list... Also I want some help from you guys. I didnt find where the game stores the data for the units movement speed and how to include the techniques between clans, kevlahnota, ribesg,med??? anyone... And if anyone is interested I ve found the offsets for the team colors and they can be changed for completely differents ones, I will post it in the next update. Quote Share this post Link to post Share on other sites
marcelo_20xx 17 #10 Posted July 1, 2008 Sorry it is just that the edit button is not working properly... Quote Share this post Link to post Share on other sites
♦ kevlahnota ♦ 5 #11 Posted July 1, 2008 Reserved as far as I know are special slots the programmers left intentionally empty to have it filled either with Battlepacks or Expansions, this is how they included some of the new units in the expansion.And thx ribesg for the complete list... Also I want some help from you guys. I didnt find where the game stores the data for the units movement speed and how to include the techniques between clans, kevlahnota, ribesg,med??? anyone... And if anyone is interested I ve found the offsets for the team colors and they can be changed for completely differents ones, I will post it in the next update. well, we can make up a team. me, ribesg, med and you marcelo_20xx, and anyone who knows anything related in modifications of battle realms. kasedo pm'ed me, and i know he is also interested in modding. if we joined, maybe we can fully modify the whole battle realms. i think 7 years we are waiting for battle realms 2 but it never happen. we cannot make battle realms 2, but we can mod it and add something to enhance gameplay. if you know how to explore .dll files, it's a big help for us. i use PE explorer to open .dll files and .exe. maybe you can decode it. Quote Share this post Link to post Share on other sites
ribesg 17 #12 Posted July 1, 2008 we can make up a team Ok for me Kev's team (1st one who did a mod) Quote Share this post Link to post Share on other sites
Asmoiha 1 #13 Posted July 1, 2008 2d = 45 decimal value 3c = 60 decimal value that is the training time, but the hero instantly comes out when you click on their portrait because that is the way the keep is designed for all clans. however, in other buildings, it will activate their training time. example the dojo, alchemist hut, etc. ah thx Quote Share this post Link to post Share on other sites
othemo 0 #14 Posted July 1, 2008 lol ok I now feel like the biggest idiot in the word right now am I the only one that doesn't understand these kind of things .... lol well kev you better keep making the mods for me because i don't understand anything of this stuff!! oh yeah asmoiha tell me if you get this to work lol leg het mij dan ff uit want di is echt veels te moeilijk lol Quote Share this post Link to post Share on other sites
♦ kevlahnota ♦ 5 #15 Posted July 1, 2008 Ok for me Kev's team (1st one who did a mod) it's not proper to use my username, i think BRMOD Team name will do. what do you think? then if we have enough members, we can assign them in different place like the coders, graphics and the tester/s. coders sub-divided into clan category, one for each clan if we are big. graphics divided into two, interface and models. the tester/s will just test the mod if it's working properly and they will report the bugs and other things. Quote Share this post Link to post Share on other sites
marcelo_20xx 17 #16 Posted July 2, 2008 If you want to make a Team is fine with me, count me in, also I now you are a humble person so no problem. I want to know also what do you want me to do with the dlls, if something I can help you I will PM you...and for the rest I will post any info Ive found here of the battlerealms.dat is only that Im organizing the info better so it could take a while. Quote Share this post Link to post Share on other sites
Dark Shuyin 0 #17 Posted July 2, 2008 this whole team/mod thing sounds great. maybe an idea for the members of this forum to add their idea's and wishes for that mod in an offcial sticky? Quote Share this post Link to post Share on other sites
ribesg 17 #18 Posted July 2, 2008 i think BRMOD Team name will do. what do you think? IBRMT (International Battle Realms Modding Team) Quote Share this post Link to post Share on other sites
dragon 0 #19 Posted July 2, 2008 Ok, so I've successfully followed every direction Kev put up, and made my own interesting mod. The only thing that I'm still not able to do is edit the Battle Gear that every unit in the game has. I've been trying for 2 days now since I ever tried to mod BR. So Kev, if you know how, could you help explain the process of how Battle Gears are assigned??? Quote Share this post Link to post Share on other sites
♦ kevlahnota ♦ 5 #20 Posted July 3, 2008 Ok, so I've successfully followed every direction Kev put up, and made my own interesting mod. The only thing that I'm still not able to do is edit the Battle Gear that every unit in the game has. I've been trying for 2 days now since I ever tried to mod BR. So Kev, if you know how, could you help explain the process of how Battle Gears are assigned??? marcelo_20xx is the one who make the guide not me and ribesg for the complete list including wotw characters, but to answer your question, the battle gears can be interchange but it has an animation step before it will activate, and only within it's clan only. you can change the battle gear but there's limitation. those battle gears that does'nt require special animation are the ones who can be use. inside the battle realms.dat there is a invalid battle gear table that makes them invalid if used by another character. if you can disable that maybe you can freely interchange anything. you try to replace a peasant model with anything except other clans peasants. and build a peasant house.... tell me what happens... Quote Share this post Link to post Share on other sites
marcelo_20xx 17 #21 Posted July 3, 2008 You are right about the battlegears but you can interchange between clans too, the only limitation is that in order to work some battlegears need special frames of animation, and I finally finish it editing the next chapter I will post it tomorrow... Quote Share this post Link to post Share on other sites
dragon 0 #22 Posted July 3, 2008 Oh Man, thanks guys. Yeah I will keep digging through the Dat. and see what I can do. Hey Marcel_20xx, you said you finished editing the BGs or is it something else? Let me know!! Quote Share this post Link to post Share on other sites
Asmoiha 1 #23 Posted July 4, 2008 lol i've tried some things with the hero's but i got the same problem which u first had with the nightvol i thought. when i mouse over orb zymeth in the keep the game quits Quote Share this post Link to post Share on other sites
Asmoiha 1 #24 Posted July 4, 2008 can someone please explain what i could change to make it work or is it just that i placed the wrong hero and deleted the wrong one ore something? Quote Share this post Link to post Share on other sites
marcelo_20xx 17 #25 Posted July 5, 2008 Asmoiha: First restore your original battlerealms.dat (since I dont know which exactly you changed) then just for testing purpose replace 5B (Kazan) for 72 (Zymeth) in the hero code section of my tutorial and that would make Zymeth available in the Dragon`s Keep. Dragon: I meant I finished editing my second tutorial but unfortunately I couldnt post it yet due to new bugs I found in my guide so far, personally I didnt mess too much with the battlegears, in my test I have interchanged almost all battlegears between units but of all 100% only a few 10% or less worked (mostly due to restrictions the programmers made as state by kevlahnota and missing anim frames necessary for the actual battlegear to work). Quote Share this post Link to post Share on other sites