Modding Q&A

The fact that they rarely (or never) build them is also discouraging.
There is a thread explaining what entices the AI to build things. I'm sorry that just now I don't recall enough of the specifics to track it down for you.
 
My armies won’t upgrade once built and loaded. I don’t like the idea of being stuck with an army group of obsolete units. Unless anyone can tell me there’s an alternative I’m going to try this plan.

Change the “Build Army unit” to an unbuildable unit that upgrades to the first army unit. The “pre-army unit” will have a high enough shield cost to upgrade to the latest army unit free of charge. The pre-army can’t have a disband button to prevent cheating by adding hundreds of shields to an expensive unit or building.

You would still lose the units inside the army but you can reuse the army.
 
My armies won’t upgrade once built and loaded.
I asked about this in another thread a while back, and the answer I got was that Armies can upgrade, but apparently only in a town which has both a Barracks AND a Sm.Wonder with the 'Build Army' flag (e.g. the Mil.Acad. in the epic game).
I don’t like the idea of being stuck with an army group of obsolete units.
Neither do I, but you can always disband obsolete Armies (for 100s, in the epic game) -- or fortify them in your capital for ceremonial purposes!

Alternatively, if you give Armies the 'Unload' flag, then you should be able to evict the component units -- but you then can't put your Armies onto boats (although you might still be able to Airlift them... Hmm...)
Unless anyone can tell me there’s an alternative I’m going to try this plan.
*snip*
The upgrade from Pre-Army to Army would still require a Rax at minimum, which the AI wouldn't necessarily understand. And even if it did, the AI might not use it anyway -- it tends to use its MGLs to rush projects, when it acquires them in a town.

(And when it acquires them in the field, I assume it will only bring them to a town if the MGL appeared within its own territory: in a recent game, I saw it leave an MGL out in the open, 1 tile beyond its own borders, turn after turn, until I finished killing the stack it was hiding under).
You would still lose the units inside the army but you can reuse the army.
Not sure what you mean here. The 'Pre-Army' presumably wouldn't load any units, and an Army which upgrades directly to more modern Army, would keep any units it was already loaded with through the upgrade.

To be able to recover/ recycle the individual units that an Army was loaded with, you would also need an intermediate upgrade-step between Armies (maybe call it a 'Great General', and re-use the MGL-graphics?), which has zero transport capacity: I believe that the intermediate would also need the King-flag (to make it unbuildable but still accessible). Upgrading to the intermediary would automatically unload the units, which could then themselves be upgraded, and reloaded into the upgraded Army. The AI almost certainly wouldn't realise this, though...
 
You CAN upgrade armies like tjs282 say, but you cannot upgrade units already loaded in an army. You cannot unload units from an army - at least not the ordinary way. When upgrading an army, the units already loaded in the army will be transferred to the upgraded army (as long as the unit-capacity is equal or larger). The only way I can imagine to get rid of antiquated units in an army, is that if you upgrade to an army with less unit-capacity than the original one. The surplus units will be ejected and be available for upgrading. I have never tried it, but it might be possible to have an zero-capacity army "between" two army upgrade steps (to eject all units loaded). The problem is of course the Pentagon, which will give the zero-capacity army a capacity of one, leaving one of the obsolete units loaded in that army.

I have upgradeable armies in my mod, but I haven't seen AI upgrade it's armies. I have regular armies that can be created from Great Military Leaders - with capacity from one to three untits - foot units only. Then I have a later Army Group that allows non-foot units, but have lesser capacity. Letting AI have access to units with more than one movement points, lets AI use armies slightly better than in the vanilla game. (the one-more-movement-point bug in AI army-routine). My nerfed armies helps the AI to cope a little better with an onslaught of the human player's armies.
 
Thanks guys, I found a problem with my game whilst testing what you said so I’ll have to get back to you when that’s fixed.

I have primary (requires resources) and secondary (doesn’t require a resource) units in my mod. The final unit in the list of secondary units upgrades to the first primary unit. This caused a crash. Is the problem that you can’t upgrade through a tech that you don’t yet have e.g. Spearman (ancient tech A)-Modern Armour (modern tech A)-Bigger Spearman (ancient tech B)?

To see a more detailed example, click on the link in my signature that says TLC News.

EDIT: My archers have the exact same system and work as expected so i'm a little lost.
 
Last edited:
Thanks guys, I found a problem with my game whilst testing what you said so I’ll have to get back to you when that’s fixed.
Please do -- I'd be very interested.
I have primary (requires resources) and secondary (doesn’t require a resource) units in my mod. The final unit in the list of secondary units upgrades to the first primary unit. This caused a crash. Is the problem that you can’t upgrade through a tech that you don’t yet have e.g. Spearman (ancient tech A)-Modern Armour (modern tech A)-Bigger Spearman (ancient tech B)?
That sounds quite possible, since you would then be trying to upgrade 'through' a currently unavailable unit. But this scheme does sound needlessly complex -- what's the rationale for having the upgrade-chain going

Secondary1 --> ... Secondary'N' --> Primary1 --> ... Primary'N'

...rather than simply

Secondary1 --> Primary1 --> Secondary2 --> Primary2 --> ... Secondary'N' --> Primary'N' ?

