Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Using Dark AI with Model Pack 17

Author
Message
Najoko
15
Years of Service
User Offline
Joined: 15th Mar 2009
Location: Australia, Perth
Posted: 3rd Feb 2011 15:36
I have been trying to do a level where the egyption undead soldiers/gardians from model pack 17 wake up and attack the humans who are intruding on thier area. Im using the v1.18 beta 7, the dark ai scripts for the human characters are all fine but i want the humans to attack the zombies and the zombies to attack them back.

With the mp17 melee charcters, they spawn fine using dark ai enemy spawn but they wont fight the human characters because in the mp17 scripts they only attack the player. If i use the dark ai main weapon script then the animations go funny and it dont work.

Is it possible to have the egyption melee characters properly utilize the dark ai system or do i have to scrap allies and just have the zombies.

Sorry if i havent explained it well and thanks for any help

Najoko Entertainment
Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 3rd Feb 2011 15:46
You'll have to re-script them to use the aiusemelee family of fpi actions in lieu of addplrhealth=-x, and swap plrdist checks with aitargetdist checks, etc, etc. It will take some doing but there's no reason it can't be done. Simply trying to plug in the stock DAI scripts won't get you very far with characters that have special animations.
Najoko
15
Years of Service
User Offline
Joined: 15th Mar 2009
Location: Australia, Perth
Posted: 3rd Feb 2011 16:09
thanks errant, one question though. Since im fairly terrible at scripting and havent done a huge amount, would you recommend waiting to attempt this, until i get far better at scripting or is it possible for a scripting noob like me to do this with tutorials and things?

Najoko Entertainment
Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 3rd Feb 2011 16:41 Edited at: 3rd Feb 2011 16:45
I would suggest reading Plystire's tutorials in the first community guide if you haven't already. You will need some solid experience because youll be needing to do a lot of animation scripting which is a little more difficult and different in DAI which makes copy/paste/pray technique less likely to succeed.

If I owned DE pack I'd give it a try myself because bond1's monsters are awesome for allies to fight.

Heres a mob zombie script I converted a while back. If it looks to confusing you should work on your fpi skills a bit more before tackling the DE characters...



(please note that this is a pretty old script and not ideal for v1.18 but it works)
Najoko
15
Years of Service
User Offline
Joined: 15th Mar 2009
Location: Australia, Perth
Posted: 4th Feb 2011 09:09
Yeah that is a bit confusing for me, looks like im going to be doing some serious script work soon to get better. thanks for the help though. actually another question, if i worked on it heaps and made a good script that is worthy of giving to people, would i have to contact bond1 b4 i could give out the script?

Najoko Entertainment
Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 4th Feb 2011 09:34
It would probably be courteous to contact him first. I contacted him when I originally wanted to share DAI mob zombie scripts and he had no problems at all with it. In essence you'll be writing the script from scratch anyhow and it might boost his DE pack sales a bit if they're truly good.
Najoko
15
Years of Service
User Offline
Joined: 15th Mar 2009
Location: Australia, Perth
Posted: 4th Feb 2011 09:57
Fair enough, though its probably beside the point as it will take me several million years to make anything half decent anyway, but thanks again

Najoko Entertainment
Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 4th Feb 2011 10:07
Believe it and achieve it

Bond had said he would be adapting MP22 on up of his after 1.18 so it should be a decent template for MP17. The most basic DAI bits required for ally vs. enemy battle is really only a couple lines of script. 90% of the script I showed you was for driving all the the melee animations. So if you look closely you'll see its basically the same things copied/pasted over and over again but with different animations being referenced. The complexity will be determined ultimately by how many custom animations the mummy has and how many of those you intend to use.

A good starting point would be to simply duplicate the DAI melee script you said has messed up attack animations and to assign a valid anim numbers that correspond to the mummy. If you can find the animation number of the mummy's basic attack I can help you get started.
Najoko
15
Years of Service
User Offline
Joined: 15th Mar 2009
Location: Australia, Perth
Posted: 4th Feb 2011 10:28 Edited at: 4th Feb 2011 10:34
ok, well the basic melee attack for the mummy is anim 93 (im like 99.99% sure on that), so slot that into where the dark ai attack animations go?

*edit* i cant even find where to put it, so many things...

Najoko Entertainment
Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 4th Feb 2011 11:33 Edited at: 4th Feb 2011 13:42
assuming melee is indeed 93, try tis script...




