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

POTATO RPG29 Patch #511

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AChesheireCat
Copy link
Contributor

This patch removes the RHSUSAF dependency for the RPG 29 Vampir mod by replacing the ammunition configs with RHSAFRF and CUP equivalents.

*It should be noted that this code is really messy and I'm pretty sure some of it is redundant, but it works and I'm very scared to remove anything lest it breaks...

This patch removes the RHSUSAF dependency for the RPG 29 Vampir mod by replacing the ammunition configs with RHSAFRF and CUP equivalents.

*It should be noted that this code is really messy and I'm pretty sure some of it is redundant, but it works and I'm very scared to remove anything lest it breaks...
Brings style/syntax more in line with POTATO standard
@TheCandianVendingMachine
Copy link
Contributor

which classes were causing the dependency? looking at this, this is just recreating the entire weapon config from scratch. you say its just ammo, but it touches a lot

@AChesheireCat
Copy link
Contributor Author

The dependencies were just the ammo (it inherited from the RHSUSAF MAAWS rounds), but I also went a little out of scope to add a scratch-made version of the RPG-29's OG-29 round that inherits from the CUP RPG-7V OG-7V round.

I'd like to reiterate that this code is really messy - every time I touched a different part of it when making the patch seemed to break something else and I've already put too many hours into making this patch so once I got it into a solid, reliable working state, I pushed it to at least get eyes on it. I'll probably continue to refine it, but at a much later date.

@kil0byt3 kil0byt3 added the WIP label Aug 5, 2024
@kil0byt3 kil0byt3 added this to the v1.3.44 milestone Aug 6, 2024
@PabstMirror
Copy link
Contributor

maybe just reduce this to just what we need to change

this replaces the rhsus sounds
and then the ammo with the vanilla maaws
just need to find something for the frag round


class CfgMagazineWells {
    class RPG29 {
        BI_Magazines[] = {"RPG29_AT","RPG29_HE_F","potato_RPG29_FRAG"};
    };
};

class CfgMagazines {
    class CA_LauncherMagazine;
    class RPG29_AT: CA_LauncherMagazine {
        ammo = "R_MRAAWS_HEAT_F";
    };
    class RPG29_HE_F: CA_LauncherMagazine {
        ammo = "R_MRAAWS_HE_F";
    };
    class potato_RPG29_FRAG: CA_LauncherMagazine { // OG-29 HE-FRAG round
        // ammo = "?";
    };
};

class Mode_SemiAuto;
class CfgWeapons {
    class Launcher_Base_F;
    class CUP_launch_MAAWS: Launcher_Base_F {};
    class RPG29_Lorad: CUP_launch_MAAWS {
        class Single: Mode_SemiAuto {         
            class StandardSound {
                begin1[] = {"A3\Sounds_F\arsenal\weapons\Launchers\RPG32\rpg32",1.9952624,1,1500}; // replace rhsus sound
                soundBegin[] = {"begin1",1};
            };
        };
        reloadMagazineSound[] = {"A3\Sounds_F\arsenal\weapons\Launchers\RPG32\reload_RPG32",0.25118864,1,10}; // replace rhsus sound
    };
};

@AChesheireCat
Copy link
Contributor Author

maybe just reduce this to just what we need to change

this replaces the rhsus sounds and then the ammo with the vanilla maaws just need to find something for the frag round

Yeah, that's what I had tried initially because that was the easiest solution to implement, but it resulted in weird bugs like the round not being visualized in the launcher when loaded, the rocket shooting in a direct straight line with no drop, or the rocket doing the CoD4 RPG thing where it spirals randomly. The only solution that seemed to work was to transpose all of the original ammunition's values and replace some of it with the CUP equivalent values.

Although, there is a lot of left over code from when I was experimenting. I really do have to sit down eventually to pare down and clear it all up. That probably won't be for another week or so, though.

@PabstMirror PabstMirror modified the milestones: v1.3.44, Ongoing Aug 8, 2024
Code no longer looks like it's just a 1:1 recreation :yay:

Spent some more time figuring out what pieces weren't tied to anything - was able to remove anything referencing optics since I didn't touch that.

Will spend some more time later working on disentangling the ammunition code.
@TheCandianVendingMachine
Copy link
Contributor

tabs -> spaces?

@kil0byt3 kil0byt3 removed the WIP label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants