Home   Help Search Login Register  

Advertisement

Author Topic: RUG High Dispersion (HD) 1.5 (Updated!)  (Read 6922 times)

0 Members and 1 Guest are viewing this topic.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
RUG High Dispersion (HD) 1.5 (Updated!)
« on: 03 Feb 2010, 02:18:37 »
RUG High Dispersion Addon
V.1.5 BETA
9.9.2010
by Wolfrug

Edit: Updated to 1.5. See changelog below + FileFront or OFPEC mirror.

Description:

This addon creates an exact copy of every default hand-held weapon in vanilla Arma 2, except that their"dispersion" config value has been changed. This means the weapon is considerably less accurate, which leads to longer firefights between the AI (and the player, should s/he choose to use a 'HD' weapon).

The inspiration for this comes from the wonderful HD version of all the JAM weapons from old OFP (featured heavily in for instance the Tonal campaign). The soldiers wielding these weapons might represent untrained militias armed with sub-par weaponry.

Features:

- Comes with simple modules (F7) which can be synchronized with group leaders/individual vehicles to switch all weapons on mission start.

- Can be used either in Arma 2, Arma 2 Operation Arrowhead, or Arma 2 Combined Operations.

- Comes with a simple script, "switchHD.sqf", which is used as a "killed" eventhandler: will switch the primary HD weapon of a dead soldier to the corresponding normal weapon upon death. Called: unitName addeventhandler ["killed", {_this execvm "RUG_HD_Core\switchHD.sqf"}];

- Can also be called without synchronizing with modules (but the modules still need to be in place to initialize the scripts). The script versions of the modules are: RUG_HD_AssureHD (permanent HD weapons), RUG_HD_AssureReg (permanent regular weapons), RUG_HD_RegToHD (switch weapons from regular to HD), RUG_HD_HDToReg (switch weapons from HD to regular). All of these are called in the same way: [unitname] spawn <script>. NB: You may want to give the modules a second to initialize before running the script!

- Comes with (invisible, Scope = 1) unit classes for every HD unit in both A2 and OA. These have the same classnames as in vanilla, except with an added RUG_HD to the front, so e.g. "RUG_HD_Ins_Soldier_AR". This is for ease of use in various spawning scripts etc, although you can also use the scripts to switch weapons.

- Fully signed for MP play.

Instructions:

- Put the RUG_HD_Core.pbo, RUG_HD_Vehicles.pbo, and either (or both) RUG_HD_A2.pbo/RUG_HD_OA.pbo into an addons folder (e.g. @RUG_HD/Addons). Note: for ONLY A2, use RUG_HD_A2.pbo + vehicles & core. For ONLY OA, use RUG_HD_OA.pbo + vehicles & core. For CO, use all of them.
- When in the editor, access modules (F7) and find the new modules: RUG HD: Switch Regular to HD (Men), RUG HD: Switch Regular to HD (Vehicles), RUG HD: Switch Regular to HD (permanent) and RUG HD: Switch HD to Regular (permanent). Note there is only one that works on vehicles.
- Synchronize (F5) the (Men) module with any group member to switch all possible weapons in that group to their HD versions. Also men inside vehicles etc. will be affected, but only if their weapons have a HD equivalent (currently only vanilla weapons supported)
- Synchronize (F5) the (Vehicles) module with any INDIVIDUAL vehicle (empty or occupied) to switch all MAIN TURRET weapons to their HD equivalent. No non-main turret weapons (commander MG, crewchiefs etc) will be affected - this is because it is currently impossible to access these weapons using default BIS commands. The static guns and most 'simpler' vehicles work fine though (such as the BRDMs and the USMC IFVs).
- If you want a vehicle to both have a HD crew and be HD itself, you need to use both modules.

Feedback requests:

* Technical stuff
- Would you prefer to get the HD units/factions etc back (simple config tweak)?
- Any weapons that don't work (the pistols have no discernible dispersion, despite having a value - no idea what's up there).
- Does the addon accidentally interfere with vanilla weapons/addons (i.e. have I screwed up an inheritance someplace)?
- Any other addon-related error messages?

* Functional stuff
- Is the Dispersion too big? Too small? Just right? It's easy to change, so please comment!
- Would you prefer the dispersion only affected AI? (tweaking only aiDispersionCoef variables)
- Would you prefer a more sophisticated dispersion model which would incorporate for instance recoil? (might be a lot of work)

