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 / The UNOFFICIAL Dark AI Knowledge Thread

Author
Message
Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 20th Jul 2010 06:03 Edited at: 7th Aug 2010 13:54
The UNOFFICIAL v117 Dark AI Knowledge Thread
Greetings FPSC Scripters,

TGC is not currently offering any support for the 117 betas but I'm not TGC and am fortunate enough to have a pretty strong understanding of the 117 Dark AI (hereafter, DAI) implementation and the related FPI.

I figured it would be better to get a script board DAI-centric thread going rather than to further muddle up the migration thread. Plus this helps to start a working knowledge-base of DAI in an easy to find location. In time I suppose some sort of FAQ will be added as things progress.

While I do not have the ability to interpret the source code, I can explain how most all of the new FPI works; in practical terms. I hope this thread will be of use to scripters chomping at the bit to get their hands dirty with the new system. So, please feel free to ask any questions about it and if its something I know about, I will share that knowledge!

However, do realize that this is NOT a feature creep or complaint thread. Approach this as you would any existing script related problem by means of devising ways to utilize what's been given to us to achieve desired effects.

For starters, here's an awesome table knxrb put together with the DAI FPI: http://www.rkwebcreations.com/DarkAI

Or if you are a masochist, the poorly organized version:



It is very important to understand that there is no "easy button" when it comes to DAI and there is nothing magical about it but it represents a tremendous addition to the AI scripters toolbox.

I've included a .zip archive with three .FPMs and several .FPI scripts I wrote while making those .FPMs. Hopefully this will give some greater insight to how the new FPI can be used. By all means, these are simple scripts and there is MUCH more possible when scripting for speciffic scenarios and using media with more/better animations

*It's important to note that the included demo maps were intended for observational use only. That said, all teams/factions are scripted to ignore the player so that you may move freely and observe the action as a non-participant. Additionally there are some graphical and AI glitches wich are outside the realm of scripting (such as the infected Nazis turning black or injured pit fighters rotating on the ground). It is also important to note that in BETA5, cross-layer shooting with guns is broken. Hopefully this will be fixed soon enough.

Anyhow, I know you have questions so now is your chance and If you've made something cool with 117 DAI you can share that here too.

Best,
E

Attachments

Login to view attachments
Nbt
10
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 20th Jul 2010 07:08
I like the AI in the process of doing things conditions (ducking, strafing etc) and AIACTION handy for checking, so your AI buddy don't come running when taking cover in a fire fight and die before it can aid you. As well as making some pretty good enemy AI attack scripts.

This is very handy E41, cheers

Best,
N

Your signature has been erased by a mod. The sig needs to be 600 width maximum (x 120 height) for all of it.
PW Productions
10
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 20th Jul 2010 07:28
DAI will certainly be interesting to watch as it develops. I'm not too big of a fan of creating shooter games with FPSC (until your TF41 comes out, of course), however this will certainly alter my previous thoughts


Best,
P

My website: http://pwp-games.com/

For KeithC! Spread it around...
knxrb
FPSC Tool Maker
11
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 20th Jul 2010 07:42 Edited at: 20th Jul 2010 14:15
Nice one Errant

I've made a table version of your list that you can use if you want to use it to display the commands more clearly.
It can be sorted by any column in ascending or descending order by using the arrows at the top of the table.

http://DarkAI.rkwebcreations.com/

knxrb
Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 20th Jul 2010 07:53 Edited at: 20th Jul 2010 08:00
Yeah, Nbt. aiaction=x is a nice condition to help avoid interrupting the AI when it's busy!

I figure I can try to answer some questions ctm asked in the migration thread...

Quote: "This one made me curious:
"..or it may crouch walk there (if the AI is badly injured). ""


This is part of the internal self-preservation routine. When the AI is 1/2 health or less the AI will duck more often and generally try to stay out of trouble by not attacking at every opportunity and generally being chicken. I'm hoping the threshold will be exposed via FPI at a later update so we can have more suicidal AI that will fight till the death.

Quote: "Lets say i want the NPC to duck immediatly when it gets shot:
:state=0,shotdamage=1:animate=31,state=1

Then ducking=0 will still be true?"


Firstly, when DAI is active you can not specify animations manually. So, this would not work because the DAI animations specified at the top of the script take priority. What's important to realize is that ducking=1/0 is only the internal AI state and doesn't have to match the animations. In fact, you can specify ducking anims for the normal anims and have a character who never stands up. Likewise you can use activation or variables in the script to manually toggle ducking animations on or off and set that variable when the character is shot thereby forcing a ducking posture regardless of health.

