Jump to content
Sign in to follow this  
demonized

Preset Weapon selections by player UID [script]

Recommended Posts

Preset Weapon selections by player UID v 1.44

Tool for mission makers, preset weapon selection for known players in MP missions and unit names in SP/MP missions

Version 1.44 is Fully working on dedicated server, vanilla and ACE, should also be compatible with any addons, but only ACE, ACRE and vanilla has been checked, this is latest stable version.

Experimental Preset Weapon selections and Body model change by player UID v 1.5

version 1.5 wich is same as v 1.41 but with added option for body model change, is still very experimental and will have issues with alot of scripts/missions that do not use ingame normal respawn.

v 1.5 is still WIP, download it at bottom of post.

How it Works:

when mission starts all players get x amount of actions based on their own unique ID, x of them is a custom loadout with all weapons/ammo/items/backpacks with content presets of choise, and last is "im ready" wich removes all the actions used by this script and you cannot acess it again, until scripted to.

You can find your ID when you start arma2 and in player profile, copy the 7 digits at bottom marked Player ID.

Give the player id to the mission maker along with your three arrays containing your selected loadouts from .rpt file along with a name of your choosing for each loadout, example "my awsomest guns" etc...

Or mission maker can create loadouts himself and allow certain players to acess them based on their player id.

For more specific info read info in preset_weapons.sqf.

Detailed instructions:

Instructions setting up a preset:

NOTE: if you want to include a body model change in your preset, name the unit in demo mission body and change the unit to whatever body you want, all bodys supported.

1: place the demo mission in my documents:

i run win 7 ultimate and my missions is stored here:

"C:\Users\DP490\Documents\ArmA 2 Other Profiles\yourIngameNick\missions"

2: locate your .rpt file as we need info from it after youre done.

To locate arma2OA.rpt file you need to show hidden files and folders.

My Arma 2 is NOT steam and is located: "C:\Users\DP490\AppData\Local\ArmA 2 OA\arma2OA.RPT"

For steam users: .rpt file may be in another location.

3: go into single player editor, and load up desert map and the demo mission.

4: click on the backpack on the left side of the player and switch it to whatever kindof backpack you want to use, or add more backpacks around you, it does not matter.

5: take whatever weapons, ammo, items and if you want a backpack take that to and fill it with whatever you want.

the ammo box contains ALL weapons and ALL ammo and ALL items you currently have in ALL your active addons. meaning if no addons you have all vanilla stuff, if ACE you have ALL ACE stuff etc.... also contains ALL OA backpacks, did i mention it was all??

6: when you have a loadout you want to save, press 0,0,1 (radio alpha) this will save the current loadout to the rpt file.

Now repeat step 5 and 6 x amount of times until you have your loadouts saved in .rpt file.

7: give each loadout a name you will remember: fex "my sniper loadout" or "saw with backpack" etc...

you will find in your arma.rpt file something like this:

"__________START of current weapon selection"
[["BAF_L85A2_RIS_ACOG","NVGoggles","ItemMap","ItemCompass","ItemWatch","ItemRadio"],["30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","BAF_L109A1_HE","BAF_L109A1_HE","SmokeShell"]]
"__________END of current weapon selection"

8: copy everything from start to end lines for each loadout, this is one loadout. (top of .rpt is the first one, bottom is the last one you saved with 0,0,1 in demo mission).

9: give player id and each loadout from .rpt file along with a name of your choosing for each loadout to the mission maker.

You can find your ID when you start arma2 and in player profile, copy the 7 digits at bottom marked Player ID.

Mission maker will take care of the rest, DONE.

Instructions for mission maker:

You now have x amount of loadouts with names and player ids from all you want this to work for, open up preset_weapons.sqf in the loadouts folder

1: locate this line

_Player_UID = ["1111111"];

and switch numbers "1111111" out with the id of the player.

NOTE: you can replace above line with this if you have multiple players for same setup:

_Player_UID = ["1111111","2345678"];

place all ids in the ["1111111","2345678"] seperated by a comma, now any player with that id will get the same loadout options.

2:

locate the line that starts with

_loadouts = [
[some code],
[some code]
];

3:

replace [some code] with 1 of the arrays from .rpt files (all lines between "start and end" lines), followed by a comma , and repeat for how many you want.