* Notes
- NOT COMPATIBLE WITH TOTAL CONVERSION MODS E.G ACE2! This is meant for Vanilla use only! No addon weapons will be modified, and any modifications to vanilla weapons will probably NOT SHOW UP (almost all inheritances etc. inside the .pbos are internal to RUG_HD)! This includes Sound Mods I'm afraid - don't blame me, blame the BIS config system.
- The dispersion is now a set 0.03 for every weapon in game, including vehicle weapons: this is slightly modified by their own original dispersion (dispersion = RUG_HD_DispersionValue + <original dispersion>), but this effect is too small to be noticeable.
- Vehicles can be given HD weapons (via module), but ONLY their main turrets are affected (i.e. the BMP-3 has two forward gunners + its main gunner + its commander. Only the main gunner's weapons are changed). This is because it is impossible at the moment to manipulate non-main turret weapons with the default BIS commands (addweapon/removeweapon).
- All vehicle weapons changed this way lose all custom animations (i.e. recoil anims and reload anims).
- Many vehicle weapons have HD variants, but aren't HD otherwise (e.g. rockets): this is because they do not have any dispersion by default.
- All of the weapons have UNCHANGED DISPLAY NAMES - therefore there's no way of telling if a unit is using a HD weapon or not at a glance! This is intentional, and you should use the (permanent/assured) scripts to assign HD or regular weapons to your units/players as you see fit!well enough for me currently - you just have to keep tabs on what units are what.
- Only one of the two Assures should be run at once (otherwise the scripts would be switching weapons back and forth like crazy!). If you want a certain unit not to run the script (e.g. in a group), simply add one of the two vehiclevariables to it in its init: unitName setvariable ["RUG_HD_HDAssured", false] OR unitName setvariable ["RegAssured", false]; If you ever want the script to -stop- running, simply do the same thing (set the variable to false) - note that this will not switch the weapon to HD/regular automatically, it will simply stop the monitoring and switching scripts. Also, the 'assured' scripts will stop on death, so you can't use corpses as a factory for HD/regular weapons ;)

Changelog:

- fixed a typo for the HD weapon of RUG_HD_Ins_Woodlander3 -> he is now properly armed
- removed scope = entries from the unitscfg.h file -> no more units showing up that shouldn't (for instance bugged Men (RACS) man under Guerilla/HD CDF)
- very slightly increased the dispersion rating
- Tweaked dispersion ratings a bit more
- Added all vehicle weapons (although some still have no dispersion, e.g. missiles)
- Removed added HD units & factions & groups, replaced with Modules (F7) for Men and Vehicles
- (1.13) Readded HD units, but hidden, so as not to clutter the editor - can still be used with createUnit
- (1.13) Added script + modules for "permanent HD" and "permanent regular": these will either assure that a unit's weapons are always HD (if available) or always non-HD. More resource hungry than the standard switch script since it is in a constant loop.
- (1.14) Added compatibility with OA, and split the addon into an A2 and an OA pack, plus a Core pbo to allow for either pure A2, pure OA or CO.
- (1.15) Added British Forces DLC/Lite compatibility, simply add the new RUG_HD_BAF.pbo to the mix (might only work with OA - not sure?).
- (1.15) Signed all the files!

Dedication: I want to dedicate this addon to Planck, who helped me in the early days with not only config work but also worked as a springboard for ideas. Rest in peace.

Enjoy!

Download:
FileFront RUG HD 1.4
OFPEC (forum attachment)

For your FURTHER ENJOYMENT I have created two BETA missions for you to use, one for A2 and one for OA. Operation Cape Horn (mirror: [link]) has been properly beta-tested and is a fun romp through Chernarus, whereas Operation Scott Free is a quick and very simple escort mission in Takistan which is compatible with either CO or OA only. :)

Please let me know what you think about the addon after playing the missions!

Regards,
Wolfrug
« Last Edit: 10 Sep 2010, 12:04:35 by Wolfrug »
"When 900 years YOU reach, look as good you will not!"

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: RUG High Dispersion (HD)
« Reply #1 on: 03 Feb 2010, 09:25:02 »
Good to see this project Wolfrug  :good:

