Jump to content
Sign in to follow this  
Nielsen

Civilian Interaction Module (beta)

Recommended Posts

(CIM) Civilian Interaction Module(s)

By: Nielsen



cimlogo.jpg

Updated to v.0.22 (Hotfix: More CRM Readme errors)

DISCLAIMER: This is more of an addon than a mod. I use the 'module' designation because the addon adds new modules to the editor. Be adviced that the addon is released as a BETA, and as such I provide no guarantees of functionality or against adverse effects. This addon should work well in hosted MP environments but it might not be fully compatible with dedicated servers yet. The point of release is to get some feedback that might help improve the addon. Also, I would like to make it clear that I do not consider myself a skilled coder, and my approach is probably not the best one.

Description:

This addon adds three modules to the editor called the ‘(CIM) Civilian Interaction Module’, the '(CIM) Civilian Extraction Module' and the '(CIM) Civilian Reaction Module'. When placed on the map the 'Interaction Module' allows players to order civilians to the ground, inside houses or out of the area or vehicle in a second. Players can also search and key-cuff civilians or detain them. The 'Extraction Module' lets players extract detained civilians in a chopper via radio call, and also allows for smoke marked LZ. The 'Reaction Module' can generate different civilian events (for ambience) at will, or at predefined locations. It also has a feature that will add certain "evidence" items to random (un-searched) civilians around the players.

How to use:

Install the addon like you would any mod - using modfolders of course. For a quick setup, open the editor and hit 'F7'. Place the '(CIM) Civilian Interaction Module' on the map on a flat spot far away from the action. When in game hold the CIM-Key (default:left shift) and view available commands in the action menu. The 'Extraction-' and the 'Reaction Module' needs to be synchronized (F5) with the group leader(s).

For a more detailed explanation of use and customizable setup see the included readme.

Features:

- Verbal commands for ordering civilians about

- Physical actions for searching and subduing civilians

- Helicopter extraction of detained civilians

- Script to mark LZ's with smoke for pinpoint extractions.

- Spawning of ambient civilian events

- Makes random civilians have "evidence"

- Custom sounds

- Global arrays and customizable parameters for mission maker convenience

- Works with ALICE

- works with surrendered units (thank you stupidwhitekid75 for pointing this out to me)

- Works with ACE2, Reezo's EOD mod, and nearly any other mod

- SP and MP compatible (not working on dedicated yet)

Requirements:

- Arma 2 CO

- CBA

Known issues:

- Because of hardcoded limitations, female civilians will not display animation when key-cuffed. However, they will still be completely passive.

- Because the action menu cannot be used while holding 'left ctrl' it is not suitable as CIM-Key.

- Smoke in the CRM "gathering" event does not work on clients yet. (No idea why. And I do know that it is a local effect)

- The 'Reaction module' currently requires that the 'Interaction module' is also present.

Credits:

• Reezo – for his epic EOD-mod which inspired this module.

• SHK – for providing his SHK_Pos function (used in CIM) and for being very helpful on the forums.

• JohnnyDust – for helping out with testing and suggestions, and for covering my six.

• Clements, Sickem and Inspired Media - For recording and editing of videos/tutorials (thanks guys).

• Pellejones and SSG (www.ssg-clan.se) – for testing and advice on dedicated servers.

• Ruebe – for taking time to help out on the forums.

• LAxemann, Feint, YayForLife, UGLY58, Zwobot, Clements, Raptor 6 Actual – for reporting bugs.

• Sickboy - for creating CBA

• Armaholic.com – for hosting my (and all other) mod(s).

• BIS, ACE2 team and the community – for making this game timeless and priceless.

License and copyright:

People are free to change this to their needs. If you are planning on changing this addon and releasing it as your own, I request that you contact me first, and of course that you credit me where it is appropriate. In the end, as long as I get credit for my work, you can pretty much do whatever you want with it.

Changelog:

0.22:

[Fixed] - More false information for CRM in the readme. (Sorry for any inconvenience)

0.21:

[Fixed] - Readme for CRM was wrong. Command for setting number of markers was wrong.

0.2:

[Fixed] - Audio now fades with distance.

[Fixed] - Clients can now properly remove items/weapons from civilians in MP via new 'Remove Belongings!' actions.

[Fixed] - ALL publicVariables are now (really) handled with CBA.

[Fixed] - Optimized several scripts.

[Fixed] - Actions in the 'Interaction' module are now fully persistent (i.e. works with team-switch/respawn etc.).

[Changed] - CIM has been split into the 'Interaction module' and an 'Extraction module'.

[Changed] - The verbal commands now override civilian animations (not if keycuffed of course).

[New] - The 'Extraction module' is compatible with OPFOR and Resistance.

[New] - The 'Extraction module' is fully configurable for custom choppers and crew.

[New] - CIM has a new module: the 'Reaction module' or "cRm". It can cause random civilian events.

