OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: zonker3210 on 01 Jun 2009, 22:52:17
-
I'm using the SPON Kit scripts to generate pre-configured loadouts. The basic loadout is working great but I'm having a problem with rucksacks...I've added a rucksack (ACE Raid Pack) to a kit but I'd like to add the ability to load some items into the pack. Is that possible via SPON Kits? If not, does anyone have ideas for accomplishing this?
Bonus question ;) - could someone please share the class name for the ACE mod's flashbang grenades? I checked the documentation but it doesn't seem to be in there.
Thanks!
-
2) ACE_Flashbang_PDM from ace_sys_ruck ?
-
@Denisko-Redisko: I believe he's asking for the class name for the flashbang, and how to add items into the rucksack as two separate questions. Maybe I'm wrong, but hey.
@zonker3210: To add items to the ruck in ACE, you'd probably be best to read this wiki entry (http://community.bistudio.com/wiki/ACE_Features#Rucksack_System) on the topic (scroll down a bit for some examples). Here are some basic examples, though (from that page):
[_unit,"ACE_15Rnd_9x19_B_M9_PDM",4] call ACE_Sys_Ruck_AddRuckMagazine[_unit,"ACE_15Rnd_9x19_B_M9_PDM"] call ACE_Sys_Ruck_RemoveRuckMagazine_mags = _unit call ACE_Sys_Ruck_RuckMagazinesAt the moment, SPON Kits doesn't support adding items to the ruck in ACE (though it seems Spooner plans to add it soon (http://dev-heaven.net/issues/show/721)), so you'd probably have to do it manually.
The class name for the flashbang in ACE is ACE_Flashbang and, for a ruck flashbang dummy object (as Denisko-Redisko alluded to) it's ACE_Flashbang_PDM. All the class names can be found in "ArmA/@ACE/Docs/Dev Docs/ACE_Class_List.pdf" (in case you need it in future :)).
-
First of all, thank you both very much! Originally I checked the ACE class list at dev-heaven since I didn't know about the local copy. In any event, I don't see flashbangs listed anywhere it there. Am I missing something? The class name you provided does work...I just don't see it in the ACE docs.
As for the SPON Kits and ruckpacks, JamesF1 , that's fine. I didn't know the ACE wiki had that sort of info (with examples, no less!) so I'll read up on the stuff and see if I can manage to extend the SPON Kit scripts to populate the rucks.
Again, thank you both for your help!
-
In any event, I don't see flashbangs listed anywhere it there. Am I missing something?
What ACE version are you running? I searched that document for "Flashbang" and turned up with it straight away. Can't say I've tested it in-game (other than picking one up from an ammo crate), I'm only going on what the documentation says.
As for the SPON Kits and ruckpacks, JamesF1 , that's fine. I didn't know the ACE wiki had that sort of info (with examples, no less!) so I'll read up on the stuff and see if I can manage to extend the SPON Kit scripts to populate the rucks.
I'm sure Spooner will find this thread sometime today, and can perhaps give you an estimate on when SPON Kits will support ACE's ruck system.
-
I'm using ACE 1.09...as far as I know that's the current version, correct? What page do you find flashbangs on? I did notice some issues (invalid/changed characters) when I try copying from the PDF and pasting into Notepad, so perhaps my PDF viewer (FoxIt Reader) isn't searching correctly.
I was able to get the flashbangs to appear in the loadout with the SPON Kit script so...thanks!
-
I'm using ACE 1.09...as far as I know that's the current version, correct?
Yup.
What page do you find flashbangs on?
Page 31, in the red block near the top.
I was able to get the flashbangs to appear in the loadout with the SPON Kit script so...thanks!
:good:
-
I was able to get the flashbangs to appear in the loadout with the SPON Kit script so...thanks!
It is best if you share how you did this, since other people have asked that (or do you mean you just put them in the inventory, not the backpack?).
Sorry I never got around to sorting this out properly, but I tend to take on many too many projects at once and some fall by the wayside. Although it was ticketed, if you see my list of SPON tickets (http://dev-heaven.net/projects/spon/issues), you'll see I have to prioritise or I'd never get anywhere at all; the reason why I've tried to reduce the number of things I actively work on and why Kits never got more love although it probably deserved it.
Other than SPON Map v0.7.0 (released today!), I don't think I plan to do any more work for A1 (I released 0.7.0 because I'd done a lot of unreleased work on SPON Map and wanted to give what I'd done to A1 players, before I ported to A2). SPON kits certainly won't directly support ACE backpacks until ACE2 (for A2).
-
@ JamesF1: Yep...found the class info right there. Weird. Among other search strings, I'd tried searching for "flash" but returned no results. Probably a PEBCAK issue.
@ Spooner: I just got them to appear in the regular loadout (not the ruck) using the class info provided by Denisko-Redisko and JamesF1. I would like to work on adding some code to allow items to be loaded into the rucks but even if I manage to figure it out, that will take me some time. The question is whether I'll simply do the update after your SPON Kit script works its magic or whether I'll integrate it directly into your script system.
Assuming I manage to figure it out and take the latter approach, would you prefer that I post the code here or would you prefer that I send you a PM/email with the modified code along with a list of changes? The reason I ask is that I suspect that it'd be a good idea to have any major changes reviewed by a more experienced ArmA scripter. I'd hate to share some "fuctional" code with the public only to have someone discover errors that might cause headaches for ArmA scripters as new as myself. In other words, I know just enough ArmA scripting to be dangerous. ;)
Of course, if I can't integrate the changes into SPON Kits, this will all be a moot point anyhow.
Thanks for the many helpful scripts, Spooner.
-
In equipWithKit.sqf:
replace
SPON_EXPLODE_2(_man getVariable KIT_VAR,_weapons,_ammo);
with
SPON_EXPLODE_4(_man getVariable KIT_VAR,_weapons,_ammo,_weaponOnBack,_packItems);
Just before:
removeAllWeapons _man;
add
{ [_unit,_x] call ACE_Sys_Ruck_RemoveRuckMagazine } forEach (_unit call ACE_Sys_Ruck_RuckMagazines);
And at the end, add:
_unit setvariable ["ACE_weapononback",_weaponOnBack];
{
[_man, _x select 0, _x select 1] call ACE_Sys_Ruck_AddRuckMagazine_man;
} forEach _packItems;
Then you can configure with:
[
"PlatoonCommander_USMC",
[
["M4", "Binocular", "NVGoggles"],
[ // mags
["ACE_gun", 2],
["ACE_Something_else", 2]
],
"ACE_Some sort of back weapon", // Weapon on back.
[ // packitems
["ACE_15Rnd_9x19_B_M9_PDM", 6],
["ACE_Something_else_PDM", 2],
]
]
],
OK, that is a 10-minute patch, totally untested and also would break Kits without ACE Rucksacks systems enabled. See where you can go from there, because I can't afford to spend a lot more time on this.
-
Thanks so much, Spooner. I'll let you know how it works out and where this leads.
-
Just scanned over the code again and found an error in the 4th block of code. Fixed and simplified this block only (in earlier post).