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:53:41 +08:00
parent ceb55cdfa9
commit 0c8794661c
7 changed files with 86 additions and 22 deletions
+5 -2
View File
@@ -473,10 +473,13 @@ Some utility/math functions are available:
- clears the cache of FRM image files loaded into memory
> 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 -------