Skip to content

AllowedLocations

Denadan edited this page May 7, 2021 · 3 revisions

This feature allow redefine AllowedLocations property for component per UnitType

Basics

Final avaliable location is combined from AllowedLocations Property of component and definition from custom/unittype using bitwise AND. for example.

  • original = "All" redefine = "Legs" result = "Legs"
  • original = "LeftLeg, LeftArm" redefine = "Legs" result = "LeftLeg"

AllowedLocation tag declarations

{
  "Tag" : "LegActuator",
  "Default" : "Legs", // Default redefine for units not fall to any defined unit type
  "UnitTypes" : [
    // definition per unit type
    { "UnitType" : "QuadMech", "Location" : "Arms, Legs" },
    { "UnitType" : "Vehicle", "Location" : "None" }
  ]
}		

AllowedLocations custom

This component custom link component to definition above. If no declaraion exists - that will be error message in log and component fallback to Def.AllowedLocations

"Custom" : {
  "AllowedLocations" : "LegActuator"
}

ChassisAllowedLocations

this chassis custom allow redefine allowed locations per mech

"Custom" : {
  "ChassisAllowedLocations " : [
    { "Tag" : "LegActuator", "Locations" : "None" }, 
    { "Tag" : "SomeOtherTag", "Locations" : "Head" } 
  ]
}
Clone this wiki locally