Jump to content
Sign in to follow this  
I34dKarma

Karma Modules

Recommended Posts

Version 1.4 Of Karma Modules Is Released

Changelog

Version 1.4

- Added City Garrison Module

- Added Mod Logo

- Minor Code Tweaks

- Added Licence Agrement On BI forum thread. (Nothing Unreasonable In My Opinion)

Updated Future Modules And Features

- IED Module

- Add Suicide Bombers To City Garrison Module

- Add Blacklist Area To Carbomb Module

- Investigate Using Module As A Server Side Only Mod

- Add To Play With Six

Feel free as always to post comments, suggestions and any errors.

Hope You Enjoy The Update

Karma

Share this post


Link to post
Share on other sites
Guest

Updated release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

@I34dKarma, what if you had all the cars from the car bomb module interactable like TPW commandeer system for TPW cars such that a patrol can stop a vehicle...or attempt to. If they are regular civs, they comply. If not, they step on the gas and player has to respond. You could have AI playmove "Freeze" for effect. What do you think?

Share this post


Link to post
Share on other sites
is the garrison module compatible with mod factions (IE. Suddens russians)

AngelWingGamingJacob- Yes I designed it so you can use an units in the game for the City Garrison Module. I made the module so you could synch the units you wanted to use to the module itself, any unit you see it the editor should work. It takes a little more setup time to do it this way but the advantage is the flexibility of the module.

@I34dKarma, what if you had all the cars from the car bomb module interactable like TPW commandeer system for TPW cars such that a patrol can stop a vehicle...or attempt to. If they are regular civs, they comply. If not, they step on the gas and player has to respond. You could have AI playmove "Freeze" for effect. What do you think?

sttosin give me link to that TPW mod and I can take a look. I just started getting into FSM scripting and that could open up some possibilities. I might even recode the carbombs with FSM's just to make the code cleaner.

Share this post


Link to post
Share on other sites
another question is it A2 map compatible?

Just ran a test with A3MP on Zargabad with Stalker British Units and in ran just fine. I also did a test on Sangin and worked as well. The only A2 maps that might not work would be ones that have buildings that are not made with the BI standards, lacking AI building position indexes ect.

One thing I did realize was that in larger cities like Zargabad you might need more then one module to populate the entire city. Right now the diameter for spawn distance is hard coded at 400m. I can make that an adjustable number in a later version.

Share this post


Link to post
Share on other sites

Karma Modules is now on Play With Six. Take a look under system. It should make it easier for mission makers and the community to get and use the modules.

Share this post


Link to post
Share on other sites

Hi Karma,

Love the mod, however I am running into one or two small issues with one of my PVP missions.

With the carbomb module, the cars don't turn their lights on at night, is there a way to either force them on, or on/off based on game time or a random probability of having their lights on/off?

second, in my pvp mission, the nato force has the ability to see the location markers of all units on the map (it only updates every 5mins and there is a random value set to determine if that units dot gets updated.) However I can't seem to generate markers for any of the civ's/vehicles generated by the carbomb module, I've tried agents/vehicles/allUnits variables with no luck, the most I get with the allUnits variable is a single vehicle out of the 60 I've told to be on the map. Obviously there is a way because the debug mode does almost exactly what I want (minus the names, update rate and color) If you have any ideas on how to solve this problem it would be fantastic.

The marker script I am using is based on this with a few little changes to remove text and removed the duplicate code block

http://forums.bistudio.com/showthread.php?151294-MP-map-friendly-player-markers

Cheers

C.

Edited by catatonicChimp
link

Share this post


Link to post
Share on other sites
Hi Karma,

Love the mod, however I am running into one or two small issues with one of my PVP missions.

With the carbomb module, the cars don't turn their lights on at night, is there a way to either force them on, or on/off based on game time or a random probability of having their lights on/off?

