Difference between revisions of "Manual:DIL Changes"
(Created page with "''Temp list of changes. Will reorganize once I see what all we have. '' '''DIL Priority''' When performing a wstat <unit> func command on an object, the dil functions will dis...") |
|||
Line 1: | Line 1: | ||
''Temp list of changes. Will reorganize once I see what all we have. | ''Temp list of changes. Will reorganize once I see what all we have. | ||
'' | '' | ||
+ | |||
'''DIL Priority''' | '''DIL Priority''' | ||
− | When performing a wstat <unit> func command on an object, the dil functions will display in order of priority; top to bottom with most important dils at the top. | + | When performing a wstat <unit> func command on an object, the dil functions will display in order of priority; top to bottom with most important dils at the top. If a dil program is executing the priority command, it will block all programs below it. Many of the stock game functions call on the priority or FN_PRI to function properly. |
− | If a dil program is executing the priority command, it will block all | + | <br> |
− | Many of the stock game | ||
A few examples: | A few examples: | ||
− | *Death ~ dilbegin recall fnpri(FN_PRI_DEATH) death_seq(); | + | <br> |
− | *Rescue | + | *Death ~ dilbegin recall fnpri(FN_PRI_DEATH) death_seq();<br> |
− | *Under Arrest ~ (dilbegin fnpri(FN_PRI_RESCUE-1)arrest_check(office:string); | + | *Rescue<br> |
− | + | *Under Arrest ~ (dilbegin fnpri(FN_PRI_RESCUE-1)arrest_check(office:string);<br> | |
+ | |||
Here's an example in a guard: | Here's an example in a guard: |
Revision as of 02:59, 3 July 2020
Temp list of changes. Will reorganize once I see what all we have.
DIL Priority
When performing a wstat <unit> func command on an object, the dil functions will display in order of priority; top to bottom with most important dils at the top. If a dil program is executing the priority command, it will block all programs below it. Many of the stock game functions call on the priority or FN_PRI to function properly.
A few examples:
- Death ~ dilbegin recall fnpri(FN_PRI_DEATH) death_seq();
- Rescue
- Under Arrest ~ (dilbegin fnpri(FN_PRI_RESCUE-1)arrest_check(office:string);
Here's an example in a guard:
The wstat returns:
dilcopy rescue@function("guard/captain/mayor");
dilcopy arrest_check@midgaard("accus_room@midgaard");
dilbegin SFUN_PROTECT_LAWFUL time PULSE_SEC*60 bits SFB_RANTIME
dilbegin guard2();
In this example, the priority belongs to rescue. Therefore the expected behavior is that this guard will prioritize rescuing someone they see being attacked before rushing off to enforce peace or arrest someone. Secondarily, if rescuing is not an active option, the guard will arrest someone before trying to keep the peace. If the guard is interrupted in the middle of the execution of guard2(); above, the guard2(); program will simply pause until the higher priority dils are completed.