[New] - When running cRm civilians will sometimes have "evidence" items on them.

0.15:

[Fixed] - Chopper extraction is now better optimized for dedicated

[Fixed] - typo in extraction hint

[Fixed] - Civilians no longer stay Bluefor after being released.

{Fixed] - Keycuff animations should now work correctly in multiplayer

[Changed] - All publicVariables are now handled by CBA_fnc_publicVariable.

[Changed] - All commands are now displayed in fixed order at the top of the action menu

[Changed] - Released civilians now run and rejoin their original group. If that group no longer exists they will join CIM_holdGrp.

[Changed] - The module Variable "nielsen_cim_SmokeType" is now an array of smoketypes (classnames), so you can use multiple colors.

{Changed] - AI behavior for "Get Inside" command improved (now handled with FSM)

[Changed] - The radio/sidechat msg on 'Request POW extraction' now displays player name rather than unit variable.

[Changed] - The readme has been updated, and setVariable examples are now unformatted and can be copied from the pdf.

0.1:

Initial beta release

Download:

Beta v. 0.22: https://rapidshare.com/files/1400329955/Nielsen_CIM.rar

I hope you enjoy and have fun trying this out. Let me know what you think.

Kind regards,

Nielsen

Edited by Nielsen
New version out

Share this post


Link to post
Share on other sites

I figured that with such a small filesize it would not matter much. But no worries, rapidshare link added :)

Share this post


Link to post
Share on other sites

@Foxhound: Thanks. You work fast :)

@MugAben: Thanks man. Yes it is. It works with more or less any civilians. :)

Edited by Nielsen

Share this post


Link to post
Share on other sites

wow this looks amazing! i am going to try and tinker around with it

thanks!

I am having trouble with setting a different key for interaction. the PDF versions has the lines needed, but they are not copyable, were as the text version does not have the commands at all

i am trying to get the DIK code thing to work, but i cant get it too. keeps telling me invalid variable

0=findDisplay 46 displayaddeventhandler [“keydownâ€,â€hint format ['%1',_this select 1];â€];

is there a way to add in were the key is mapped to an out of game config file? like have the config file in the addons folder or something? that way the key is not slaved to the whims of the mission maker. since i use my shift key as sprint, makes for very awkward handling :p

i would like to switch the key to left CTRL

Edited by That guy

Share this post


Link to post
Share on other sites

Make sure you run the command in an activation field and not an init field. It has to be run after mission start, so launching it in init will not work. Other than that, the "" might be twisted by the forum font. I think I've seen that before. The command you posted look right.

I see your problem. I first set default to left control, but realized that when ctrl is held the action menu is not available. I thought about using left alt, as I have trackIR that would work. But I ended up going with left shift because it is within reach, and because it is tied to run/walk it works nice when standing still. Of course it can be a problem when moving depending on the setup. I am open to better ideas for a default key.

But:

0 = findDisplay 46 displayaddeventhandler ["keydown","hint format ['%1',_this select 1];"];

Should tell you the DIK-code of a pushed key if run after mission start.

I use a "CIM-Key" because I hate cluttering up the action menu. I thought that would be a better way of making it less intrusive. But action menu seemed like the only way to make this work. A dialog would have frozen the player. Way to dangerous with suicidebombers around. I think a required key is a good compromise, I just hope it does not seem over the top.

EDIT: Fixed command line :o

EDIT2: I'm not sure how to make the CIM-Key local. It would obviously be a cool thing, so I would like to do it, but right now I'm not entirely sure how.

Edited by Nielsen

Share this post


Link to post
Share on other sites

Mate, I have to say this is one brilliant addon!

Ive been creating SF HVT arrest operations and missions but have always been bogged down with unpredictable AI and scripts that fail. This mod answers everything ive been ragging my brain over. Thanks!

Keep up the great work!

Share this post


Link to post
Share on other sites

I can't seem to get mine to work. I added the mod and I see it in the modules list, I add it to my mission away from the battlefield. But once I'm in game, I'll press shift and nothing happens at all. I tried changing the key to something else still nothing!!! I don't know why it isn't working!

Share this post


Link to post
Share on other sites
I can't seem to get mine to work. I added the mod and I see it in the modules list, I add it to my mission away from the battlefield. But once I'm in game, I'll press shift and nothing happens at all. I tried changing the key to something else still nothing!!! I don't know why it isn't working!

Hmm. That is strange. Are you also using the mouse scrollwheel to go through your action menu? You have to scroll while holding left shift.

Share this post


Link to post
Share on other sites

I've been waiting for something like this for a while now. BIS stated that civilian interactions would be key in the game, but before this module, all you could do is pretty much say hello and ask them about the weather.

This module takes interacting with the locals to a whole new level.

Keep up the great work!

Edited by Laqueesha

