From 85020d66f27fc4c59b3bd6628e4cead78915321d Mon Sep 17 00:00:00 2001 From: phobos2077 Date: Sat, 15 Apr 2017 22:17:42 +0700 Subject: [PATCH] Added new functions into docs #90 --- artifacts/scripting/headers/sfall.h | 1 + artifacts/scripting/sfall function notes.txt | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/artifacts/scripting/headers/sfall.h b/artifacts/scripting/headers/sfall.h index f0fda342..bb841746 100644 --- a/artifacts/scripting/headers/sfall.h +++ b/artifacts/scripting/headers/sfall.h @@ -218,6 +218,7 @@ #define intface_show sfall_func0("intface_show") #define outlined_object sfall_func0("outlined_object") #define real_dude_obj sfall_func0("real_dude_obj") +#define set_car_intface_art(artIndex) sfall_func1("set_car_intface_art", artIndex) #define set_dude_obj(critter) sfall_func1("set_dude_obj", critter) #define set_flags(obj, flags) sfall_func2("set_flags", obj, flags) #define set_outline(obj, color) sfall_func2("set_outline", obj, color) diff --git a/artifacts/scripting/sfall function notes.txt b/artifacts/scripting/sfall function notes.txt index cdeb0439..b72a8583 100644 --- a/artifacts/scripting/sfall function notes.txt +++ b/artifacts/scripting/sfall function notes.txt @@ -106,6 +106,9 @@ array - array ID to be used with array-related functions (actually an integer) > int get_npc_level(string npc) - also takes the npc name as an argument, and returns the npc's current level. Again, the npc needs to be in your party. +> void set_car_current_town(int town) +- changes the current town index for the player's car + > int get_ini_setting(string setting) - reads an integer value from an ini file in the fallout directory. - It only takes a single argument; seperate the file name, section and key with a '|' character; e.g. 'myvar:=get_ini_setting("myini.ini|mysec|var1")' If the file or key cannot be found, -1 is returned. @@ -400,6 +403,15 @@ Some utility/math functions are available: > array sfall_func2("get_ini_section", string fileName, string section) - returns an associative array of keys and values for a given INI file and section +> int sfall_func0("car_gas_amount") +- returns current amount of fuel in player's car (between 0 and 80000) +- to change fuel amount, use vanilla function: metarule(METARULE_GIVE_CAR_GAS, amount) - amount can be positive or negative + +> void sfall_func1("set_car_intface_art", int artIndex) +- changes the interface art (index in LST file) for the car image on worldmap screen +- should be called before going to worldmap +- vanilla art index is 0x1B1 + ------------------------ ------ MORE INFO ------- ------------------------