Trying to improve the AI in combats (for my mod "Age of Great Battles"), I am working on the PLY file
I have a technical question, concerning this file, that I can solve myself
I explain it here, perhaps somebody will have any knowledges or informations about that
My work start with this very interessant documentation article made by Rasher, about editing PLY file
Link to the article :
http://aoe.heavengames.com/siegeworkshop/ply/
Text of short extract :
(...)
PHASES:
The phases are a simple, state-driven system. One and only one phase is always active in any given play that is being run. There are 10 allowable phases per play. Due to the triggering system, the phases do not need to be linear other than Phase 0 being the entry point. The phase 255 is the end phase; triggering to that phase will end the play. Use the ‘Phase’ keyword followed by a number between 0 and 9 to start a phase. The appearance of any non-phase keyword signifies the end of the current phase. - Here is where the fun starts. This is the most detailed, and most complicated, part of the file. Basically, the PHASES are simple commands to be followed. They are set off at any time by triggers, which I will explain later. Once a phase is triggered, it is followed by the groups of units.
Phase 0 - Type in the phase number
To assign a command to a group, use the following syntax:
Group # Command Values - Type the group number, then a value from the list below
The available commands are:
Move X Y Z - This tells the group where to move. As of yet, I am unsure what the coordinated on the map are
(…)
End of the extract---
This part of the text is actually is for me a pb :
Rasher wrote :
“The available commands are:
Move X Y Z - This tells the group where to move. As of yet, I am unsure what the coordinated on the map are”
My own supposition (and just hypothetic supposition) is that X,Y and Z are :
-not origin coordinates (starting point)
-not where the group to move (destination point) because it would have no any sense : the gather command is here to turn off the move when it becomes necessary, units do not need any precise destination (just to be gathered in the asked radius = only the goal to be gathered in a certain distance, that is indicated in the “play” by the gather command trigger
In my opinion (just doubting supposition, therefore) : These indications could be “instructions” to the concerned unit : “how you have to occupy space during your move”
If you consider the content of the PLY file (it opens with txt bloc notes), you will see that : when a “play” has more one group unit to intervene, each group has “different move coordinates” :
Sample :
Play "HPPatrol1"
PlayType Recon
MinUnits 1
MaxUnits 4
Power 0
Overflow Balance
Intelligence 50
DeathPercentage 100
TargetChar Any
TargetType Any
NumberGroups 4
Group 0 Cavalry 1 - 1
Group 1 Cavalry 1 - 1
Group 2 Cavalry 1 - 1
Group 3 Cavalry 1 - 1
//Phase 0
Phase 0
Group 0 Move 10 0 0
Group 1 Move 0 10 0
Group 2 Move -10 0 0
Group 3 Move 0 -10 0
Trigger 1 Gather 2
//Phase 1
Phase 1
Group 1 Move 10 0 0
Group 2 Move 0 10 0
Group 3 Move -10 0 0
Group 0 Move 0 -10 0
Trigger 2 Gather 2
//Phase 2
Phase 2
Group 2 Move 10 0 0
Group 3 Move 0 10 0
Group 0 Move -10 0 0
Group 1 Move 0 -10 0
Trigger 3 Gather 2
//Phase 3
Phase 3
Group 3 Move 10 0 0
Group 0 Move 0 10 0
Group 1 Move -10 0 0
Group 2 Move 0 -10 0
Trigger 0 Gather 2
EndPlay
If I take this extracted part of the “play” in the PLY file, I see that each group has symetric orders :
Groupe 0 and group 2 have same “structure order” but in total symetric inversion :
Group 0 Move 10 0 0
Group 2 Move -10 0 0
Groupe 1 and group 3 = the same :
Group 1 Move 0 10 0
Group 3 Move 0 -10 0
My supposition is that : there are 3 columns : 0 0 0
The first may concern the vertical plan (simpe supposition : it may be the horizontal)
The first may concern the horizontal plan (simple supposition : it may be the vertical)
The third may be : ? (don’t know)
So, a 10 0 0 “move instruction” to a unit could mean that : “during your move according to reach the gather instruction (trigger), do not choice at any moment to be out of your actual position + 10 tiles in the vertical plan (you are free for the horizontal plan)”
A -10 0 0 “move instruction” to a unit could mean that : “during you move according to reach the gather instruction (trigger), do not choice at any moment to be out of your actual vertical position -10 tiles in the vertical plan (you are free for the horizontal plan)”
etc.
By this way, the PLY file organizes the “occupation” of space by groups during their move
But just supposition... Has someone any informations about ? I need to understand correctly this aspect to continue the work
If someone has worked about the PLY file and discovered some interessant things, it would be great for me to have informations about his work - Thanks in advance
The conclusion of Rasher about Ply file is that :
There are many useful aspects of the .ply file, but it is made diffucult for use in scenarios and campaigns by the cons described above. If you want some more interesting attacks in random maps, by all means go ahead, and you will probably recieve some good results. Other than that however, it does not have much use. If there was a way to select which AI player would use the play and when, this would be a very valuable tool to the Scenario Designer.
It is exactly the situation of my mod : only one AI player, so the designer (me) may "try to build the AI combat conduct.
The only thread I founded on the forum concerning PLY file is here :
http://aoe.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=1,5919,450,all
Any other ?
I have a technical question, concerning this file, that I can solve myself
I explain it here, perhaps somebody will have any knowledges or informations about that
My work start with this very interessant documentation article made by Rasher, about editing PLY file
Link to the article :
Text of short extract :
PHASES:
The phases are a simple, state-driven system. One and only one phase is always active in any given play that is being run. There are 10 allowable phases per play. Due to the triggering system, the phases do not need to be linear other than Phase 0 being the entry point. The phase 255 is the end phase; triggering to that phase will end the play. Use the ‘Phase’ keyword followed by a number between 0 and 9 to start a phase. The appearance of any non-phase keyword signifies the end of the current phase. - Here is where the fun starts. This is the most detailed, and most complicated, part of the file. Basically, the PHASES are simple commands to be followed. They are set off at any time by triggers, which I will explain later. Once a phase is triggered, it is followed by the groups of units.
Phase 0 - Type in the phase number
To assign a command to a group, use the following syntax:
Group # Command Values - Type the group number, then a value from the list below
Move X Y Z - This tells the group where to move. As of yet, I am unsure what the coordinated on the map are
(…)
End of the extract---
This part of the text is actually is for me a pb :
Rasher wrote :
Move X Y Z - This tells the group where to move. As of yet, I am unsure what the coordinated on the map are”
My own supposition (and just hypothetic supposition) is that X,Y and Z are :
-not origin coordinates (starting point)
-not where the group to move (destination point) because it would have no any sense : the gather command is here to turn off the move when it becomes necessary, units do not need any precise destination (just to be gathered in the asked radius = only the goal to be gathered in a certain distance, that is indicated in the “play” by the gather command trigger
In my opinion (just doubting supposition, therefore) : These indications could be “instructions” to the concerned unit : “how you have to occupy space during your move”
If you consider the content of the PLY file (it opens with txt bloc notes), you will see that : when a “play” has more one group unit to intervene, each group has “different move coordinates” :
Play "HPPatrol1"
PlayType Recon
MinUnits 1
MaxUnits 4
Power 0
Overflow Balance
Intelligence 50
DeathPercentage 100
TargetChar Any
TargetType Any
NumberGroups 4
Group 0 Cavalry 1 - 1
Group 1 Cavalry 1 - 1
Group 2 Cavalry 1 - 1
Group 3 Cavalry 1 - 1
//Phase 0
Phase 0
Group 0 Move 10 0 0
Group 1 Move 0 10 0
Group 2 Move -10 0 0
Group 3 Move 0 -10 0
Trigger 1 Gather 2
//Phase 1
Phase 1
Group 1 Move 10 0 0
Group 2 Move 0 10 0
Group 3 Move -10 0 0
Group 0 Move 0 -10 0
Trigger 2 Gather 2
//Phase 2
Phase 2
Group 2 Move 10 0 0
Group 3 Move 0 10 0
Group 0 Move -10 0 0
Group 1 Move 0 -10 0
Trigger 3 Gather 2
//Phase 3
Phase 3
Group 3 Move 10 0 0
Group 0 Move 0 10 0
Group 1 Move -10 0 0
Group 2 Move 0 -10 0
Trigger 0 Gather 2
EndPlay
If I take this extracted part of the “play” in the PLY file, I see that each group has symetric orders :
Groupe 0 and group 2 have same “structure order” but in total symetric inversion :
Group 2 Move -10 0 0
Groupe 1 and group 3 = the same :
Group 3 Move 0 -10 0
My supposition is that : there are 3 columns : 0 0 0
The first may concern the vertical plan (simpe supposition : it may be the horizontal)
The first may concern the horizontal plan (simple supposition : it may be the vertical)
The third may be : ? (don’t know)
So, a 10 0 0 “move instruction” to a unit could mean that : “during your move according to reach the gather instruction (trigger), do not choice at any moment to be out of your actual position + 10 tiles in the vertical plan (you are free for the horizontal plan)”
A -10 0 0 “move instruction” to a unit could mean that : “during you move according to reach the gather instruction (trigger), do not choice at any moment to be out of your actual vertical position -10 tiles in the vertical plan (you are free for the horizontal plan)”
etc.
By this way, the PLY file organizes the “occupation” of space by groups during their move
But just supposition... Has someone any informations about ? I need to understand correctly this aspect to continue the work
If someone has worked about the PLY file and discovered some interessant things, it would be great for me to have informations about his work - Thanks in advance
The conclusion of Rasher about Ply file is that :
It is exactly the situation of my mod : only one AI player, so the designer (me) may "try to build the AI combat conduct.
The only thread I founded on the forum concerning PLY file is here :
Any other ?
[This message has been edited by PhatFish (edited 06-03-2014 @ 08:32 AM).]