Share this post


Link to post
Share on other sites

Downloaded this today, it is really awesome. Out of curiosity, I set up a large battle and placed the surrender module along with your interaction one. During the firefight only one enemy surrendered, however I was able to use all the same commands on him that I would for the civilians..within a minute or two he was arrested, put on the black hawk, and sent on his way!

If you ever plan on furthering this, maybe you could tweak AI surrendering so that it works better than BI's current module and allows both players and AI alike to surrender, capture, and exfil enemy combatants. I could also see this working as a great MEDEVAC feature too..load the wounded up onto the black hawk and transport them off to a hospital. Very realistic. Just some input though, once again thanks for this, its great!

Share this post


Link to post
Share on other sites

after some testing, i have to say this is quite amazing!

anyway, for some reason i cant get the ctrl key to work as the activation key, but the alt key does. odd

Share this post


Link to post
Share on other sites
I can't seem to get mine to work. I added the mod and I see it in the modules list, I add it to my mission away from the battlefield. But once I'm in game, I'll press shift and nothing happens at all. I tried changing the key to something else still nothing!!! I don't know why it isn't working!

hold left shift and look at your action menu

Share this post


Link to post
Share on other sites

Thanks for all the kind words. I really appreciate it.

This module takes interacting with the locals to a whole new level.

Or at least it makes the bare minimum of combat interaction possible :D

after some testing, i have to say this is quite amazing!

anyway, for some reason i cant get the ctrl key to work as the activation key, but the alt key does. odd

Thanks for the feedback. Yeah I know about the ctrl key. That was my first pick. Not sure if it is only a matter of taking care of control options ingame (e.g. reassigning the target button or something) or if it is hardcoded. The way I see it right now shift or alt seems to be the best options for quick use. Both have pros and cons though.

During the firefight only one enemy surrendered, however I was able to use all the same commands on him that I would for the civilians..within a minute or two he was arrested, put on the black hawk, and sent on his way!

Great stuff! I had not thought of that. I think it is because the surrender module makes them "setCaptive" and that in turn makes them civilian. That is a cool bonus effect. Actually, I'll add it as a feature so people know that it works. Thanks for pointing it out! :).

Edited by Nielsen

Share this post


Link to post
Share on other sites

Amazing mod thanks :)

one bug I've seen when I drop a smoke the helicopter doesn't land but fly back to its initial position. My suggestion if it's possible to add an option where the helicopter I want it land by clik-map or somethingelse.

Really big thanks this mod give us all a better realistic immersion for the game.

(sorry for my poor english I am non-native english speaker)

Share this post


Link to post
Share on other sites

Very intersting.

Two questions:

1. Do released civilians re-join their original group they were in before arresting them?

2. (More of a feature request: ) would it be possible to use this module to fix the broken standard conversations (Location? Targets? Weather? ...) between player and AI?

Share this post


Link to post
Share on other sites
when I drop a smoke the helicopter doesn't land but fly back to its initial position. My suggestion if it's possible to add an option where the helicopter I want it land by clik-map or somethingelse.

Hmm. This has only happened to me when testing out the extraction feature too close to the helicopter spawn point(?). Because the helicopter spawns on a helipad, it will land on that (instead of the invisible helipad created by the smoke) if ordered to that area. Where you far from the helicopter when testing this? Could you tell a little more about the circumstances. When I test it the helicopter is quite reliable :)

Very intersting.

Two questions:

1. Do released civilians re-join their original group they were in before arresting them?

2. (More of a feature request: ) would it be possible to use this module to fix the broken standard conversations (Location? Targets? Weather? ...) between player and AI?

1. No. At the moment they join "grpNull". I did think about it, but then I thought if you detain someone and bring them along, and then later you release them while clearing a compound. If joining an original group far away, the civilian will take of running as soon as you release him. I could make him rejoin the group but order him to stop. What do you think?

2. I have not looked into the conversation system, so I dont know how hard that would be. I made this mod to be able to order civilians down or away instead of shooting them if they get too close. The other features grew from there. Regular conversation requires that you are up close, so it did not seem suitable for yelling at them.

Share this post


Link to post
Share on other sites

1. No. At the moment they join "grpNull". [...] What do you think?

Depends on the situation. Could be that the released civilian wants to get back to his buddies quickly after having been released. On the other hand he/she might be a bit disoriented and clueless and just stand there...