you will get something like this for 3 loadouts, add/remove x amount by desire.

_loadouts = [
[[["BAF_L85A2_RIS_ACOG","NVGoggles"],1,1]],"30Rnd_556x45_Stanag","SmokeShell"],[6,2]]],
[[["BAF_L85A2_RIS_ACOG","NVGoggles"],1,1]],"30Rnd_556x45_Stanag","SmokeShell"],[6,2]]],
[[["BAF_L85A2_RIS_ACOG","NVGoggles"],1,1]],"30Rnd_556x45_Stanag","SmokeShell"],[6,2]]]
];

IMPORTANT!!!: after the last array in _loadouts and last name in _names there must be NO comma.

also _names corespond with order of _loadouts, top one has top name bottom one has bottom name.

4:

locate the line:

_names = [
"some name",
"some name"
];

replace "some name", with "whatever choosen name for that players loadout 1".

repeat for all loadouts until you have names for all arrays, DONE for 1 player.

repeat and do the same for all players. you will see example for Michael Jackson and Donkey Kong player in preset_weapons.sqf how and what to copy, you can have as many players you want in this script, no limits.

also same examples in preset_weapons_demo.sqf on unit usage instead of player UID.

5: open up init.sqf and add this:

// this is needed for backpacks and content to work, in both SP and MP.
Preset_loadOuts_backPacks = compile preprocessFile "loadouts\backpacks.sqf";

Multi Player missions:

Place this line in any object/unit initline and that will serve as where the action can be acessed from:

// for the MP mission, only usable in MultiPlayer, place in any playable units initline to avoid JIP issues.
_null = [this,"start"] execVM "loadouts\preset_weapons.sqf";

Single Player missions:

player id will not work and is not needed for Single Player, use the "preset_weapons_demo.sqf" and simply skip step 1.

add this into any unit/object initline or init.sqf:

[player,"start"] execVM "preset_weapons_demo.sqf";  // for use in SP only.

You can also start weapon selection again anytime during the mission by running the lines used in init.sqf, or the object etc again from a script or a trigger, note that the backpack part from init.sqf only needs to be run at mission start, and will work for the entire mission, no matter how many times you activate this script.

folder named demo_files is only needed for unmodified Single Player or setting up and testing presets for Multi Player, it can be deleted when no longer needed.

1 time setup, lifetime reward.

NOTE: script was created for trusted members of clan who play fair, if players dont select "im ready" after they are done they can change their weapons whenever how many times they want during the mission, a potential cheat wich mission maker should be aware of.

How to avoid cheating:

place this in init.sqf, a trigger or anywhere before the script is started.

Preset_Loadouts_Active = true;

locate below line in preset_weapons.sqf and:

change:

_con = format["(getPlayerUID _this) == '%1' AND (getPlayerUID _this) in %2",(getPlayerUID _unit),_Player_UID];

to this:

_con = format["(getPlayerUID _this) == '%1' AND (getPlayerUID _this) in %2 AND Preset_Loadouts_Active",(getPlayerUID _unit),_Player_UID];

and repeat for all presets.

Now you can turn off the available loadouts actions with doing this in a trigger or a script:

Preset_Loadouts_Active = false;

for exampel when units are out of an area, it can also be replaced with individual variables or simply replace

Preset_Loadouts_Active

with for example a distance check:

(_this distance anyotherobject) < 50

You will get:

_con = format["(getPlayerUID _this) == '%1' AND (getPlayerUID _this) in %2 AND (_this distance anyotherobject) < 50",(getPlayerUID _unit),_Player_UID];

now the actions will only be availabe when that specific player is within 50 meter of the object or unit called anyotherbject

Any other conditions can be used. its a AND OR condition and works with any know combination.

This demo mission is meant for SP editor, it contains 3 switchable units and a ammo crate with all weapons, magazines and items that are in all your active addons, as well as 1 BAF backpack next to it, and a warrior (BAF) to test object actions instead of unit actions, and a CRATE with ACE backpacks automatic created for ACE users.

