Loot on mission (edit)

  • Offline Ltc-Bullet
  • First Blood
  • ***
  • Posts: 57
  • Founder of EZ Company Gaming

Loot on mission (edit)

« posted: Sep 12, 2016, 04:56 PM »
Hello guys well like my tittle say i wanna edit the item that are in the loot boxes when you finish the mission if any body can help me on that ...thanks in advance ...

Re: Loot on mission (edit)

« Reply #1 posted: Sep 12, 2016, 10:47 PM »
Look for server/functions/fn_refillbox
  • Offline Ltc-Bullet
  • First Blood
  • ***
  • Posts: 57
  • Founder of EZ Company Gaming

Re: Loot on mission (edit)

« Reply #2 posted: Sep 13, 2016, 06:12 AM »
Thanks  ;D ;D ;D ;D
  • Offline soulkobk
  • First Blood
  • ***
  • Posts: 99
  • soulkobk.blogspot.com.au

Re: Loot on mission (edit)

« Reply #3 posted: Oct 08, 2016, 04:41 AM »
You may be interested in this script that I have written.

It totally replaces the "fn_refillbox" command that missions use for the crate load-outs.

My script fills mission crates 100% randomly each-and-every-time, so no two crate load-outs will ever be the same. You are able to change the configuration of everything within the script itself should you want to add/remove/change items, and minimum and maximum values on added quantities to each crate.

I have briefly tested my script within A3Wasteland, and it works extremely well. So instead of "knowing" exactly what crates will contain at certain missions... it is now 100% random, so you'll never know what crate goodies are inside before you finish the mission!

-soul.
  • Offline Violt
  • Geared Up
  • **
  • Posts: 44

Re: Loot on mission (edit)

« Reply #4 posted: Oct 08, 2016, 10:42 AM »
You may be interested in this script that I have written.

It totally replaces the "fn_refillbox" command that missions use for the crate load-outs.

My script fills mission crates 100% randomly each-and-every-time, so no two crate load-outs will ever be the same. You are able to change the configuration of everything within the script itself should you want to add/remove/change items, and minimum and maximum values on added quantities to each crate.

I have briefly tested my script within A3Wasteland, and it works extremely well. So instead of "knowing" exactly what crates will contain at certain missions... it is now 100% random, so you'll never know what crate goodies are inside before you finish the mission!

-soul.

Hey man, how do i install this script? in what Folder?

Re: Loot on mission (edit)

« Reply #5 posted: Oct 08, 2016, 03:57 PM »
Thanks for this very much appreciated , could you give me an example of how to do this

Code: [Select]
In order to use this in your mission you can place in the init line of the crate...
this call randomCrateLoadOut;

Would this go within the actual mission file itself or within the fn_refillbox , any info would be appreciated

best regards

smithy
  • Offline Mokey
  • Fractured Wasteland
  • Elite
  • ******
  • Posts: 594
  • Https://Fractured-Gaming.com

Re: Loot on mission (edit)

« Reply #6 posted: Oct 09, 2016, 08:33 AM »

Ignore the Backup files... my sorcetree went nuts
https://github.com/Fractured-Gaming-Official/Frac_v1.3.Stratis/commit/9a4ca5b53562b17cfc197d0c6e6cba8dc18c9d0c


I just replaced
Code: [Select]
call fn_refillBox; with
Code: [Select]
call randomCrateLoadOut;
seems to work fine.. probably the worst way to do it LOL. but it works.
Posts once, edits post 40 times in 60 seconds. STUPID FAT FINGERS!
  • Offline soulkobk
  • First Blood
  • ***
  • Posts: 99
  • soulkobk.blogspot.com.au

Re: Loot on mission (edit)

« Reply #7 posted: Oct 09, 2016, 01:35 PM »
Hey man, how do i install this script? in what Folder?

If you read the header of the file, it includes instructions on how to install it. :)

Quote
   Description:
   For use with A3Wasteland 1.3x mission (A3Wasteland.com). This script is a replacement mission
   crate load-out script that will randomly select and place items in to mission crates.
   
   Place this script in the mission file, in path \server\functions\randomCrateLoadOut.sqf
   and edit \server\functions\serverCompile.sqf and place...   
   randomCrateLoadOut = [_path, "randomCrateLoadOut.sqf"] call mf_compile;
   underneath the line...
   _path = "server\functions";
   
   In order to use this in your mission you can place in the init line of the crate...
   this call randomCrateLoadOut;
   
   If you intend on using it within outpost scripts, you can call this script within using the
   fourth paramater, Example...
   ["Box_East_WpsSpecial_F",[0,0,0],0,{_this call randomCrateLoadOut}],
   ["<object>",[<xyz location>],<direction>,{<init>}],
   
   The custom function will disable damage to the crate, lock the crate until mission is completed,
   and randomly fill the crate with loot. To edit the script and how it functions, see the code
   below from lines 64 to 1109. Some loot is commented out by default (OP items), I have left
   them in should you want them in your A3Wasteland mission.

