Jump to content
JOHNBELLO

Preventing AI group leaders from issuing orders?

Recommended Posts

Hello.

We have run into some kind of a major problem, while trying to create some kind of public group system in our game.

We don't want a player to be the leader of this public group due to possible spamming and giving annoying orders (like dismount) so we added an invincible NPC as leader of that group.

Problem is, now this NPC does give all these spamming and annoying orders, like "attack this", "move there" or the dismount as soon as you enter a vehicle, which is totally unacceptable.

Now the question is, would it be possible to prevent this NPC from giving orders in any way? Or is it possible to assign something without an AI as the leader of this group, like a vehicle and would that actually work in the end?

This is a pretty big issue for us now so we definitely need to fix this, but also we need something non-player to be the leader.

Any ideas?

Share this post


Link to post
Share on other sites

hi John, what have you tried so far?

have you tried disableAI ? https://community.bistudio.com/wiki/disableAI

I find that anoying too, but the best way I found is not to have an AI as leader. And the player that is leader should order an All 1-6 (wait) order. this stop the random chatter a little. also I use a script (ins_revive) to manage the groups. there is also the FockAi script that work well for that kind of group management.

hope this help.

Share this post


Link to post
Share on other sites

Hey, thanks for answering.

We tried disableAI or basically are using every of these commands as we want that leader to not take any damage or anything, basically exist like a dummy unit that's only purpose is to be a silent leader for the group - but the disableAI options seem not to prevent him from giving orders, what is really annoying.

Also we tried the enableAttack command, but that simply seems to do nothing at all, at least it did not change the ordering behavior of the AI.

That's all so far. We are going to try to set that unit as unconscious to see if that prevents him from chatting/ordering while still being the leader.

And like i said, having a player be the leader is not an option, we just don't want to risk that someone is spamming around etc.

Share this post


Link to post
Share on other sites

I don't know if this would work in mp but you can have a gamelogic as group leader in SP the only issue is if you have waypoints.

Share this post


Link to post
Share on other sites

Interesting your search. It does give me some ideas. I 'll check the high command (hc) commands, to make a leader of the leader and maybe there is some "rest" command. maybe putting him as "safe"? I'll also check the different waipoints, maybe there is one that will make him stuck on it doing nothing or repeating a armless movement.

I'll share my finding.

Share this post


Link to post
Share on other sites

Could you explain this a little further? Is it something like this High Command feature? (http://community.bistudio.com/wiki/High_Command)

This sounds actually like a solution.

We don't have any AI in these groups except the leader itself and he does not move nor do anything. So there are no waypoints, at least not for this group.

Share this post


Link to post
Share on other sites

Have you tried

unit disableAI "AUTOTARGET";

or maybe

unit setCombatMode "BLUE";

Share this post


Link to post
Share on other sites
Have you tried
unit disableAI "AUTOTARGET";

or maybe

unit setCombatMode "BLUE";

We tried the first one, like i said we have all the "disableAI" parameters for these group leaders, but they still keep ordering stuff.

The second one we did not try, and probably might work for some things but i guess the order to rearm and the order to dismount will still be there and these are the big issue (at least the dismount)

Share this post


Link to post
Share on other sites

sorry I missed that you had already tried disableAI

what about setCaptive true ? Although that may cause other issues....

Share this post


Link to post
Share on other sites
sorry I missed that you had already tried disableAI

what about setCaptive true ? Although that may cause other issues....

Have not tried that one yet. Will do tomorrow.

I now tried creating an game logic - at least as far as i am able to due to finding code scraps on google. That seemed to work for the ordering part, until i tried to look or get into an vehicle, because well - i wasn't able to do anything except opening doors.

I tried using resitance but still creaking the "unit" that will be the leader as "logic" but that immediatly gave me back some orders again to rearm and all that nonsense.

I don't know if i might have used that logic feature wrong.. anyone experienced in this able to post the lines that would actually create a group for an game logic with an leader that well, is only the game logic part?

Any other ideas to fix our problem would be nice aswell... isn't there an way to contact the BI dev's to ask such a question? I mean, they have to know, right?

Share this post


Link to post
Share on other sites

If you don't need the radio, you can turn it off completely with:

enableRadio false;

But I don't know if you need it for what you're doing.

Share this post


Link to post
Share on other sites

If you don't have a leader is there any point being in a group?

Oddly though if there is a player as leader you can create a team and they can get into vehicles but there seems no way to create the same sort of team in script.

unit assignteam "RED" will put you in that team but there seems to be no real effect.

Share this post


Link to post
Share on other sites
If you don't have a leader is there any point being in a group?

Well, the point of being in a group is forming a team ingame without being forced to join a faction in the lobby.

We basically have only one faction that serves as a free for all faction, and then we want to give the players the choice to either join public group A, public group B or create their own custom group.

Custom groups are easy because these can have their group leader, but a public group where players join into because they have no mates to play with or something like that simply can't have an player as leader due to the radio spamming and the orders that someone would be able to give that have impact on the game (like dismount)

If you don't need the radio, you can turn it off completely with:

enableRadio false;

But I don't know if you need it for what you're doing.

That's simply not enough because that would just disable the messages to these orders but not prevent the orders itself. Rearm, attack, dismount - all these still happen, what is the real problem of this issue. The chat is basically irrellevant. Besides that we tried this one already and it seemed to be broken because it did nothing.

Share this post


Link to post
Share on other sites

So, little update on the issue - we just finished our very own script based group system.

Now we don't need any unit to hold the group open, or some kind of leader but are still able to do all kinds of things like player icons etc.

If there is interest we will release it to the public in some days. Maybe someone else will benefit from it aswell.

Thanks to everyone that tried to help on this issue!

Share this post


Link to post
Share on other sites

If there is interest we will release it to the public in some days. Maybe someone else will benefit from it aswell.

Thanks to everyone that tried to help on this issue!

+1 for release :p

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

×