Getting started in modding
Jan 23, 2017 14:50:45 GMT
Quintus Fabius and Aleksandr Vasilevsky like this
Post by Bismarck Jr on Jan 23, 2017 14:50:45 GMT
I'm in class so I will not be able to go into detail. Will update thread when I have time.
Tools I use:
APK Editor Pro (Android)
APKtool (PC)
7Zip (PC)
Hex Editor (Android)
Total Commander (Android)
Unlocked .APK file extension
It is possible to use only one device to mod, but I prefer to use a combination of PC and Android.
Android:
Obviously the first thing you need to know is what exactly you want to mod. I will post tutorials to various actions throughout the coming month.
If you desire to change unit stats, the pathway /assets and open the file labeled def_army.xml (I believe, will update when checked.). You will see HTML coding (No experience in coding needed, can pick up super easy) and scroll all the way to the bottom. You will see lines of code that look similar to "countryname="hes" ref=pru". That isn't it exactly but that is what I recall. Using these, you can change what countries have what root's unit stats. A root is what I call the unit hierarchies that you see on top of these pieces of code. for example, if you wanted Hessen to have Frances' unit types, change the ref=pru segment to ref=fra.
Making changes to the unit stats themselves is simple number replacement. Find the the unit you want in which root you want. If I wanted to change the French Militia's health to 160 when formation 3, find the french militia segment that is labeled "Militia fra 3" and look for the stat "strength=xxx" and change it to "strength=160". The same works for every unit for every other stat such as mobility, range etc. You can even give it cavalry's ability to attack after a used turn if you change a unit's weapon type. Heavy edits to units can cause crashes so be careful, especially when changing which country uses which root, creation of root, and unit names. Changing unit names is very difficult and equally frustrating. If you do change any unit names, change the root name and all of it's attachments to the desired name, and do the same in def_motion. Furthermore, in order to prevent many bugs, it is recommended that you add a new card in def_cards.
Naming cities is very important for for anyone trying to change the geography of the map. The process is simple. In Assets, locate def_areaname.xml and basically all you need to do is copy and paste one line of code for areaname, and change the base name of it to your cities base name, and then change what it equals to what you want it to appear as in game.
Changing General names is much more simple. Locate the file in assets/english.lproj called stringtable_en.ini and find the list of code that looks like "name_Napoleon=Napoleon". Lets say you want to change Napoleon's name to something else, keep his name as name_Napoleon unless you edited that in his segment in the def general file, but set it equal to what you want. name_Napoleon=x where x is desired screen output. The same works for other things in the .ini file. If you want to change the name of everything tagged with name_Militia, it is name_Militia=x where x is desired screen output. Also, this is the same way you change general speeches and unit descriptions.
It is also possible to change General stats much the same way you change an army's. Go to def_General and find the general you want to change. From there, you see a list of stats such as mobility, and skills. You can change up to three skills and make General stats to whatever you want.
I will write more later. Please ask questions and make tutorial requests.
Tools I use:
APK Editor Pro (Android)
APKtool (PC)
7Zip (PC)
Hex Editor (Android)
Total Commander (Android)
Unlocked .APK file extension
It is possible to use only one device to mod, but I prefer to use a combination of PC and Android.
Android:
Obviously the first thing you need to know is what exactly you want to mod. I will post tutorials to various actions throughout the coming month.
If you desire to change unit stats, the pathway /assets and open the file labeled def_army.xml (I believe, will update when checked.). You will see HTML coding (No experience in coding needed, can pick up super easy) and scroll all the way to the bottom. You will see lines of code that look similar to "countryname="hes" ref=pru". That isn't it exactly but that is what I recall. Using these, you can change what countries have what root's unit stats. A root is what I call the unit hierarchies that you see on top of these pieces of code. for example, if you wanted Hessen to have Frances' unit types, change the ref=pru segment to ref=fra.
Making changes to the unit stats themselves is simple number replacement. Find the the unit you want in which root you want. If I wanted to change the French Militia's health to 160 when formation 3, find the french militia segment that is labeled "Militia fra 3" and look for the stat "strength=xxx" and change it to "strength=160". The same works for every unit for every other stat such as mobility, range etc. You can even give it cavalry's ability to attack after a used turn if you change a unit's weapon type. Heavy edits to units can cause crashes so be careful, especially when changing which country uses which root, creation of root, and unit names. Changing unit names is very difficult and equally frustrating. If you do change any unit names, change the root name and all of it's attachments to the desired name, and do the same in def_motion. Furthermore, in order to prevent many bugs, it is recommended that you add a new card in def_cards.
Naming cities is very important for for anyone trying to change the geography of the map. The process is simple. In Assets, locate def_areaname.xml and basically all you need to do is copy and paste one line of code for areaname, and change the base name of it to your cities base name, and then change what it equals to what you want it to appear as in game.
Changing General names is much more simple. Locate the file in assets/english.lproj called stringtable_en.ini and find the list of code that looks like "name_Napoleon=Napoleon". Lets say you want to change Napoleon's name to something else, keep his name as name_Napoleon unless you edited that in his segment in the def general file, but set it equal to what you want. name_Napoleon=x where x is desired screen output. The same works for other things in the .ini file. If you want to change the name of everything tagged with name_Militia, it is name_Militia=x where x is desired screen output. Also, this is the same way you change general speeches and unit descriptions.
It is also possible to change General stats much the same way you change an army's. Go to def_General and find the general you want to change. From there, you see a list of stats such as mobility, and skills. You can change up to three skills and make General stats to whatever you want.
I will write more later. Please ask questions and make tutorial requests.