initial unit (test1 has actions on his body, meaning he can select anywhere anytime until he selects "im ready" action, also he has same actions on warrior as well.

Use T to teamswitch to any of the other units.

Approach warrior with unit test2 and see that this unit has acess to both his own and (test3) actions (public).

Approach warrior with unit test3 and see that he only has acess to "public" loadouts.

unit named test1 has actions assigned directly to him self, and at the warrior.

In demo mission i have made 4 quick presets for myself for demonstration.

1: "my default inf loadout"

2: "my Ak74 and backpack"

3: "my ACE and backpack"

4: "ACE and weapononback full kit"

Scroll your mouse wheel and select any of the loadouts to see how it works, and when done select "im ready" and all the actions will be removed, and you are good to go.

If actions are on a object/vehicle the action "im ready" will not appear, so you can choose from it as long as its not destroyed.

the destroyed part can ofc be modified to suit users needs, its a condition nothing else, all viable conditions can be used, _target is object, _this is the unit/player acessing _target actions.

Credits:

Styxx42 - for feedback, bug reports and testing on dedicated server with ACE.

Spazo - for feedback and bug reports.

HitmanFF - for pointing out the use of arrays when used on multiple players.

Issues: 1 total known confirmed atm, current stable is v 1.44 download added 2nd May 2011.

when using ACRE mod, magic box stop working most of the times in demo mission, unsure why.

workaround, place down any ammo box of choise and select gear from them.

Notes:

There is a limit in amount of characters printed to .rpt file, its 1044 total:

v 1.42(further improved in v 1.44) is taking measures againts this issue, but if you have insane amount of different mags, weapons, items you can in some rare cases get non complete print to .rpt file, NOTE: this will be extremely rare and probably only related to user created mods with very long object classnames.

example:

you have 20 different magazines, 2 different weapons, 1 backpack with 12 different magazines in, and 12 different items and all have a classname wich is 20 characters long: you get 1340 charaters.

but of course noone will never have 20 different magazines as they would need 20 different weaons to use them so it will not be a problem, if you encounter a circumstance where this is indeed a problem with v 1.44 let me know and ill try my best to work around it.

Tested and working fully in SP and MP on Dedicated server with v 1.43, v 1.44 should be same.

v1.5

body model change is very experimental when used in MP, switch works fine on dedi, but there is issues with custom respawns etc.

Confirmed working fine in MP and SP editor, you can also change body model inside a vehicle etc, and script will keep your group, leader, vehicle position, score etc.. more to come, need bug reports.

Please submit any errors or scores missing etc if testing this, bug hunt will be prioritized.

Once body model change is confirmed working on dedicated server, i will begin to implement support for synched modules, respawn / revive scripts like Norrins revive etc.

If you have a specific one please let me know and ill look into making support for it.

body model change in v 1.5 is partially confirmed working on dedi server, issues:

original unit is not deleted but hidden,

respawn types like in insurgency, norrins revive is ofc not supported yet.

WIP: norrins revive, domination respawn/revive, ACE wounded modules.

Changelog:

Updated to v 1.44 - 2nd May 2011

- added dynamic creation of x amount of preset loadouts, infinite? tested with 23 total.

- fix for ocasional multiple ACRE radios.

- prevent accidental grenade throw due to multiple mouse clicks when selecting loadout.

- further shortening of characters printed to .rpt file, by removing double instances for weapon on back and backpack with ACE.

- shortened viewed script to make for easier usage, NOTE: this is not attempt to hide code, simply place cursor behind every ; and press enter in arma edit or similar to restore full readability.

- added damage check of object/vehicle conditon, note: this can be altered any way desired.

- updated readme.

Updated to v 1.43

- bug fix, action condition was missing "" around UID in MP type script.

- changed count of magazines, weapons to limit max character limits even further, now including weapons in count in case of double weapons, items, this mostly is needed for ACE users and rare case of long names and many different.

- tweaks of script, shortening filepaths references inside script.

- various optimizations.

Updated to v 1.42

- changed magazine count to .rpt file when creating preset, to avoid to many characters issue. (over 1044 characters)

- also changed how magazines is added to unit based on above fix.

- used text in format line in getMyPresets.sqf to avoid first and last " in .rpt file.

- added all vanilla backpacks to ammo create in demo mission.

- added automatic ACE backpack crate for ACE users in demo mission.

Updated to v 1.41

- fixed multiple im ready actions in MP.

- fixed possible actions acess on another unit if that unit had not yet selected im ready.

- fixed using playable units part in init.sqf should in theory work now.

Updated to v 1.4

- Fully compatibel with ACE weapons and backpacks, bugs fixed, lets hope at least :)

