Scripts / AI System choice vs Character choice

Author
Message
Nick Saturday
7
Years of Service
User Offline
Joined: 28th Jan 2017
Playing: board games...
Posted: 28th Jan 2017 06:18
Hi, I am a noob so it can be a stupid question, but at the same time I didn't find any explanation, so... There must be an answer or a way out of the problem.

WHICH CHARACTERS CAN GO WITH WHICH AI SYSTEMS?

I cannot have soldiers walk around as security (so they don't shoot you on sight), and I have problems with making monsters and evil wizards walk around a village without attacking you
.
I gave them "neutral" or "wanderer" AI but they just stand there, motionless.

I have never learnt programming in my life, so if you tell me I can re-programme something in lua, well, no I can't (yet).


Is there a matrix of AI systems working with characters available in basic GG and official DLCs?


I want to use fantasy and medieval characters to populate a town. First time you visit the town (level 1) everyone (civilians, soldiers, wizards, mosters) is friendly and just walks around, so you explore the town. Second time you visit the town (level 2) everyone is cursed/poisoned so they attack you. That's why I wanted to have them walk around without attacking anyone in level 1. Only in level 2 I want them to attack.

That is why I tried changing AI to neutral, wanderer, etc. It didn't work :-(
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 28th Jan 2017 09:16 Edited at: 28th Jan 2017 09:16
Ok there is a a civilian waypoint script you can attach where you can set their paths and they will ignore you ...
then just change it in level 2 .... I used if for this .. Is this what your after ?


The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 28th Jan 2017 10:14
In order for characters to use the stock AI system, ischaracter needs to be set to 1 in the fpe file, and the animations need to match the stock csi animations. The stock characters are mostly set up for this, but 3rd party characters aren't always compatible with the stock AI scripts.
Nick Saturday
7
Years of Service
User Offline
Joined: 28th Jan 2017
Playing: board games...
Posted: 30th Jan 2017 13:07 Edited at: 31st Jan 2017 12:11
In order for characters to use the stock AI system, ischaracter needs to be set to 1 in the fpe file, and the animations need to match the stock csi animations. The stock characters are mostly set up for this, but 3rd party characters aren't always compatible with the stock AI scripts.

I hope your answer is what I need, but I don't understand it...
Please, remember I have never done any programming or coding in my life.

What is "stock AI system"?
Where is this fpe file? And which one?
How do I check if animations match stock csi animations? And what does that mean?

I was using "stock characters" from the main engine and from DLCs and they do not walk around peacefully with "neutral" or "wanderer" AI -- they just stand motionless...

Thanks.
PM
Nick Saturday
7
Years of Service
User Offline
Joined: 28th Jan 2017
Playing: board games...
Posted: 30th Jan 2017 13:13 Edited at: 31st Jan 2017 12:14
Ok there is a a civilian waypoint script you can attach where you can set their paths and they will ignore you ... then just change it in level 2 .... I used if for this .. Is this what your after ?

OK, great, now give it to me in capital letters... Sorry for not understanding much (yet).

Where is this script? Or are you talking about waypoints I can create using the menu bar icon?

I tried that and either they don't use it (when I set AI to "neutral" or "wanderer") or they do use it and follow the path, but then attack me as a hostile (when I used soldiers).

Thanks.
PM
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 31st Jan 2017 06:30
Stock ai system - if you look in the gameguru-files-scriptbank folder, you'll see a set of scripts with the prefix 'ai' - these are the ai scripts that use GameGuru's hardcoded ai system. The characters you get with the original version of GameGuru, and some DLC characters, use these scripts.
In order for a custom character to use these scripts, they need to be set up correctly. Each GameGuru model has an associated fpe file, which has a list of properties. Models and all their files can be found in the entitybank folder. Characters using the GameGuru ai system need to have ischaracter set to 1 (if ischaracter is 0 then the model will ignore all the GG ai functions and commands. If you open one of GameGuru's stock characters FPE files, you see at the end of the file a list of animation frames - here's a few of them just to show you



The numbers are the animation frames. If you have a model that has a walk animation from, say, frame 1 to 100, then you should change csi_unarmedmovefore = 3870,3900 to csi_unarmedmovefore 1,100 etc.
This process is very much trial and error, as the scripts don't tell you which csi_animations are being called. The characters also have ton of animations which aren't used.
One way of figuring out which animations are playing is to add the line Prompt (GetAnimationFrame(e)) underneath the _main(e) section of whatever script you're working with, and use one of GameGuru's models to test the animations - this will give you an on screen display of what animation frames are playing. The display will change rapidly, but if it's a looped animation, you get a good idea of what the frame range is and then match it to the csi_animations.
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 31st Jan 2017 06:33
You can use the waypoint.lua script (I'm pretty sure it's one of the included GameGuru scripts, if not I'll post the code for you), if you want a character to follow waypoints and not attack the player.
Nick Saturday
7
Years of Service
User Offline
Joined: 28th Jan 2017
Playing: board games...
Posted: 31st Jan 2017 09:05
@Gtox, thanks so much. Now I understand what I didn't understand
I don't know programming, but I can try what you are talking about -- it seems straightforward if a bit time-consuming.

Is there an easier way to have characters walk around, then using waypoints?
I can use waypoints -- I already know how -- but I just want them to wander around. That's why I tried switching AI to "wanderer."

I read somewhere, that it's possible to limit the distance and radius at which enemies see you. It makes them walk around you (following waypoints) without "spotting" you, because their line of sight is extremely limited.

Do you think it is easier to "limit" characters' vision or to tweak waypoint.lua?
PM
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 31st Jan 2017 11:30
Tweaking the waypoint script would be pretty tough (have you had a look at it?). To get an entity to wander around aimlessly isn't all that hard, but you'll need some scripting knowhow.
The waypoint.lua script makes them follow waypoints without attacking you, which seems to be what you want.
Nick Saturday
7
Years of Service
User Offline
Joined: 28th Jan 2017
Playing: board games...
Posted: 31st Jan 2017 12:07 Edited at: 31st Jan 2017 12:19
Quote: "Tweaking the waypoint script would be pretty tough (have you had a look at it?). To get an entity to wander around aimlessly isn't all that hard, but you'll need some scripting knowhow. The waypoint.lua script makes them follow waypoints without attacking you, which seems to be what you want."


OK, let's try it. If it is really that simple, can you please tell me how I change the waypoint.lua?

Anyway, thanks for your help so far -- you showed me a lot already
PM
Nick Saturday
7
Years of Service
User Offline
Joined: 28th Jan 2017
Playing: board games...
Posted: 31st Jan 2017 12:07
[href=Tweaking the waypoint script would be pretty tough (have you had a look at it?). To get an entity to wander around aimlessly isn't all that hard, but you'll need some scripting knowhow. The waypoint.lua script makes them follow waypoints without attacking you, which seems to be what you want.]Tweaking the waypoint script would be pretty tough (have you had a look at it?). To get an entity to wander around aimlessly isn't all that hard, but you'll need some scripting knowhow.
The waypoint.lua script makes them follow waypoints without attacking you, which seems to be what you want.[/href]

OK, let's try it. If it is really that simple, can you please tell me how I change the waypoint.lua?

Anyway, thanks for your help so far -- you showed me a lot already
PM

Login to post a reply

Server time is: 2024-12-23 03:46:33
Your offset time is: 2024-12-23 03:46:33