Gates of Arimyth
http://forum.arimyth.com/

Ancient AI Parameter info. (Whirlwind)
http://forum.arimyth.com/viewtopic.php?f=25&t=13933
Page 1 of 1

Author:  PureRage-DoD [ Thu Feb 18, 2016 6:32 am ]
Post subject:  Ancient AI Parameter info. (Whirlwind)

This may be useful information for you Brevan as I believe you have added this AI to a number of enemies and you might want to fine tune them.

Since ancient AI (WW) now works for all units I started working out exactly what each parameter does for the AI.

This AI will begin closing in on the target by default.
Once within Par1 range it will begin rolling Par2 once per AI delay.
If Par2 rolls true, it will aim Par4 distance beyond the target and use Skill1.
If Par2 does not roll true by the time the unit is in melee range of the target, it will roll Par3 once.
If Par3 also fails, it will roll Par2 again and repeat the process


Par1 = Minimum distance from target to start rolling Par2
Par2 = Chance to use Skill1
Par3 = Chance of melee attack (when in melee range and Par2 has not rolled true) (Randomly uses A1 and A2 even if A2 has no damage or animation)
Par4 = Distance beyond the target to aim Skill1

Note: Because Par3 randomly chooses between A1 and A2, if the unit has no A2 animation, it is best to set Par2 to 100, or Par3 to a very low value to avoid blinking animations.

Here are Talics parameters as an example:
Code:
Par1 = 15
Par2 = 33
Par3 = 75
Par4 = 8