You'd then search within your expanded mission folder, and search for the string 'fn_refillbox', and all your mission.sqf's should pop up. Open each one and search for the text 'fn_refillbox'.

Some mission lines were like, for example...

Code: [Select]
[_box1, "mission_USSpecial"] call fn_refillbox;
which then needs to be changed to...

Code: [Select]
_box1 call randomCrateLoadOut;
It all depends on how your missions are called/executed, as everyone seems to have additional ones they have added in.

You can also call this script for missions with any object you can store items in (ammo crate, vehicle etc). it will spawn the items inside

The syntax to use it is the same every time you want to call it...

Code: [Select]
<object> call randomCrateLoadOut;
Code: [Select]
_this call randomCrateLoadOut; // for use in sqf scripts
Code: [Select]
this call randomCrateLoadOut; // for use in init lines of objects
Code: [Select]
_vehicle call randomCrateLoadOut; // for use in sqf scripts when doing createVehicle <vehicle class>
Code: [Select]
_object call randomCrateLoadOut; // for use in sqf scripts when doing createVehicle <crate/box class>
I hope that helps in understanding how it gets installed and functions. With any of my public scripts, always read the header text!

Thanks for this very much appreciated , could you give me an example of how to do this

Code: [Select]
In order to use this in your mission you can place in the init line of the crate...
this call randomCrateLoadOut;

Would this go within the actual mission file itself or within the fn_refillbox , any info would be appreciated

best regards

smithy

See the above explanation :)

If anyone still has any issues or questions, just throw me a PM (as I don't always check these public forum posts).

-soul.

Re: Loot on mission (edit)

« Reply #8 posted: Oct 10, 2016, 08:21 AM »
Thanks guys really appreciate the help
  • Offline Ltc-Bullet
  • First Blood
  • ***
  • Posts: 57
  • Founder of EZ Company Gaming

Re: Loot on mission (edit)

« Reply #9 posted: Oct 10, 2016, 10:58 PM »
That's a very nice way to sort the loot on the missions I will try it but I will go so the frac version of editing the name of the files
  • Offline Mokey
  • Fractured Wasteland
  • Elite
  • ******
  • Posts: 594
  • Https://Fractured-Gaming.com

Re: Loot on mission (edit)

« Reply #10 posted: Oct 11, 2016, 12:10 AM »
That's a very nice way to sort the loot on the missions I will try it but I will go so the frac version of editing the name of the files

His version is just as good. IF you want to reference mine, Everything is up to date and working thanks to soul. You can reference mine if you want.

But there are pros and cons to both.

The standard fn_refillbox is good. You can specify many arrays without any issues and give certain missions the crates needed. However, those missions will ONLY drop what you specify.

The RandomCrate sqf is awesome. However, you will need to make multiple scripts to make multiple random arrays for different boxes. 

I guess it's however you like it. I like randomness, I have Thermals included. However thermals are "HIDDEN" in my store config and sell for quite a bit in our gun store. SO people can sell the non store items rather than just hoard thermals. Or if you kill some1 you could call it a payday.

I personally prefer the randomcrates. It causes people to go, "OHHH, I GOT A NIGHTSTALKER!!" and other people say, "Thanks for the paycheck. Sorry you lost your NightStalker!" when they kill them. It comes to what you and your server prefers.
Posts once, edits post 40 times in 60 seconds. STUPID FAT FINGERS!
  • Offline Ltc-Bullet
  • First Blood
  • ***
  • Posts: 57
  • Founder of EZ Company Gaming

Re: Loot on mission (edit)

« Reply #11 posted: Oct 11, 2016, 12:17 AM »
Yea I will give the credits to him but I will cut the work on the files  ;D
  • Offline Mokey
  • Fractured Wasteland
  • Elite
  • ******
  • Posts: 594
  • Https://Fractured-Gaming.com

Re: Loot on mission (edit)

« Reply #12 posted: Oct 11, 2016, 12:20 AM »
I sent Soul a PM earlier telling him great work. I Personally am in love with this, and will probably Frankenstein it for a fewthings. I.E. Gambling Store :P
Posts once, edits post 40 times in 60 seconds. STUPID FAT FINGERS!
  • Offline dekela
  • First Blood
  • ***
  • Posts: 79

Re: Loot on mission (edit)

« Reply #13 posted: Oct 11, 2016, 01:11 PM »
its is indeed an awesome script to add pure randomness to mission crates. i have been running it for a little and the players seem pretty happy, unless they get the ever elusive crate with firstaid kits and bipods  :P

Re: Loot on mission (edit)

« Reply #14 posted: Nov 05, 2016, 01:27 AM »
Do i need to add " _box1 call randomCrateLoadOut;" on all missions ore only on those i want to spawn random loot crates?

 :-X

It dosnt work for me and im stuck