Follow up question: how does this feature connect with the ALICE module, i. e. are released civilians handed back to ALICE (I don't know if this is even possible).

It would be nice to have it as optional setting if it wouldn't be too messy to keep track which group a civilian was detained from or would it be sufficient to only setVariable the original group of detained units on the unit itsself?

2. I have not looked into the conversation system, so I dont know how hard that would be.

I found the conversation system hard to get to grips with in the beginning. Once you understood how it works it is quite powerful and I think it is a pity that it is not working for Arma2 units anymore and that the default version was not thought through to the end, e. g. you cannot configure language skills of the units. So as Blufor Army unit you can not talk to Takistani civilians because they don't understand you.

This could be fixed with a community made addon I reckon.

Have you thought about a scripted version of your module which would not require an addon?

Share this post


Link to post
Share on other sites

1. No. At the moment they join "grpNull". I did think about it, but then I thought if you detain someone and bring them along, and then later you release them while clearing a compound. If joining an original group far away, the civilian will take of running as soon as you release him. I could make him rejoin the group but order him to stop. What do you think?

Joining grpNull is a bad idea, since this will create a new group each time. So you end up with one-unit groups for no good reason. So either rejoin them to their original group (remembered with setVariable on the unit) or create a single group the first time it's needed (dismissed waypoint) and then join them to that group from now on...

The second option could be better, since it's not guaranteed, that the original group still exists... so you could run into problems there (without further checks). Or do both and use that specific "released people"-group as a fallback maybe. Or something. :)

As for the running away: forceWalk and forceSpeed (for some time after release) could do the trick.

Otherwise this looks very promising.

Tweak on!

Share this post


Link to post
Share on other sites
Depends on the situation. Could be that the released civilian wants to get back to his buddies quickly after having been released. On the other hand he/she might be a bit disoriented and clueless and just stand there...

Yeah. Thats what I thought. And I figured it was best not to force it. That way people can set up scenarios where civs go to specific places once released or something. If I returned the unit to its old group, then he/she would take of running every time you released him. I saw that as the bigger problem, as I often want them to stay (more or less) put.

Follow up question: how does this feature connect with the ALICE module, i. e. are released civilians handed back to ALICE (I don't know if this is even possible).

I'm not sure (how) that is possible either. I did think about it, but did not know how to go about it. Not sure if ALICE ever excludes them. I have not tested if they still despawn after being released. I figured that people wont detain and release civilians en masse, so that it would cause a build up in the number of units end groups.

It would be nice to have it as optional setting if it wouldn't be too messy to keep track which group a civilian was detained from or would it be sufficient to only setVariable the original group of detained units on the unit itsself?

That's an interesting question/idea. My only worry is that I would have to introduce a shit load of new global variables. I am very busy irl over the next month (which is why I decided to release a beta now), but I will keep it in mind and look into it further down the road.

I found the conversation system hard to get to grips with in the beginning. Once you understood how it works it is quite powerful and I think it is a pity that it is not working for Arma2 units anymore and that the default version was not thought through to the end, e. g. you cannot configure language skills of the units. So as Blufor Army unit you can not talk to Takistani civilians because they don't understand you.

This could be fixed with a community made addon I reckon.

Yeah it is a shame that the conversations are so underdeveloped. I really like the concept. It certainly would make for a great addon, but I dont think this would be the right addon to toy with that. I have allready worried that the helicopter extraction and smoke features were too much past the scope of the addon. But I thought that it was kinda vital to be able to get civilians off your hands once you'd detained them.

EDIT2:

Have you thought about a scripted version of your module which would not require an addon?
Indeed. It started out as a script. Before making this addon I was all like "Scripts > addons". But working on this and tweaking it all the time - and then have to reimplement it in all the missions I use (often with slight script changes) - it started to take its toll on my patience. Finally I came to the conclusion that the convenience of an addon makes up for the download requirements - especially during continued development. Once it is closer to completion I might do a script version if the demand is there.

EDIT:

Joining grpNull is a bad idea, since this will create a new group each time. So you end up with one-unit groups for no good reason. So either rejoin them to their original group (remembered with setVariable on the unit) or create a single group the first time it's needed (dismissed waypoint) and then join them to that group from now on...

The second option could be better, since it's not guaranteed, that the original group still exists... so you could run into problems there (without further checks). Or do both and use that specific "released people"-group as a fallback maybe. Or something. :)

As for the running away: forceWalk and forceSpeed (for some time after release) could do the trick.

Otherwise this looks very promising.

Tweak on!

Thanks for the input.

Yeah I see now that I might have been a bit lazy. I thought about the group thing but figured it would not be aproblem with a few groups. Of course that is not the right approach. I think I will go with the second option for now and just make a new "hold-group", and then give the civs a dostop (or forceSpeed 0) command when they are released so they wont scatter. I'll do something more ellaborate when I get the time.

Thanks for the hint on the forceWalk and forceSpeed. For some reason I am really concerned with using loops and such. Maybe it's just amateurish paranoia, but I am really trying to limit them in any way, that is why I have stuck to "doMove", "doStop" and such. Do you think this is an ineffective disposition?

Edited by Nielsen

Share this post


Link to post
Share on other sites

Tried today with ACE2 and EOD mods. All worked well. Excellent mod. Thanks and keep up the work.

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  

×