Help Finding a List of Conditions Used by Traits

Finding a list of "conditions" used by, and implemented through, traits in the .yaml files for the maps and/or the whole mod.

Information and discussion for custom maps and mods.
Post Reply
Eaglepry
Posts: 1
Joined: Thu Dec 02, 2021 6:34 pm

Help Finding a List of Conditions Used by Traits

Post by Eaglepry »

My goal is make progress towards adding a custom unit to the TD mod. The GitHub guide https://github.com/OpenRA/OpenRA/wiki/C ... a-new-unit mentions how to copy the "MSUB" unit and copy its code to make the custom sub. Therein the code are listed "traits", some of which are associated with "conditions," such as the "underwater" one. I basically want to find the names of all the conditions, so I can use them to create the code for my custom unit and it's traits. I can't find anything like that from the documentation or code on GitHub or the wiki. Please support me with guidance.

abcdefg30
Posts: 562
Joined: Mon Aug 18, 2014 6:00 pm

Re: Help Finding a List of Conditions Used by Traits

Post by abcdefg30 »

There is no list of those conditions, as they can be arbitrarily defined by other traits. For example

Code: Select all

	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
grants the condition "cloak-force-disabled", and other traits can then consume that condition. The name "cloak-force-disabled" isn't set in stone, the name can be any name. It could be something like

Code: Select all

	GrantConditionOnDamageState@UNCLOAK:
		Condition: critical-damage
		ValidDamageStates: Critical
and the other traits would consume "critical-damage" instead. (In this example, "Cloak" would define "PauseOnCondition: critical-damage".)

Post Reply