Home   Help Search Login Register  

Author Topic: SPON Kits & Rucksacks  (Read 2566 times)

0 Members and 1 Guest are viewing this topic.

Offline zonker3210

  • Members
  • *
SPON Kits & Rucksacks
« 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!

Offline Denisko-Redisko

  • Members
  • *
Re: SPON Kits & Rucksacks
« Reply #1 on: 01 Jun 2009, 23:01:55 »
2) ACE_Flashbang_PDM from ace_sys_ruck ?
sorry for my english

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: SPON Kits & Rucksacks
« Reply #2 on: 02 Jun 2009, 01:12:03 »
@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 on the topic (scroll down a bit for some examples).  Here are some basic examples, though (from that page):
Code: (Add magazines) [Select]
[_unit,"ACE_15Rnd_9x19_B_M9_PDM",4] call ACE_Sys_Ruck_AddRuckMagazine
Code: (Remove magazine) [Select]
[_unit,"ACE_15Rnd_9x19_B_M9_PDM"] call ACE_Sys_Ruck_RemoveRuckMagazine
Code: (Get list of magazines) [Select]
_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), 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 :)).
« Last Edit: 02 Jun 2009, 01:17:09 by JamesF1 »

Offline zonker3210

  • Members
  • *
Re: SPON Kits & Rucksacks
« Reply #3 on: 02 Jun 2009, 03:11:06 »
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!

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: SPON Kits & Rucksacks
« Reply #4 on: 02 Jun 2009, 10:39:29 »
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.

Quote
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.

Offline zonker3210

  • Members
  • *
Re: SPON Kits & Rucksacks
« Reply #5 on: 02 Jun 2009, 13:50:39 »
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!

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: SPON Kits & Rucksacks
« Reply #6 on: 02 Jun 2009, 14:13:25 »
I'm using ACE 1.09...as far as I know that's the current version, correct?
Yup.

Quote
What page do you find flashbangs on?
Page 31, in the red block near the top.

Quote
I was able to get the flashbangs to appear in the loadout with the SPON Kit script so...thanks!
:good:
« Last Edit: 02 Jun 2009, 17:01:39 by JamesF1 »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Kits & Rucksacks
« Reply #7 on: 02 Jun 2009, 17:04:12 »
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, 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).
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline zonker3210

  • Members
  • *
Re: SPON Kits & Rucksacks
« Reply #8 on: 02 Jun 2009, 19:54:19 »
@ 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.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Kits & Rucksacks
« Reply #9 on: 03 Jun 2009, 01:21:24 »
In equipWithKit.sqf:
replace
Code: [Select]
SPON_EXPLODE_2(_man getVariable KIT_VAR,_weapons,_ammo);
with
Code: [Select]
SPON_EXPLODE_4(_man getVariable KIT_VAR,_weapons,_ammo,_weaponOnBack,_packItems);

Just before:
Code: [Select]
removeAllWeapons _man;
add
Code: [Select]
{ [_unit,_x] call ACE_Sys_Ruck_RemoveRuckMagazine } forEach (_unit call ACE_Sys_Ruck_RuckMagazines);

And at the end, add:
Code: [Select]
_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:
Code: [Select]
[
"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.
« Last Edit: 06 Jun 2009, 00:01:50 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline zonker3210

  • Members
  • *
Re: SPON Kits & Rucksacks
« Reply #10 on: 03 Jun 2009, 11:26:25 »
Thanks so much, Spooner. I'll let you know how it works out and where this leads.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Kits & Rucksacks
« Reply #11 on: 03 Jun 2009, 13:27:53 »
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).
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)