This latter is what I'm doing in my 'C3C EGO* Mod' (TM) (WIP), to integrate the Guerillas (and TOW-Infs) into the 'Offensive Rifleman --> Offensive MechInf' line, so that the AI won't build a lower-stat no-resource unit when it has the resources to build a better one instead.
*
Spoiler :
EGO = Epic Game Overhaul -- just because I like acronyms!

EDIT: My archers have the exact same system and work as expected so i'm a little lost.
Maybe the tech-tree is shorter, and/or doesn't cross between eras? Or... You're using one of the custom Editors (Steph's or Quintuillus'), right? So is it possible that you've got an undetected 'upgrade-loop' somewhere in the Spearman upgrade-chain? I know the Firaxis Editor doesn't allow that, but I don't know about the others.
 
So is it possible that you've got an undetected 'upgrade-loop' somewhere in the Spearman upgrade-chain?
Yep, I messed-up. It was an upgrade loop.
That sounds quite possible, since you would then be trying to upgrade 'through' a currently unavailable unit. But this scheme does sound needlessly complex -- what's the rationale for having the upgrade-chain going
The difference in stats between primary and secondary units in my mod could cause you to upgrade to a weaker unit. The straight line method (now working) allows for a neater transition in the Civilopedia. It’s more about making game play easier.

I’m going to get back to work testing armies and hopefully return with an answer.
 
As you found already, this is possible to have Spearman -> Modern Armor -> Pikeman type upgrade lines.

As an example (in the yet to be released Playground Mod 3.0), I have the Mercenary upgrade to the Condottiero, which is a resource-less unit that fills a similar niche to the civ 3 Guerilla/TOW Infantry line. However, the Condottiero upgrades to the Mercenary Swordsman, which is available earlier (but after the Mercenary), but requires the Mercenary resource.

The benefit of this complex system is that, if you have the required resource, you get a cheaper, stronger unit. But if not, you'll have to settle for a weaker, more expensive unit, later. Alternatively, you can make the units available on the same tech, like "Tank", and "Tank (Synthetic Fuel)", so that you can still build a tank without oil, but it will be more expensive, or weaker, or both.
 
It looks like armies don’t show the “build army” button in-game. tjs282’s idea should work. You wouldn’t be able to reset the army unless it was obsolete. If you loaded a unit by mistake or are still using the same army class but loaded with obsolete units; you couldn’t recycle the unit.

I’m going to keep working with it but tjs282’s idea is the likely to be the only solution.
 
Do you mean the message "So, this game is, like, over. No further score will be entered."? If thats the one, it's located in the textfile "script.txt" in the "Text"-folder. Search for the entry key #GAMEOVERMAN.
 
ah , a modder Q and A thread ... ı am planning to have multiple unit lines , but they all need a different couple of resources . Say ı use iron and horses for 50 units , but if gold is discovered the gold and horses line takes precedence . To save time ı was planning to upgrade the last one of iron and horses to the first of gold and horses . A tank of the first to a spearman of the second . And different eras , too . So do ı have stop right now , before wasting any time ?

immediate edit : after fully reading the page , ı see an answer but let me allow this as a subsricption .
 
From what I understand, this is what you are trying to do:

(Tech) Unit
(Horseback riding) Iron Horseman -> (Chivalry) Iron Knight -> (Military Tradition) Iron Cavalry -> (Horseback riding) Gold Horseman -> (Chivalry) Gold Knight -> (Military Tradition) Gold Cavalry

This would work, but you have to be aware that this upgrade line will preferentially give you Gold Horsemen over Iron Cavalry. In a situation where, if you have already built 10 Gold Horsemen, then lose your source of Gold, so you have to revert back to Iron Horsemen. As you advance to Chivalry, you are supposed to build Iron Knights, but your Gold Horsemen can't upgrade to Iron Knights, as they are farther along the upgrade tree. If Gold Horsemen are that much more preferential than Iron Knights, this will be a good method. However, if you want Gold Horsemen to turn into Iron Knights if you run out of Gold, I will recommend you to use this tree:

(Tech) Unit
(Horseback riding) Iron Horseman -> (Horseback riding) Gold Horseman -> (Chivalry) Iron Knight -> (Chivalry) Gold Knight -> (Military Tradition) Iron Cavalry -> (Military Tradition) Gold Cavalry

This way, the lower tech tier horse unit still upgrades to the higher tech tier, then it upgrades to the superior metal type if it is available, rather than uses the superior the metal type (if available), and then determines the tech tier.
 
My game uses the settings Conquest, Victory Point Scoring and Capture the Unit. Is there a way to remove the 540 turn limit (actually set to 1000) or the 20 turn warning and then the defeat message? I only want the conquest victory condition to apply with no game stopper messages to contradict it or a doom preaching countdown.
upload_2017-3-18_18-8-35.png
 
My game uses the settings Conquest, Victory Point Scoring and Capture the Unit. Is there a way to remove the 540 turn limit (actually set to 1000) or the 20 turn warning and then the defeat message? I only want the conquest victory condition to apply with no game stopper messages to contradict it or a doom preaching countdown.
View attachment 467230

I think a graphic is needed for that 20 turn warning window, so that it shows blank. I thought I saw one in the database.
 
Last edited:
Top Bottom