PDA

View Full Version : Ensuring AI Pahlava gets its due



LordCurlyton
01-25-2009, 01:02
Since the script places Reformed Pastoralism when Pahlava conquers new territory in areas where it could normally build govparthian, which effectively cripples the AI by not allowing any factional building. So I modified the script to place govparthian instead in appropriate areas (basically any where the pahlava faction barracks can get a decent array of troops) but some more snooping reveals that apparently the barracks requires reformedpastoralism as well.

muster_field_C requires factions { parthia, } and building_present government and building_present_min_level minimumbuilding reformedpastoralism and building_present_min_level government govparthian
A) Why need the reformedpatoralism since its already a prereq for govparthian?
B) Does this mean I would need to spawn both govparthian and reformedpastoralism whenever AI Pahlava conquers a territory where such would be placed?
C) Alternatively, would it just be easier to make a script that checks to see if the player is playing Pahlava at the start of the campaign and if not then place reformedpastoralism in all the potential conquests, thus reducing building spam and the possible CTDs that could result?

LordCurlyton
01-27-2009, 04:04
Well lacking a reply I decided to insert a check into the gov placement script.
Example:

if I_SettlementOwner Palmyra = parthia
and not SettlementBuildingExists = reformedpatoralism

console_command create_building Palmyra reformedpastoralism
end_if
This should accomplish all I want: it will check ownership of the appropriate settlement, spawn it if necessary, and should prevent building spam. Please feel free to correct me if I am wrong since I'm still new enough to modding files that I appreciate feedback to ensure I'm not FUBAR-ing things.
I just want to ensure that the AI Pahlava is unable to truly reach its potential as its quite depressing to see their armies made primarily of phalanxes by the end of the game.

iamphet
01-27-2009, 09:34
I'm not sure it makes sense to build reformed pastoralism in Palmyra since Pahlava is not able to recruit any HAs here. Settlements with pahlavahome resource should be ok for this though.

LordCurlyton
01-27-2009, 11:52
Well it was being used as an example, and script spawning should be independent of resources anyways, no? Plus I noticed a spelling error in my example...curse me and my tired eyes (and hooray find and replace!).

Atraphoenix
01-27-2009, 15:34
As I mostly play with Pahlava myself, so I have no Problem :beam:

V.T. Marvin
01-27-2009, 23:00
Thanks for drawing my attention to this, LordCurlyton, in mycurrent campaign I expect Pahlava to become my principal enemy and I want them to give me a worthy fight. The solution I have used to redress this potential problem is somewhat in-elegant, but easier than messing with the script: I have simply deleted all other conditons, so instead

"muster_field_C requires factions { parthia, } and building_present government and building_present_min_level minimumbuilding reformedpastoralism and building_present_min_level government govparthian"
it now simply states

"muster_field_C requires factions { parthia, }"
The Pahlavans will now be able to build those barracks even in the un-reformed provinces, but that does not bother me too much... :2cents:

LordCurlyton
01-28-2009, 02:49
Yeah I thought of that too but I didn't think it would be SGC so I tried a tack I knew would be. As it stands my "test" campaign I ran to see if it worked yielded no results as the Pahlava got their butts handed to them!:laugh4:
Though I may just delete the "needs reformedpastoralism" bit since I know the placement of the govparthian works fine (I encountered this in two separate teps so I have one known working bit at least). This way you just need the Parthian Reformed Gov to make the Faction MIC, which means I can define the AI's recruitment area and it won't affect the human (as yours will, assuming you don't want to have to go back and edit it again in case you want to play Pahlava).
I'd still like to see if that little trigger works properly, though. Maybe my next "test" campaign will be better on them.
Also, you could change the gov level to govfeeder (IIRC that is what Military Occupation is called), that way all those pre-placed govs will enable the AI to build in the team's pre-specified area (namely, all areas with the pahlavahome resource). And I'm presuming you made your change for all five levels of the MIC, right? Otherwise they will be stuck at the basic level.

V.T. Marvin
01-28-2009, 08:00
And I'm presuming you made your change for all five levels of the MIC, right?
Sure I did!:yes:

Also, you could change the gov level to govfeeder (IIRC that is what Military Occupation is called), that way all those pre-placed govs will enable the AI to build in the team's pre-specified area (namely, all areas with the pahlavahome resource).
Well, I did not thought abpout the former (the govfeeder thingy), but I have used the latter (pahlavahome resource) for the two highest level of Pahlavan barracks. It is too soon to say whether it is working as intended, but at least there seem no noticable problems so far.