Jump to content

Weidu APPEND weirdness with multi line text files


subtledoctor

Recommended Posts

Question about how Weidu and/or the game treats newlines in .txt files.

 

When I want to add lines to a kit's CLAB file, I run Camdawg's REMOVE_BLANK_LINES macro and then APPEND a text file.

 

To make sure my lines go after the original CLAB file's lines, my .txt file looks like this:


ABILITY       GA_WHAT02  ****      ****     ...
ABILITY       GA_WHAT03  ****      ****     ...
That's a return/newline, followed by lines for the CLAB file.

 

Lately I've inspected the CLAB fikes after this process and some of those newlines aren't being respected. Sometimes it works perfectly, sometimes the various lines of my .txt files get appended all together into the last line of the original file, and ends up looking like this:

ABILITY       GA_WHATEV  ****      ****     ...
ABILITY       GA_WHAT02  ****      ****     ...  ABILITY       GA_WHAT03  ****      ****     ...
Is there something about the text encoding or newline encoding I need to know? I've been using UTF-8 text and UNIX (LF) newlines. I tried switching to Windows (CRLF) newlines and it doesn't fix the problem.

 

Any clue what's going wrong?

Link to comment

The beginning of an answer to my own question: switching to Windows CRLF returns seems to have helped. If anything, now it is too aggressive, adding more lines than I want, so it looks like this:

ABILITY       GA_WHATEV  ****      ****     ...
ABILITY       GA_WHAT02  ****      ****     ...

ABILITY       GA_WHAT03  ****      ****     ...
Maybe I just need to run the REMOVE_BLANK_LINES macro *after* appending the text...
Link to comment

WeiDU recognizes variables for three different line feeds:

WNL "\r\n" // Windows new line
MNL "\r" // (pre-OSX) Macintosh new line
LNL "\n" // Linux/Unix/OSX new line

So in essence, %WNL% can function like two line feeds in some cases. In your case, you might try feeding WeiDU one of those variables when doing the APPEND.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...