Advise needed for another mod

<Nexus>

Traveler of the Multiverse
Joined
Jan 23, 2014
Messages
5,558
Location
In a constant brainstorm...
I hope you don't mind me posting it here but I don't know where else could I ask.
I ask it here because this is probably the most active Civ4 modding section and I hope that you may have some experiences that will help me.

So my problem is that the AI in my mod (an AND2 modmod) does not improve it's tiles. It uses workers to build roads and improvements on top of resources but on those plots. I am clueless about it.

I didn't edit the dll - it's the same as in AND2 where workers behave normally.
I also didn't do any extreme with resources and improvements - only small tweaks.

See more in my thread and in quick-modding-questions-thread about what I tried already.

Any help, ideas or brainstorming is greatly appreciated. :help:
THX!
 
I have been thinking on this. If I remember correctly @Afforess modified the AI for all workers, AI and automated, so they would only build improvements if they were on a bonus or if a plot without a bonus was being worked. In other words they only do stuff when it is needed not before. This is a problem for non bonus plots since the choice for working them is between the plot and a city specialist. This can mean that the plot will never be worked even though if it had an improvement it would return better than a specialist.
 
I don't think you'll be solving that outside of working on the AI in the code but you COULD if you know what you're doing and how to go about it, write an overriding code for workers in python. I'd warn it might process a little slow and I'd think it'd be easier to fix the existing stuff in the dll but maybe that's just me.
 
AND2 without the xml modmod still works though right?
Yes and the 2 mods use the same dll (I cannot edit it).
I have been thinking on this. If I remember correctly @Afforess modified the AI for all workers, AI and automated, so they would only build improvements if they were on a bonus or if a plot without a bonus was being worked. In other words they only do stuff when it is needed not before. This is a problem for non bonus plots since the choice for working them is between the plot and a city specialist. This can mean that the plot will never be worked even though if it had an improvement it would return better than a specialist.
My tests shows that even the worked tiles didn't get improved :(
And again, in AND2 the same AI did improve all/most tiles.

It is something in the xml just I cannot find out what...

Thx anyway!
 
Are the workers set to having the right default unitAI?
Yes. All I changed was adding a tech requirement and a train condition. And the AI DOES train workers just don't use them tu the full. I also moved them to a different location in the xml file. I checked with WinMerge and these are all my changes.
 
I'll have a look at your modmod files, but I won't be digging into the AND2 dll code for you.

Did you reduce yields from terrains or improvements in this modmod?
Edit: Farm has 0 base yield, is this original AND2 values?​
Did you change the xml TypeName of any improvements/terrains?

Edit: This is a big modmod, was hoping it was small when I said I was gonna look at it. I doubt I'll be able to spot any possible causes without downloading AND2 and looking through the file differences in details, I won't be doing that, sorry.
 
Last edited:
Here I am again with an other problem. How did you make the Suburb improvement work?
Quick Modding Questions Thread
Graphics?
I searched for improvement before Suburbs in LSystem xml files and changed it accordingly.
That is I added Suburbs right after improvement, that upgrades to it.
 
Graphics?
I searched for improvement before Suburbs in LSystem xml files and changed it accordingly.
That is I added Suburbs right after improvement, that upgrades to it.
No, that didn't work :(
 
You might have to look into the coding to see if anything changed that would allow what you're trying to do where maybe it wasn't possible before. I didn't have a hand in that so I wouldn't know really.
 
Okay, I found the answer:

I added IMPROVEMENT_SUBURB after every IMPROVEMENT_TOWN with Find+Replace function but I did not notice that there are some !IMPROVEMENT_TOWN parts too. Adding the ! to the remaining parts solved the problem.

Thanks for every answer :)
 
Okay, I found the answer:

I added IMPROVEMENT_SUBURB after every IMPROVEMENT_TOWN with Find+Replace function but I did not notice that there are some !IMPROVEMENT_TOWN parts too. Adding the ! to the remaining parts solved the problem.

Thanks for every answer :)
Yeah, forgot that "!IMPROVEMENT_TOWN" exists too.
 
Top Bottom