Disabling units

Copycat665

Chieftain
Joined
Aug 13, 2012
Messages
12
Firts of all, i'm very sorry if this question has already been asked. I tried and search the forums, but found nothing about this.

My problem is that i simple love the tactical gameplay of the early era's of Civ5, and feel that most units from the modern age (Tanks, Artillery, nukes, flights etc) ruins this tactical gameplay you get with the old era units.

There seem to be several mods which removes some of the modern age units, but far from as many as i would like. Neither would i like to remove all the cool techs, since i love more buildings and wonders etc, so i dont want the techs removed, only the modern age units.

So my question: Is there any mod out there that lets you remove the units you would like removed, but still keeping the techs? If so, please leave a link, as i've already tried to browse through the Mod hub with no luck.

Thanks for taking your time to read and reply.
 
Make your own mod, and just set the Cost of any units you want disabled to be -1. That'll make the game treat it as unbuildable.

A better option, though, would be to alter those units to not be quite so overpowering. Many of us have done that in the past, reducing the drastic power increase of the Modern Era units. For instance, in my mod I lowered the Modern Armor from 80 strength to 70 (compared to the 50 for a normal Tank), which really reduced the ability to walk all over the other players once you get them, and then I changed its resource cost to require both Aluminum and Oil (with Tanks using Iron + Oil), so that players couldn't churn out a ton of them.

Do stuff like that, and it won't be so bad.
 
Thank you for the suggestion Spatz.

My problem is that i know nothing of moding. I dont even know where i should change these numbers for the units?
 
Or... Let me rephrase that. I know how to open modbuddy and create a mod in there, i just dont know how to get this mod to do what i'd like it to.
 
I've tried to use the following line in my mod:


<units>
<update>
<set cost="-1"/>
<where type ="UNIT_LONGSWORDSMAN"/>
</update>
</units>


But it doesent change anything. I dont know if im writing something wrong, or if i'm loading the mod incorrect or whatever. I'm really quite lost.
 
First, XML is case-sensitive. Units, Update, Set, Cost, etc. all need to start with capital letters.

Second, even if your code was correct (and it'd need to be inside <GameData> for that to work), you might be screwing up the OnModActivated command; without seeing your mod's files, we'd have no way of knowing.

Third, you might not be enabling the mod correctly in the mod menu, which again we can't tell, although you can easily check that by saving a game, and in the load/save menu seeing which mods are enabled for each savegame.

I'd suggest sticking with this, even if it feels too hard right now; learning how to do the basic modding doesn't take long once you see how it's done, and it'll allow you to make all sorts of balance tweaks. It'll be worth it for you in the long term. Besides reading Kael's modding guide, in the Reference forum, I'd suggest downloading a few of the more popular mods to see how they changed things; that'll go a long way towards helping you make your own mod work.

Also: turn on logging. Go into your user directory, which in Win7 is "My Documents/My Games/Sid Meier's Civilization V/" or something similar. Find the "config.ini" file, and open it in a text editor. The line that says "EnableTuner = 0", at the top: change it to a 1. Same goes for the LoggingEnabled line (about two-thirds of the way down the file), as well as any other log-related line that looks interesting to you. Once you've done this, start up the game and try to load your mod. Inside your user directory is a Logs/ subdirectory; in there, the files that matter are xml.log, Database.log, and Lua.log. Open each of those and see what error messages you have; some of those will be things related to the core game itself, so you may want to try starting a mod-free game to see what an "functional" log file would look like. If your mod is giving more errors than this baseline, you should be able to use that info to figure out what you did wrong.
 
And bumping this with a new problem. I downloaded Kael's mod guide which is great, but i now have trouble with some of the civilizations special units. For example Gatling Gun, Great War Bomber and Landship. I have their names, and i've changed their cost as all the other units, but it seems these just aint gonna work. I cant find any info regarding them having a different name or anything. I find it rather weird as i can get the Triplace, Machine Gun and Marine's to cost -1.

Anyone got an idea what the problem might be with these specific units, or if there's someplace i can find out what they are really called?
 
Usually, with something like that, the problem is in the spelling. The internal names of units, techs, etc. might be spelled differently than you'd expect. For instance, take Techs; Plastics is TECH_PLASTIC (no S on the end) and Penicillin is TECH_PENICILIN (missing an L). I don't have G&K, so I can't check the names of those specific units, but it's something that might be causing the issues. Lots of DLC units or civ-specific units will have some extra word in the name; the Minuteman isn't UNIT_MINUTEMAN, it's UNIT_AMERICAN_MINUTEMAN. So if you're only seeing an error with civ-specific units, then it's probably that; open up the game's actual XML files to see what name the game is using internally.

Also, as I said, turn on logging and the log files will tell you exactly why those lines failed to execute. You could easily have one line that still has capitalization issues, or something like that.

If that fails, then copy the XML in question to this board (using the (CODE) environment, except obviously you use brackets instead of parentheses), so we can take a look at it. If we don't see anything wrong, then post the modfiles themselves (in a zip file, preferably).
 
Back
Top Bottom