StrataSource / Engine

Issue tracker for Strata Source
47 stars 2 forks source link

Feature: Cvar that optionally replaces the default explosion VFX with a custom Particle Effect #37

Open RandomCatDude opened 3 years ago

RandomCatDude commented 3 years ago

Which component should be improved?

Explosion VFX

Describe your suggestion

New cvar that when set to a non-empty string, replaces the default explosion VFX(Which is an old hardcoded HL2 effect in Portal 2) from env_explosion, turrets, explosive futbol, etc. with a custom particle effect. The cvar's string is the name of the particle effect to use.

Expected result

It is possible to easily replace the default explosion effect with any desired custom effect, by setting a single cvar.

Gocnak commented 3 years ago

Should this be a cvar or something controlled by mappers instead?

RandomCatDude commented 3 years ago

Oh, hm. Well, I guess if mappers could setup per-map CVars, then they'd naturally be able to control it... which may've been what I assumed would be the case when I first wrote this. So I think this'd be a cvar.

I just think probably be a little clunky to have to setup something in the map itself to change it. Because it's not just env_explosion -- other entities can explode by themselves, too. So a cvar would cover everything in regards to explosions. And it'd allow personal customization, too, if the map doesn't override it.

hexaflexahexagon commented 3 years ago

why wouldn't this just be something packed into a map like any other custom asset would be? if it were a cvar mappers would need to use something like point_clientcommand which is very messy.

RandomCatDude commented 3 years ago

The thing is that the default explosion effect in Portal 2 (which is what I had in mind when writing this) is a hardcoded effect from HL2. meaning you cannot override it with custom assets.

RandomCatDude commented 3 years ago

But. I do realise now that my original proposed solution for that in this issue, would be kind of a mess, especially if it'd be an engine-wide thing. (I originally posted this on the P2:CE issue tracker, then it was moved here). So... I'm open to a better solution to this, I guess. Preferably something that's contained to P2:CE.

I do have a slightly better idea, actually -- perhaps the cvar could just be a bool, and it'd instead switch explosions to dispatching a certain particle effect? then this speciifc one could be overriden by anything, and it'd not require mappers to faff around with cvars as much. Though this one still has issues I'm unsure about...

RandomCatDude commented 3 years ago

Just to be clear. The one issue I'm trying to tackle here is the legacy HL2 explosion effect that's still in use in some Source games, and how modders can't do much to it without code access.

RandomCatDude commented 3 years ago

but, to be real... this whole thing is a pretty minor issue, so I'd understand if it was deemed too difficult and closed. especially with my, in hindsight, rather messy proposal here for solving it

Gocnak commented 3 years ago

What I'm suggesting is instead of a cvar, expanding these entities to take a string for the desired particle to use. It doesn't have to be hardcoded, but it probably shouldn't be a single convar for everything.

hexaflexahexagon commented 3 years ago

What I'm suggesting is instead of a cvar, expanding these entities to take a string for the desired particle to use. It doesn't have to be hardcoded, but it probably shouldn't be a single convar for everything.

this would probably be the most flexible and intuitive solution

RandomCatDude commented 3 years ago

right then, so... I dunno. to be honest I'm starting to rethink this whole thing, and feel like it's kinda dumb in hindsight. but I'm unsure about closing it or doing anything, so... i guess i'll leave it up to somebody else

RandomCatDude commented 3 years ago

yeah, no, I'm just gonna close this. in hindsight I realise that this is just a dumb, very poorly thought-through solution to a very minor problem that pretty much nobody cares about except me. I don't think it's something worth looking into...

of course, if someone thinks otherwise, or has a good idea to turn this into something good, then feel free to reopen it. but right now I don't like this at all.

Gocnak commented 3 years ago

You need to have more confidence in your own ideas. We did have a more general approach to take it, and suggested going with a per entity override, offering the ability to customize it on the mapper level. It's still a valid concern. I'm reopening it because I hate all the hardcoded stuff too.

RandomCatDude commented 3 years ago

i'm just unsure about the per-entity override. it would allow anything explosive to explode with its own effects, but... i also for some reason want the player to be able to customise the explosion effect for themselves, and... ugh, I'm just being a huge perfectionist here and i want this to cover far too many cases than would be reasonable. i also would want to retain backwards compatability so the HL2 effect stays in and is the absolute default.... which is also silly

honestly, i dunno at this point. I should really stay out of further discussion on this since i'm really not bringing anything good to it

hexaflexahexagon commented 3 years ago

even if we don't change these using a cvar like the issue was originally, its still a good idea to remove hard coded things like those explosion effects whenever we can so this should stay open to track that. or we can make a new issue for that explicitly, doesnt matter which. if you want to edit the original card even to reflect that you can but it's all good as it is.

e: as for player control to me this makes the most sense as something only the mapper will have control over. if players want to use the custom folder to override these like any other asset that's their own prerogative, like any other particle or texture or so.

backwards compatibility will be a nonissue because we can always default to the normal effect, we're just giving people the option to change it if they wish.

RandomCatDude commented 3 years ago

i don't know. at this point i've honestly given up on this idea because trying to think about it is just exhausting

there would need to be serious alterations done to make this feasible at all, and there'd need to be compromises that would cause it to fall below my ridiculous perfectionism, because i want every little bit of this to be flexible and perfect and that's just dumb

honestly, i really hate this issue and the embarrassing comment thread that it spawned. i feel like it'd be better to just toss this issue and start from scratch with the whole idea of custom explosion particles, in a new issue. because this one is just a mess now that's not worth trying to clean up