Difference between revisions of "Modding:Affects"
From DRL Wiki
Shark20061 (Talk | contribs) m (Consistancy...) |
Game Hunter (Talk | contribs) m (used more effective templates) |
||
| Line 3: | Line 3: | ||
== Prototype == | == Prototype == | ||
| − | {| | + | {{drltable|Affect Prototype|3|{{Table3Col |
| − | + | ||
| − | + | ||
|es=background: #333; | |es=background: #333; | ||
|c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px; | |c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px; | ||
| − | |c2=padding:0px 2px; | + | |c2=vertical-align:top; padding:0px 2px; |
| − | | | + | |c3=padding:0px 2px; |
| − | | | + | |{{modarg|string}} |id |The identifier for the affect. |
| − | | | + | |{{modarg|string}} |name |What is displayed in the status line while the effect is active. |
| − | | | + | |{{modarg|Color}} |color |The color of the name on the status line while the effect is on. |
| − | | | + | |{{modarg|Color}} |color_expire |The color of the name on the status line when the effect is wearing off. |
| − | | | + | |{{modarg|string}} |message_init |The message printed when the effect is activated. |
| − | | | + | |{{modarg|string}} |message_ending |The message printed when the effect is wearing off. This is unused in 0.9.9.6. |
| − | | | + | |{{modarg|string}} |message_done |The message printed when the effect wears off. |
| − | | | + | |{{modarg|StatusEffect}}|status_effect |The overlay effect that occurs while this effect is active. |
| + | |{{modarg|integer}} |status_strength|When multiple effects have overlay changes, the one with the highest strength will be the overlay displayed if more than one is active at the same time. | ||
}} | }} | ||
| − | + | }} | |
== Engine Hooks == | == Engine Hooks == | ||
| − | {| | + | {{drltable|Affect Hooks|2|{{Table2Col |
| − | + | ||
| − | + | ||
|es=background: #333; | |es=background: #333; | ||
|c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px; | |c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px; | ||
|c2=padding:0px 2px; | |c2=padding:0px 2px; | ||
| − | | | + | |{{modarg|void}}|[[#OnAdd|OnAdd]]('''Affect''' self) |
| − | | | + | |{{modarg|void}}|[[#OnTick|OnTick]]('''Affect''' self) |
| − | | | + | |{{modarg|void}}|[[#OnRemove|OnRemove]]('''Affect''' self) |
}} | }} | ||
| − | + | }} | |
{{anchor|OnAdd}} | {{anchor|OnAdd}} | ||
Latest revision as of 22:02, 24 March 2012
These represent the various temporary effects in the game.
Prototype
| Affect Prototype | ||
| string | id | The identifier for the affect. |
| string | name | What is displayed in the status line while the effect is active. |
| Color | color | The color of the name on the status line while the effect is on. |
| Color | color_expire | The color of the name on the status line when the effect is wearing off. |
| string | message_init | The message printed when the effect is activated. |
| string | message_ending | The message printed when the effect is wearing off. This is unused in 0.9.9.6. |
| string | message_done | The message printed when the effect wears off. |
| StatusEffect | status_effect | The overlay effect that occurs while this effect is active. |
| integer | status_strength | When multiple effects have overlay changes, the one with the highest strength will be the overlay displayed if more than one is active at the same time. |
Engine Hooks
| Affect Hooks | |
| void | OnAdd(Affect self) |
| void | OnTick(Affect self) |
| void | OnRemove(Affect self) |
- OnAdd(Affect self)
- This is called when the effect is gained.
- OnTick(Affect self)
- This is called every action while the effect is active.
- OnRemove(Affect self)
- This is called when the effect is lost.