Login


All times are UTC - 5 hours


It is currently Tue Apr 24, 2018 3:53 pm




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Ancient AI Parameter info. (Whirlwind)
PostPosted: Thu Feb 18, 2016 6:32 am 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4286
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).

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Ancient AI Parameter info. (Whirlwind)
PostPosted: Thu Feb 18, 2016 1:17 pm 
User avatar

Joined: Mon Aug 31, 2009 11:28 am
Posts: 1091
Location: Vancouver, BC
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.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Ancient AI Parameter info. (Whirlwind)
PostPosted: Fri Feb 19, 2016 2:08 am 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4286
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 40 times

_________________
Bron wrote:
There's no cure for being a cunt.
Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Ancient AI Parameter info. (Whirlwind)
PostPosted: Fri Feb 19, 2016 3:58 am 
User avatar

Joined: Mon Aug 31, 2009 11:28 am
Posts: 1091
Location: Vancouver, BC
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.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Ancient AI Parameter info. (Whirlwind)
PostPosted: Fri Feb 19, 2016 4:14 am 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4286
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.

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Ancient AI Parameter info. (Whirlwind)
PostPosted: Fri Feb 19, 2016 4:38 am 
User avatar

Joined: Mon Aug 31, 2009 11:28 am
Posts: 1091
Location: Vancouver, BC
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


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Ancient AI Parameter info. (Whirlwind)
PostPosted: Fri Feb 19, 2016 5:01 am 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4286
Cool, ty that'll save me a lot of time in the long run.

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Ancient AI Parameter info. (Whirlwind)
PostPosted: Fri Feb 19, 2016 5:08 am 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4286
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.

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Ancient AI Parameter info. (Whirlwind)
PostPosted: Fri Feb 19, 2016 1:48 pm 
User avatar

Joined: Mon Aug 31, 2009 11:28 am
Posts: 1091
Location: Vancouver, BC
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.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Ancient AI Parameter info. (Whirlwind)
PostPosted: Sun Feb 21, 2016 1:23 pm 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4286
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.

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Ancient AI Parameter info. (Whirlwind)
PostPosted: Sun Feb 21, 2016 2:29 pm 
User avatar

Joined: Mon Aug 31, 2009 11:28 am
Posts: 1091
Location: Vancouver, BC
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.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Ancient AI Parameter info. (Whirlwind)
PostPosted: Sun Feb 21, 2016 3:00 pm 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4286
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!

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: