Partial override using a special new element and xpath #9770
Replies: 5 comments
-
|
On second thought, it would make mods much easier if one allows inheriting from other items, partially rewriting part of the item. Something that looks like this: Could come up with a pr proof of concept that work with items. |
Beta Was this translation helpful? Give feedback.
-
|
Dug deeper into the code, and it seems items can already be handled with |
Beta Was this translation helpful? Give feedback.
-
|
It seems that the inheritance cycle detection code currently prohibits overriding while inheriting. Adding content package specifier in parameters should fix this, also should make mod path (%ModDir:Parent%) seem more straightforward. |
Beta Was this translation helpful? Give feedback.
-
|
Opened pr #9779 |
Beta Was this translation helpful? Give feedback.
-
|
The current state of pr is usable with items and character overrides. Will look into overriding other things and fixing potential problems. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Original:
Some mods share much in common, but have different sprites. Especially so with clothing mods. They typically do not need to override each other's human.xml and xxx_gear.xml completely, but instead use slightly different sprites. Currently this have to be done by overriding the complete character or job, etc.
An way to make these mods work easier and more up to date with vanilla updates (some still use really old diving gear effects), is to open up sprites and their identifier as a content package api. Barotrauma already internally uses identifiers for sprites, and exposing identifiers for sprites will allow mods to only override simple visuals, and override each other to form dependant mods, making things easier to be up to date.
Edit:
It seems supporting partial override itself should be much better. See pr: #9779
Beta Was this translation helpful? Give feedback.
All reactions