second, in my pvp mission, the nato force has the ability to see the location markers of all units on the map (it only updates every 5mins and there is a random value set to determine if that units dot gets updated.) However I can't seem to generate markers for any of the civ's/vehicles generated by the carbomb module, I've tried agents/vehicles/allUnits variables with no luck, the most I get with the allUnits variable is a single vehicle out of the 60 I've told to be on the map. Obviously there is a way because the debug mode does almost exactly what I want (minus the names, update rate and color) If you have any ideas on how to solve this problem it would be fantastic.

The marker script I am using is based on this with a few little changes to remove text and removed the duplicate code block

http://forums.bistudio.com/showthread.php?151294-MP-map-friendly-player-markers

Cheers

C.

I never tested the car bombs at night so I never saw weather or not the lights were on. I took a look at the code and based on the old arma 2 behaviour they should have the lights on at night. I will give it a test and see what happens. If the behavior scripting has changed in Arma 3 then I will try and find a solution. I guess I could either set an option in the module to have lights on or script a solution based on time of day.

The marker problem is really interesting considering the allUnits, vehicles command should pull up all the units in the game. The problem could be a possible issue with scripting locality server vs client issue.

Are you running any other mods?

Share this post


Link to post
Share on other sites

It looks like some of the lights are on, but I think that is just the running lights, from the air we can see the vehicles on the radar, but flying near them we can clearly see the car, but no lights..

The mods I am running with it are: Task Force Arrowhead Radio, Vehicle Refinement Mod, a couple of client side mods, but that is it for what is actually been called in the mission.

AllUnits does show a single unit, but yeah that is it, I did see a similar problem in testing with AI units (instead of actual players) where they wouldn't show up until I added a name to them...

Cheers

C.

Edited by catatonicChimp
grammer/spelling

Share this post


Link to post
Share on other sites
I think the bug with the headlight is a result of the behaviour set on the civilians... apparently they only turn their headlights on if they are in safe behaviour. http://feedback.arma3.com/view.php?id=4533

Managed to sort my issues with markers... it was a locality issue like you suggested..

Cheers

C.

Glad you got your marker script working. I have been a little busy so have not had time to look at it but its good to know I was not crazy. Locality in scripting can always be a challenge to work with.

Thanks for the information about the AI drivers and headlights. I can test the AI in safe behavior and see what they do but in Arma 2 I think in safe mode the units would start to drive off road. Careless was the only way to get units to stick to the roads. If that does not work I can script the driver to turn the lights on. I code hard code it in or set an option in the module settings with Lights On Time or Lights Off Time. Not sure what people would rather see so I hope a few of the Mod users post an opinion.

Hopefully this should be patched in the next release along with a few other minor bug fixes.

Share this post


Link to post
Share on other sites

Actually I you might be right, careless should work as well, but I haven't tested with that... safe did definitely work when I set that behavior to my ai squad.

I did have a look through your code to see if I could find anything missing, (I am relying on memory now, so I am probably wrong) but I don't recall seeing any setBehavior or setWaypointBehaviour under the scripts for spawning and controlling the civ vehicles, though I did see one for the car bombs... but I could also have just been stupid and missed it...

Edited by catatonicChimp

Share this post


Link to post
Share on other sites

I'm very interested now, especially after someone got it working with ALiVE! I wasn't sure how nicely the two would work together: http://www.armaholic.com/forums.php?m=posts&q=26171

Looking forward to IEDs and suicide bombers! Your roadblock module should do nicely to replace my feeble attempts at creating such a thing from scratch. Thanks!

