Open past-due opened 4 years ago
@KJeff01: Curious about your thoughts on this.
Now I think that model, mountModel, explosionWav, weaponWav are not needed to be split, it'll be useless. Others are important, they will allow us to create unique effects for each weapon.
I think recoilValue
is purely a visual effect of how "hard" a weapon turret recoils.
My opinion is that this is a great idea and that anything that relates to the purely visual aspects of a component could be split. This way the old file would encompass all the balance based stuff and the other file would contain all the visual data and whatnot.
Also if you want to move ALL stuff that is not balance based to separate file, we could use parameters like model, mountModel as feature in a future. They exist not only in weapons.json, so If I will create a new model and it looks good on battlefield, it will still look bad in build menu(coz can't use shading). This way we could add a new line in "visual" table that will tell the game what model should be used in menu.
PIE files do affect balance because they determine hitboxes. Moving all references to purely graphical effects into separate files would thus break existing mods without eliminating the need for further changes to graphics mods after new releases.
Well, I think that only models like structures and tanks have hitboxes. Weapon effects are still visual stuff.
@Forgon2100, @KJeff01:
model
affects hitboxes, but does mountModel
?
And these appear to be purely graphical / audio-related (but please correct me if I'm missing something), so could be split into a separate file?
Also, this wouldn't change the requirement that all players have the same mods enabled.
I think the goal here is to reduce the maintenance effort required by folks wanting to create purely graphical mods - if underlying stats changes affect balance, that's okay (for them). Just because changing the model
affects the hitboxes, doesn't mean there isn't merit to splitting it out as well, for that use-case. It seems rare (to me) that typical stats changes also change the model, and that typical model changes also change the stats. (And I realize they have some joint influence with the hitboxes, but since most graphical mods just rebase with the current stats, that seems to not be an issue per-se for this case.)
this wouldn't change the requirement that all players have the same mods enabled.
But it could if the game will check only "hash" of files which affect balance. So players could use whatever graphical mods they want.
It looks like the "hitbox" for units is determined by only the body model.
reallyBuildDroid()
...
psDroid->sDisplay.imd = BODY_IMD(psDroid, psDroid->player);
...
hotbox is equal to (sDisplay.imd->radius * 2)
Then the hitbox is returned from establishTargetShape() which differs in shape by object type. I'm guessing weapons models would affect structure hitboxes though. So yeah.
Also lightworld
is graphical related and could be split.
I have found no hard evidence that mountModel values affect hitboxes, although changing them can cause projectiles to be drawn in noticeably different locations, e.g. when using the bizarre Machinegun shown below:
For the sake of simplicity, I would nevertheless recommend to exclude mountModel from our list of purely graphical parameters.
The easiest way to not brake hitboxes(aabb calculations) is using a special model for each component of tank or structure(excluding baseplates). At start we could use classic modes for these stuff, but later, I think, I could create a special models(bounding boxes), yeah just cubes, for each model, which we could specify in balance stats. These bounding boxes will be used to calc aabb center while true model will be kept as graphical aspect of the game only and moved to separate stats file.
(Requested by @MaNGusT-)
One thing that is problematic for creating new gfx effects / graphics mods is that the gfx parameters and balance stats are in a single table / file.
i.e. in
weapons.json
: effectSize, flightGfx, hitGfx, missGfx, model, mountModel, muzzleGfx, waterGfx, explosionWav, weaponWav (possibly recoilValue? but what does that affect?)Splitting these stats out into a separate file will mean that graphics mods hopefully won't need to be edited every time weapon stats updates / balancing occurs.