- ACE weapon on back is placed correctly on back as it was when setting up preset, no matter if it was backpack or another weapon.

- Fixed issue with ACE weapon on back not being detected.

- Fixed issue with ACE double backPacks if action used when already ACE backpack was equipped.

- Also fully support multiple weapons and no backpacks in ACE, see ACE weapon on back full kit action in demo mission.

- updated readme and instructions, since some of it was changed in v 1.4.

Updated to v 1.3

- ACE backpacks also fully supported.

- when using ACE backpacks and rifle and a launcher etc, script puts backpack correctly on back using ACE built in functions.

- Object instead of unit actions optionable. fex a ammo crate.

- Equip AI units same way.

- Tweaks.

Updated to v 1.2

- backpack and content is fully supported. (did not work on ACE) fixed in v 1.3

For those that do not wish to redo all their presets again for v 1.43, here is the critical fix.

1.44 workaround instead of redoing all presets:

http://forums.bistudio.com/showpost.php?p=1910274&postcount=72

NOTE: for v 1.43 and 1.42 old workarounds, does not aply ACRE fix, or premature grenade throwing by accident.

the fix for v 1.42 in regards to UID error was replacing this line in preset_weapons.sqf

_con = format["(getPlayerUID _this) == %1",(getPlayerUID _unit)];

with this:

_con = format["(getPlayerUID _this) == '%1'",(getPlayerUID _unit)];

do the above and you should be just fine, both ACE and vanilla users needs to do this, or simply download v 1.44 and copy the getMyPresets.sqf into your v 1.42/1.43 (old) demo_files folder and select your previous presets one by one, and use 0,0,1(radio) to gather the new presets in v 1.44 format.

Also add this line to top of preset_weapons.sqf v 1.42:

_script = "loadouts\preset_weapons.sqf";

Downloads:

Demo mission v 1.44 for SP editor presetting loadouts and testing functionality, + files for MP and instructions.

This is latest stable version without body model change.

Direct Download: http://www.4shared.com/file/ogBJdnIi/make_my_weapon_selectionsDeser.html

here is the v 1.5 with the experimental body model change, now you can get out your ghillie suit when ever you want ;)

changelog v 1.5:

Added body model change, and all types vanilla("BASE" or 3,"GROUP" or 4 etc..) ingame MP respawn function (experimental).

Added all vanilla backpacks to ammo crate in demo mission, also ACE users gets a backpack crate with all ACE backpacks.

Improved code.

Tweaks.

Updated readme.

Credits:

kju - for posting info on MP selectPlayer on wiki.

Direct Download: http://www.4shared.com/file/CfruvMgD/make_my_weapon_selectionsDeser.html

v 1.5 currently only fully support vanilla respawn, but im working on getting multiple respawn types and revive scripts supported by this as well.

Armaholic link: http://www.armaholic.com/page.php?id=13810

Edited by Demonized
Updated to version 1.44

Share this post


Link to post
Share on other sites

updated to v 1.2

Added backpack and content support.

Share this post


Link to post
Share on other sites

Demonized

This fantastic.

You are fantastic.

Thanks. This will save me so much time.

Last Friday I quickly edited the init lines of my friends solders and 1.5 hours later we finally started playing because of fat finger syntax errors. This will virtually remove this sort of stupidity.(have to leave the HUMAN factor still in there)

THANKS

Pint of your favorite when ever you are in my neck of the woods.

Good old Canada.

Share this post


Link to post
Share on other sites

glad you like it :)

hope it works as intended in MP.

I quickly edited the init lines of my friends solders and 1.5 hours later
this was exactly the reason for making this script. Edited by Demonized

Share this post


Link to post
Share on other sites

Looking forward to trying this out. Got some guys (including myself) who HATE having to take the time to re-spec so this will be interesting to try out. I'll save my initial questions until I take some time to play around with it. ;)

Share this post


Link to post
Share on other sites

