Changed "add_extra_msg_file" script function (#249)

* added auto ID assignment for the message file.
This commit is contained in:
NovaRain
2019-07-16 12:45:22 +08:00
parent 2bfb886ece
commit 16fbc0f93f
5 changed files with 30 additions and 9 deletions
+1 -1
View File
@@ -244,7 +244,7 @@
#define ADD_PERK_MODE_REMOVE (4) // remove from the list of selectable perks
// sfall_funcX macros
#define add_extra_msg_file(name, number) sfall_func2("add_extra_msg_file", name, number)
#define add_extra_msg_file(name) sfall_func1("add_extra_msg_file", name)
#define add_iface_tag sfall_func0("add_iface_tag")
#define art_cache_clear sfall_func0("art_cache_clear")
#define attack_is_aimed sfall_func0("attack_is_aimed")
+6 -3
View File
@@ -609,10 +609,13 @@ optional arguments:
> int sfall_func2("has_fake_trait_npc", object npc, string nameTrait)
- these functions are similar to has_fake_*/set_fake_*/set_selectable_perk functions, but apply to the specified party member NPC (including dude_obj)
> void sfall_func2("add_extra_msg_file", string fileName, int fileNumber)
- loads the custom message file and assigns it with the specified ID number
> 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 "text\<language>\game\" directory
- fileNumber: the file ID number for the message_str_game function to get messages from the file. The available range is from 0x3000 to 0x3FFF
optional argument:
- fileNumber: the file ID number for the message_str_game function. The available range is from 0x2000 to 0x2FFF (see ExtraGameMsgFileList setting in ddraw.ini)
use fileNumber only if you want to add a message file without editing ddraw.ini or existing scripts to support the old way
------------------------
------ MORE INFO -------