Both for AIvsAI/AIvsPlayer and Player vs Player this is very interesting to see how it plays out.
Looking at the files two points:

1)
Is there a reason why you made not HD vehicle weapons?

2)
Unfortunately the weaponscfg.h needs improvement. It seems you copied the complete definition in there.
This makes your addon not compatible to any sound MOD or any other addon.
You are only to define the class structure and dispersion values in there.

Via regex/search and replace, it is very simple to make a config that way.
Here is yours (took me less time than writing this post).  :)

http://pastebin.jonasscholz.de/579

3) It'd be nice to see a replacement config.
This will make it far easier to use and get feedback.

Here is a template:
http://pastebin.jonasscholz.de/580

Looking forward to see it evolve.  :clap:

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG High Dispersion (HD)
« Reply #2 on: 03 Feb 2010, 11:44:32 »
Hi there kju!

Thanks for the input, I only wish it were that simple :)

Essentially, your idea for the bare-bones, inherited config was the one I had initially - it works for everything else in the game (such as my vehiclescfg.h which only changes the faction and crew variables of the new vehicles) so why not for weapons? Of course your example is flawed from the get-go, since inheritances such as:

Code: [Select]
class RUG_HD_M24: RUG_HD_Rifle
{
dispersion = RUG_HD_DispersionValue / 0.00012;
};
class RUG_HD_M40A3: RUG_HD_M24 {};

Would mean that RUG_HD_M24 and RUG_HD_M40A3 would have the same model/sound/recoil etc. of RUG_HD_Rifle (which has NO model since it's a "base" config entry). What I think you wanted was this:

Code: [Select]
class RUG_HD_M240: M240
{
class manual: Mode_FullAuto
{
dispersion = RUG_HD_DispersionValue / 0.0008;
};
};

Logically, this config should inherit everything from the standard M240 (model, recoil, sound etc.) except change the dispersion value. Unfortunately, that's not what happens. What happens is instead that you get the model of the gun, with the appropriate dispersion value, modes (full, burst, single...) and some other things (animations for instance), but NO recoil and NO sound!

I really have no idea why the modes needed sound and recoil entries, but they do - so yes, unless there's some way to get around this fact, this addon won't be compatible with sound mods I'm afraid. I copied the whole weapons config because I didn't want the headache of fiddling around until I was sure I hadn't accidentally removed something (like dexterity or handling or AI rate of fire or anything else BIS might have decided the gun couldn't do without). It works, and although it'd need a full update whenever BIS changes any of these values, I don't think they're going to do that very much any more.

Since I have seen weapons which don't define sounds inside their modes class, I'm assuming there's -some- way to inherit them as well - maybe if the weapons are added directly inside the "parent" class (e.g. class AK_Base {bla bla; class AK_47 {bla bla}}), but since that's not the way most of the weapons work, and since many of them belong the same base class but still have different sounds (say the AK74SU and the regular AK-74). Anyway, it's a big hassle to make it work. If you can with your regedit/config editing mad skillz make it work with a minimal config without losing sounds/recoil, then wonderful! I haven't however.

Re: vehicle weapons: As I mentioned, I -could- do this, but it'd require quite a bit of work. Also I'm not entirely sure how the turret system works and how to correctly change the weapons used in them - and neither am I sure if I will then ALSO have to include all kinds of superflous definitions (such as sounds) in the config. However I'll surely experiment with it and see if I can get at least some machinegun-type weapons to be HD - I'm not so sure about for instance the main guns on the tanks or the big guns on airplanes/helicopters - they've already got a hard time hitting you on the ground, and I'm not sure how much a higher dispersion value would help there. But - input and thoughts are always nice!

