Simple Parts Pack for Flan's Mod

Simple Parts Pack for Flan's Mod

903k Downloads

Generalising Capabilities

stvncao5 opened this issue ยท 5 comments

commented

The variables used for when a projectile can lock onto "x-type" of entity shouldn't be unique to the ammo type because that's frankly quite absurd. It should be generic to both the weapon and the ammo (unless I was mistaken while looking through the variables in the mod).

The same goes for variables like explosion radius, fire radius, applying potion effects, etc.

Also a side note, not related to this specific issue. Please don't take this personally, for frankly, I am annoyed, but not angry nor trying to sound impatient. But this mod is just riddled with blatantly bad design. (As evidenced by my need for my past few consecutive tickets.) I'm still trying to fathom very hard where it makes sense to make a variable like NumBullets a gun-specific variable when it should be used for both guns and ammo, or at least just for ammo. I'm almost tempted to say this mod needs a rewrite, although that will probably be impractical.

commented

I'm not sure about this one. If anything I think it's better to have the specialist attributes handled in the ammo file. That way you can theoretically make one gun fire multiple different types of specialist ammo (e.g. a rocket launcher firing dumbfire, guided, chemical and napalm projectiles), however if you started defining these in the gun's config, you would just limit what you could do with it.

The only reason I could think of to define these in the gun's file is if you only want it to fire a single type of ammunition, and seeing as you have to create the ammunition anyway, I don't see the benefit of defining these in the gun's file rather than the ammo. Don't get me wrong, this seems more logical, but it's not the most prominent issue to address and doesn't really add anything useful outside of a few very specific cases.

You raise a few good points, but the real uses of a couple of them are minimal. Although I am very much with you on the whole NumBullets thing. That is genuinely much more useful if it is on the bullet's config than on the gun's config.

commented

"I'm not sure about this one. If anything I think it's better to have the specialist attributes handled in the ammo file. That way you can theoretically make one gun fire multiple different types of specialist ammo (e.g. a rocket launcher firing dumbfire, guided, chemical and napalm projectiles), however if you started defining these in the gun's config, you would just limit what you could do with it."

It would seem sensible to take this approach, but it would still be limiting creativity and potential for all sorts of content packs by catering only to the ones that have a modernistic theme to it. For example, let's take the game Mass Effect - they use thermal clips. All guns essentially use the same ammo. If I wanted to make a content pack to closely model Mass Effect, I can't do it effectively.

Let's also take Perfect Dark. A Rocket Launcher in this game can switch between firing fast+straight missiles or slow+homing missiles. I'd rather have one gun that can "switch modes" (which is what I'm trying, partially in vain, to do with my content pack) then create an extremely high number of ammo types (i.e. normal rocket, normal+homing rocket, large rocket, large+homing rocket, etc.) I'd have to account for a large amount of combinations which is too cumbersome to do by limiting these features to ammo only.

Also I'm not saying these features should be handled only in the gun file. I'm saying they should be able to be handled either in the gun file, the ammo file, or both.

commented

The problem with these proposed changes is that it breaks or does not follow the process of an Object-Oriented Design - that is, the link between Gun and Shootable Object(bullet/grenades).
The only, and most logical option, is to push as many variables as possible to either bullet or ShootableType. Flan (and us) can make as many different ammo types and expand on ShootableType as much as he wants - but he'll never need to commit any changes to Gun, because Gun simply thinks all the private variables of Shootable Object are the same.

Breaking that link by having most variables shared between Gun and Shootable Object will mean that every time a change is made to bullets, it must be made to gun as well - they're now almost one unit of code split across two classes, and there's no guarantee that it can run without crashing.

And to move most variables to the Gun Class becomes worse - Grenade is also a type of Shootable Object that can be fired from gun (see flan's grenade launcher), and thus will end up in the same problems as mentioned.

Most of these changes you ask for breaks the mod should we try to change it. NumBullets is the only one that I can see that needs to be moved over to Ammo.
And before you say "but Perfect Dark and Mass Effect could do it" keep in mind they're built in C/C++, where the language can support extended functionality.

commented

Thanks for explaining the caveats for me. (Also keep in mind I'm fairly ignorant in programming so I'm never clear on what can or cannot be done.)

I'm not necessarily saying the same variable should be split between guns and bullets. I'm saying the same "concept" should be split in between the two. Bullets can have all the attributes they want, guns can multiply these attributes by some factor. I don't see why this approach wouldn't be able to work (then again I'm a fairly ignorant person so there's always something I haven't comprehended yet).

On a side note, I never said that "these games could do it so therefore Flan's mod can do it too". I was simply providing examples of why I would want these features to begin with and how creativity with creating content packs is limited at the moment.

commented

I overhauled shotguns in the MW pack a fair bit with the 1.8 and Apocalypse update, and in doing so I gave the bullet file several new options such as NumBullets and Spread.