Unit Modification Questions

MajorWinters

Chieftain
Joined
Jul 22, 2008
Messages
83
A friend of mine and I are attempting to change unit stats, add new units, and delete units. We are having no luck searching about the forums for coherent explanations of how to do this. Anyone who knows how to do this please help us. We really need it.
 
You will have to ask more precise questions to get good answers. As it is now someone would have to juast start lecturing into the blue - having no idea what you might already know (i assume it's not much).

I suggest you start lookng in the tutorails section, check out a example mod or two...

Tutorial Index: http://forums.civfanatics.com/showthread.php?t=236836

A Tutorial on adding units - the seteps/files involved changing a existing one would be similar - http://forums.civfanatics.com/showthread.php?t=176460

Edit: Wow, a "someone.... hhhhheeeeellllpppp" bumb after whole 7 minutes of waiting for a reply ;)
 
What MajorWinters and I are trying to do is to modify the xml files in order to change unit's strengths, movement, range, and bonuses. We are trying to make a more realistic version that we can play based off of Dale's Road to War mod. Do you know how to or do you know anyone who could help us figure out how to change these statistics within the xml files? And as for new units, I'm not entirely sure how to go about actually creating them in the program and creating the corresponding skin to go with it. Do the links that you provided show how to do these things? Thanks...
 
The file responcible for [most of] the gameplay relevant unit rules is Assets\XML\Units\Civ4UnitInfos.xml its long, but quite straight-forward when it comes to things you mentioned - there is a big block for every unit, listing the relevant numbers - which most tags you can easily guess what they mean.

I suggest you choose a unit - say a anti-tank infantry - find the appropriate block in the file (UNIT_AT_INFANTRY) and compare the values there with these you know the unit has... So for example, the unit having a base strenght of 14 corresponds to <iCombat>14</iCombat>; You can also see how the Bonus vs Armor is defined...

If you want to add stats (like additional bonus, flanking, promotion,...) to a unit, and do not know how, check out a unit that has this feature already - so for example if you want to add free promotion, check out UNIT_INCAN_QUECHUA - it comes with a free combat I...

Using a editor capable of Syntax Highlighning could be helpful...
This one for example... http://notepad-plus.sourceforge.net/uk/site.htm
 
We already got that down good, we can change strength and add bonuses but what we really need is to know how to add units, remove units, add technologies to corespond to the new units we added etc. know anything about that?
 
Techs enabling units are in the unitinfos under <PrereqTech>.
Adding units is done by simply copy and pasting a unit entry and editing that. To remove a unit simply delete the entry. If you are doing this in RTW, you might actually need to do some python work becasue I think Dale refrences some units in Python.
 
this is a little off topic but i'm having no luck finding an answer on the forums anyway so here goes, could anyone help with trying to combine two mods? one is a mod made by a civ4 gamer the other is an original mod that came with beyond the sword, i would really like to combine some elements of the two mods.
 
Adding new Techs is easy. Simply copy the tech entry, and edit it. Make sure you change the tech position or it causes a crash (I think. It cant be over the icon of another text)

On merging mods: It is helpful to know what exactly you want to merge and what mods they are. EG: Trying to merge two small XML mods is easier than trying to merge two huge .dll mods.
 
The general procedure merging mods is to choose one, that you will use as base. Then transfer all the stuff you want from the other mod into the files you chosen as base.

Software like Winmerge (http://www.winmerge.org/) can be of some help, as it will show you differences between files.. (As with any software - it does help, but you can't trust it blindly to do what you want)

+ What Ajidica said.
 
Thanks for the info. what i'm trying to do is merge the Next War epic mod with Carter's 32 civ earth map. What should i do to merge them? And about adding new techs, i can copy the entry but i'm not really sure what to do next, i think the next step is to change the name (obviously) then tack on the appropiete unit triggers but i don't know how to have it show up as a seperate researchable tech in-game, or how to have it be put into a certain tech order. Ex. original techs= Medical service 1 leads to medical service 2 leads to medical service 3 leads all the way up to medical service 6 what i want to know is how to insert another tech in-between that whole list or just add it to the end of that list. Anyone who understood that, please try to help.
 
You can copy and paste the tech (the whole block) from the source to the target mod.
It should be visible/tech-able in the game by this point. It might however be obsscured by a overlaping tech panel - there are tags withhin each tech block GridX/GridY iirc that define where in the tech tree screen the panel will be - even if you can not actually reach it, because of some prereq snafu.

Then you need to change the prerequisite techs, the way you like it.
 
I have never actually merged a mod and I dont know if next war uses python or not, so I cant help there.

For refrence, XML doesnt trigger anything. It just gives data to Python and the .dll. The techs 'enable' the unit. Triggering generaly refers to a dynamic change like events.

That said, techs unabling units are defined under prereq tech in unitinfos. All that Techinfos does is give info such as name, a few abilities, and prereqs for other techs.

For techs enabling another tech, that is done in the part <PrereqAnd> and >PrereqOr> IIRC, prereqor is done for linear tech advancement. Prereq And is done for tech needs both. Or is also used for either or in techs.

NOTE: In prereqs, it defines what is needed for that tech, not the next one.

Remember, when in doubt, poke around in the XML. Most things that people ask about Firaxis already did. You just need to copy and paste.
 
ok i understood some of what the two of you said. i'm do not know too much about moding i really only know the basic of the basic, but most of what you guys just said above, i didn't get. is there anyway you can make it more step by step or tell where i can go to see it step by step?
 
Just poke around the XML files. Most of the tags and other things are easily understandable. Also, is english your native language? I know that I tend to type in incorrect grammer and for a person who isnt fluent in english it can be confusing.
 
Yes english is my native language its just i don't know too much about computer files. i just need like a tutorial or something, i've been to the part of the forums that deals with that kind of stuff but haven't found anything that is like what i am trying to do, its possible that i have just missed it ,so if you know of any step by step "how-to" tutorial thing just tell me and i'll have a look at it.
 
There are plenty of XML Tutorials in the Tutorials subforum. XML is easy. Once you know how to do one thing, everything else is just an extension, all functions in XML follow the same rules. From what I can tell, only the Lsystem files are different and until you start doing some advanced graphics stuff, they arent needed.
 
first could someone tell me how to combine those two mods i mentioned earlier? Carter's 32 civ earth mod and the next war mod. i have attempted it and failed. i just don't know what to combine, overright, etc.
 
I really need help, right now all i really want to do is combine Carter's 32 civ Earth mod with the Next War mod that came with beyond the sword. Anyone who can help me please do.
 
Back
Top Bottom