Ok, started playing around with this today and have some questions. Here is my line from the preset_weapons.sqf file in the loadouts folder within my mission folder...

_preset1 = _unit addAction ["Standard Loadout","preset_weapons.sqf",["preset1"]];

_preset2 = _unit addAction ["my saw thermal loadout","preset_weapons.sqf",["preset2"]];

_preset3 = _unit addAction ["my javelin loadout","preset_weapons.sqf",["preset3"]];

_endPresets = _unit addAction ["im ready","preset_weapons.sqf",["end", [_preset1,_preset2,_preset3]]];

Obviously, I'm doing something wrong because when I choose "Standard Loadout" (which I have edited to my loadout via RPT file) or the other two presets left in there (you know, Michael Jackson may have been on to a sweet loadout), it says..

"Script preset_weapons.sqf not found"

To my novice ARMA2 editing brain, it seems like there is a "loadouts\" missing somewhere. I thought, most likely, in the first "addAction" line but added the text and had the same failure.

Details about how I'm running it, atm. I've got a working Dom version of a map and I added your script to the init field. It looks like this...

// Demonized Custom Loadout Script

// for the MP mission, only usable in MultiPlayer, not sure if this will affect JIP, look below for other option.

{_null = [_x,"start"] execVM "loadouts\preset_weapons.sqf"} foreach playableUnits;

// for the MP mission, only usable in MultiPlayer, place in any playable units initline to avoid JIP issues.

//_null = [this,"start"] execVM "loadouts\preset_weapons.sqf";

// this is needed for backpacks and content to work.

Preset_loadOuts_backPacks = compile preprocessFile "loadouts\backpacks.sqf";

// [player,"start"] execVM "preset_weapons_demo.sqf"; // for testing in SP only.

// End Demonized Custom Loadout Script

The MP map is running on a locally hosted LAN game with just me as a player. I can upload to our dedicated tonight to see if the same error happens but I've found that any problems existent in a LAN version, exist in a Hosted version.

Share this post


Link to post
Share on other sites

yes, that was a major cockup.

Demo mission is replaced with fixed one, first post updated with link.

Issue was file path was missing loadouts\ for all actions in the main script since i added the folder after i did the demo script seperate, for cleanlyness x)

it was "preset_weapons.sqf" and should have been "loadouts\preset_weapons.sqf"

Note: the script used in Single player editor worked as it should but MP version was missing the path.

Ive sent a PM to both you and Styxx42 with new download link.

I will update the first post with tomorrow also, making it little less messy as instructions is kindof, well, not user friendly i think.

but again, im really sorry about the missing file path, all is corrected now.

Thanks for letting me know.

Edited by Demonized

Share this post


Link to post
Share on other sites

no worries, i saw that the other guy posting said it worked so figured i bonked something up!

Yeah, a new set of directions would help. I was just kinda putting files here and there until it "worked". Downloading your new one now...

---------- Post added at 06:32 PM ---------- Previous post was at 06:16 PM ----------

Works now. I'll see if I can throw it up on our Dedi tonight and see how it works.

In your text, it says that a player cannot revisit the selection menu until scripted. How/what is that script if I wanted to include that on a trigger or something?

---------- Post added at 06:51 PM ---------- Previous post was at 06:32 PM ----------

Oh and is there a way to include multiple player id's in one line? I have an ID that is ArmA2 and one that is for OA...

Share this post


Link to post
Share on other sites
In your text, it says that a player cannot revisit the selection menu until scripted. How/what is that script if I wanted to include that on a trigger or something?

it ends with the end action. and you can start the script again by running same line from init.sqf wich belongs to this script in a trigger or whatever that can be used to run a script.

maybe best to use this:

_null = [this,"start"] execVM "loadouts\preset_weapons.sqf";

Note: the backpack part does not need to be run again, since its already loaded.

Oh and is there a way to include multiple player id's in one line? I have an ID that is ArmA2 and one that is for OA...

change line in preset_weapons.sqf

