Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added gunbag for DMRs #3749

Merged
merged 20 commits into from
Jun 12, 2016
Merged

added gunbag for DMRs #3749

merged 20 commits into from
Jun 12, 2016

Conversation

ir0n1e
Copy link
Contributor

@ir0n1e ir0n1e commented May 3, 2016

Gunbag for DMRs
Known issues: Mass calculation of full gunbag - cause of ArmA restrictions
Screenshots (tan)
http://imgur.com/a/r9l36

@thojkooi thojkooi added the kind/feature Release Notes: **ADDED:** label May 3, 2016
@jonpas
Copy link
Member

jonpas commented May 3, 2016

Replace tabs with 4 spaces.

Can you also give a broader description of the feature?

@BaerMitUmlaut
Copy link
Member

Looks like this adds an interaction to add a weapon virtually to a gunbag backpack.

This won't work with weapons that have scopes by default which were then removed by a script.

Additionally I don't see the need for this at all. You can already put weapons in your backpack. Adding a larger backpack to the game would have the same effect without the potential for bugs and issues.

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 3, 2016

@BaerMitUmlaut
Part1: correct
Part2: Possible but could not repuduse it in tests, weapon will be stored with all attachments
Part3: Your opinion

@bux
Copy link
Member

bux commented May 3, 2016

@ir0n1e
Part 2 isn't possible in Arma 1.58 with the commands that are available.

Example: You equip the weapon srifle_DMR_01_ACO_F which has a RedDot when created (hence the ACO in the name).
You now remove the RedDot and mount a MRCO sight onto the weapon. You now aren't able to restore the weapon using the srifle_DMR_01_ACO_F class name with a MRCO sight equipped.

@BaerMitUmlaut
Copy link
Member

Part 3 is not an opinion. What advantages does this have that a large backpack doesn't have? I see the following disadvantages:

  • breaks with some weapons because of how attachments work
  • removes the effect of weight of weapons in the backpack and is independent of what weapon is in the backpack (an SMG would weigh as much as an MMG)
  • removes the interaction of opening the backpack and switching out your weapon manually (realism)

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 3, 2016

@bux578 Jabb, but I read current weapon config with EFUNC(common,getWeaponState)
and rebuilding the weapon to this state.

@BaerMitUmlaut you are right, but you can't store a G82 in any backpack (realism).
My prefered solution is a weapon in the inventory of the gunbag, but it's not possible to buildup the weapon with all attachments in backpack.

@BaerMitUmlaut
Copy link
Member

This would work with making a new backpack that is simply larger.

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 3, 2016

The G82 is more then 60 inches long, the largest backpack has less then 30 inches. You have to dismatle the weapon to store it in a backpack. (realism
)

@BaerMitUmlaut
Copy link
Member

This would work with making a new backpack that is simply larger.

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 3, 2016

Knowing that. Your comment was realism.

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 3, 2016

@commy2 needing your opinion, caues it's your initial idea!

@commy2
Copy link
Contributor

commy2 commented May 3, 2016

This would work with making a new backpack that is simply larger.

