• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Quick Modding Questions Thread

Technically, you can use python to check how many copies of Future Tech you have, so you do own the tech. Thus, both can be done via python.

Awesome, thanks for the info. For 2) I guess I'd have check whenever Future Tech (1) is researched by a player that iterates through each other player if/until it finds one who has researched Future Tech (1), then call the Permanent Alliance set-up sub-trigger-routine...thing.
 
Yep, unless you want to tweak the SDK to keep a count, or at least do the iterating for you, which would be quicker than doing it in Python.
 
Hi, I am working on my own mod but I can't figure this one out. In Civ4 BTS whenever you enter the city screen the music stops and you hear the city ambient sounds. As soon as you leave the screen the music resumes.
I would like the music to just keep playing and get rid of the city ambient sounds. Any advice?
 
It looks like it is handled in the dll (not Python). If you don't mod the dll, then what is left for you is to play with the settings defined in the XML/Audio folder (AudioSoundscapeScripts.xml, Audio2DScripts.xml).
 
So, two (and a half) unrelated questions:

1: History: I (successfully) added Chariot Archers into the game, and wanted to alter the price for War Chariots event to be either combat 1 for them instead or add chariot archers to your army. The promotion reward was trivially simple enough. However, despite my efforts, I failed to locate the part for quest to reward Chariots in the files.
Question 1: Where does the game check what units to give, and (if different file/location) where is the actual code for giving them is handled?

2: History: It just bugs me in general that even my most houdini Bomber ever won't ever gain XP because of abysmal damage dealing, and increasing minimum damage or bomber interception kinda tweaks the wrong stuff.
Question 2: Can I, without recompiling stuff, alter Air Combat so that instead/in addition of kills, the game rewards an Air Unit (and NOT an ground unit intercepting) a single point of xp for SURVIVING triggered air combat when intercepting/getting intercepted? (If complicated but doable, an hypothetical code example would be appreciated).

Recompiling stuff is kinda a last ditch effort for me, but even those kind of answers would be really helpful in a no-can-do sort of way.

PS. "Surviving aircombat" could simply be: "At the beginning of Air combat, give air units in the combat +1 exp." No one would know the difference, as dead men tell no tales about how much exp they had when they were shot down.
 
the first one is eventinfo.xml (not eventtrigger)

unitclass tag is where you specify what unit(s) to give and iNumFreeUnits is where you say how many.

2) I am unsure if python has a function for surviving combat (I know it can do onvictory)..
if it doesn't it would need a .dll math.
Alternatively, some mods provide experience for a ranged combat attack...I can't remember the name of the one I got it from...argh...realism invictus (just checked my mod credits) but that would require a recompile of the .dll
 
Thank you for quick reply. The exp. thingy requiring recompiling is a bit disappointing, but what can do.
It seems I missremembered the quest rewards: I thought there were a third one: gain a number of chariots. But that would have been kinda silly for a quest requiring one to build them, wouldn't it?
 
Oh sorry, you are talking about a specific quest?

I have only done my own quests from scratch so far, I don't know anything about specific quests.

You can however add an extra event that gives the option of a number of free chariot archers.

if you look at the event trigger for 'Chariot Quest' you can just add an extra event into the options there, then make it do whatever by adding it to the event file.

if you are thinking balance it could be that you pay some gold to 'speed up production of this wonderful new technolgy' and get X archer chariots or any other negative effect, temporary unhappiness by whipping your work force into a frenzy, etc.
 
What does the numbers mean in CvUnitAI.cpp

ex : if (AI_anyAttack(1, 45, 3))

In BBAI that is:

Code:
bool AI_anyAttack(int iRange, int iOddsThreshold, int iMinStack = 0, bool bAllowCities = true, bool bFollow = false);

In BTS that is:

Code:
bool AI_anyAttack(int iRange, int iOddsThreshold, int iMinStack = 0, bool bFollow = false);
 
Ok, this has probably moved out of a quick answer then.

My advice is open a new thread, and post a link here to it.

That way people can help you work through your steps and see where it goes wrong, without bits getting lost in the general conversation here.

Sure. Thank you.
 
Back
Top Bottom