// presets for player Michael Jackson.
if ((getPlayerUID _unit) == "1111111" OR (getPlayerUID _unit) == "2222222") then {

this will work for player with 1111111 and 2222222

Edited by Demonized

Share this post


Link to post
Share on other sites

If you want multiple IDs to lead to the same line of code, you could also use IN:

// presets for player Michael Jackson.
if ((getPlayerUID _unit) in ["1111111", "2222222", "33333333", "44444444"]) then {

Share this post


Link to post
Share on other sites

both == and in works.

what hitman says is the best way size wise, as you get a shorter line with multiple player ids.

I just didnt want to confuse any non scripters.

Share this post


Link to post
Share on other sites

Updated first post with detailed instructions wich should be easier to understand for anyone.

Share this post


Link to post
Share on other sites

Awesome, those should be great! I'll see if I can get those implemented.

I'm hoping to include that code into an object on the base so that a player can walk up to it, "use" it, and have the options reappear. I'm busy the next couple days but will try and start punching holes in it over the weekend.

Share this post


Link to post
Share on other sites
I'm hoping to include that code into an object on the base so that a player can walk up to it, "use" it, and have the options reappear.

i tested this in Editor and it works for object.

_preset1 = _unit addAction ["my default inf loadout","preset_weapons_demo.sqf",["preset1"],1,true,true,"","(cursorTarget == name_of_object AND (_this distance name_of_object) < 2)"];

do similar change for all the three actions. _preset2, 3.

and comment out this line by adding // in front like here.

//_endPresets = _unit addAction ["im ready","preset_weapons_demo.sqf",["end", [_preset1,_preset2,_preset3]]];

now when player with the id is within 2 meters of the object called name_of_object (ammocrate in my test) and he is looking at it with his mouse cursor the actions appear, no end action. and when player moves away, actions disappear, and if player come back, they appear again.

This does not include if crate is alive or dead.

to check if crate/vehicle/whatever object used is alive use this instead:

_preset1 = _unit addAction ["my default inf loadout","preset_weapons_demo.sqf",["preset1"],1,true,true,"","(cursorTarget == name_of_object AND (_this distance name_of_object) < 2 AND alive name_of_object)"];

Edited by Demonized
added object alive check

Share this post


Link to post
Share on other sites

Very nice! You saved me a BUNCH of time since that is all pretty much over my head! :/

Where did you put that, in the object's init in the editor or in the preset_weapons.sqf?

Share this post


Link to post
Share on other sites

edit the lines in loadouts\preset_weapons.sqf

or do it in preset_weapons_demo.sqf to test in SP editor.

Share this post


Link to post
Share on other sites
no worries, i saw that the other guy posting said it worked so figured i bonked something up!

..

Hey Spazo Just in case you mistook my

******

This fantastic.

You are fantastic.

*****

For this is working. I hadn't tested it. Sorry for misleading you that I already tested it. Was not my intention. Just wanted to Thank Demonized for his work in posting it.

But I did test it last night and Wow, already it has saved my very poor typing skills and much time. Working almost perfect and Spazo and Demonized you are both working on exactly what I was looking to do with this.

Put a of swap out station in game that you can walk up to and use.

Going to try previous suggestion on how to do that this week.

So far, 4 players used it for 6 hours with JIP for weapons and sidearms, and it worked perfectly for that.

The rpt is not capturing the backpack contents for some reason.

Either way back pack are extra stuff, and I am still fiddling with it. Could be me or my addons(hvy ace user)

Thanks for all the work Demonized and Testing and quick reporting Spazo.

Question to all scripters.

Is it possible to edit the init.sqf instead of putting the JIP line in each characters init? That way there would be minimum editing of mission. Drop loadout folder in mission , edit one file(init.sqf or what ever file you would need to edit) and join the game.

Is that even possible?

Styxx42

Edited by Styxx42
mistyped HA

Share this post


Link to post
Share on other sites

Oh no worries Styxx! Yeah, Demonized has done some excellent work creating this! I'm appreciative of the fixes he's made and supplemental coding he's created to support (well, to be honest) my requests!

We've been running the object-selected version on our hosted Domination server and it seems to work once on the player's initial joining of the server but after a revive, respawn, or player leaving then rejoining the server, we can't get it to work again. I'll test more extensively (no death & only teleporting, for example) and see when the option disappears.

Is it possible to edit the init.sqf instead of putting the JIP line in each characters init? That way there would be minimum editing of mission. Drop loadout folder in mission , edit one file(init.sqf or what ever file you would need to edit) and join the game.

I have not done any editing in each player's init. I just included the following text in the init.sqf (notice I only uncommented the JIP one since we don't use it) ...

// Demonized Custom Loadout Script

// for the MP mission, only usable in MultiPlayer, not sure if this will affect JIP, look below for other option.

{_null = [_x,"start"] execVM "loadouts\preset_weapons.sqf"} foreach playableUnits;

// for the MP mission, only usable in MultiPlayer, place in any playable units initline to avoid JIP issues.

//_null = [this,"start"] execVM "loadouts\preset_weapons.sqf";

// this is needed for backpacks and content to work.

Preset_loadOuts_backPacks = compile preprocessFile "loadouts\backpacks.sqf";

// [player,"start"] execVM "preset_weapons_demo.sqf"; // for testing in SP only.

// End Demonized Custom Loadout Script

Share this post


Link to post
Share on other sites

We've been running the object-selected version on our hosted Domination server and it seems to work once on the player's initial joining of the server but after a revive, respawn, or player leaving then rejoining the server, we can't get it to work again. I'll test more extensively (no death & only teleporting, for example) and see when the option disappears.

I have not done any editing in each player's init. I just included the following text in the init.sqf (notice I only uncommented the JIP one since

Spazp

What about if you put

_null = [this,"start"] execVM "loadouts\preset_weapons.sqf"; in a radio call for everyone.

I did that sort of thing for the Mando's air console because in the init it disappears after you die. if you need it again just radio call it,

Or can you create a trigger that senses player so it fires when they are around it.

Just brainstorming here, not a scripter but a fiddler(would not bastardize the term hacker with my limited skills).

Thanks for you init.sqf advice. Going to try that myself.

Props.:bounce3:

Share this post


Link to post
Share on other sites

hey guys, ive located why ACE ruck sack contents was not added, and will upload fix in a few.

basically ACE rucks is also a weapon and thats why you actually had it, but the script itself did not find any ruck as ACE use special functions for that, and for adding cargo to the ruck.

All fixed and tested SP editor, so in "theory" shoud work fine on server as well :)