Not true. "Long rifles" (anything that isn't a 5.56mm or 6.5mm by vanilla standards) cannot be put inside a bagpack, regardless of how little mass they have or how much cargo capacity the bagpack has.

    class Rifle : RifleCore {
        class WeaponSlotsInfo {
            allowedSlots[] = {901};
        };
    };
    class Rifle_Long_Base_F : Rifle_Base_F {
        class WeaponSlotsInfo : WeaponSlotsInfo {
            allowedSlots[] = {};
        };
    };
  • 701 vest
  • 801 uniform
  • 901 backpack

@BaerMitUmlaut
Copy link
Member

Why not change the configs accordingly then?

@commy2
Copy link
Contributor

commy2 commented May 3, 2016

breaks with some weapons because of how attachments work

I don't see how.

Store weapon info:
While it's true that pre-equipped weapons are reported as their class names with attachments, the primaryWeaponItems command still reports only the attachments currently there, including those added automatically.

Restore weapon:
You use addWeapon, removeAllPrimaryWeaponItems and then addPrimaryWeaponItem and can fully restore a primary weapon. The problem comes with launchers, because the commands are bugged for those.

Pre-quipped weapons are not a problem.

@BaerMitUmlaut
Copy link
Member

That's not the case right now though.

@commy2
Copy link
Contributor

commy2 commented May 3, 2016

Why not change the configs accordingly then?

Then you could put (multiple of) those weapons inside even the smallest backpacks, even though they shouldn't have the space for it. It's just the cheap vanilla inventory system.

@commy2
Copy link
Contributor

commy2 commented May 3, 2016

That's not the case right now though.

I haven't checked the PR, but it is possible to achive (with primary weapons)

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 3, 2016

Test it and you will see it works. Script stores weapon, and attachements. If you pull out the weapon all attacements will be build up.
Problem is mass of gunbag, cause we can't build up the weapon in a vehicle.

@commy2
Copy link
Contributor

commy2 commented May 3, 2016

Problem is mass of gunbag, cause we can't build up the weapon in a vehicle.

while this is true, you could still adjust the "loadCoef" via setUnitTrait to create some kind of "virtual mass". I haven't tested the command for bugs though ...

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 3, 2016

Will test that, but first time read this command. Have tested with "setmass", but it's not working for player vehicle.

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 3, 2016

@commy2 setUnitTrait sets unit specialisation..? Do you have time for a TS conversation today?

@BaerMitUmlaut
Copy link
Member

Try adding weapon that has attachments by default for example arifle_TRG21_ARCO_pointer_F. Now drop all attachments, put it in the backpack and take it out again. I'm pretty sure this creates new attachments right now. I cannot try it right now.

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 3, 2016

@BaerMitUmlaut jabb, the script will working so, but it's nothing that I can change.

@commy2
Copy link
Contributor

commy2 commented May 3, 2016

Do you have time for a TS conversation today?

Yes, 1700B

setUnitTrait sets unit specialisation..?

I think that was what they were going for, but they ended up also enabling editing some other numeric values.

https://community.bistudio.com/wiki/setUnitTrait

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 3, 2016

@commy2 1700 thats a date!

@BaerMitUmlaut
Copy link
Member

You need to use removeAllPrimaryWeaponItems first.

@jokoho48
Copy link
Member

jokoho48 commented May 8, 2016

but @BaerMitUmlaut what is happening if someone want to put RHS or CUP or BW weapons like this in there backpack and its dont work... they came to use and Blame us that we broke it.
i realy would like it if no other mod would break it again

@BaerMitUmlaut
Copy link
Member

If they inherit from Rifle_Long_Base_F as they probably should there are no issues. If they don't and manually disable adding them to backpacks, it's clearly their fault. I don't see the issue with that.

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 10, 2016

At this time script checks a config value. Like swapbarrol. The modders have to add this value in there ace_comp config. If you check "Rifle_Long_Base_F", LMGs and MMGs will fit into gunbag.

@BaerMitUmlaut
Copy link
Member

What's the problem with putting an MMG in the gunbag? We even have deployable HMGs in Arma that come in backpacks. Why not MMGs now?

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 10, 2016

Don't have a major problem with that, but it schould be a bag for sniperrifles in my opinion. In real you will carry a Barrett or a M24 in this bag. Or something similar.

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 10, 2016

@commy2 Mass calculation: Which mass i have to pass (config mass or Kg/Pounds)?
Virtual mass is not recognized by EFUNC(movement,getWeight)!

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 10, 2016

KK, think I have to pass config mass, cause of #3779

@ir0n1e ir0n1e changed the title added gunbag added gunbag for DMRs May 10, 2016
removeAllPrimaryWeaponItems _unit;

{
_unit addWeaponItem [_weapon, _x];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 spaces indent

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everywhere actually. :)

@jokoho48
Copy link
Member

ok .. this time in the right PR... fu github why did you do this...

i just took a look at the model and found 2 thing that you should improve, the Polycount in this parts of the model is way to high
http://puu.sh/oNmPh/b985503f8b.jpg
http://puu.sh/oNmTj/ad8adb18ac.png

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 13, 2016

@jokoho48 will see what I can do. But I hate bumpmapping.

@jokoho48
Copy link
Member

i think that can be dont without any normal

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 18, 2016

I'm done. I Think, everything should pass ACE3 checks.

@ir0n1e
Copy link
Contributor Author

ir0n1e commented May 30, 2016

Merge status?

@SzwedzikPL
Copy link
Contributor

SzwedzikPL commented May 30, 2016

Gunbag carried on launcher slot would be an awesome feature

@thojkooi thojkooi added this to the 3.6.0 milestone Jun 11, 2016
@commy2 commy2 self-assigned this Jun 11, 2016
@commy2 commy2 mentioned this pull request Jun 12, 2016
@commy2 commy2 merged commit 4a7f552 into acemod:master Jun 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Release Notes: **ADDED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants