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

CSW - Minor fixes for CSW + RHS Compats #7497

Merged
merged 9 commits into from
Feb 22, 2020
Merged

Conversation

Whigital
Copy link
Contributor

@Whigital Whigital commented Jan 29, 2020

When merged this pull request will:

ace_csw:

  • Add Mk6 Mortar icon.

ace_compat_rhs_usf3 / ace_compat_rhs_afrf3/ ace_compat_rhs_gref3:

  • Add WeaponSlotsInfo to get rid of error picture error when opening inventory.
  • Use rhs_SPG9_INS instead of rhsgref_ins_SPG9 for ace_compat_rhs_afrf3_spg9_carry.
  • Add ACE_CSW inheritance on ace_compat_rhs_afrf3_spg9m_carry.

@PabstMirror PabstMirror added this to the 3.13.1 milestone Jan 29, 2020
@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label Jan 29, 2020
@commy2
Copy link
Contributor

commy2 commented Jan 29, 2020

Why would static weapons appear in the arsenal?

@commy2
Copy link
Contributor

commy2 commented Jan 29, 2020

RHS compat icons extracted from RHS. If you believe there might be an licensing issue, we can swap them for the generic icons in csw.

There is no reason to do this. Just use the external filepath.

Tbh, for legal reasons, these commits should be rebased.

@Whigital
Copy link
Contributor Author

Why would static weapons appear in the arsenal?

Isn't the whole point of CSW, to have a crew that serves a weapon platform ?

What is the point of the weapon and tripod bags if you can't equip them from the arsenal. Maybe I've completely misunderstood the purpose of the module.

There is no reason to do this. Just use the external filepath.

When equipped, you get an error when looking in the inventory (ex. Warning Message: Picture \rhsusf\addons\rhsusf_heavyweapons\data\ico\rhs_m252_x_ca.paa not found). I'm suspecting that Arma tries to find a higher/lower res version of the picture to display as icon in the inventory. Removing the _co suffix seems to disable this behavior, so i copied and renamed the .paa.

Tbh, for legal reasons, these commits should be rebased.

I'll point them to the generic icons in csw if thats ok ?

@commy2
Copy link
Contributor

commy2 commented Jan 29, 2020

I'll point them to the generic icons in csw if thats ok ?

No, use the RHS paths. If they changed them, adjust the paths. Obviously you have to start RHS to start these components.

