User:Tinkerer: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=== To be added === ==== Behaviour script ==== * TeleportTo has a force parameter. If it's not forced it will put it at y=0, else it will take the position provided.") |
mNo edit summary |
||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=== To be added === | === To be added === | ||
==== Behaviour script ==== | ==== Behaviour script ==== | ||
* TeleportTo has a force parameter. If it's not forced it will put it at y=0, else it will take the position provided. | * TeleportTo has a force parameter. | ||
** For items: If it's not forced it will put it at y=0, else it will take the position provided. | |||
** For characters: If it's not forced, it will find the nearest AI-grid position, otherwise it will take the position provided | |||
* Event parameter matching/initialisation | |||
** Global variables and constants (e.g. '1' or "fire") are always inputs (as in: event parameter should match the variable) | |||
*** But: Null global variables, and '_', are neither input, nor output (they're just ignored) | |||
** Local variables are always outputs | |||
==== Combat scripting ==== | |||
* If you have combats where an enemy gives up at the end and you do not want them to regenerate health and/or armor at that point, you can use the following features: | |||
** no health regeneration 3 seconds after leaving combat: set the *character flag* GLO_BlockRegenAfterCombat (handled by DefaultCharacter.charScript) | |||
** no magical/physical armor regeneration after leaving combat: set the *tag* NO_ARMOR_REGEN (handled by code) | |||
==== UUID resolution ==== | |||
Any of our load procedures works as follows: | |||
* we expect loads from multiple modules to be done according to the order given by module ActiveMod.GetLoadOrderedModules. (Shared first and then down the line) | |||
* if the uuid of an object already exists, the new load overwrites the old one. | |||
* if this happens in the same module, it's a critical design assert. Otherwise it's fine. | |||
==== PointSound ==== | |||
* PointSoundDummy extends the range of the PointSound, they will use only 1 sound. This is handy for rivers and other non circular sound emitters | |||
* currently no way to change PointSound while the game is running (changing sound, enabling/disabling) | |||
==== APIs to check when new versions get released ==== | |||
* [[Osiris/Shared/DB_HasItemTemplateScriptFlag]] |
Latest revision as of 21:36, 23 October 2018
To be added
Behaviour script
- TeleportTo has a force parameter.
- For items: If it's not forced it will put it at y=0, else it will take the position provided.
- For characters: If it's not forced, it will find the nearest AI-grid position, otherwise it will take the position provided
- Event parameter matching/initialisation
- Global variables and constants (e.g. '1' or "fire") are always inputs (as in: event parameter should match the variable)
- But: Null global variables, and '_', are neither input, nor output (they're just ignored)
- Local variables are always outputs
- Global variables and constants (e.g. '1' or "fire") are always inputs (as in: event parameter should match the variable)
Combat scripting
- If you have combats where an enemy gives up at the end and you do not want them to regenerate health and/or armor at that point, you can use the following features:
- no health regeneration 3 seconds after leaving combat: set the *character flag* GLO_BlockRegenAfterCombat (handled by DefaultCharacter.charScript)
- no magical/physical armor regeneration after leaving combat: set the *tag* NO_ARMOR_REGEN (handled by code)
UUID resolution
Any of our load procedures works as follows:
- we expect loads from multiple modules to be done according to the order given by module ActiveMod.GetLoadOrderedModules. (Shared first and then down the line)
- if the uuid of an object already exists, the new load overwrites the old one.
- if this happens in the same module, it's a critical design assert. Otherwise it's fine.
PointSound
- PointSoundDummy extends the range of the PointSound, they will use only 1 sound. This is handy for rivers and other non circular sound emitters
- currently no way to change PointSound while the game is running (changing sound, enabling/disabling)