Jump to content
Sign in to follow this  
mr.g-c

Largely Mod-able AI

Recommended Posts

The only tool you need to edit FSM files is a simple text editor.

Although some documentation of how the FSMs are being processed would be helpful (it's very tedious process to learn these things on the try&fail basis, things like when the default hardcoded FSM will kick in overriding your custom FSM, etc.).

When it comes to performance, it doesn't matter whether all the FSM are hardcoded or not, it depends only on how the system was designed and how the devs wrote their C++/#/ASM/etc.. You cannot say that hardcoded FSMs will run more smoothly than custom FSM compiled on the fly (it all depends on design and devs abilities).

I can imagine fully open editable FSM system without any hardcoded logic - the question is whether BIS wants it open, and whether their developers are able to do it (i believe they are).

It was a very good thing from BIS to make the FSM editable.

By editing FSMs you can alter the behaviour of single units or whole groups, you can make them react to things the way you want.

BIS can make some default FSM (hardcoded or not - preferably not) for controlling behaviour of the default soldier/civilian, but they cannot predict what special behaviour you will want in the new mission you are creating - (for me) thats the reason for editable FSMs.

For example, you have many different soldier classes in the game - machine gunner, sniper, rifleman, leader, rpg soldier, etc. - each of them should behave a little differently according of his usage in the battlefield. As somebody already stated, you don't want the sniper running to the front to engage in a close range combat.

Now imagine some modder will create a new soldier class, which wasn't in the game before, and which needs to behave slightly different than any other class that already is in game - he could write a custom FSMs to make it so.

It's not only about soldier classes, do not forget the animals - it can make a difference if you have cats, dogs, cows, birds, deers, etc. who behave properly according to (for example) a human (player or AI) presence in the woods, and on the other hand also AI/players who are able to interpret those natural signals and behave accordingly.

FSM provides you with additional abilities to create more believable world.

...maybe those examples sounds too unreal to some of you?

Well, then consider another, real exmaple - the zombies.

Maybe you are not into the zombies, but lots of other people wanted them.

You can write scripts to make zombie-like behaviour, but FSMs are much more efficient for this task. You can make the zombies to search for food, hunt you when they spot you, follow you into buildings, all by using custom FSMs in conjunction with few simple SQF functions.

Thats the zombies, but then you also need to customize the soldiers FSMs, because its a huge difference between fighting other soldiers or fighting zombies.

You can also create a "living" world with people traveling around the island, going to work, shoping for food, sleeping, as a background for your mission.

So you create bunch of custom FSMs which will control the units behaviour during their travel from home to work (it can make them choose whether they will go on foot, or whether they take the car, or bus - then if they took the car, what if the gas tank is empty, what to do if the car breaks, etc.).

You can do this with ordinary scripts, but only with a few units, not on massive scale with hundreds of NPCs moving around your island.

Here i am little bit concerned about the thing i read somewhere, that BIS wants to make it "simple" for mission creators to populate the world with people.

I fear those methods for making it "simple" could result in some restrictions of what you can do.

I tried all those things, the zombies, the animals, the populated island, everything.

And everything failed because the current ArmA FSM system is not exactly what i would like it to be (the default hardcoded FSM will kick in when you least want it, without warning, without any possibilities to prevent it or to 'correct' it afterwards [there are some methods, but not clean enough to be really usable on wide scale], you have to make your way around the fact that you cannot detect which FSM is the unit currently executing [again there are ways, but all of them are not good/clean enough]),

so i wish BIS will make the system better (more open, more configurable, more customizable).

A good FSM system can make a huge difference in the quality of future ArmA2 missions/mods (with good FSM everything can be even better).

Judging by the reactions in this topic, there aren't much people who would know when and how to use FSM to enhance the mission they are making, but that is beacuse of the lack of proper documentation, not because the FSM system would be something difficult to master.

Share this post


Link to post
Share on other sites

With FSM you can do a lot of things you can't with scripts... you can go as already mentione done step deeper into AI behavior.

Look at the rarely written BI-Page in that example:

http://community.bistudio.com/wiki/FSM

You can script real bahavior plans, when Ai fire what or how to react on what, etc... far more advanced than the few scripting commands.

Share this post


Link to post
Share on other sites

well said. with a good visual editor FSM will help big time for

designing system and most likely can help improve AI.

Share this post


Link to post
Share on other sites
But it also seems like a double egded sword. How fun would it be when you join a server only to find out that its AI can only use grenades because of a new fsm bug? I do have a feeling this can cause more pain than good in certain circumstances.

Just a small note: The custom FSM are currently included within the mission file (and so it should be in ArmA2), so it would be the same as it is with the possbility to connect to a server which is running some new/flawed version of some mission.

So i don't see almost any difference it these two situations - the mission has bugs? then you simply won't play it, same as it is now.

Share this post


Link to post
Share on other sites
...maybe those examples sounds too unreal to some of you?

Well, then consider another, real exmaple - the zombies.

Maybe you are not into the zombies, but lots of other people wanted them.

You can write scripts to make zombie-like behaviour, but FSMs are much more efficient for this task. You can make the zombies to search for food, hunt you when they spot you, follow you into buildings, all by using custom FSMs in conjunction with few simple SQF functions.

hmmm... Just how it's more effective?

I can do that all with something like search for food.sqs, hunt player.sqs, eat brains.sqs, which all are launched/controlled by zombie general.sqs.

I've done/tried some pretty advanced things for alerting AI like suppression, basic battledrills or MOUT behaviour for AI (published only suppression). Sure they are eating alot of processor powerz as they are not very optimized and they are scripts. Has anyone written FSM's which covers same areas? No, i dont' think so. So yet even there are fancy talks about FSM and it's all kinds of spezial powerz, i'm not buying it.

In short if FSM's don't have great amounts more commands than scripting language has, it's ain't any more effective than scripting in getting AI to do things. Limitations in scripting solutions is that there isnt' enough (well there never will be enough things) scripting commands to make AI do things.

Share this post


Link to post
Share on other sites

(from what i know) fsm have no more commands.

they only force you to design in FSM (look up what it means if you don't know).

you can design scripts also as FSM.

you can attach fsm behavior via config.

.fsm can replace the standard fsm via config.

not sure if mission/script called fsm are any different to scripts

(apart from forcing fsm design).

Share this post


Link to post
Share on other sites
hmmm... Just how it's more effective?

I can do that all with something like search for food.sqs, hunt player.sqs, eat brains.sqs, which all are launched/controlled by zombie general.sqs.

FSM in ArmA is designed to do this kind of thing, that is why and how.

If you want to control few dozen units, you can use scripts, and you may not see any performance impact, but as i said, when you want to control hundreds of them, the FSM matters.

I've done/tried some pretty advanced things for alerting AI like suppression, basic battledrills or MOUT behaviour for AI (published only suppression). <span style='color:red'>Sure they are eating alot of processor powerz as they are not very optimized and they are scripts.</span> Has anyone written FSM's which covers same areas? No, i dont' think so. So yet even there are fancy talks about FSM and it's all kinds of spezial powerz, i'm not buying it.

You may buy what you want, and i am not selling anything.

Anyway, you wrote it yourself (the bold text in red color).

So you did something "pretty advanced", and yet you don't understand the purpose of FSM? Then you will be very happy after you learn that with using better FSM system you could do even much more "advanced" things.

You don't think somebody covered similar areas with FSM? Well, seems like you really don't know everything, but who does.

I wrote many FSMs for different purposes, the living world simulation, the zombies, also suppressing fire, reaction to various events like "hearing" gunshots to set off alarms (i hope you understand why i put "hearing" in between the quotes), tweaking reaction to dead bodies, autonomous sniper/spotter behaviour, and other things - still i wouldn't dare to label anything i did as "advanced", its just simple FSM scripting.

And yes, i was also using scripts (functions to be exact), but only to do some occasional calculations or whatever was needed, not for emulating FSM.

And i have to say, that most of these things mentioned, i started them as a scripts, but soon moved to FSM, because it proved to be more efficient.

You never used ArmA FSM implementation, but you dare to say it's useless? How could you know that if you never tried?

In short if FSM's don't have great amounts more commands than scripting language has, it's ain't any more effective than scripting in getting AI to do things. Limitations in scripting solutions is that there isnt' enough (well there never will be enough things) scripting commands to make AI do things.

I understand your point here, yes, there are some things which are hard or impossible to do with the AI, and it would be nice to have the additional commands, but that doesn't say anything about FSM and its usage in ArmA.

FSM has no commands, or maybe you could say it already has all the commands you will ever need - init, to, action, and condition.

You lack some commands in ArmA scripting language? Ok, then make a topic "I want new commands to do ...", but its got nothing to do with FSM and this topic.

Inside a FSM file, you can use the same commands as in any script, there are only maybe few commands you can/should not use inside the FSM (the Move command for example).

You can also call functions and execute scripts from the FSM - maybe you know these things, maybe not, i am not sure, it isn't clear from your post.

I do not wish to argue with you, but please do not judge something if you don't know much about it.

You lack the basic understanding of FSM in ArmA, and yet you post in this thread that FSM is useless.

The FSM system in ArmA has only two major flaws:

1. No easy and reliable way to find which FSM is currently run for given unit/group

2. Under certain conditions, the hardcoded FSM will kick in and stop your custom FSM without any warning nor way to prevent it.

If these two issues will be addressed and resolved in ArmA2, it will make me happy enough.

Share this post


Link to post
Share on other sites

I dont' wish to agrue about this, i know my understandment is pretty limited to have anything constructive discussion about scripting vs FSM or anything related to them. It like foreign grammar: i dont' understand grammar very well, i just can write, understand and speak things in limited fashion (compared to someones who can create art with it)... So in the end from your writing i get just that FSMs are more optimized solution for CPU (sorry!wink_o.gif. Other ways i see them very similar, this was just the reason why i said that:

Quote[/b] ]In short if FSM's don't have great amounts more commands than scripting language has, it's ain't any more effective than scripting in getting AI to do things. Limitations in scripting solutions is that there isnt' enough (well there never will be enough things) scripting commands to make AI do things.

Because without additoinal FMS commands there are not very different just more optimized, that is reason why i don't see them special in anyway... Worth the hype put on them. To this my limited FSM experiments have led me. Could be wrong thou.

Your black bolded part i know. The 2nd note pushed me finally off from fiddling with FSMs any further.

Share this post


Link to post
Share on other sites

Anyone looked into this already for Arma2?

Is the AI now fully based on changeable FSMs?

If this is true, then i will take the effort and learn that FSM stuff to add some behaviors after standard Military handbooks.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×