Research:Scripting: Difference between revisions
Jump to navigation
Jump to search
(Added research navbox.) |
(Added actor local variable bindings.) |
||
Line 88: | Line 88: | ||
These defaults are engine defaults that have a lower priority than values read from data files. This means a new game will have the values from the base game data rather than these values. | These defaults are engine defaults that have a lower priority than values read from data files. This means a new game will have the values from the base game data rather than these values. | ||
==Actor local variables== | |||
The engine exposes actor events and additional actor information through local script variables. | |||
===List of named locals=== | |||
{| class="wikitable" | |||
!ID | |||
!Type | |||
!Used in | |||
!Implementation status | |||
|- | |||
|Companion | |||
|short | |||
|rowspan="3"|Companions | |||
|{{StatusCol|orange|unknown}} | |||
|- | |||
|stayOutside | |||
|short | |||
|{{StatusCol|red|unimplemented}} | |||
|- | |||
|minimumProfit | |||
|float | |||
|{{StatusCol|orange|unknown}} | |||
|- | |||
|OnPCEquip | |||
|short | |||
|Set to 1 when an item is equipped | |||
|{{StatusCol|orange|unknown}} | |||
|- | |||
|OnPCAdd | |||
|short | |||
|Set to 1 when an item is added to the inventory | |||
|{{StatusCol|orange|unknown}} | |||
|- | |||
|OnPCHitMe | |||
|short | |||
|Set to 1 when the player attempts to damage an actor | |||
|{{StatusCol|orange|unknown}} | |||
|- | |||
|OnPCDrop | |||
|short | |||
|Set to 1 when an item is dropped | |||
|{{StatusCol|orange|unknown}} | |||
|- | |||
|OnPCRepair | |||
|short | |||
|Set to 1 when an item is repaired | |||
|{{StatusCol|orange|unknown}} | |||
|- | |||
|OnPCSoulGemUse | |||
|short | |||
|Set to 1 when a soul gem is used (non-functional) | |||
|{{StatusCol|orange|unimplementable}} | |||
|- | |||
|OnPCEquip | |||
|short | |||
|Set to 1 when an item is equipped | |||
|{{StatusCol|orange|unknown}} | |||
|- | |||
|PCSkipEquip | |||
|short | |||
|If set to 1, will prevent the equipping of an item | |||
|{{StatusCol|orange|unknown}} | |||
|} | |||
{{Template:Research Navbox}} | {{Template:Research Navbox}} |
Revision as of 19:37, 19 November 2015
Script commands
See Scripting (status).
Script global variables
Engine data exposed to scripts through script global variables, rather than accessor functions.
List of exposed globals
ID | Default value | Used in | Implementation status |
---|---|---|---|
GameHour | 12.0 | Time system | implemented |
Year | 427.0 | implemented | |
Month | 7.0 | implemented | |
Day | 17.0 | implemented | |
DaysPassed | 1.0 | implemented | |
TimeScale | 30.0 | implemented | |
CharGenState | 0 | Character creation | implemented |
MonthsToRespawn | 1.0 | Container respawning | not started |
PCKnownWerewolf | 0 | Werewolf transformation | not started, needs research |
WerewolfClawMult | 1.0 | Werewolf melee damage | implemented |
CrimeGoldDiscount | 0 | Dialogue global variables | implemented |
CrimeGoldTurnIn | 0 | implemented | |
PCHasCrimeGold | 0 | implemented | |
PCHasGoldDiscount | 0 | implemented | |
PCHasTurnIn | 0 | implemented |
These defaults are engine defaults that have a lower priority than values read from data files. This means a new game will have the values from the base game data rather than these values.
Actor local variables
The engine exposes actor events and additional actor information through local script variables.
List of named locals
ID | Type | Used in | Implementation status |
---|---|---|---|
Companion | short | Companions | unknown |
stayOutside | short | unimplemented | |
minimumProfit | float | unknown | |
OnPCEquip | short | Set to 1 when an item is equipped | unknown |
OnPCAdd | short | Set to 1 when an item is added to the inventory | unknown |
OnPCHitMe | short | Set to 1 when the player attempts to damage an actor | unknown |
OnPCDrop | short | Set to 1 when an item is dropped | unknown |
OnPCRepair | short | Set to 1 when an item is repaired | unknown |
OnPCSoulGemUse | short | Set to 1 when a soul gem is used (non-functional) | unimplementable |
OnPCEquip | short | Set to 1 when an item is equipped | unknown |
PCSkipEquip | short | If set to 1, will prevent the equipping of an item | unknown |