@@ -148,6 +145,9 @@ class CfgWeapons {
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
modes[] = {};
picture = QPATHTOF(UI\StaticAT_Icon.paa);
magazines[] = {
"Titan_AT"
Copy link
Contributor

Choose a reason for hiding this comment

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

This does make them be able to load the magazines, doesn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, if you have it (the weapon bag) equipped, you can drag a mag to it, but nothing happens.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's terrible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For a Titan/Spike AT, i guess its pretty obvious what kind of mag you need for it, but adding compatible mags to the array is the only way to know what ammo you need for the weapon. Otherwise you have to scroll through the "All Magazines" list and pray you pick up the right one.

We can remove them, but the convenience of having the compatible mags listed under Magazines maybe outweighs the fact you can "placebo load" the weapon with them ?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe consider adding custom properties for magwells and magazine classes. Content of these properties could be read by ACE Arsenal and shown on the magazine list.

@Whigital
Copy link
Contributor Author

No, use the RHS paths. If they changed them, adjust the paths. Obviously you have to start RHS to start these components.

I did, of course. With the RHS paths, the icon/picture shows up in the arsenal ok, but when you exit and look in your inventory, the error pops up and the launcher slot is blank.

@commy2
Copy link
Contributor

commy2 commented Jan 29, 2020

Does the picture error happen in the release version of ACE?

@commy2
Copy link
Contributor

commy2 commented Jan 29, 2020

I don't understand what type = 4; does here. That value should be inherited from LauncherCore.
Rule of thumb: type or simulation in public class -> you dun goofed or pulled something genius (unlikely)

@Whigital
Copy link
Contributor Author

Does the picture error happen in the release version of ACE?

Yepp, just tested with SW versions ACE + USAF/AFRF/GREF + compats:

Equipped a ace_compat_rhs_usf3_mk19_carry in the arsenal, exit and open inventory.

0:40:43 Warning Message: Picture \rhsusf\addons\rhsusf_heavyweapons\data\ico\rhs_mk19_tripod_x_ca.paa not found

https://github.com/acemod/ACE3/blob/master/optionals/compat_rhs_usf3/CfgWeapons.hpp#L546

@commy2

This comment has been minimized.

@commy2

This comment has been minimized.

@Whigital
Copy link
Contributor Author

I don't understand what type = 4; does here. That value should be inherited from LauncherCore.
Rule of thumb: type in public class -> you dun goofed or pulled something genius (unlikely)

Correct, did a boo boo there. Looked at the wrong classes. The actual static weapons that has a corresponding vehicle for them have 65535. Will remove those declarations.

@Whigital
Copy link
Contributor Author

Most of the requested changes done now. Added a MuzzleSlot placeholder to make the engine use the supplied image based on this info -> https://community.bistudio.com/wiki/Arma_3_Weapon_Config_Guidelines#Inventory_icons_overlay_method

Image now shows in player inventory without any errors ....

@veteran29
Copy link
Member

Why would static weapons appear in the arsenal?

Without ACE CSW static weapons are available as backpack variants, I see no reason to not have launcher slot variants in it too. Otherwise to get launcher slot variants you would need to assemble backpack versions and disassemble them via CSW to get them.

Ideally you would have backpack versions in arsenal when CSW is disabled and opposite if enabled.

@dedmen
Copy link
Contributor

dedmen commented Jan 30, 2020

RHS compat icons extracted from RHS.

RHS will rip your ass up and potentially cause issues for us if you do that. So no no no no no.

Tbh, for legal reasons, these commits should be rebased.

yes. Definitely. Please do that, right now the RHS icons are still in history. Should be fine if we just squash&merge at the end though, if author doesn't want to fix it.

@Whigital
Copy link
Contributor Author

Would you like me to remove the mag. defs. and just keep the other fixes, or just rebase as is ?

@PabstMirror
Copy link
Contributor

Tag @TheCandianVendingMachine

@TheCandianVendingMachine
Copy link
Contributor

@Whigital I would say remove the mag defs for right now. I'll take a look at ACE Arsenal to try and find a way to have compatible magazines show up if you have the launcher equipped, but being able to drag magazines into the launcher slot is hacky and I just don't like it

@Whigital
Copy link
Contributor Author

There we go, squashed, baked and magazines gone.

@Whigital Whigital changed the title [csw] Add compatible mags and enable Arsenal listing [csw] Minor bugfixes Jan 30, 2020
@commy2
Copy link
Contributor

commy2 commented Jan 31, 2020

Can you explain why:

            class MuzzleSlot {
                iconScale = 0.1;
            };

works?

Why list iconScale at all?
Why is it not set to 0 or 1?
Why is not an empty picture set instead?
What about the other attachment slots?

@Whigital
Copy link
Contributor Author

Can you explain why:

            class MuzzleSlot {
                iconScale = 0.1;
            };

works?

Why list iconScale at all?
Why is it not set to 0 or 1?
Why is not an empty picture set instead?
What about the other attachment slots?

Basically just to trick the engine into using the weapon picture instead of looking for alternatives based on slots:

https://community.bistudio.com/wiki/Arma_3_Weapon_Config_Guidelines#Inventory_icons_overlay_method

  • If there is no slot with positive value of iconScale property, the game falls back to old behaviour

From what i could gather, the picture error is based on the engine looking for a picture with <classname>_x_ca.paa as baseLayer, <classname>_m_ca.paa for muzzle etc., if there are no slots with the iconScale property.

Can add the other slots and use an empty picture for them if it makes more sense.

@commy2
Copy link
Contributor

commy2 commented Jan 31, 2020

It wouldn't make more sense to add the other entries, however, I think this warrants a comment in the source code.

@Whigital
Copy link
Contributor Author

Whigital commented Jan 31, 2020

Maybe add a macro for that class (MuzzleSlot) and comment that ?

// Fake muzzle slot to get weapon picture to display in inventory, ref.
// https://community.bistudio.com/wiki/Arma_3_Weapon_Config_Guidelines#Inventory_icons_overlay_method

#define FAKE_MUZZLE_SLOT class MuzzleSlot { iconScale = 0.1; };

@commy2
Copy link
Contributor

commy2 commented Jan 31, 2020

Not sure about macro. It would be enough if the first occurance in the config is commented.

I'd chose a better comment though, i.e.:

// Positive value for iconScale forces game to use icon overlay method.
// Required, because the inventory icon has no accessory variants.

FAKE_MUZZLE_SLOT is a poor name, imo. One should use the self documenting possibilities when chosing a macro name. I.e. FIX_INVENTORY_ICON;

@Whigital Whigital changed the title [csw] Minor bugfixes CSW - Minor fixes for CSW + RHS Compats Feb 12, 2020
@commy2 commy2 merged commit af777a4 into acemod:master Feb 22, 2020
@Whigital Whigital deleted the csw_mags_zeus branch February 29, 2020 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants