• Civilization 7 has been announced. For more info please check the forum here .

Modding Q&A

Does the AI understand how to upgrade workers? For example, if I create a faster more expensive Serf with Feudalism and have the standard worker set to upgrade to a Serf, will the AI upgrade them?
As with all AI-upgrading, the answer is "In theory, yes; in practice, not reliably"

The AI will generally only upgrade any unit if it has sufficient gold in its Treasury to make the upgrade on the same turn that the upgradeable unit happens to pass through a Barracks-town. AFAIK, it does not deliberately cycle obsolete units (back) through Barracks-towns just for the purpose of upgrading them. That said, when D=0 units (e.g. unmodded Workers) are threatened by a nearby hostile unit, the AI will almost always retreat those units to the nearest friendly town. If that town happens to have a Barracks, the units may then get upgraded, if the gold is available.

(In addition to allowing the production of Veteran units everywhere, another reason why the SunTzu wonder is so useful to the AI, is that it can then also upgrade any unit in any town — gold permitting).
 
I have a Marauder being auto-produced by the Pirate Haven SW at the end of Era 1. I want the Marauder to be able to upgrade Pirate in Era 2 at Astronomy, but not be buildable. Would I make the Pirate available to ALL civs and set as the King flag?
 
That should work.
 
I have a Marauder being auto-produced by the Pirate Haven SW at the end of Era 1. I want the Marauder to be able to upgrade Pirate in Era 2 at Astronomy, but not be buildable. Would I make the Pirate available to ALL civs and set as the King flag?
:yup: This is the principe of CCM - and it works very well (only with more classes of pirate ships in it).
 
I downloaded a couple of units that don't have sounds. What would be the path to use sounds from a stock unit? For example, I have a Crossbowman with no sounds. I figured I could have him just use the Firaxis Longbowman sounds. In the .ini file, what does the file path supposed to look like?
 
I was trying to devise a way for Pirate ships to capture some "booty" besides simply enslaving another identical ship (e.g. Privateer). Either via a prize ship that can be converted into shields or as plunder as mentioned in this thread Exports, Piracy and Trade. I am assuming the AI doesn't know how to take prize ship back to port and disband for shields, right? Or in the plunder method know to take the plunder back to their capitol to convert? It would only benefit the human player?
I don't think disbanding the ship would work for the human player either - I'm pretty sure that foreign units (captured/enslaved/traded) don't contribute to shields when disbanded.

I downloaded a couple of units that don't have sounds. What would be the path to use sounds from a stock unit? For example, I have a Crossbowman with no sounds. I figured I could have him just use the Firaxis Longbowman sounds. In the .ini file, what does the file path supposed to look like?

two dots and a backslash (takes it out of the folder the .ini is in) like so: ..\

then the name of the unit folder whose sounds you want to use, e.g.: ..\warrior\

then the name of the specific file

here's an example of the sound section of an .ini pointing to two different unit folders:
Code:
[Sound Effects]
BLANK=
DEFAULT=
WALK=
RUN=..\Spearman\SpearmanRun.amb
ATTACK1=..\Archer\ArcherAttack.amb
ATTACK2=
ATTACK3=
DEFEND=
DEATH=..\Spearman\SpearmanDeath.wav
DEAD=
FORTIFY=..\Archer\ArcherFortify.wav
FORTIFYHOLD=
FIDGET=
VICTORY=
TURNLEFT=
TURNRIGHT=
BUILD=
ROAD=
MINE=
IRRIGATE=
FORTRESS=
CAPTURE=
STOP_AT_LAST_FRAME=
PauseROAD=
PauseMINE=
PauseIRRIGATE=
[Version]
VERSION=1
[Palette]
PALETTE=
 
@Virote_Considon thanks. I figure out how to add sounds from units in the main game, but now I am trying to get sounds for a Grenadier unit. I was going to use the sounds and graphics from Napoleon Infantry in the Napoleonic Europe scenario. Any idea the file path for the stock scenarios/conquests?
 
I keep getting a crash and I am having a heck of time diagnosing what causes it. My turn happens, a city finishes building a unit (in this case a submarine, then I switched to infantry and same result), and game crashes with the error message below. One, the Germans are eliminated so nobody should be building a Panzer (I checked the biq, it isn't available to them). I checked the biq and even if a Panzer was being built the entry is correct:

#ICON_PRTO_Panzer
art\civilopedia\icons\units\62germanpanzerlarge.pcx
art\civilopedia\icons\units\62germanpanzersmall.pcx
Tank
#ANIMNAME_PRTO_Panzer
Panzer

Below is the screenshot of the error. Any ideas to point me in the right direction?

Screenshot 2024-06-01 at 5.40.19 PM.png
 
in my game thePediaIcons.txt entry for German Tank
:hammer:
#ICON_PRTO_GeTankRgt
art\units\GePzRgt\pedia\Large.pcx
art\units\GePzRgt\pedia\Small.pcx
#ANIMNAME_PRTO_GeTankRgt
GePzRgt

Your entry Tank is too much

best regard
Wotan49
:old:
 
Last edited:
I figured out after way too much time. When copying and pasting units to organize the pediaicons file awhile back, I had pasted over the animation file for tank, so the when I built a tank the next line was the #icon file for the Panzer. Doh!
 
@Virote_Considon thanks. I figure out how to add sounds from units in the main game, but now I am trying to get sounds for a Grenadier unit. I was going to use the sounds and graphics from Napoleon Infantry in the Napoleonic Europe scenario. Any idea the file path for the stock scenarios/conquests?
I'm not promising ideal matches, but we do have a considerable Sound Effects DB.
 
Does the "Foot Unit" designation have any effect besides determining what type of transport a unit can load onto?
 
Don't think so...
 
Does the "Foot Unit" designation have any effect besides determining what type of transport a unit can load onto?
It differentiates it from Wheeled Units, with the +/- attributes for each of those Abilities - e.g., Terrain that Foot Unis can move into, but not Wheeled.
 
Does the "Foot Unit" designation have any effect besides determining what type of transport a unit can load onto?
Not really, except that an air unit flagged as Foot Unit cannot load onto a transport, even if it has both "Transport only Air Units" and "Transport only Foot Units" flagged

It differentiates it from Wheeled Units, with the +/- attributes for each of those Abilities - e.g., Terrain that Foot Unis can move into, but not Wheeled.
I think you might find yourself mistaken there - the Foot Unit flag doesn't affect terrain mobility, only Wheeled.
 
Top Bottom