Three questions (sorry if I missed them... I read the whole thread but it's been a very long day): If using the roadblock module too, will it let the civ vehicles pass? Do the civ garrison cache at a distance or not at all? Are the civ vehicles affected by combat? In other words, does their behavior change if combat is detected up ahead?

I second the idea about being able to stop and "commandeer" civilian vehicles, similar to TPW's. This might have a future use if anyone sets up a "take civ in for interrogation", etc. type of scenario. UNLESS they are a car bomb! Then they should blow up, if close enough. If shot at civs should stop and maybe try to flee, car bombs could speed up!

EDIT: If you are still looking for feature requests it would be nice if the civ vehicles considered military bases in the starting locations or destinations? I'm testing it on Clafghan and I can't seem to get any of them to spawn in the south end of the map, near the major military base (where I really want to use the roadblocks!)

---------- Post added at 10:22 PM ---------- Previous post was at 09:38 PM ----------

And the garrison module, will custom civilians work too?

Thanks!

EDIT AGAIN: I had read elsewhere in this thread that car bombs didn't like to use their headlights. This actually sounds kind of cool. Even better would be a car bomb that acts like a normal car, headlights on, until it picks a target. Headlights off (harder to see to shoot at!) and throttle pedal to the floor! :D

Edited by Oktyabr

Share this post


Link to post
Share on other sites

Just to be clear, if i use this on mission editing, the add-on is required after exporting correct? Is there not a way around this? Like copying the required code/script to the mission?

Share this post


Link to post
Share on other sites
Just to be clear, if i use this on mission editing, the add-on is required after exporting correct?

That is correct.

@I34dKarma Liking these a lot! If you haven't already been considering/working in this direction yet, how about providing a variable size for the garrison module? Either linked to a named marker or with a radius?

Thanks!

Share this post


Link to post
Share on other sites

First off sorry for the delay in updates I have been having issues with a physx.dll crash with the latest patch that makes it really hard to work on and test code when it crashes. Hopefully a new update will fix the issue.

Actually I you might be right, careless should work as well, but I haven't tested with that... safe did definitely work when I set that behavior to my ai squad.

I did have a look through your code to see if I could find anything missing, (I am relying on memory now, so I am probably wrong) but I don't recall seeing any setBehavior or setWaypointBehaviour under the scripts for spawning and controlling the civ vehicles, though I did see one for the car bombs... but I could also have just been stupid and missed it...

Now I remember why I did not set the behavior, I had a little issue with it during initial testing with civilian traffic so I am trying something to get it fixed. The units do not use waypoints just to keep the code cleaner as well avoiding the hassle of making more groups.

I'm very interested now, especially after someone got it working with ALiVE! I wasn't sure how nicely the two would work together: http://www.armaholic.com/forums.php?m=posts&q=26171

Looking forward to IEDs and suicide bombers! Your roadblock module should do nicely to replace my feeble attempts at creating such a thing from scratch. Thanks!

Three questions (sorry if I missed them... I read the whole thread but it's been a very long day): If using the roadblock module too, will it let the civ vehicles pass? Do the civ garrison cache at a distance or not at all? Are the civ vehicles affected by combat? In other words, does their behavior change if combat is detected up ahead?

I second the idea about being able to stop and "commandeer" civilian vehicles, similar to TPW's. This might have a future use if anyone sets up a "take civ in for interrogation", etc. type of scenario. UNLESS they are a car bomb! Then they should blow up, if close enough. If shot at civs should stop and maybe try to flee, car bombs could speed up!

EDIT: If you are still looking for feature requests it would be nice if the civ vehicles considered military bases in the starting locations or destinations? I'm testing it on Clafghan and I can't seem to get any of them to spawn in the south end of the map, near the major military base (where I really want to use the roadblocks!)

---------- Post added at 10:22 PM ---------- Previous post was at 09:38 PM ----------

And the garrison module, will custom civilians work too?

Thanks!

EDIT AGAIN: I had read elsewhere in this thread that car bombs didn't like to use their headlights. This actually sounds kind of cool. Even better would be a car bomb that acts like a normal car, headlights on, until it picks a target. Headlights off (harder to see to shoot at!) and throttle pedal to the floor! :D

Oktyabr here is an answer to a few of your questions.

- Double checked the code on the roadblocks and civilians should pass through roadblocks without any trouble. I know that the roadblocks see the car bombs as enemies so they will open fire on them.

- I did not use military bases as spawn locations or destinations for civilian drivers just do to logic. A civilian would not have much use of driving to a military base. Might consider it in the future if I get enough requests for it. The locations are grabbed from the map so it also depends on how the map maker classifies locations so results are going to very from map to map.

- The car bombers will do a speed change when a target is spotted. They will come to a stop (Arm the bomb) then accelerate to max speed if they can. Trying to deal with the headlights though is going to be tricky because it is tied directly to AI behavior, so if I change the behavior to turn off the lights they will no longer drive right at the target but instead try and avoid incoming fire. They will then try to find cover and flank so it kinda ruins the experience. Might change the car bomb code and civilian code to do FSMs and it might be possible to get them do it with that method.

- To get the player units to be able to interact with the traffic might be possible but that is going to take a ton of client side coding to do. To be honest that is where my scripting skills start to dwindle. I can ask the creator of TPW to use some of his code it might help but still this is going to be a backbunred part of the project.

- I can put in a radius for spawning units in the city garrison module. That will be pretty easy. Currently the radius is 200m from the center. The civilians how ever will run that same 200m scan for a building each time they find a new building to go to so they will wonder around a bit further from the module placement. This seemed to work fine in smaller cities but I agree that an adjustable value would be handy for larger cities.

- I did not cache the units the city garrison script because all the code is done with FSMs, to cache the units it would require another loop running. To keep the over head low I did decided not to do it. I did zero out a lot of the skills that that AI have that the civilians don't need to keep the overhead low. I may also see what disabling a few of the AI features might help as well. I populated about 4 cities on the map and did not notice any real changes in frame rates or perfomance.

- Custom civilians should work as well with the city garrison module. I did not test with custom civilian units but I did test with custom/mod military units and that worked without issue. That was the main reason I used the method of synching units to the module. Call it a lesson learned from getting roadblocks to work with custom units.

- Civilian drivers do react to combat somewhat. Its pretty much the default AI civilian behavior AI running there. Hopefully BI will improve the civilian behavior down the road considering its pretty basic right now.

Hopefully BI will fix the crash issue soon so I can get to work on releasing an update.

Share this post


Link to post
Share on other sites

You could always break the headlights on the car they are driving

EDIT:

It seems to be harder than I thought to break the headlights from a script point of view...

Take the Hatchback for example, It has 4 lights on the front, LightCarHeadL01, LightCarHeadL02, LightCarHeadR01, LightCarHeadR02.

LightCarHeadL01 and LightCarHeadL02 both share the hitpoint "Light_L".

LightCarHeadR01 and LightCarHeadR02 both share the hitpoint "Light_R".

If you run _vehicle setHit ["Light_l",1]; , you will see one of the front left ones break, but the other one is still one. I am not sure how to break it.

You can add a "Dammaged" eventHandler to the car and no matter where you shoot the headlight, it will show up as "Light_L" or "Light_R", even though there are 2 lights on each one...

It seems other cars do the same thing. The Hunter, Offroad, Marshall, HEMTT and UGV for example.

The Quadbike and Slammer do not.

Edited by brians200

Share this post


Link to post
Share on other sites

Thanks for the well worded reply!

Oktyabr here is an answer to a few of your questions.

- I did not use military bases as spawn locations or destinations for civilian drivers just do to logic. A civilian would not have much use of driving to a military base. Might consider it in the future if I get enough requests for it. The locations are grabbed from the map so it also depends on how the map maker classifies locations so results are going to very from map to map.

Again, as an example, Claf or even Altis have a very large main base. In real life civ *vehicles* drive back and forth from such bases all the time (no soldier uses an MRAP to run to the convenience store), but more importantly on most well made maps large bases are also usually located along a major roadway... so it's not that I specifically want civ vehicles driving to and from bases but rather I want them to use the roads that go by the base(s) and on some maps (Claf again) because the module doesn't detect any towns in the south of the map very few cars ever make it there.

- The car bombers will do a speed change when a target is spotted. They will come to a stop (Arm the bomb) then accelerate to max speed if they can. Trying to deal with the headlights though is going to be tricky because it is tied directly to AI behavior, so if I change the behavior to turn off the lights they will no longer drive right at the target but instead try and avoid incoming fire. They will then try to find cover and flank so it kinda ruins the experience. Might change the car bomb code and civilian code to do FSMs and it might be possible to get them do it with that method.

I love the speed change idea if nothing else! We played for awhile today with them and ended up getting blown up by a carbomb that was parked across the road. I'm sure it was an accident but the area it was in made it perfect for such an ambush (opfor on the nearby hills shooting down at us). One of the guys in our squad repeated the suggestion that it might be nice to have some sort of indicator that it is a carbomb... wires hanging out of the trunk, classic PR "ALLAHU AKBAR!!!" shouted from the car, or maybe even the horn honking (?!?) I don't know really what might work or how it might be implemented... the speed up and maybe headlights off at night in the future would be much better than nothing.

- To get the player units to be able to interact with the traffic might be possible but that is going to take a ton of client side coding to do. To be honest that is where my scripting skills start to dwindle. I can ask the creator of TPW to use some of his code it might help but still this is going to be a backbunred part of the project.

I understand. It's been my quest for awhile to get MP compatible civs working and I don't know how many times I've looked over various scripts and such. Best of luck with it!

- I can put in a radius for spawning units in the city garrison module. That will be pretty easy. Currently the radius is 200m from the center. The civilians how ever will run that same 200m scan for a building each time they find a new building to go to so they will wonder around a bit further from the module placement. This seemed to work fine in smaller cities but I agree that an adjustable value would be handy for larger cities.

For some reason I thought the radius on the garrison was 400m! No wonder they were spawning a bit strange. A radius setting would be great. Some of the little COP's and villages on Clafghan, for instance, can be completely covered with a 50m radius marker. Other cities are much larger... but to make MY mission editing simpler ;) something like using a named marker to cover the area would be best, just because I already have them in place for ALiVE. None the less if a radius variable is much easier to code I certainly won't complain.

- I did not cache the units the city garrison script because all the code is done with FSMs, to cache the units it would require another loop running. To keep the over head low I did decided not to do it. I did zero out a lot of the skills that that AI have that the civilians don't need to keep the overhead low. I may also see what disabling a few of the AI features might help as well. I populated about 4 cities on the map and did not notice any real changes in frame rates or perfomance.

You've done a great job so far. My current mission uses the garrison module something like 10 times, just for civs, with five each. I expected MUCH more performance loss than I have actually seen, especially running it with the carbomb module (10 cars), five instances of the custom roadblock module, AND 2500 force strength of ALiVE. I think I see only a couple FPS drop with all those modules than I do without them. Pretty slick, considering that the garrsions do not cache!

- Custom civilians should work as well with the city garrison module. I did not test with custom civilian units but I did test with custom/mod military units and that worked without issue. That was the main reason I used the method of synching units to the module. Call it a lesson learned from getting roadblocks to work with custom units.

Yup. Got them working just fine. I really like the way you have it set up to sync them to the Master list module too. Very clever, easy to use and it works very well. The only reason I don't use them for military units too is because ALiVE's CQB module already does a very smart job of it. Might try using it to better defend some friendly bases though... I really need to find a way to spawn custom military units in a base where they will actually use and defend things like HQs, guard towers, etc. The BIS Sites -> Blufor -> Outpost module does this almost perfectly but can't be used with custom units and I'm not sure how much overhead it would add anyway.

- Civilian drivers do react to combat somewhat. Its pretty much the default AI civilian behavior AI running there. Hopefully BI will improve the civilian behavior down the road considering its pretty basic right now.

Hopefully BI will fix the crash issue soon so I can get to work on releasing an update.

Top notch stuff! Looking forward to seeing what you cook up next, once you get the crash sorted out.

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  

×