Thanks. :)

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: RUG High Dispersion (HD)
« Reply #3 on: 03 Feb 2010, 12:38:55 »
Shame on me  :-[

You are right. The first config is very obviously wrong.  :blink:
That said, I cannot confirm your problems with the inheritance.
Do you have such a config for me to double check?

To me it sounds more like some config tree definition error or missing cfgPatches dependencies.

Why do you use custom classes in the first place.
Either both human and AI should have the HD weapons,
or if only AI, you can use the aiDispersionX/Y value to tweak AI only.  ???

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG High Dispersion (HD)
« Reply #4 on: 03 Feb 2010, 15:04:01 »
I couldn't get the aiDispersion values to work - they'd be a good idea otherwise. But I still really prefer to give mission makers more control - by adding custom classes it's possible to equip whomever you want, player or AI, with HD weaponry. Frankly, they're mostly meant for the AI since as a player I'd find it very annoying if my bullets didn't hit where I aimed, but the mission maker can still use this to his/her advantage, for instance by forcing the player to use his own (non-HD) gun more conservatively instead of just picking up any old AK left over by the enemy.

And I absolutely do not want to make a replacement config - if people simply wanted their AI to be less accurate, they can edit the precisionEnemy/Friendly values in their own user configs to make a change across the board. This addon is for mission makers who want to have much more control over exactly how accurate or inaccurate their enemies/allies are. I suppose I'm doing stuff for the SP, player vs AI scene here again, and I guess you're thinking more generally :)

As to my problems with the inheritance, it's very easy to reproduce. Take your own config you gave me and change any of the weapons inheritances as shown in my example (e.g. class RUG_HD_M24 : M24) and you'll end up with a weapon with no recoil or sound. I'm sure you're right - it's probably some kind of inheritance/config tree error, but unfortunately I can't seem to pin it down.  :dunno:

Thanks again for your thoughts.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Online h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: RUG High Dispersion (HD)
« Reply #5 on: 03 Feb 2010, 15:25:38 »
Quote
I couldn't get the aiDispersion values to work
In my experience you need to use massive values as aiDispersionCoef values (massive compared to the regular dispersion values) since apparently it's a multiplier (dispersion*aiDispersionCoef) so you can imagine what kind of numbers you get with 0.002*1 for example..

So try something like 100.00 for the aiDispersionCoefs and you should see a clear difference in AI shooting accuracy.. :dunno:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: RUG High Dispersion (HD)
« Reply #6 on: 03 Feb 2010, 21:51:59 »
Fair points Wolfrug.  :)

I agree that it a good addition to give a mission designer the control.
At the same time to have both solutions, aka the config replacement as well,
will make this very easy to try and promote.

I'd say both designs are OK.
To have you shoot where you aim at, or to have random dispersion,
even on the first shoot - probably best with less damage.

Just think of C&C / Starcraft / CoH infantry combat and gameplay.
A longer lasting battle can be done in various ways. In 1st person
shooter aiming and reaction are far more important, than say movement
and use of cover in RTS games.

The later approach would definitely be interesting to see in ArmA
and even work too I believe.

Offline OldBear

  • Members
  • *
Re: RUG High Dispersion (HD) 1.1
« Reply #7 on: 05 Mar 2010, 18:22:10 »
Here, in the Clan ADO, missions makers tend to agree to the use of RUG HD in some of our MP mission but we need a .bisign for this purpose ... and if this addon is compatible with 3rd party units ... Molatian and Afrenian soldiers or militias
Do you intend to release a signed version ?

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG High Dispersion (HD) 1.1
« Reply #8 on: 06 Mar 2010, 09:31:38 »
Hi OldBear!

Glad to see you're interested in the addon. I've got a new version coming, although it's had its share of problems, mostly with the vehicle weapon configs. However I'll hopefully be able to produce a publishable version soon, which I can also sign.

Regarding 3rd party units: I am going to add a "module" capability to this that will allow you to synchronize a module with a group which will then change all of their weapons to HD weapons instead - however this will obviously only work if they are wielding default weaponry (e.g. AK-74s and the like). Otherwise you can also add the weapons to them normally - but unless the addon-makers themselves create HD versions of their own weapons (or ask me to), then any third-party WEAPONS will not be 'compatible'.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG High Dispersion (HD) 1.2 (Updated!)
« Reply #9 on: 17 May 2010, 23:51:07 »
Updated to 1.2, check first post for changelog & download  :good:

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG High Dispersion (HD) 1.4 (Updated!)
« Reply #10 on: 19 Aug 2010, 09:02:11 »
Updated to 1.4, see first post for changelog & links  :good:

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline OldBear

  • Members
  • *
Re: RUG High Dispersion (HD) 1.5 (Updated!)
« Reply #11 on: 25 Apr 2011, 14:54:38 »
We - at the Clan ADO - have gone to a test in MP.
But it seems that there is a bisign / key server mismatch.
Could you tell us if you are going to mend it ?