AvernumScript/Appendix/General notes about scripting

From Wikibooks, open books for an open world
Jump to navigation Jump to search

General notes about scripting

[edit | edit source]

which_char

[edit | edit source]
Many calls expect to be given a value for which_char. This expects the number of a character, which will be from 0 to 119.

Note: You are not entering the character’s Character ID or their Personality. To find the number of a character; in the editor, select the character and look at the number in the first description line.

If you use such a call in a creature script, if you enter a value of -1 for which_char, the function will act on the creature whose script is running. In such a case, you can also enter ME for which_char. This does the same thing.

which_char_or_group

[edit | edit source]
When a call expects a value for which_char_or_group, it wants the number of a character or group. This is exactly like which_char, except for one difference: the call can also act on every member of a group. If you want to have the call act on group x, give which_char_or_group a value of 1000 + x.

Note: Group 0 is always the party.

The Most Important Calls

[edit | edit source]
You should pay special attention to these calls. They are the calls that are, in general, used the most frequently to write special encounters.
This call is the way to begin a conversation.
This call lets you block containers and spaces from the party.
Using these two calls can let you easily reward the party.
The first call lets you see if a character exists. The second call will instantly make a new one.
Every scenario must use this call. Otherwise, the only way the party can leave the scenario is via the character editor.
This is the best call to display some simple text to the player.
This call enables you to customize your outdoor encounters.
These are the two primary calls for setting and checking Stuff Done flags.
These two calls enable you to instantly customize creatures in your towns:
This call lets you jump around states in scripts easily.