-
Notifications
You must be signed in to change notification settings - Fork 5
Predefined Components
Change color of component in inventoty and salvage list, on mech.
"RGBColor" : { "Color" : "red"; }
"RGBColor" : { "Color" : "#A00000"; }
- Color - HTML-coded color
Change color of component in inventoty and salvage list, on mech.
"Color" : { "UIColor" : "Red"; }
- UIColor - UIColor
Change color of component in inventoty and salvage list, on mech based on preset color
"ColorTag " : { "Tag" : "SRM"; }
- Tag - predefined color tag. To define colortags use "ColorTags" section in mod.json at CustomComponent folder, for examlpe
"ColorTags" : [
{ "Tag" : "SRM", "Color" : "purple" },
{ "Tag" : "othertag", "Color" : "#800080" },
]
Limit Component usage to given tonnage. Also hide from inventory list in mechlab when mech have wrong tonnage like JumpJets do
"TonnageAllowed" : { "Tonnage" : 50 }
Limit Component usage to given tonnage range. Also hide from inventory list in mechlab when mech have wrong tonnage like JumpJets do
"TonnageLimit" : { "Min" : 30, "Max" : 50 }
Try to put item in given position when(and only when) installed. If you have gaps in order or few items with same order - order can be wrong. Values less then 0 will be ignored. If value more then current count of component in location - item will be put in end of list as usual
"Sorter" : { "Order" : 0 }
- always put item on top of installed components
Complex theme, so it have own article
Defaults - components that controloed by other components. Player cannot add or remove they manualy, buy, sell or salvage(they not appear on this list basicly). All next components use defaults as part of own logic. Usualy they DarkGrey color on mech, but you can ovveride this using ColorComponent(default color for upgrades "Upgrade"). Main idea - they can be created or destroyed any time. Attention: Default must be same base type as main component - Weapon, AmmunitionBox, JumpJet, HeatSink or Upgrade
List of string values, that can stored and checked like ComponentTags. Some of them predefined and describe component behaviour, but you can add any value to implement own
"Flags" : { "flags" : ["default"] }
"Flags" : {
"flags" : ["invalid"],
"ErrorInvalid" : "Something wrong with {0}, remove it"
}
- "hide" - item filtered from mechlab inventory list(but appear in storage and shop inventory)
- "autorepair" - item repair iteself instead removing when you press "repair all" or "replace part" in mechlab
- "no_remove" - item cannot be removed from mech inventory by player, but it will removed with "Strip Equip" or "Replace Part" if auto repair not set
- "no_salvage" - item cannot be salvaged
- "default" - implement all 4 flags and item also destroyed iteself when moved to inventory and left on mech when stripped(but will be removed if main component removed)
- "not_broken" - if component is damaged or destroyed - mech cannot be fielded
- "not_destroyed" - if component is destroyed - mech cannot be fielded
- "invalid" - invalidate mech when equiped. for safe removing items from mod
-
ErrorCannotRemove = "Cannot remove vital component"
- Message for "default" and "no_remove" items when player try to grab it -
ErrorItemBroken = "{0} is damaged, repair it"
- Message for "not_broken" -
ErrorItemDestroyed = "{0} is destroyed, replace it"
- Message for "not_destroyed" -
ErrorInvalid = "{0} is placeholder, remove it"
- Message for "invalid"
All Messages can use {0}
parameter for item name(include ErrorCannotRemove)
Item replaced with default when removed, include remove by user, strip, remove broken by repair. Reverse replacement can be done by Category. For example Leg Actuators - it must be on mech, it can be upgraded(i.e. replaced) with current Leg Actuators with bonuses but when this bonus actuator removed default must be placed.
-
ComponentDefId
- id of component for replace -
Location
- optional, location where to add replace, if not set - current location used.
"Replace" : { "ComponentDefId" : "<id of default component>"}
note: currently supported only replace with defaults, posibility to replace with "normal" items from inventory investigated
Item have "appendixes" which must be added or removed with it. For example - XL-Engine have parts in side torso.
"Linked" : {
"Links" : [
{ "ComponentDefId" : "Gear_Engine_XL_Left", "Location" : "LeftTorso" },
{ "ComponentDefId" : "Gear_Engine_XL_Right", "Location" : "RightTorso" }
]
}
note1: appendixes must be Default
note2: appendixes must be some base type as main item, i.e. Upgrade or Weapon