Changed the description of CheckWeaponAmmoCost in ddraw.ini

Replaced <br> html tag with backslash in markdown documents.
(CommonMark spec)
This commit is contained in:
NovaRain
2021-10-25 10:18:16 +08:00
parent f1c087b3a3
commit f2bc04001e
5 changed files with 433 additions and 431 deletions
+4 -2
View File
@@ -1,5 +1,5 @@
;sfall configuration settings
;v4.3.1
;v4.3.2
[Main]
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
@@ -657,7 +657,9 @@ ExplosionsEmitLight=0
;Set to 0 for backward compatibility with pre-3.4 scripts
ArraysBehavior=1
;Set to 1 to add proper checks to see if there is enough ammo to attack with weapons that use multiple ammo per shot
;Set to 1 to add proper check for ammo before attacking and proper calculation of the number of burst rounds
;By default, weapons can make attacks when at least one ammo is left, regardless of ammo cost calculations
;Note that enabling this option will prevent super cattle prods and mega power fists from attacking if there is only one ammo left
CheckWeaponAmmoCost=0
;Controls the speed of combat panel animations (lower - faster; valid range: 0..65535)
+1 -1
View File
@@ -238,7 +238,7 @@ For those who used arrays in their mods before sfall 3.4:
* There is an INI parameter **arraysBehavior** in **Misc** section of ddraw.ini. If set to 0, all scripts which used sfall arrays before should work. This basically changes that `create_array` will create permanent arrays which are "saved" by default and their ID is also permanent. It is 1 by default.
* How savegame compatibility is handled?<br>
* How savegame compatibility is handled?\
Saved arrays are stored in **sfallgv.sav** file (in savegame) in new (more flexible) format, just after the old arrays. So basically, when you load older savegame, sfall will load arrays from old format and save them to new format on next game save. If you load savegame made with sfall 3.4 using sfall 3.3 (for example), game shouldn't crash, but all arrays will be lost.
* Previously you had to specify size in bytes for array elements. This parameter is now ignored and you can store strings of arbitrary length in arrays.
+23 -23
View File
@@ -87,7 +87,7 @@ The defines to use for the hookID are in **sfall.h**.
#### `HOOK_TOHIT (hs_tohit.int)`
Runs when Fallout is calculating the chances of an attack striking a target.<br>
Runs when Fallout is calculating the chances of an attack striking a target.\
Runs after the hit chance is fully calculated normally, including applying the 95% cap.
```
@@ -125,8 +125,8 @@ Critter ret2 - Override the target of the attack
#### `HOOK_CALCAPCOST (hs_calcapcost.int)`
Runs whenever Fallout is calculating the AP cost of using the weapon (or unarmed attack). Doesn't run for using other item types or moving.<br>
Note that the first time a game is loaded, this script doesn't run before the initial interface is drawn, so if the script effects the AP cost of whatever is in the player's hands at the time the wrong AP cost will be shown. It will be fixed the next time the interface is redrawn.<br>
Runs whenever Fallout is calculating the AP cost of using the weapon (or unarmed attack). Doesn't run for using other item types or moving.\
Note that the first time a game is loaded, this script doesn't run before the initial interface is drawn, so if the script effects the AP cost of whatever is in the player's hands at the time the wrong AP cost will be shown. It will be fixed the next time the interface is redrawn.\
You can get the weapon object by checking item slot based on attack type (`ATKTYPE_LWEP1`, `ATKTYPE_LWEP2`, etc) and then calling `critter_inven_obj`.
```
@@ -161,7 +161,7 @@ int ret0 - The pid of an object to override the attacking weapon with
#### `HOOK_DEATHANIM2 (hs_deathanim2.int)`
Runs after Fallout has calculated the death animation. Lets you set your own custom frame id, so more powerful than `HOOK_DEATHANIM1`, but performs no validation.<br>
Runs after Fallout has calculated the death animation. Lets you set your own custom frame id, so more powerful than `HOOK_DEATHANIM1`, but performs no validation.\
When using `critter_dmg` function, this script will also run. In that case weapon pid will be -1 and attacker will point to an object with `obj_art_fid == 0x20001F5`.
Does not run for critters in the knockdown/out state.
@@ -222,7 +222,7 @@ Critter arg0 - The critter that just died
#### `HOOK_FINDTARGET (hs_findtarget.int)`
Runs when the AI is trying to pick a target in combat. Fallout first chooses a list of 4 likely suspects, then normally sorts them in order of weakness/distance/etc depending on the AI caps of the attacker.<br>
Runs when the AI is trying to pick a target in combat. Fallout first chooses a list of 4 likely suspects, then normally sorts them in order of weakness/distance/etc depending on the AI caps of the attacker.\
This hook replaces that sorting function, allowing you to sort the targets in some arbitrary way.
The return values can include critters that weren't in the list of possible targets, but the additional targets may still be discarded later on in the combat turn if they are out of the attackers perception or the chance of a successful hit is too low. The list of possible targets often includes duplicated entries, but this is fixed in sfall 4.2.3/3.8.23.
@@ -350,8 +350,8 @@ int ret0 - the new AP cost
Run when checking to see if a hex blocks movement or shooting. (or ai-ing, presumably...)
__NOTE:__ These hook scripts can become very CPU-intensive and you should avoid using them.
For this reason, these hooks are not thoroughly supported in sfall, and may be removed in future versions.<br>
If you want to check if some tile or path is blocked, use functions: `obj_blocking_tile`, `obj_blocking_line`, `path_find_to`.<br>
For this reason, these hooks are not thoroughly supported in sfall, and may be removed in future versions.\
If you want to check if some tile or path is blocked, use functions: `obj_blocking_tile`, `obj_blocking_line`, `path_find_to`.\
If you want script to be called every time NPC moves by hex in combat, use `HOOK_MOVECOST` hook.
```
@@ -385,9 +385,9 @@ int ret1 - The new maximum damage
#### `HOOK_AMMOCOST (hs_ammocost.int)`
Runs when calculating ammo cost for a weapon. Doesn't affect damage, only how much ammo is spent.
By default, weapon will shoot when at least 1 round is left, regardless of ammo cost calculations.
To add proper check for ammo before shooting and proper calculation of number of burst rounds (hook type 1 and 2 in `arg3`), set **CheckWeaponAmmoCost=1** in **Misc** section of ddraw.ini.
Runs when calculating ammo cost for a weapon. Doesn't affect damage, only how much ammo is spent.\
By default, weapons can make attacks when at least 1 ammo is left, regardless of ammo cost calculations.\
To add proper check for ammo before attacking and proper calculation of the number of burst rounds (hook type 1 and 2 in `arg3`), set **CheckWeaponAmmoCost=1** in **Misc** section of ddraw.ini.
```
Item arg0 - The weapon
@@ -459,7 +459,7 @@ Runs when checking an attempt to steal or plant an item in other inventory using
This is fired before the default handlers are called, which you can override. In this case you MUST provide message of the result to player ("You steal the %s", "You are caught planting the %s", etc.).
Example message (vanilla behavior):<br>
Example message (vanilla behavior):\
`display_msg(sprintf(mstr_skill(570 + (isSuccess != false) + arg3 * 2), obj_name(arg2)));`
```
@@ -477,8 +477,8 @@ int ret0 - overrides hard-coded handler (1 - force success, 0 - force fail,
Runs when checking if one critter sees another critter. This is used in different situations like combat AI. You can override the result.
__NOTE:__ `obj_can_see_obj` calls this first when deciding if critter can possibly see another critter with regard to perception, lighting, sneak factors.<br>
If check fails, the end result is false. If check succeeds (e.g. critter is within perception range), another check is made if there is any blocking tile between two critters (which includes stuff like windows, large bushes, barrels, etc.) and if there is - check still fails.<br>
__NOTE:__ `obj_can_see_obj` calls this first when deciding if critter can possibly see another critter with regard to perception, lighting, sneak factors.\
If check fails, the end result is false. If check succeeds (e.g. critter is within perception range), another check is made if there is any blocking tile between two critters (which includes stuff like windows, large bushes, barrels, etc.) and if there is - check still fails.\
You can override "within perception" check by returning 0 or 1, OR, as a convenience, you can also override blocking check after the perception check by returning 2 instead. In this case you should add "line of sight" check inside your hook script, otherwise critters will detect you through walls.
This is fired after the default calculation is made.
@@ -503,7 +503,7 @@ int ret0 - overrides the returned result of the function:
#### `HOOK_INVENTORYMOVE (hs_inventorymove.int)`
Runs before moving items between inventory slots in dude interface. You can override the action.<br>
Runs before moving items between inventory slots in dude interface. You can override the action.\
What you can NOT do with this hook:
- force moving items to inappropriate slots (like gun in armor slot)
@@ -533,7 +533,7 @@ int ret0 - Override setting (-1 - use engine handler, any other value - prev
#### `HOOK_INVENWIELD (hs_invenwield.int)`
Runs before causing a critter or the player to wield/unwield an armor or a weapon (except when using the inventory by PC).<br>
Runs before causing a critter or the player to wield/unwield an armor or a weapon (except when using the inventory by PC).\
An example usage would be to change critter art depending on armor being used or to dynamically customize weapon animations.
__NOTE:__ When replacing a previously wielded armor or weapon, the unwielding hook will not be executed.
@@ -553,7 +553,7 @@ int ret0 - overrides hard-coded handler (-1 - use engine handler, any other
#### `HOOK_ADJUSTFID (hs_adjustfid.int)`
Runs after calculating character figure FID on the inventory screen, whenever the game decides that character appearance might change.<br>
Runs after calculating character figure FID on the inventory screen, whenever the game decides that character appearance might change.\
Also happens on other screens, like barter.
__NOTE:__ FID has following format: `0x0ABBCDDD`, where: `A` - object type, `BB` - animation code (always 0 in this case), `C` - weapon code, `DDD` - FRM index in LST file.
@@ -701,7 +701,7 @@ int ret1 - pass 1 to allow the skill being used in combat (only for dude_obj
#### `HOOK_ONEXPLOSION (hs_onexplosion.int)`
Runs when Fallout is checking all the tiles within the explosion radius for targets before an explosion occurs.<br>
Runs when Fallout is checking all the tiles within the explosion radius for targets before an explosion occurs.\
The tile checking will be interrupted when 6 additional targets (critters) are received.
```
@@ -764,7 +764,7 @@ int ret1 - overrides the light radius. Radius range is from 0 to 8 (works on
#### `HOOK_SNEAK (hs_sneak.int)`
Runs when the Sneak skill is activated, or when the game rolls another Sneak check after the duration for the current one is over.<br>
Runs when the Sneak skill is activated, or when the game rolls another Sneak check after the duration for the current one is over.\
You can override the result of a random Sneak check or the duration time for the current result.
```
@@ -797,7 +797,7 @@ int ret0 - pass -1 to cancel the execution of the handler (only for HOOK_STD
#### `HOOK_TARGETOBJECT (hs_targetobject.int)`
Runs when the targeting cursor hovers over an object, or when the player tries to attack the target object.<br>
Runs when the targeting cursor hovers over an object, or when the player tries to attack the target object.\
You can override the target object or prevent the player from attacking the chosen target.
```
@@ -812,7 +812,7 @@ mixed ret0 - overrides the target object, or pass -1 to prevent the player fro
#### `HOOK_ENCOUNTER (hs_encounter.int)`
Runs whenever a random encounter occurs (except the Horrigan meeting and scripted encounters), or when the player enters a local map from the world map.<br>
Runs whenever a random encounter occurs (except the Horrigan meeting and scripted encounters), or when the player enters a local map from the world map.\
You can override the map for loading or the encounter.
```
@@ -882,7 +882,7 @@ int ret0 - overrides the roll result
#### `HOOK_BESTWEAPON (hs_bestweapon.int)`
Runs when the AI decides which weapon is the best while searching the inventory for a weapon to equip in combat.<br>
Runs when the AI decides which weapon is the best while searching the inventory for a weapon to equip in combat.\
This also runs when the player presses the "Use Best Weapon" button on the party member control panel.
```
@@ -899,8 +899,8 @@ Item ret0 - overrides the chosen best weapon
#### `HOOK_CANUSEWEAPON (hs_canuseweapon.int)`
Run when the AI checks whether it can use a weapon, or when the game checks whether the player can use an item (weapon) in hand slot.<br>
For AI, this mostly happens when NPCs try to find weapons in their inventory or on the map.<br>
Run when the AI checks whether it can use a weapon, or when the game checks whether the player can use an item (weapon) in hand slot.\
For AI, this mostly happens when NPCs try to find weapons in their inventory or on the map.\
For the player, this happens when the game updates the item data for active item slots on the interface bar.
```
+43 -43
View File
@@ -73,7 +73,7 @@ The `list_xxx` functions can be used to loop over all items on a map. `list_begi
The `play_sfall_sound` and `stop_sfall_sound` are used to play **mp3/wav/wma** files. The path given is relative to the Fallout folder. Specify mode as 1 to loop the file continuously, 2 to replace the current background game music with playing the specified file in loop mode, or 0 to play the file once. If you don't wish to loop, `play_sfall_sound` returns 0. If you do loop, it returns an id which can be passed back to `stop_sfall_sound` when you want to stop the effect. All sounds effects will be stopped on game reload, looping or not. These functions do not require **AllowDShowSound** to be set to 1 in ddraw.ini.
Starting from sfall 4.2.8/3.8.28, you can pass a value in the **mode** argument for a reduced sound volume. To set the volume, You need to convert the number to hexadecimal and use the argument format `0xZZZZ000Y`, where `ZZZZ` is the volume reduction value in range from 0 to 32767 (the value 32767 is muted), and `Y` is the playback mode.
Arrays are created and manipulated with the `xxx_array` functions. An array must first be created with `create_array` or `temp_array`, specifying how many data elements the array can hold. You can store any of ints, floats and strings in an array, and can mix all 3 in a single array. The ID returned by `create_array` or `temp_array` can then be used with the other array functions. Arrays are shared between all scripts. (i.e. you can call `create_array` from one script, and then use the returned ID from another script.) They are also saved across savegames. Arrays created with `temp_array` will be automatically freed at the end of the frame. These functions are safe, in that supplying a bad id or trying to access out of range elements will not crash the script. `create_array` is the only function that returns a permanent array, all other functions which return arrays (`string_split`, `list_as_array`, etc,) all return temp arrays. You can use `fix_array` to make a temp array permanent.<br>
Arrays are created and manipulated with the `xxx_array` functions. An array must first be created with `create_array` or `temp_array`, specifying how many data elements the array can hold. You can store any of ints, floats and strings in an array, and can mix all 3 in a single array. The ID returned by `create_array` or `temp_array` can then be used with the other array functions. Arrays are shared between all scripts. (i.e. you can call `create_array` from one script, and then use the returned ID from another script.) They are also saved across savegames. Arrays created with `temp_array` will be automatically freed at the end of the frame. These functions are safe, in that supplying a bad id or trying to access out of range elements will not crash the script. `create_array` is the only function that returns a permanent array, all other functions which return arrays (`string_split`, `list_as_array`, etc,) all return temp arrays. You can use `fix_array` to make a temp array permanent.\
__NOTE:__ the above description only applies when **arraysBehavior** is set to 0 in ddraw.ini. Refer to **arrays.md** for detailed description of new arrays behavior.
The `force_aimed_shots` and `disable_aimed_shots` allow overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) `force_aimed_shots` will allow a weapon to make aimed shots even if it normally couldn't, and `disable_aimed_shots` stops a weapon from making aimed shots even if it normally could. Both of these functions affect player and NPCs alike. `force_aimed_shots` does not override the effects of the fast shot trait. The list of edited weapons is not saved over game loads, so you need to call the functions once at each reload. Use a pid of 0 to represent unarmed.
@@ -483,7 +483,7 @@ sfall_funcX metarule functions
----
#### intface_redraw
`void sfall_func0("intface_redraw")`<br>
`void sfall_func0("intface_redraw")`\
`void sfall_func1("intface_redraw", int winType)`
- Redraws main game interface, useful to reflect changes after directly changing current player weapons or stats
- `winType`: the type number of the interface window (see `WINTYPE_*` constants in **sfall.h**). Pass -1 to redraw all interface windows
@@ -679,14 +679,14 @@ sfall_funcX metarule functions
----
#### inventory_redraw
`void sfall_func0("inventory_redraw")`<br>
`void sfall_func0("inventory_redraw")`\
`void sfall_func1("inventory_redraw", int invSide)`
- Redraws inventory list in the inventory/use inventory item on/loot/barter screens
- `invSide` specifies which side needs to be redrawn: 0 - the player, 1 - target (container/NPC in loot/barter screens), -1 - both sides (same as without argument)
----
#### item_make_explosive
`void sfall_func3("item_make_explosive", int pid, int activePid, int damage)`<br>
`void sfall_func3("item_make_explosive", int pid, int activePid, int damage)`\
`void sfall_func4("item_make_explosive", int pid, int activePid, int min, int max)`
- Makes the specified item (pid) an explosive item like Dynamite or Plastic Explosives
- `activePid` is for an item with an active timer, can be the same as the pid argument
@@ -712,7 +712,7 @@ sfall_funcX metarule functions
----
#### create_win
`void sfall_func5("create_win", string winName, int x, int y, int width, int height)`<br>
`void sfall_func5("create_win", string winName, int x, int y, int width, int height)`\
`void sfall_func6("create_win", string winName, int x, int y, int width, int height, int flags)`
- Works just like vanilla `CreateWin` function, but creates a window with `MoveOnTop` flag if the flags argument is not specified, and allows to set additional flags for the created window
- `MoveOnTop` flag allows the created window to be placed on top of the game interface
@@ -741,8 +741,8 @@ sfall_funcX metarule functions
#### obj_under_cursor
`object sfall_func2("obj_under_cursor", bool onlyCritter, bool includeDude)`
- Returns the object under the cursor on the main game screen
- `onlyCritter`:<br>
True - only checks critters and ignores their cover (roof tiles, walls, scenery, etc.)<br>
- `onlyCritter`:\
True - only checks critters and ignores their cover (roof tiles, walls, scenery, etc.)\
False - checks all objects (can't check critters under objects)
- Passing False to the `includeDude` argument will ignore `dude_obj`
- __NOTE:__ to get an object located on a tile when the cursor is in movement mode (hexagon cursor), use the `tile_under_cursor` function
@@ -783,13 +783,13 @@ sfall_funcX metarule functions
#### set_drugs_data
`void sfall_func3("set_drugs_data", int type, int pid, int value)`
- Overrides the parameters of drugs set in the configuration file (**DrugsFile** setting in ddraw.ini)
- `type`:<br>
0 - changes the value of **NumEffects** for the drug (see **Drugs.ini** for the description of NumEffects)<br>
- `type`:\
0 - changes the value of **NumEffects** for the drug (see **Drugs.ini** for the description of NumEffects)\
1 - changes the duration of the addiction effect for the drug (a value of 1 = one game minute)
----
#### set_unique_id
`int sfall_func1("set_unique_id", object)`<br>
`int sfall_func1("set_unique_id", object)`\
`int sfall_func2("set_unique_id", object, int flag)`
- Assigns a unique ID number to the object and returns it. If a unique ID number has already been assigned to an object, then ID number is returned without reassignment
- Items with unique IDs will not stack with other items of the same type in the inventory
@@ -800,7 +800,7 @@ sfall_funcX metarule functions
----
#### draw_image | draw_image_scaled
`void sfall_func5("draw_image", string/int artFile/artId, int frame, int x, int y, bool noTransparent)`<br>
`void sfall_func5("draw_image", string/int artFile/artId, int frame, int x, int y, bool noTransparent)`\
`void sfall_func6("draw_image_scaled", string/int pathFile/artId, int frame, int x, int y, int width, int height)`
- Displays the specified PCX or FRM image in the active window created by vanilla `CreateWin` or sfall's `create_win` script function
- `artFile/artId`: path to the PCX/FRM file (e.g. `art\\inven\\5mmap.frm`), or its FRM ID number (e.g. `0x7000026`, see specification of the FID format)
@@ -815,16 +815,16 @@ sfall_funcX metarule functions
----
#### set_fake_perk_npc | set_fake_trait_npc | set_selectable_perk_npc | has_fake_perk_npc | has_fake_trait_npc
`void sfall_func5("set_fake_perk_npc", object npc, string namePerk, int level, int image, string desc)`<br>
`void sfall_func5("set_fake_trait_npc", object npc, string nameTrait, int active, int image, string desc)`<br>
`void sfall_func5("set_selectable_perk_npc", object npc, string namePerk, int active, int image, string desc)`<br>
`int sfall_func2("has_fake_perk_npc", object npc, string namePerk)`<br>
`void sfall_func5("set_fake_perk_npc", object npc, string namePerk, int level, int image, string desc)`\
`void sfall_func5("set_fake_trait_npc", object npc, string nameTrait, int active, int image, string desc)`\
`void sfall_func5("set_selectable_perk_npc", object npc, string namePerk, int active, int image, string desc)`\
`int sfall_func2("has_fake_perk_npc", object npc, string namePerk)`\
`int sfall_func2("has_fake_trait_npc", object npc, string nameTrait)`
- These functions are similar to `has_fake_perk`, `has_fake_trait`, `set_fake_perk`, `set_fake_trait`, `set_selectable_perk`, and `set_selectable_trait` functions, but apply to the specified party member NPC (including `dude_obj`)
----
#### add_extra_msg_file
`int sfall_func1("add_extra_msg_file", string fileName)`<br>
`int sfall_func1("add_extra_msg_file", string fileName)`\
`int sfall_func2("add_extra_msg_file", string fileName, int fileNumber)`
- Loads the custom message file, and returns the file ID number assigned to it in range from `0x3000` to `0x3FFF` for the `message_str_game` function to get messages from the file
- `fileName`: the name of the custom message file (including the **.msg** extension) in the `text\<language>\game\` directory
@@ -859,7 +859,7 @@ sfall_funcX metarule functions
----
#### remove_timer_event
`void sfall_func0("remove_timer_event")`<br>
`void sfall_func0("remove_timer_event")`\
`void sfall_func1("remove_timer_event", int fixedParam)`
- Clears all set timer events for the current global script
- `fixedParam`: removes all timer events with the specified value for the current global script
@@ -871,14 +871,14 @@ sfall_funcX metarule functions
----
#### hide_window
`void sfall_func0("hide_window")`<br>
`void sfall_func0("hide_window")`\
`void sfall_func1("hide_window", string winName)`
- Hides the specified or currently active (selected) script window
- `winName`: the window name, assigned to the window by the `CreateWin` or `create_win` function
----
#### show_window
`void sfall_func0("show_window")`<br>
`void sfall_func0("show_window")`\
`void sfall_func1("show_window", string winName)`
- Displays the specified hidden script window or the one previously hidden with the `sfall_func0("hide_window")` function
- `winName`: the window name, assigned to the window by the `CreateWin` or `create_win` function
@@ -899,7 +899,7 @@ sfall_funcX metarule functions
----
#### string_compare
`bool sfall_func2("string_compare", string str1, string str2)`<br>
`bool sfall_func2("string_compare", string str1, string str2)`\
`bool sfall_func3("string_compare", string str1, string str2, int codePage)`
- Compares two strings case-insensitive, and returns True if the two strings are matched
- `codePage`: code page number to properly compare national characters in the range 128-255 of the ASCII code table. Available encodings: 1250-1252, 866
@@ -912,7 +912,7 @@ sfall_funcX metarule functions
----
#### objects_in_radius
`array sfall_func3("objects_in_radius", int tile, int radius, int elevation)`<br>
`array sfall_func3("objects_in_radius", int tile, int radius, int elevation)`\
`array sfall_func4("objects_in_radius", int tile, int radius, int elevation, int type)`
- Returns an array of objects of a type (see `OBJ_TYPE_*` constants in **define_extra.h**) within the specified radius from the given tile
- Passing -1 to the `type` argument or not specifying it will return all objects within the radius
@@ -938,14 +938,14 @@ sfall_funcX metarule functions
----
#### get_window_attribute
`int sfall_func1("get_window_attribute", int winType)`<br>
`int sfall_func1("get_window_attribute", int winType)`\
`int sfall_func2("get_window_attribute", int winType, int attrType)`
- Returns the attribute of the specified interface window by the `attrType` argument
- `winType`: the type number of the interface window (see `WINTYPE_*` constants in **sfall.h**)
- `attrType:`<br>
0 - checks and returns a value of 1 if the specified interface window is created by the game (same as without the argument)<br>
1 - X position, 2 - Y position (relative to the top-left corner of the game screen)<br>
3 - interface width size, 4 - interface height size<br>
- `attrType:`\
0 - checks and returns a value of 1 if the specified interface window is created by the game (same as without the argument)\
1 - X position, 2 - Y position (relative to the top-left corner of the game screen)\
3 - interface width size, 4 - interface height size\
-1 - returns an associative array of keys (left, top, right, bottom) and values that define the position of the window rectangle (use standard syntax to access array values, e.g. `win.top`, `win.bottom`)
- Returns -1 if the specified attribute cannot be obtained
@@ -968,17 +968,17 @@ sfall_funcX metarule functions
----
#### get_stat_min | get_stat_max
`int sfall_func1("get_stat_min", int stat)`<br>
`int sfall_func1("get_stat_max", int stat)`<br>
`int sfall_func2("get_stat_min", int stat, bool who)`<br>
`int sfall_func1("get_stat_min", int stat)`\
`int sfall_func1("get_stat_max", int stat)`\
`int sfall_func2("get_stat_min", int stat, bool who)`\
`int sfall_func2("get_stat_max", int stat, bool who)`
- Returns the maximum or minimum set value of the specified stat (see `set_stat_min` and `set_stat_max` functions)
- `who`: 0 (false) or omitting the argument - returns the value of the player, 1 (true) - returns the value set for other critters
----
#### interface_art_draw
`int sfall_func4("interface_art_draw", int winType, string/int artFile/artId, int x, int y)`<br>
`int sfall_func5("interface_art_draw", int winType, string/int artFile/artId, int x, int y, int frame)`<br>
`int sfall_func4("interface_art_draw", int winType, string/int artFile/artId, int x, int y)`\
`int sfall_func5("interface_art_draw", int winType, string/int artFile/artId, int x, int y, int frame)`\
`int sfall_func6("interface_art_draw", int winType, string/int artFile/artId, int x, int y, int frame, array param)`
- Draws the specified PCX or FRM image in the game interface window, returns -1 on any error
- `winType`: the type number of the interface window (see `WINTYPE_*` constants in **sfall.h**). This also takes the value of the flag `0x1000000` to prevent immediate redrawing of the interface window
@@ -987,22 +987,22 @@ sfall_funcX metarule functions
**Optional arguments:**
- `frame`: frame number, the first frame starts from zero
- `param`: an array which specifies additional parameters, where:<br>
index 0 - sprite direction for multi-directional FRM<br>
- `param`: an array which specifies additional parameters, where:\
index 0 - sprite direction for multi-directional FRM\
index 1/index 2 - the new width/height to scale the image to. Pass -1 to use the original width/height
----
#### interface_print
`int sfall_func5("interface_print", string text, int winType, int x, int y, int color)`<br>
`int sfall_func5("interface_print", string text, int winType, int x, int y, int color)`\
`int sfall_func6("interface_print", string text, int winType, int x, int y, int color, int width)`
- Displays the text in the specified interface window with the current font. Use vanilla `SetFont` function to set the font
- Returns the count of lines printed, or -1 on any error
- `text`: the text to be printed. Use the `\n` control character to move text to a new line (example: "Hello\nWorld!")
- `winType`: the type number of the interface window (see `WINTYPE_*` constants in **sfall.h**)
- `x/y`: offset relative to the top-left corner of the window
- `color`: the color index in the game palette. Pass 0 if the text color was previously set by vanilla `SetTextColor` function. It can also take additional flags (via `bwor`) for displaying text:<br>
`0x0010000` - adds a shadow to the text, the `textshadow` compiler constant<br>
`0x1000000` - prevents immediate redrawing of the interface window, the `textdirect` compiler constant (works the other way around)<br>
- `color`: the color index in the game palette. Pass 0 if the text color was previously set by vanilla `SetTextColor` function. It can also take additional flags (via `bwor`) for displaying text:\
`0x0010000` - adds a shadow to the text, the `textshadow` compiler constant\
`0x1000000` - prevents immediate redrawing of the interface window, the `textdirect` compiler constant (works the other way around)\
`0x2000000` - fills the background of the text with black color, the `textnofill` compiler constant (works the other way around)
**Optional argument:**
@@ -1012,25 +1012,25 @@ sfall_funcX metarule functions
#### combat_data
`mixed sfall_func0("combat_data")`
- Returns a pointer to the `C_ATTACK_*` data for the current combat attack turn (see defined constants in **define_extra.h**)
- Can be used in conjunction with the `get_object_data` and `set_object_data` functions<br>
- Can be used in conjunction with the `get_object_data` and `set_object_data` functions\
Example: `sfall_func3("set_object_data", sfall_func0("combat_data"), C_ATTACK_UNUSED, 255);`
----
#### win_fill_color
`int sfall_func0("win_fill_color")`<br>
`int sfall_func0("win_fill_color")`\
`int sfall_func5("win_fill_color", int x, int y, int width, int height, int color)`
- Fills the rectangle area of the currently selected script window with the specified color, or clears the window with transparent color (use index 0 or call the function without arguments)
- `color`: the color index in the game palette (from 0 to 255)
----
#### interface_overlay
`int sfall_func2("interface_overlay", int winType, int mode)`<br>
`int sfall_func2("interface_overlay", int winType, int mode)`\
`int sfall_func6("interface_overlay", int winType, 2, int x, int y, int width, int height)`
- Creates an additional drawing surface above the graphic layer of the specified interface window. All subsequent calls of `interface_art_draw` and `interface_print` functions will draw on it
- `winType`: the type number of the interface window (see `WINTYPE_*` constants in **sfall.h**)
- `mode`:<br>
1 - creates a new overlay surface<br>
2 - clears the overlay area or the specified rectangle defined by the x, y, width, height arguments<br>
- `mode`:\
1 - creates a new overlay surface\
2 - clears the overlay area or the specified rectangle defined by the x, y, width, height arguments\
0 - destroys the created overlay surface (frees up the memory allocated to the surface)
----
File diff suppressed because it is too large Load Diff