Just doing some cleanup in script before i upload it.

Share this post


Link to post
Share on other sites
hey guys, ive located why ACE ruck sack contents was not added, and will upload fix in a few.

basically ACE rucks is also a weapon and thats why you actually had it, but the script itself did not find any ruck as ACE use special functions for that, and for adding cargo to the ruck.

All fixed and tested SP editor, so in "theory" shoud work fine on server as well :)

Just doing some cleanup in script before i upload it.

That is perfect, I can test it as soon as you put it out for consumption.

Thanks Demonized.

Share this post


Link to post
Share on other sites
Spazp

What about if you put

_null = [this,"start"] execVM "loadouts\preset_weapons.sqf"; in a radio call for everyone.

I did that sort of thing for the Mando's air console because in the init it disappears after you die. if you need it again just radio call it,

Or can you create a trigger that senses player so it fires when they are around it.

Yeah, I dunno where/how to put that in there. Place a trigger over my change-loadout-object and use that code in the "on act" section?

Share this post


Link to post
Share on other sites

i have created a workaround that should be no problem with respawns when using crates/objects.

Also updated script to fully support ACE backpacks and content.

Was foolish of me to assume ACE backpacks was same as BIS backpacks, well i learned a little about ACE and tadaa.

Version 1.3 with new download link in first post.

Share this post


Link to post
Share on other sites
i have created a workaround that should be no problem with respawns when using crates/objects.

Also updated script to fully support ACE backpacks and content.

Was foolish of me to assume ACE backpacks was same as BIS backpacks, well i learned a little about ACE and tadaa.

Version 1.3 with new download link in first post.

Super (HAVEN"T TESTED IT YET SPAZO....:D)

Can't wait to get my teeth into this tonight.

Thanks for your persistance Demonized.

Share this post


Link to post
Share on other sites

well, shoot, since Styxx says it works perfectly then there is no need for me to test it. I will update every single server I have control over (and maybe even some that I don't, muhahaha) and not test them before implementing the changes. Man, that makes my job A LOT easier! :p

On a serious note, I'll see if I can grab it today or tomorrow and get it up on the server and try it out. Thanks Demonized!

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  

×