[Religion and Revolution]: Mod Development

Status
Not open for further replies.
Oh, and for the matter, when an AI colonial militia or a town guard is on UNITAI_DEFENSIVE. It doesn't hold a fort, it just leaves it and go get a walk, even if all cities are already well-guarded.

Then I would severely encourage their defence bonus to be reduced at only 50% for normal forts and 70% for great forts? As I can't see the AI attacking a single fortified colonial militia with the current defensive bonus.

You might be interested to find that the original "Super forts" you had suggested had a defense bonus of 25%.
Also, I'm sure the AI code is configured to have atleast one defender per fort...Atleast from what i remember while merging.
 
Also, I'm sure the AI code is configured to have atleast one defender per fort...Atleast from what i remember while merging.

Did you adjust any UnitAI ?
(Because from what I saw in your code I can't remember changes to UnitAIs.
Could be wrong of course.)

Without such changes to UnitAIs I don't believe AI would ever guard a Fort.
 
Maybe someone could take a look at this method? It's purpose it to have 1 min defender per fort. (excluding floating defenders, i.e extra which are calculated elsewhere) I can't find anything wrong with it though.

Code:
// Super Forts begin *AI_defense* - this is designed to ensure each fort has one defender (or improvements that require a fortified unit to upgrade)
bool CvUnitAI::AI_guardFortMinDefender(bool bSearch)
 
I would start looking from here:
(see method marked in red)
Code:
case UNITAI_DEFENSIVE:
				if (kOwner.isNative())
				{
					AI_defensiveBraveMove();
				}
				else if (kOwner.AI_isKing())
				{
					AI_imperialSoldierMove();
				}
				else
				{
					[COLOR="Red"]AI_defensiveMove();[/COLOR]
				}
				break;

Within AI_defensiveMove you do call your method AI_guardFortMinDefender.
So that seems to be ok. :thumbsup:

But before that method call, it is checked first, if the Unit should guard a City.
(Which is ok, too.)

However, it might be possible that AI will move so many Defenders to Cities, that there won't be any defenders left for Forts. :dunno:

As I said, start checking from AI_defensiveMove.

Messing with AI is a lot of "Try and Error" until you get the right balancing.
(Implementation -> Testing -> Correction -> Re-Testing -> Smaller Correction -> Retesting -> ...)
 
Alright, I know that this isn't my field, but following the computer defensive logic, couldn't we do something like:
- first check if all cities have 1 guard.
- then check if all forts have 1 guard.
- then check the previously implemented logic.

I'm only trying to be useful.
 
I wonder if it would be ok to release 2.3 saying that trade route groups will not be saved in network games, nor will they be remembered if the client reconnects. I'm not sure it will be worth the effort to fix this issue.

Onwards to fort code reading. The code I have seen for it so far looks fine.
EDIT: I'm only looking for network desync issues. AI issues will have to wait (or be fixed by other people).
 
Onwards to fort code reading. The code I have seen for it so far looks fine.

The general UnitAI has been implemented. :thumbsup:
(Methods are exist and are called that should have UnitAIs use Forts.)

But UnitAIs in Civ4Col are a bit different from Civ4.
Also UnitAIs in RaR (and TAC) have been tweaked a bit.

So it might be small details in those UnitAIs, that could prevent AI from using (e.g. guarding) Forts properly.
(Actually from my experience that is very likely.)

We will simply need to test.
(And most likely small adjustments will be necessary.)

If we really notice that AI simply never guards Forts, then we have 2 choices:

A) We simply accept that issue. <-- But then AI should also never build Forts.
B) We try to correct UnitAI. (Without breaking other parts of course.)

But let's first test AI behaviour with Forts a bit more. :thumbsup:
(Tomorrow I will do some testing with long Autoplays as well.)

Edit:
From my experience Implementing / Tweaking UnitAIs (to properly use new features) is a lot of "Try and Error" until you hit a good behaviour.
(That is completely normal though and nothing to worry about.)
 
The general UnitAI has been implemented. :thumbsup:
(Methods are exist and are called that should have UnitAIs use Forts.)

But UnitAIs in Civ4Col are a bit different from Civ4.
Also UnitAIs in RaR (and TAC) have been tweaked a bit.
One more thing I'm not sure is why there's no usages for AI_guardFort()
 
So after adding a check for AI_guardFort() I saw that the AI is now guarding the fort after guarding his cities as well. It looks good! I'm still not sure if it's the AI_guardFortMinDefenders() that's doing it or the AI_guardFort(), but they both look fine to me. :dunno: So I followed the pattern we have for cities, and it seems to work now. Have checked into SVN. Woohoo 1000 checkins.
 
I just need a quick advice (if you don't know, don't bother):

Is there a way to load a specific XML file directly from a WBsave file?
I'm working on a scenario about the New World by 1650AD and I would like to change the GameSpeedInfo.xml to make it fit, but without changing options for a regular game.
 
Is there a way to load a specific XML file directly from a WBsave file?
I'm working on a scenario about the New World by 1650AD and I would like to change the GameSpeedInfo.xml to make it fit, but without changing options for a regular game.

No, a WBsave is no logic. It is only data.
You would need to implement some logic reading such data from your WBSave.
 
No, a WBsave is no logic. It is only data.
You would need to implement some logic reading such data from your WBSave.
Alright then. In web development we can add <?php ?> tags to an HTML file which is only data, in order to call for PHP functions on server side. Now I'm not fully surprised it's not the case here but was worth asking.

So overall, all the XML we could add to the XML folder will be read by the whole mod. So if I add a "GAMESPEED_1650START" speed, it will necessarily be available to any game. Or is there another way to make it "hidden" and only active through the scenario?

I'm curious because I was also thinking about adding new leaderheads too...
 
Or is there another way to make it "hidden" and only active through the scenario?

No, there is no such possibility.
You would more or less need to create a new modmod.
 
Ok guys.

My vactaion is over. :(
(I will go to bed early because I need to get up at 5:00 AM tomorrow.)

I did a few tests (looking for small details) and a few small improvments today, but nothing spectacular.
(Also checked the forums but there did not seem anything important we have still forgotten.)

Next weekend I will try testing by playing a bit again.
(The weekend after, we will try to publish, if there are no major issues left.)

Please don't go crazy while I am gone. ;)
(Let us really focus on getting the current version tested and published.)

Until the weekend I will still read in the forum.
But I won't write much and I won't be able to do any modding.

------

Have a nice week. :wavey:
 
Hi everybody,

from what I heard so far, upcoming Release 2.3 is fine to be published.
(We plan to publish next weekend.)

Test reports from team and partners were good.
(No CTDs or other problems we would need to take care of now were reported. :) )

I also ran a few Autoplay sessions and tried to explicitly test all small changes / improvments / fixes ingame.
(All tests positive. :) )

So everything else will depend on our partners (infracta and HermanHeydt) to upload Release 2.3 to their servers next weekend so community can access it.
(We currently don't know for sure if they will have time to do so next weekend. :dunno:)
 
Uploaded some graphic improvements to SVN.
Thanks Schmiddie.

Talking about that, the RAR download page looks a bit... technical. Over time, it seems it slowly turned into a developpers log.

Maybe we could work on a more "promotional" text focusing on the main additional features of the mod and screenshots showing all the great added graphics?

Would you and Ray mind if I would post a first proposal in this thread? You could take it or leave it of course. :)
 
Status
Not open for further replies.
Back
Top Bottom