• 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

If I'm not mistaken, Python may have a way to program an AI action override routine but I'm not sure if that always must interrupt the normal dll evaluation process before, after or during the normal dll AI determinations. I'd assume it would come in at the beginning and thus would potentially cripple the unit from doing anything BUT what the Python tells it to if it can always find good reason enough to do so.

You are correct in that there is a python function for this AI_update. This is called before the DLL AI code and if it returns true then no other AI code is run. It's a very brute force method and tends to cripple the AI as you mention. There is a lot of AI code in the DLL, not all of it particularly good in OOB, that does multiple calculations that are not available from Python to determine the units best move. If you use an improved AI DLL such as BBAI or even better K-Mod then this should be avoided at all costs!
 
I've gotten a similar error before. It has nothing to do with Civ4ForceControlInfos, that's just the last XML file the game calls. You should check in GlobalDefines.xml, it has some things you will need to change. For example:
Code:
	<Define>
		<DefineName>STANDARD_HANDICAP</DefineName>
		<DefineTextVal>HANDICAP_NOBLE</DefineTextVal>
	</Define>
	<Define>
		<DefineName>STANDARD_HANDICAP_QUICK</DefineName>
		<DefineTextVal>HANDICAP_CHIEFTAIN</DefineTextVal>
	</Define>
will probably need to be changed.

The same error happens if you remove eras. (FYI)

thanks it works now.

does anyone know where I can find a guide to adding city art styles?
 
I'm sure I'm missing something simple, but after I added a resource (which looks fine, btw), some of the miniicons got screwed up. Unit's move now has a :) next to it when the unit is hovered, and hovered luxuries have a :( where a :) should be. Things like the food miniicon are fine. Thanks!
 
Hmm. Vanilla shows up correctly now, but the icons on gamefont_75 (which appear to be ones showing when hovering something on the map) are still off. This only impacts icons in the rows after resources, not before. I get the impression that a pointer is off, but I don't know where to find it.
 
This is what I'm seeing.

badicons1.jpg

I don't know if it matters, but I used the Extra mod as a starting point.
 
1. If I were to enable gold hurry and pop hurry at the same time so both of them could be used, would it cause AI any problems?

2. Is there another way to enable hurry methods other than through civics? I want to know if its possible to enable hurry methods through a tech or even from game start.
 
did you add the resource to the same lines as both resource lines, and did you change it in both the gamefont files gamefont and 75?

I think so, I put the vanilla image in the first open box after the pearl resource, which was the last resource in that line, and I did that in both files. The vanilla was from another mod, so I imported each image from its respective .tga file.
 
also

3. If I change the benefits of each civic I assume the AI will not re evaluate their new values and will treat them as if they are like the default values. Is this true? if so, how can I change AI's understanding of them? What part of the AI code? anyone know?
 
For (2) I suppose you could use the brute force method of adding the hurrys to every civic, including the starting ones, but I'm sure there's an easier way.
 
also

3. If I change the benefits of each civic I assume the AI will not re evaluate their new values and will treat them as if they are like the default values. Is this true? if so, how can I change AI's understanding of them? What part of the AI code? anyone know?

Since it MAY be different in C2C I can't say this for absolute certainty but in CvPlayerAI there should be a tag by tag valuation mechanism. It's rather complex for all the considerations it needs to take into account (like evaluating civics by category - not just one civic against all others) but if you're talking about the normal tags then it might be more adaptive than you'd think as it is. If you're adding tags and such then you will need to include new evaluations of the values those tags bring into that civic ai evaluation process.
 
Since it MAY be different in C2C I can't say this for absolute certainty but in CvPlayerAI there should be a tag by tag valuation mechanism. It's rather complex for all the considerations it needs to take into account (like evaluating civics by category - not just one civic against all others) but if you're talking about the normal tags then it might be more adaptive than you'd think as it is. If you're adding tags and such then you will need to include new evaluations of the values those tags bring into that civic ai evaluation process.

oh that's good to hear! No I'm not adding any new tags. Just working with already present mechanisms, changing what's already there. for example, the place holder for what used to be "police state" might become something that has nothing to do with military benefit, rather something economical. So I'm wondering if the AI is designed to adapt to that or if its totally hard coded. You're saying its not hard coded, so that works.

4. If that's so, then would it be ok to add a 6th option to some civics? Will the AI read and interpret them correctly?
 
@ Topsecret,

The link that you posted, does it mean that I can create more than 5 main catagories and it wil;l still work?

Because what I actually really wanna do is have like 10 different catagories, each with 2 or 3 options. Will this addon allow me to do that?
 
Back
Top Bottom