So he will close in on the target until within 15 subtiles (5 subtiles per tile)
He then has a 33% chance of using WW (aiming 8 subtiles past the target) each frame until he reaches melee range.
If he reaches melee range, he will then alternate rolling Par2 and Par3 (33% chance to WW, 75% chance to melee if he doesn't WW > repeat).

Author:  Brevan [ Thu Feb 18, 2016 1:17 pm ]
Post subject:  Re: Ancient AI Parameter info. (Whirlwind)

Thanks for letting me know, I've given the AI to:

A1 Berserkers (bugbear)
A2 Sandraiders (Sandraider1 and (4 or 5))
A3 Zealots (Zealot1)
A5 Minotaurs (a couple of them).

It seems pretty likely that some of those have A2 animations, so I will probably give them a better chance of using them, so there is some variety among WW monsters.

Author:  PureRage-DoD [ Fri Feb 19, 2016 2:08 am ]
Post subject:  Re: Ancient AI Parameter info. (Whirlwind)

I have documentation on most of the other AI in game that details what each param column controls if you need it. (like quill rats having a param that controls how many missiles its ranged attack should release etc.)

Edit: Attached below.

Attachments:
Monster AI Info.rar [150.6 KiB]
Downloaded 561 times

Author:  Brevan [ Fri Feb 19, 2016 3:58 am ]
Post subject:  Re: Ancient AI Parameter info. (Whirlwind)

Back in 2012 I remember looking at a couple AI related files, and thinking that it might be neat to change things. I recall one of those files was outdated, and the other was said to be incomplete. I've taken a quick look at the one you sent, and noted that the Ancient WW AI isn't in it, so perhaps it's a copy of the incomplete one I saw a few years ago. Still, as long as it's accurate, then it'd probably be fun to tweak some of the numbers so that colour-swapped version of the same base monster (fallen, carver, devilkin, etc) have slightly different behaviours. It would probably take a good chunk of time. Since I've recently run through the 800+ lines of monstats.txt recently in order to re-evaluate their damage ranges and such, I'm not in a rush to dive back in right now.

I'm a little motivated to make a program that goes through levels.txt, superuniques.txt, and whatever else might rely on monstats.txt, and try to determine which lines are simply unused. I'd like to then delete the unused stuff, but I know that would be impractical since plenty of things are hardcoded and I'd never really be sure if the removal of something caused a crash or not.

As it is, I've got a program that goes through levels.txt and monstats.txt and creates a list of area names and expected char level, along with an indented list of monsters (with level) that are in the area. If a monster's level is more than 5 away from the area's level, then the indented space in front of the monster name gets a "!!" inserted. I used the program to help figure out some damage bugs a while back. If it's of any use to you, let me know.

Author:  PureRage-DoD [ Fri Feb 19, 2016 4:14 am ]
Post subject:  Re: Ancient AI Parameter info. (Whirlwind)

Yeh that will be very handy for the levels.txt.

RE: Ancient AI, I had to work out the params manually. I think they were never documented before because the AI was hardcoded to that 1 unit and the "Ancient" AI has 3 possible modes making it awkward to document before.

Author:  Brevan [ Fri Feb 19, 2016 4:38 am ]
Post subject:  Re: Ancient AI Parameter info. (Whirlwind)

Here's the program that prints and compares the monster level with the area level. It will undoubtedly be flagged as the worst of malware, and admittedly, considering all it does, it's a suspiciously large .exe file that gets generated by that pyinstaller program.

https://dl.dropboxusercontent.com/s/lysw2mt037li1pq/MonLevelsCheck.exe

Author:  PureRage-DoD [ Fri Feb 19, 2016 5:01 am ]
Post subject:  Re: Ancient AI Parameter info. (Whirlwind)

Cool, ty that'll save me a lot of time in the long run.

Author:  PureRage-DoD [ Fri Feb 19, 2016 5:08 am ]
Post subject:  Re: Ancient AI Parameter info. (Whirlwind)

well damn, its 64 bit, it wont run on my machine. No worries, if you can just double check with it when we next pool our files it should be fine.

Author:  Brevan [ Fri Feb 19, 2016 1:48 pm ]
Post subject:  Re: Ancient AI Parameter info. (Whirlwind)

This should be a 32bit version. Next time I'll know. Apparently pyinstaller determines the bit-count of the executable based on the version of Python you've got installed. Good to know. In general I'd give pyinstaller's documentation a C-.

Useage instructions: drop into a folder containing both monstats.txt and Levels.txt, run. Produces MonLevelsCheck.txt with the list described earlier.

NEW FEATURES!!1
- Added a pause instruction so you can actually read the bit it has to say at the end.

Author:  PureRage-DoD [ Sun Feb 21, 2016 1:23 pm ]
Post subject:  Re: Ancient AI Parameter info. (Whirlwind)

Quote:
I'm a little motivated to make a program that goes through levels.txt, superuniques.txt, and whatever else might rely on monstats.txt, and try to determine which lines are simply unused. I'd like to then delete the unused stuff, but I know that would be impractical since plenty of things are hardcoded and I'd never really be sure if the removal of something caused a crash or not.


That would still be a handy program to have! If it identifies an unused line, then we can simply rename them "unused X", then use those lines as we add things in the future.

Author:  Brevan [ Sun Feb 21, 2016 2:29 pm ]
Post subject:  Re: Ancient AI Parameter info. (Whirlwind)

I can't guarantee getting the program to you quickly, but to your knowledge, what are all the files where a monster might appear. I only know that levels.txt and superuniques.txt is not enough.

Author:  PureRage-DoD [ Sun Feb 21, 2016 3:00 pm ]
Post subject:  Re: Ancient AI Parameter info. (Whirlwind)

monpreset.txt (for placing specific non super uniques onto a map at an exact location like legion, portal spires, lightning towers, catapults etc.)

missiles.txt (there are 2 types of monster spawn missile. 1 spawns a random mob from levels.txt so we don't need to worry about that one. The other spawns a mob by ID. The ID one is the one we would want to track.)
Those missiles use pSrvHitFunc = 6 and the ID of the mob to spawn is set in sHitPar1

Skills.txt: Summon column.

Edit: No rush for it, would just be handy to have for future for sure!

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/