example (not a complete script and i've left out move/strafe anim definitions for brevity):



This would make the character assume the ducking animation when shot until the etimer elapsed.

Quote: "When gets aiatcover=1 true?
Only when the NPC is behind a segment or does it work with static entities too?"


It's true when the AI thinks its out of the line of fire. In practical use it's easy for the AI to never find cover especially if it goes to where cover is and someone is already there or he is getting flanked. For those reasons I find it important to always use an etimer failsafe instead of relying solely on the aiatcover=1 condition.

Heres an example of etimer failsafe being used to augment aiatcover:



In the above script portion the AI attempts to find cover. If it manages to find cover it goes to the reload anim sequence but if it can not get to cover within a reasonable amount of time it will take alternate action.

Quote: "Would also be interesting to know how the AIADDPOINT=X exactly works..."


This sort of works like rally waypoints for DAI. it's highly level specific so I don't really have any experience with it yet. I believe AI points are to be placed on the map as triggerzones.

Quote: "now, i hope there'll come some example maps with the final 1.17"


I'm sure there will be.

Quote: "DAI will certainly be interesting to watch as it develops. I'm not too big of a fan of creating shooter games with FPSC (until your TF41 comes out, of course), however this will certainly alter my previous thoughts"


I'm continually excited as TF341 scripts evolve. DAI really shines when you can throw more anims at it.

Quote: "I've made a table version of your list that you can use if you want to use it to display the commands more clearly.
It can be sorted by any column in ascending or descending order by using the arrows at the top of the table."


knxrb... you are awesome with a side of rad. I'll update the OP with that and forgive the breaking of the bold/italic monogram theme
knxrb
FPSC Tool Maker
11
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 20th Jul 2010 08:06
Quote: "I'll update the OP with that"

No problem
I'll keep an eye on this thread myself but if anymore commands need adding or editing then send me an email and I'll get them on the table for you

knxrb

knxrb
Nickydude
Retired Moderator
12
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 20th Jul 2010 10:44
Errant AI, I've stuck this thread as I'm sure many people appreciate what you're doing, and seeing as there is no real full documentation on how scripting works it would be great if you had the time to put together some sort of guide.

Scripting is the main drive of FPSC but it's the least understood and this is why most games could be a lot better than they are.



For KeithC
Shadowtroid
9
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 20th Jul 2010 12:44
I've never been one who's very good at character AI (I always leave something out) and now there's like a bajillion new commands.

Well, I guess no time better to start than now.

Best,
S

Marc Steene
13
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 20th Jul 2010 13:21
Can't wait to combine these new DarkAI actions with Project Blue's conditions...the combinations are infinite


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
Mr Game
10
Years of Service
User Offline
Joined: 11th Feb 2009
Location: Under Your Skin
Posted: 20th Jul 2010 13:52
what about condition:
hasweapon=x
and scale of sound from entity or soundzone?
and whenever will be Fenix mod updated to work with 1.17?

Insomnia is coming...
Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 20th Jul 2010 14:41 Edited at: 20th Jul 2010 14:44
Thanks for the sticky, Nickydude! I'm putting together the beginnings of a basic walkthroug I hope will be of use.

@Shadowtroid - Yeah there's quite a bit more but its a very good time to get into the swing of things because it will only get more complex once a decent variable system is in place.

@Marc Steene - Yeah, I'm dying for Ply's variable system most of all.

@Mr Game- I don't know anything about soundzones or mod updates but I can tell you...

The hasweapon=x condition is simply to check if the character has been assigned to hold a weapon. It is needed because ifweapon=0 will always return as true if no weapon is held (which in turn can cause scripted reload sequences to be triggered endlessly). It also can be used to branch AI decisions based on whether or not it is armed, if you have a mix of armed and unarmed AI running the same script.
Mr Game
10
Years of Service
User Offline
Joined: 11th Feb 2009
Location: Under Your Skin
Posted: 20th Jul 2010 14:54
so hasweapon=x an example could check condition (if player has weapon)and than drop player weapon or current weapon or pass throught the door (via switch.fpi modification script).

Insomnia is coming...
ctm
14
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 20th Jul 2010 15:02
@Errant AI
Thank you very much for the answers and the demo scripts

The reload example and the woundet script made it clear for me how to script NPC behavior that is not done by DAI.

Best,
c
Nbt
10
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 20th Jul 2010 15:58
The "aicallteam" calls any of it's team mates that are within the call radius of x ?

If so this will be handy for adding a little stealth via a kill timer, where the player has a time limit to kill the dude if spotted, or local reinforcements will come running with alarms blaring. Could maybe animate/script the AI to run to the nearest alarm button as the kill timer?

Your signature has been erased by a mod. The sig needs to be 600 width maximum (x 120 height) for all of it.
Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 20th Jul 2010 16:54 Edited at: 20th Jul 2010 16:58
Quote: "so hasweapon=x an example could check condition (if player has weapon)and than drop player weapon or current weapon or pass throught the door (via switch.fpi modification script)."


No. The hasweapon=x condition only applies to AI; not the player. What you're thinking of is the haveweap=x condition from Project Blue.

@ctw- that's great

Quote: "The "aicallteam" calls any of it's team mates that are within the call radius of x ?"


Yep, that's the idea of it, Nbt.

When aicallteam=x is used, it stores the location of the entity that ran the FPI and broadcasts a call which can be heard by members of the same team and allies of that team (set through the faction controlling FPI) if they are listening for it. In practice, I'm not really sure that it's a strict radius because if you have a level which is not totally open, it seems necessary to use a larger value than you might think would be needed.

-When a call is made, it persists for a brief amount of time. During that window, allied AI within range will return true the condition of aicalled=1.

-If the action airespondtocall is used, the AI will pathfind to the location the last call was made.

-Related to aicallteam is the aiplrcallteam=X action which works in the same way but instead of using the location of entity which ran the FPI it will use the player's position.

It should be noted that there is a flood interval limit for team calls to minimize ping-ponging should a responding AI get between two AIs spamming team calls.
knxrb
FPSC Tool Maker
11
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 20th Jul 2010 17:15 Edited at: 20th Jul 2010 17:15
I think this explains the 'aicallteam', 'aicalled' and 'airespondtocall' commands (presuming I understand them correctly ):


knxrb
PW Productions
10
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 20th Jul 2010 17:48
Cool, KNXRB, I didn't really understand how that worked, thanks for the example

My website: http://pwp-games.com/

For KeithC! Spread it around...
Nbt
10
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 20th Jul 2010 21:00
Does the radius act on a purely horizontal scope or does it take into account the Y Axis?? i.e. will it check team members on the upper and lower floors etc?

Your signature has been erased by a mod. The sig needs to be 600 width maximum (x 120 height) for all of it.
Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 21st Jul 2010 03:40
You guys are asking great questions because I had to run some tests to confirm the answers

@knxrb- Great diagram you have there but any friend (same team or allied team) of the calling AI who is within range will return aicalled=1 as true. THB, I'm not really sure why there is an =x associated with that condition because there seems little practical use to ever use aicalled=0 as a condition because it is true pretty much all the time. I'm sure someone will find a way to use it though.

@Nbt- aicallteam also works vertically (though I don't know if the call area is a cylinder or sphere shape).
knxrb
FPSC Tool Maker
11
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 21st Jul 2010 03:50
Quote: "any friend (same team or allied team) of the calling AI who is within range will return aicalled=1 as true"

Ok, updated the diagram

I'm having quite a few ideas for a little program that could be used to auto-generate AI scripts.
Drag and drop allies into team groups, etc.

knxrb
Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 21st Jul 2010 04:25
Thats a cool idea, knxrb and the diagram looks all good now too.


I'll post the first "lesson" for DAI later today which will show how to set up bare-bones Dark AI scripts so scripters have a good foundation to work from when experimenting.
PW Productions
10
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 21st Jul 2010 05:27
Sadly not very many people look at the script board. Even though this is in the right place, I think you'd get a lot more views and responses within the Chat board. Just a thought.

Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 21st Jul 2010 07:07
PWP, while that's true I think it's great right where it is

Anyhow...

Here's the first installment of what I hope will be many lessons to help scripters get acquainted with the new DAI FPI. We'll start with the bare essentials of creating the appear and main DAI scripts. I am going to be some double posting here so that the individual lessons can be linked to directly.

Lesson 1: Dark AI Start Script, AI Teams and AI Factions



In the above snippet, you will see a template for the humble DAI appear script which is assigned to the "Start" field in the AI Script section of the editor. It's mostly like a standard appear script but already we can see the introduction of DAI related FPI systems: Teams and Factions

addiateam=x tells the game that the entity calling the FPI is being added as a member of the team number defined by X.

-The team number can be any number you like but you may only have 20 teams loaded into the system simultaneously.
-Team 1 is reserved for the player and his team members.
-addaiteam=x is not limited to being used in the appear script and may be used in the main or shoot AI to change which team the entity belongs to.

aiaddenemy=X Y|Y is one of three FPI actions used to define the DAI team's disposition towards other DAI teams. The other two are aiaddally=X Y|Y and aiaddneutral=X Y|Y.
In all three, X=The AI Team for which the factions are being set and Y= An AI Team being categorized as Enemy, Ally or Neutral by Team X. IMO, this is one of the coolest features because complex "ecosystems" can be created using the DAI faction system.

-By default, all teams begin as neutral to one another.
-By default, faction disposition is automatically reciprocated between teams.
-Automatic disposition reciprocity can be toggled on/off by using aiautofactionoff=x
-Factions can be redefined on the fly by using the faction actions.
-Faction actions can be ran from any script.
-You may define up to 20 allied, enemy or neutral dispositions per team.

Faction Example 1:
In the following snippet there are seven AI teams whose dispositions have been defined.



-Team 1 has been set to consider teams 2,4 and 5 as its enemy; teams 3 and 6 as its friends; and Team 7 as neutral.
-Due to automatic reciprocity, Teams 2,4 and 5 will now regard Team 1 as an enemy; Teams 3 and 6 will now regard Team 1 as an ally and Team 7 will remain neutral towards Team 1.
-Assuming no further faction actions have been used for the other teams; Teams 2-7 will retain default neutral disposition towards each other.

Faction Example 2:
Changing AI faction disposition on the fly is easy. In the next snippet we will define factions based on a local variable.



-When the local variable is equal to 0, the factions are as they were in the previous example. However, when the local variable is equal to 1 the factions are rearranged so that: Team 1 now regards it's former allies (Teams 3 and 6) as enemies; Has allied itself with teams 2,4 and 7; and is now neutral towards Team 5.
-It is best to avoid spamming the faction actions.

One can imagine how cool this could be if factions were simply assigned by global variables in the start script. It would be possible to change who the player's friends and foes are from level to level based on actions in a previous level which set those variables.
Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 21st Jul 2010 07:09
Lesson 2: Dark AI Main Script Foundation



In the above snippet is a bare-bones" AI Main" script for DAI.

Starting out, we have the DAI animations being defined and told to animate accordingly depending on meeting the criteria of the ducking=x,strafingleft=x,strafingright=x,movingforewards=x,movingbackwards=x and idle=x conditions. These animations are used by the internal system whenever the AI is set to active mode (setaiactive=1) and Dark AI is controlling the movement of the character.

-When making your own DAI Script is best to keep the animation definitions in the order presented.
-Animation definitions do not need to be "state-less". They can vary by state, variable or activation.
-Although the example uses stock animation numbers, custom animations can be easily substituted.
-Animation playback can be further manipulated by using the animationnormal and animationreverse actions.

Further down, we see the setaiactive=x action being used to give permission to the internal AI system to control several aspects of the characters abilities and behavior. Without additional scripting, for the most part, the AI can't do anything other than stand there and be pushed around by the player or other AI.

-If you shoot him, he might move around a bit. If he is at half health he will likely start ducking or looking for cover and if he sees an enemy he will target it.
-If setaiactive=0 is used, he will just stand there frozen; much like if running default.fpi.
-With DAI characters, the AI should only be deactivated in order to run special animations like melee, reloading or when you need to suspend DAI path-finding behavior such as when following way-points.
-Characters with their AI activated will automatically target and attempt to attack any enemies they see but if they are not scripted to attack they will only be able to engage in a vicious stare-down. So, if you need to have mixed allies and enemies in the same area but behaving civilly, use the aiattackawareness=x action and set it to =0 in order to keep AI from targeting and trying to attack one another.

OK so that's the end of lesson #2! Lesson #3 will cover making a basic shoot script. If you have ideas for future DAI lessons, please speak up!
PW Productions
10
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 21st Jul 2010 07:53
Quote: "PWP, while that's true I think it's great right where it is"


Alrighty then

And those new lessons are great! Only read one though... it's time for me to sleep... All that coffee finally wore off

Nbt
10
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Jul 2010 22:05
Oh damn these rock E41, keep erm coming /me cracks whip *swish ting* ^_^

Leaving the faction associations in the appear script is handy, as we can make a few named say "AppearRED, AppearBlue" etc and just pick the right appear script for each AI faction member.

Oh cool so we can change the AI love/hate on the fly. This will be handy for adding a little RPG style faction rating into our games, so we can maybe do jobs for certain factions and get them on our side and visa versa.

Shadowtroid
9
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 22nd Jul 2010 00:58
Quote: "Yeah there's quite a bit more but its a very good time to get into the swing of things because it will only get more complex once a decent variable system is in place."


I can imagine some cool stuff with random values that can be added to range, or even stuff like radio strength in an area. That would be awesome.

Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 22nd Jul 2010 20:38
Quote: "Oh cool so we can change the AI love/hate on the fly. This will be handy for adding a little RPG style faction rating into our games, so we can maybe do jobs for certain factions and get them on our side and visa versa."


Yeah, definitely. Personally, if I were to planning to do a lot of faction manipulation, I would control factions through a stand-alone script to prevent the factions from being overwritten whenever a character spawns and to keep organization simpler.

Quote: "I can imagine some cool stuff with random values that can be added to range, or even stuff like radio strength in an area. That would be awesome."


Yep, you could do a lot of cool things with a more robust variable system. Ally control would be a huge beneficiary because you could use it to more easily have the player issuing squad instructions such as telling all their guys to stay ducked, go aggressive/stand-down, go to a predetermined AI point, etc, etc.
Shadowtroid
9
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 23rd Jul 2010 03:06 Edited at: 23rd Jul 2010 03:19
Quote: "Ally control would be a huge beneficiary because you could use it to more easily have the player issuing squad instructions such as telling all their guys to stay ducked, go aggressive/stand-down, go to a predetermined AI point, etc, etc. "


Oh yeah, having it go to the next target (and it would know which target to go to through varibles) or even stuff like (for enemies) knowing when you have crouched and not react to movement as easily. Or (for factions) having it switch on a moment's notice, for the dramatic RANDOM DOUBLECROSS move. Or even "assigning" different allies to have different skills, like choosing between medics, short range, long range, even have them level up in those areas...Man, with some heavy scripting you could get an epic FPS/RTS thing going...The possibilities are endless.

Alright, we officially need the PB variable system.

If we do get a good variable system, I will make a good amount of scripts for it. I am overflowing with ideas.

WWIV Studios
10
Years of Service
User Offline
Joined: 10th Sep 2009
Location: Atlanta,Georgia
Posted: 23rd Jul 2010 04:12
Cool

Best
W

Wolf
11
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 26th Jul 2010 22:15 Edited at: 26th Jul 2010 22:15
Playing around with it...

I'm amazed! Sure, I don't need much but I wasn't expectin this to ever happen in FPSC

Best



Wolf

God Helps the Beast in Me!
PW Productions
10
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 2nd Aug 2010 07:26
Is it possible to have enemies move and shoot at the same time? It's very pathetic seeing them chase after you, stop, shoot, chase more, repeat


Nbt
10
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 2nd Aug 2010 12:48
Maybe the enemies have been playing too much counterstrike and are worried they will miss at point blank range if they don't stand stock still like a statue :p

PW Productions
10
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 2nd Aug 2010 22:58
LOL


Soviet176
10
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 4th Aug 2010 03:27
How do you use the talkandmove script located in the user folder in the scripts section? I put it in the main slot and tried using a nav point. It didn't work :/

Wolf
11
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 4th Aug 2010 03:52
Quote: "Is it possible to have enemies move and shoot at the same time? It's very pathetic seeing them chase after you, stop, shoot, chase more, repeat"


Should be... it was possible with stock FPI Scripting.



-Wolf

God Helps the Beast in Me!
Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 4th Aug 2010 07:32
Quote: "Should be... it was possible with stock FPI Scripting."


Yep. It's possible and can be pretty simple.

at a basic level, you can add the following to any state you want AI to be able to shoot from...

Nbt
10
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 4th Aug 2010 11:44
Welcome back EAI ^_^

Metal Devil123
11
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Suomi, Finland
Posted: 4th Aug 2010 12:05
Tht's awesome! I could even say the

Best
M


My old YouTube account got deleted. My new account is called MetalFPSC. thanks for your time!
SpyDaniel
13
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 6th Aug 2010 13:05
Can you add darkai to old character scripts and have them use darkai and their scripted commands, like Bond1's zombies?

Windows 7 Home Premium 64-bit, AMD Phenom II X4 940 3.0Ghz, 2.0GB Single-Channel DDR2 @ 400MHz, ATI Radeon Sapphire HD 5770 Vapor-X
Nbt
10
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 6th Aug 2010 13:46
To be honest bond1's zombies really don't need DAI, they already work really well. After all zombies are mindless freaks and are not meant to be intelligent

Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 6th Aug 2010 13:55 Edited at: 6th Aug 2010 15:05
Quote: "Can you add darkai to old character scripts and have them use darkai and their scripted commands, like Bond1's zombies?"


Not exactly. It more or less requires writing new scripts but they can be adapted to work with DAI. It was one of the things I tried during alpha.

Here are two scripts (male and female) I made for the mob zombies. I'm not sure they will still work right in current release but they run the custom anims and when fighting someone they call to other nearby team mates to join the fight. You're welcome to give them a try and modify to suit...

Dark_AI_appear_zombie_team6.fpi



Dark_AI_mobzombie_female.fpi



Dark_AI_mobzombie_male.fpi



The males only attack when provoked (attacked) but the females will attack on sight. Otherwise the scripts are almost identical other than calling different sounds when moaning and stuff.

There's some debug text in there which I might have not gotten all commented out.

Quote: "To be honest bond1's zombies really don't need DAI, they already work really well. After all zombies are mindless freaks and are not meant to be intelligent"


But without DAI they can only attack the player. Its cool to see them attack your allies (and enemies too if you like)

EDIT: For these scripts I set the hitpoints higher than default (around 500) and increased their speed quite a bit(250-300)as well via editor.
SpyDaniel
13
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 6th Aug 2010 13:59
I know Bond1's zombies work fine as is, but its the running into walls I want gone and with darkai that is possible. Going to give the script a go Errant and let you know what happens.

Windows 7 Home Premium 64-bit, AMD Phenom II X4 940 3.0Ghz, 2.0GB Single-Channel DDR2 @ 400MHz, ATI Radeon Sapphire HD 5770 Vapor-X
Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 6th Aug 2010 14:02 Edited at: 6th Aug 2010 14:05
OK. I just noticed theres some rawtext debug stuff in those which youll want gone. Also see my note above about hitpoints and speed. Theres also some attacks commented out for some reason or another.
SpyDaniel
13
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 6th Aug 2010 14:08
Tested the male script as is, the zombies just stand there and I get "state5" appear on screen. I'll look through the script to see if I notice any thing.

Windows 7 Home Premium 64-bit, AMD Phenom II X4 940 3.0Ghz, 2.0GB Single-Channel DDR2 @ 400MHz, ATI Radeon Sapphire HD 5770 Vapor-X
Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 6th Aug 2010 14:10
Try the female one too. I think that one was further along as I can see the male one seems to have more stuff commented out of it.
SpyDaniel
13
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 6th Aug 2010 14:16
Nothing happens with the female zombie script either, but the "state5" is not displayed this time.

I can't see any thing that would not make it work, in the script, so I don't know.

Windows 7 Home Premium 64-bit, AMD Phenom II X4 940 3.0Ghz, 2.0GB Single-Channel DDR2 @ 400MHz, ATI Radeon Sapphire HD 5770 Vapor-X
Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 6th Aug 2010 14:20 Edited at: 6th Aug 2010 14:21
Run testgame with entity info turned on; it will show you the exact state its hung up in.

When I've got a few minutes i'll take a quick look myself.

Edit: you did assign an appear script with the correct faction info right?
SpyDaniel
13
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 6th Aug 2010 14:21
I feel dumb, I forgot to add the Dark AI appear script! They do actually work after all, they are now uber zombies that can walk around corners correctly .

Thanks Errant.

Windows 7 Home Premium 64-bit, AMD Phenom II X4 940 3.0Ghz, 2.0GB Single-Channel DDR2 @ 400MHz, ATI Radeon Sapphire HD 5770 Vapor-X
Errant AI
13
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 6th Aug 2010 14:27 Edited at: 6th Aug 2010 14:33
ok cool

I tested it and here's an appear script I use for them...

Dark_AI_appear_zombie_team6.fpi



Setting speed to 300 and hitpoints to 500 works pretty well. They can be a little slow to get mobbing but once they do they're nuts.

If Bond1 is reading this, theres some subtleties in how the animation playback is handled such as you dont need to/cant advance anim frame but if omitted, it may break the script if pausing the game. Some of that still needs to be worked out.

Login to post a reply

Server time is: 2019-10-19 04:31:54
Your offset time is: 2019-10-19 04:31:54