Further implementation of unique ID.

* weapons with knockback modifiers applied will have a special ID
(negative value) that work as a temporary UID for the current game
session.

Added checks on object types to functions in Combat module.
Added the second argument to set_unique_id script function.
This commit is contained in:
NovaRain
2019-04-16 20:33:00 +08:00
parent e92b8021c0
commit 4cdc028cb7
7 changed files with 88 additions and 22 deletions
+5 -2
View File
@@ -579,10 +579,13 @@ Some utility/math functions are available:
1 - changes the duration of the addiction effect for the drug (a value of 1 = one game minute)
> int sfall_func1("set_unique_id", object)
- assigns an unique ID number to the object and returns it. If an unique ID number has already been assigned to an object, then ID number is returned without reassignment
> 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
- to just get the current ID number of an object, use sfall_func2("get_object_data", object, OBJ_DATA_ID)
- unique ID numbers are saved in your savegame, and have a range from 0x10000000 to 0x7FFFFFFF
- there is also an unique ID number range for the player and party members from 18000 to 83535
- there is also a unique ID number range for the player and party members from 18000 to 83535
- to assign a new ID number generated by the engine to the object (i.e. unassign a unique ID), call the function with two arguments and pass -1 for the flag argument
------------------------
------ MORE INFO -------