Fallout 2 mod FO2 Engine Tweaks (Sfall)

-2147483648 is already within 32bit integer range. I don't know why you'd assume you need to "truncate" it.
"if (pMode == SPECIAL) then debug_msg("SPECIAL mode flag unset!");" works just fine for me when exting dialogue.

EDIT: if you mean cases when it's mixed with other flags (e.g. entering barter), yes, use bwand SPECIAL. Just like how the game does for checking various bit flags in scripts.
ah ok
so wait...should I be doing my checks like this?
Code:
 if (arg1 bwand DIALOG) then begin
 
Code:
if (get_game_mode == DIALOG) then begin
This returns true if you are in the dialog interface.

This if you are in the barter interface or party member screen.
Code:
(get_game_mode bwand (DIALOG + SPECIAL) or get_game_mode bwand BARTER)
 
thanks!
get_game_mode is much closer to what I'm looking for.

Is it possible (using a global script) to log out which line of dialogue is being displayed in the dialogue screen?
Same for reactions? (NOption/GOption/BOption)?
 
You should just edit the dialog macros for that and add your own debug lines.
 
sadly, I'm not debugging stuff.

I had a request to help write a script that would interface with an AI to read the dialogue lines and generate and animate a talking head for each line, so I'm trying to write something that will log out all the necessary information.
With your help I've figured out how to log out if the player has entered and exited dialog, and which script is having the dialogue, but I'm having trouble finding anything else dialogue related.

Here's what I've got so far:
C-like:
procedure start begin
   if game_loaded then begin
      register_hook_proc(HOOK_GAMEMODECHANGE, check_mode_change);
   end
end
procedure check_mode_change begin
   // GameModeChange
   // HOOK_GAMEMODECHANGE (hs_gamemodechange.int)
   // Runs once every time when the game mode was changed, like opening/closing the inventory, character screen, pipboy, etc.
   variable arg0 := get_sfall_arg;  // int - event type: 1 - when the player exits the game, 0 - otherwise
   variable arg1 := get_sfall_arg;  // int - the previous game mode
   variable game_mode := get_game_mode;
   if (game_mode bwand DIALOG) then begin
      variable critter := dialog_obj;
      variable SCscriptID := get_script(critter);
      debug_msg("Entering Dialogue");
      debug_msg("ScriptID : " + SCscriptID);
      set_ini_setting("Dialogue.ini||Dialog", "Entering");
      set_ini_setting("Dialogue.ini||ScriptID", SCscriptID);
   end
   if (arg1 bwand DIALOG) then begin
      debug_msg("Exiting Dialogue");
      set_ini_setting("Dialogue.ini||Dialog", "Exiting");
      set_ini_setting("Dialogue.ini||ScriptID", 0);
   end else debug_msg("");
end
 
Back
Top