Loading...
  OR  Zero-K Name:    Password:   

Post edit history

Editing the campaign

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
5/29/2019 3:07:55 AMAUrankAdminGoogleFrog before revert after revert
Before After
1 Use planetData.infoDisplay.extendedText to set the ingame text to be distinct from the campaign menu text. You will need this if you want to use line breaks. 1 Use planetData.infoDisplay.extendedText to set the ingame text to be distinct from the campaign menu text. You will need this if you want to use line breaks.
2 \n 2 \n
3 There are two (relevant) delimiters for strings in lua. [[]] interprets the intervening text literally whereas "" interprets \ as an escape character for things like newlines. The tricky part is that sending the mission text ingame involves constructing a string that contains a lua table, sending it ingame, and executing it. The construction of the lua table is interrupted if you send a string with something like a newline. 3 There are two (relevant) delimiters for strings in lua. [[]] interprets the intervening text literally whereas "" interprets \ as an escape character for things like newlines. The tricky part is that sending the mission text ingame involves constructing a string that contains a lua table, sending it ingame, and executing it. The construction of the lua table is interrupted if you send a string with something like a newline.
4 \n 4 \n
5 I've added support for sending \n, \r, \t, \a, \v, and \" without breaking the string constructor. It is best to use the "" delimiters for strings involving such characters since I wouldn't trust [[]] to interpret the in-file newlines as desired in all cases. 5 I've added support for sending \n, \r, \t, \a, \v, and \" without breaking the string constructor. It is best to use the "" delimiters for strings involving such characters since I wouldn't trust [[]] to interpret the in-file newlines as desired in all cases.
6 \n 6 \n
7 Here is the fix: https://github.com/ZeroK-RTS/Chobby/commit/c056ed44d1d26ed896ca73a24a4f9992241939f7 7 Here is the fix: https://github.com/ZeroK-RTS/Chobby/commit/c056ed44d1d26ed896ca73a24a4f9992241939f7
8 \n
9 Also note that very little space is available on the campaign screen. Some of the briefings hit the limit of what can fit on the smallest supported screen size (iirc 1200 x 800). For bigger briefings ingame you'll want to use extendedText.