The melee part is the last block near the bottom starting at state 191. This script is a bit old (from 1.17 beta) but it should still work as a foundation for melee only character. It's modified from DAI melee10
Najoko
15
Years of Service
User Offline
Joined: 15th Mar 2009
Location: Australia, Perth
Posted: 4th Feb 2011 12:17
Does that script attatch to another cause when used as the main script for the mummy it stays in its default position until the player comes close, then it changes animation to a frozen half walking half ready for melee pose.

Ive attachted the anim numbers for all the mummies special animations, the numbers b4 those ones are as far as i can tell, the stock ones (cause the mp17 characters can use weapons like stock characters).

I also tried changing the movement anim numbers (those that i could see) to the correct ones, but it didnt have any effect

Najoko Entertainment

Attachments

Login to view attachments
Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 4th Feb 2011 13:40 Edited at: 4th Feb 2011 13:43
If you turn on entity info in preferences it will show the state number the script is in so you can tell where the script is broken. It sounds like it's breaking in state 192.

You should be using this with the stock dark ai appear team 2 script.

It has a range check of 500 units before it should come alive. The movement settings are the old 117beta type though so you can replace the running,walking,crouching blocks with:



That will simplify things a bit. I've updated the previous script to reflect the change so you can see.
Najoko
15
Years of Service
User Offline
Joined: 15th Mar 2009
Location: Australia, Perth
Posted: 4th Feb 2011 14:48
We have some success! The zombie moved to attack me when i got close, there was the odd annoying thing where the mummy changed back into the crossed arm stance for less than a second but other wise it came at me and attacked fine, though i have to change the range of the melee, it hurting me from to far away.

Najoko Entertainment
Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 4th Feb 2011 15:15
Ah good!

OK... now you can see in the script the distance checks are set for 90. You can probably do 60-70 for those but it depends a little bit on your allies because if the range is too short they will sort of get hung up at the bounds of the "personal space" and just spazz about.

What is animate=1/anim1 for this character? is it with arms crossed or like the stock idle animation?
Najoko
15
Years of Service
User Offline
Joined: 15th Mar 2009
Location: Australia, Perth
Posted: 4th Feb 2011 15:31 Edited at: 4th Feb 2011 15:43
the anim 1 is the arms crossed. their are 2 versions of all the characters but the other version is set to use guns and function like a stock character (i think cause i never use the egypt characters with guns). Ive attachted a screen of the mummy when i told it to loop the animate=1 animation.

*edit* the only one who seems to use the crossed arms is the mummy one, which is the primary character is use, the others seem to use normal stock idle but the mummy is the character that i intend to use so it dont matter

Najoko Entertainment

Attachments

Login to view attachments
Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 4th Feb 2011 16:38
Hmm. That's sort of problematic because it needs something to reference as an idle animation.

You could try using animate=96 or another anim wherever animate=1 is used to see which is less annoying. You could also put the walk anim number there but it would look really dumb when idle.

You could also sort of hack the .fpe by finding a frame in the animation timeline like frames 0-1 (beginning of anim11 I think) where it might be at a sort of default idle pose and then tacking on an extra animX setting in the FPE which you could call via script. That should be a last resort though aside from trying to change the anim in fragmotion or something.
Najoko
15
Years of Service
User Offline
Joined: 15th Mar 2009
Location: Australia, Perth
Posted: 4th Feb 2011 17:04
The animate=96 and animate=1 are both roughly the same. the idle pause between attacks only occurs roughly between 5 and 10 attacks, so unless the player is really bad ingame its unlikely it will be that noticeable, but still i wish i had more knowledge to help make it go away.

Btw on a different note, your 341 model pack is really freaking awesome

Najoko Entertainment
Najoko
15
Years of Service
User Offline
Joined: 15th Mar 2009
Location: Australia, Perth
Posted: 5th Feb 2011 07:07 Edited at: 5th Feb 2011 10:20
Ive been doing some more testing of the script with all the other characters in mp17. So far they are all attacking me and my allies pretty well. the changing back to the idle pose seems to happen far less and be less noticable with all other charcters, just my luck the mummy is most noticable.

I have found one possible bug though, ive only tested it once cause ive been busy but it appears that if i drop through a hole in the floor to the allies and enemies below the mummies dont seem ti react very well, they mainly stay in the idle pose.

*edit* disregard the bug, was just something to do with the room, works fine now

Najoko Entertainment

Login to post a reply

Server time is: 2024-11-24 12:27:59
Your offset time is: 2024-11-24 12:27:59