How do I generate a game log entry?

Users who are viewing this thread

Mordachai

Squire
Ok - so to create a message that pops up on screen, then fades, I do a (display_message, "@yo!").

What's the command to generate a message that goes into the log, preferably with links to the appropriate objects (such as lord names, and city names, etc.)
 
Sounds like you're looking for display_log_message and variations on str_store_troop_name_link (such as str_store_faction_link).  You can find usage details in the after action report generation code in my favorite of scripts: game_event_simulate_battle. 

From header_operations.py:
  str_store_troop_name_link      = 2341 # (str_store_troop_name_link,<string_register>,<troop_id>),
  str_store_party_name_link      = 2342 # (str_store_party_name_link,<string_register>,<party_id>),
  str_store_faction_name_link    = 2343 # (str_store_faction_name_link,<string_register>,<faction_id>),
  str_store_quest_name_link      = 2344 # (str_store_quest_name_link,<string_register>,<faction_id>),
 
not sure if you can generate a link to a message. Links are used in reports, like you say.

You'll just need to use str_store_troop_name and print the str to a log message with the operation you stated

but I could be wrong, maybe the game doesn't really care about whether it's a link or just a string

these messages (as with the messages that show up on screen) are store in rgl.txt in the MNB directory. I've never used the display_log_message myself but I assume it works.
 
Back
Top Bottom