You must be logged in to post messages.
Please login or register

News Discussions
Moderated by Suppiluliuma, PhatFish, Fisk, EpiC_Anonymous, Epd999

Hop to:    
Welcome! You are not logged in. Please Login or Register.7 replies
Age of Empires Heaven » Forums » News Discussions » work on the PLY file (to improve AI combat)
Bottom
Topic Subject:work on the PLY file (to improve AI combat)
welk
Clubman
posted 06-02-14 06:44 AM ET (US)         
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 ?

[This message has been edited by PhatFish (edited 06-03-2014 @ 08:32 AM).]

AuthorReplies:
aoe_scout
Clubman
posted 06-02-14 08:59 AM ET (US)     1 / 7       
The truth is only the creators of the game could tell you more about the ply file. The official documentation and the article you saw is all there is. So it's up to you to found out. But you won't be able to make it work only for specific player, because there is no such option in Scenario editor.

I even have reason to believe this file is not used at all in the game (but you may prove me wrong) - you can delete it and the game will not be affected. The values from .ply might have been hardcoded (just like .per file values for Random Map/Death Match), but I don't know for sure. This is what you need to found out first, if the file is used and can actually change something or not.

UPatch HD - the unofficial (HD) patch for Age of Empires: The Rise of Rome - HD resolution, HD quality interface graphics, hundreds of bug fixes, new gameplay options and many other enhancements.
--- Download here (version 1.1 Release 3).
--- For more information visit the site.
welk
Clubman
posted 06-02-14 11:35 AM ET (US)     2 / 7       
Yes, I tried to erase the file too, when I began the work on, and I saw the game worked normaly, without crashing.

But on the other hand, I saw also that when I do changes in the PLY file, the conduct of IA in battle has some differences.

Basing on these observations, I have made some "generic" "plays bloks" for this file in version 3.0 of the mod and they seem have some effects on AI (in my battle mod, think it would not have same in "basic game", because my mod battles is very similar to a "death match")

In addition, due to the fact my mod works only with one opponent (AI), it is easy to know what opponent will be affected by the PLY file : only my AI opponent.

I just wanted to know if someone has also worked on the PLY file, but it seems not.

Noticed also that changes may be made in the rps file (concerning what each unit type unit prefer attacks)

On the general way, except the fact the AI army is a little bit in disorder when it begin the battle, I found that it makes a good opponent : very oft, I have lost the battles.

[This message has been edited by welk (edited 06-02-2014 @ 11:36 AM).]

aoe_scout
Clubman
posted 06-02-14 01:36 PM ET (US)     3 / 7       
Well, from what I've seen, your mod is very different from normal game (esp. the speed). Are you 100% sure there is an actual effect from changing ply and rps? For rps, I've read somewhere that there isn't (doesn't change anything). Testing smaller unit groups in normal game would be the proper way to find out.

UPatch HD - the unofficial (HD) patch for Age of Empires: The Rise of Rome - HD resolution, HD quality interface graphics, hundreds of bug fixes, new gameplay options and many other enhancements.
--- Download here (version 1.1 Release 3).
--- For more information visit the site.
welk
Clubman
posted 06-02-14 04:32 PM ET (US)     4 / 7       

Effectively, the mod is so different that it's a 100% new way for the game (the spirit of play is absolutly not the same). I can not say for the basic game because I only test my work with the mod. I have to say I observed (always with the mod) that the conduct of AI in battle was influed :
1°/ by Placement of AI units on map
2°/ by placement of "AI" village (town center, etc) on the map
3°/ by the content of the PLY file

I think changes have no great influence in basic game because the number of units commanded by AI is very low (50). In the mod, AI can command an army of 250/300 or 400 units on the map, and it's a different mass : perhaps, this difference of scale may produce different effects.

Concerning rps file, I just begin the observations, I have no sure conclusions about (will continue to test). But one thing I am sure is that AoE/RoR makes a great figurines wargames in this way, very funny to play for the wargamer I am (but you are right : very different system, and AoE players may be a little surprised by this unusual and unconventional use of the game)

One thing is curious : players of AoE/RoR seem not very interrested by the "wargame" aspect ; and wargamers seem not very interrested by the "RTS" aspect of the game. But I have to say this association is very interessant to play : scenario designers has more than 200 units types to build their own historical battles, AI is a hard opponent and the "slow time battle" with full scrolling and full capacity order during pause gives to the game (for me) a great attraction and interest.
PhatFish
Mr. Beta
posted 06-03-14 08:33 AM ET (US)     5 / 7       
The link in the OP didn't work - edited it for you, welk.
aoe_scout
Clubman
posted 06-03-14 09:53 AM ET (US)     6 / 7       
@welk: It is indeed original and interesting concept. But I was actually commenting on the rps/ply, you will have much more success in finding out what they do, if you test them in original game. And after that apply what you have learned on your mod.

UPatch HD - the unofficial (HD) patch for Age of Empires: The Rise of Rome - HD resolution, HD quality interface graphics, hundreds of bug fixes, new gameplay options and many other enhancements.
--- Download here (version 1.1 Release 3).
--- For more information visit the site.
welk
Clubman
posted 06-03-14 12:35 PM ET (US)     7 / 7       
@PhatFish: Thanks

@aoe_scout : Logically, you are 100% right. But ont the other hand, I have to consider that the game is more complexe and subtil than my mod. In the mod, there are only 2 armies and without any other thing, for a simple fighting : so, the "conditions of observations" effects of PLY changes are very minimals. If I should try to do tests with the basic game (full game features), I think lot of other things could (perhaps) eventually influence the results.
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires Heaven | HeavenGames