Saturday, October 15, 2016

ArmA 3 Scripting, Random Crate And Soldier Load Outs

So I've been scripting in notepad++ again, this time writing a couple of randomization scripts for missions for use within A3Wasteland.

Within the vanilla A3Wasteland... it got rather boring doing the same missions over and over, approaching the same AI, being rewarded with the same crate load outs (which were never really any good to begin with), so I decided to totally randomize things.

The first script I wrote was for crate load out randomization. I began by pulling all the class names from the ArmA 3 config file for wearables, weapons, throwables, etc then compiling them in to a list (per array). I then set out to do a total randomization on what was selected, number of items/magazines/grenades/etc, how many loops per, etc. After coding it (I knew it would work in theory), I jumped in-game to the test environment... and well, it worked as expected, so I was very pleased. I ran the same script over-and-over on the same crate, and it randomized the load-out each and every time... so no two load-outs would every be the same!
Look at...
...all the...
...goodies!
Once tested, I merged it in to my A3Wasteland DEV build (my highly customized 1.Xx build) and made sure it worked... and it did, on all missions everything was random within the mission crates. The script now resides on my github account which you can find here. *See the script header information on how to implement it in to your own A3Wasteland mission.

Once I coded that script, I thought... now for the mission AI, as they all had the same basic gear on... which was never really any good for 'looting'. I set out to do a similar thing in regards to the crate load out, but for actual AI units... so the coding was slightly different.
 
Mission AI got some decent gear!
More dead mission AI units with custom gear.
Again, I coded it and was sure it would work in theory... tested it, then implemented it in to my A3Wasteland DEV build, and waited for a mission to spawn. I put myself as a friendly unit to the mission AI and went and had a look... yup, all custom load-outs per AI unit. You can also find the script on my github account here.

So now each A3Wasteland mission has random load-outs for AI units (wearables, primary weapon, throwables, etc) as well as upon mission completion... randomized weapon crate load outs (worthy of actually completing missions now!). *Thermal scopes can be negated from load-outs.

At the time of this post, the only two servers (that I know of) to currently run these load-out scripts are [TAG] and [FRAC] A3Wasteland servers.

I hope more A3Wasteland servers implement these scripts in to their mission, as it gives the player(s) a better and more random reward each and every completed mission (no two crates will ever be the same).

Randomization FTW!

-soul.