Difference between revisions of "SEXP Debugging"

From FreeSpace Wiki
Jump to: navigation, search
(quick data dump about the event.log - mostly based on the linked forum post)
 
m (+category)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
This is a quick intro to SEXP debugging, based on the [http://www.hard-light.net/forums/index.php?topic=85174.0 event log feature] added by karajorma (and the linked post).
 
This is a quick intro to SEXP debugging, based on the [http://www.hard-light.net/forums/index.php?topic=85174.0 event log feature] added by karajorma (and the linked post).
  
 +
{{Note|requires FSO 3.7.0 or later}}
  
 
== Option 1: Snapshot all events ==
 
== Option 1: Snapshot all events ==
Line 17: Line 18:
 
This needs to be configured ahead of time.  It gives the FREDder another option to write a state change. If you tell FS2 to log whenever an event comes true, the event log will also write out the state of the event in the previous frame.
 
This needs to be configured ahead of time.  It gives the FREDder another option to write a state change. If you tell FS2 to log whenever an event comes true, the event log will also write out the state of the event in the previous frame.
  
Yeah, I'm not actually sure how to add this to sexp's. Maybe this:
+
To configure this, add this to the end of a given event:
  
<nowiki>MjnMixael: but basically in the event viewer, you can mark events to be logged.</nowiki>
+
'''+Event Log Flags: ( "true" )''' (or "false", or both)
  
Anyway, more details from someone with more knowledge on this than me would be superuseful! :)
+
This should be able to be set for the event using FRED.
 +
 
 +
[[Category:FRED Tips]]

Latest revision as of 07:28, 2 July 2021

This is a quick intro to SEXP debugging, based on the event log feature added by karajorma (and the linked post).


Note: requires FSO 3.7.0 or later

Option 1: Snapshot all events

How to take a snapshot of the events in the game.

If you are having problems with a mission, rather than asking for a debug log, you may be asked for a snapshotted event log. You can get hold of it like this.

  1. If you are running a debug copy of FS2_Open, you can skip this step. Otherwise, enter the FS2_Open cheat code www.freespace2.com to activate cheat mode.
  2. Wait until the problem occurs and then press ~ (Above space on most keyboards) and Q at the same time.
  3. When you exit the game look in your Freespace2/Data folder for a file called event.log. If you are running a mod, you will find the file in Freespace2/Mod Name/Data instead. If you are running a game other than Freespace2 (Diaspora, TBP, etc) you will find the file in that game's data folder (e.g Diaspora/Data).
  4. Post here on HLP and attach the log to your post.

Option 2: Watch specific events

This needs to be configured ahead of time. It gives the FREDder another option to write a state change. If you tell FS2 to log whenever an event comes true, the event log will also write out the state of the event in the previous frame.

To configure this, add this to the end of a given event:

+Event Log Flags: ( "true" ) (or "false", or both)

This should be able to be set for the event using FRED.