Page 1 of 1
AI Script for AI
Posted: Mon Apr 21, 2025 9:42 pm
by rmelvin
There have been several times I had to write two scripts for an "or" condition or like partisan script to cover either Allies or Axis occupier of the same location in different games.
If this is not the right location, please inform me there to post this thought.
Add to the script "AI = 5" being trigger under AI control only, and maybe "AI = 6" for human only, both sides.
Old frat from
Tucson, AZ

Re: AI Script for AI
Posted: Tue Apr 22, 2025 10:11 am
by BillRunacre
Do you mean Guard scripts so Partisan locations are guarded?
It might be difficult to have a universal setting as they are country specific.
Re: AI Script for AI
Posted: Tue Apr 22, 2025 11:37 pm
by rmelvin
Here where I was going is having an AI setting to make an Event Script to trigger for either Allies or Axis if that player is AI.
Now like Partisans need to write two scripts to handle both Allies and Axis. Mobilization like # 2 or # 3 I need to write two scripts to handle the same situation. I do use Guarded script to garrison Partisan locations.
Could #CONDITION_POSITION be added to Supply Event. This then can be used to force a garrison.
Side notes about Partisans, I find having a unit showing up deep inside opponents is really more of a hassle and AI's response time at times is very slow. That was the reason of the thought of AI triggering only a human turn, then can make Partisans for human as a Hex event without a unit. A whole lot easier for AI to handle.
Re: AI Script for AI
Posted: Wed Apr 23, 2025 2:06 pm
by Hubert Cater
Thanks for this, it is an interesting idea for sure, I'll add it to my list, thanks
Re: AI Script for AI
Posted: Sat Apr 26, 2025 12:10 pm
by El_Condoro
In partisan.txt, you can set #AI= 3 or 4, so that the partisans will only appear for the human player and not the AI, which simplifies things. They still appear for MP games.
So, if I want partisans appear in the SU for an Axis player, I would set them as #AI= 4. If it were an Axis AI, the partisans would not appear.
3 = Event fires whenever all fields are satisfied, for AI and Multiplayer games only, and only on the Axis AI or on the Allied Multiplayer turns
4 = Event fires whenever all fields are satisfied, for AI and Multiplayer games only, and only on the Allied AI or on the Axis Multiplayer turns
Re: AI Script for AI
Posted: Sat Jul 26, 2025 8:37 pm
by Lothos
rmelvin wrote: Tue Apr 22, 2025 11:37 pm
Here where I was going is having an AI setting to make an Event Script to trigger for either Allies or Axis if that player is AI.
Now like Partisans need to write two scripts to handle both Allies and Axis. Mobilization like # 2 or # 3 I need to write two scripts to handle the same situation. I do use Guarded script to garrison Partisan locations.
Could #CONDITION_POSITION be added to Supply Event. This then can be used to force a garrison.
Side notes about Partisans, I find having a unit showing up deep inside opponents is really more of a hassle and AI's response time at times is very slow. That was the reason of the thought of AI triggering only a human turn, then can make Partisans for human as a Hex event without a unit. A whole lot easier for AI to handle.
Look at TRP, I have ways of getting around the issue by using a flag system. I set a hex to USA controlled etc... which tells the system what flags are set
Code: Select all
{
#NAME= Flag Indicator - Axis AI
#POPUP=
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 1
#AI= 1
#LEVEL= 0
#GV= 1[1,100]
#LINK= 0[0]
#COUNTRY_ID= 0
#RECIPIENT_ID= 115
#REMOVE= 0
#TRIGGER= 100
#DATE= 1939/09/01
#VARIABLE_CONDITION= 5 [0] [0] [0]
; - 3,111 to prevent centering of the screen on Flag Hex
#MAP_POSITION= 3,111
#MAP_POSITION= 5,252
}
{
#NAME= Flag Indicator - Allied AI
#POPUP=
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 1
#AI= 2
#LEVEL= 0
#GV= 1[1,100]
#LINK= 0[0]
#COUNTRY_ID= 0
#RECIPIENT_ID= 115
#REMOVE= 0
#TRIGGER= 100
#DATE= 1939/09/01
#VARIABLE_CONDITION= 5 [0] [0] [0]
; - 3,111 to prevent centering of the screen on Flag Hex
#MAP_POSITION= 3,111
#MAP_POSITION= 5,253
}
Re: AI Script for AI
Posted: Mon Jul 28, 2025 12:51 am
by rmelvin
Thank you for your comment. I will get back with you this fall.
Given what happened this spring I think maybe a little bit more time to do thing.
I do have three questions so see you in the fall.
Thanks, I appreciate this.