Jump to content


Photo

ReadMe Addendum


  • Please log in to reply
11 replies to this topic

#1 Idobek

Idobek

    Pocket Plane Gibberling

  • Member
  • 429 posts

Posted 24 January 2004 - 03:27 PM

Command Line Options
--biff-get will search the override directory.

I noticed this today, and it was causing me a headache until I actually realised what was going on, so I thought I'd point it out. Does any body else have any other information on the way functions work that are not documented? I might be nice to keep a note of the unexpected things.

What else? Oh yeah, I noticed a while back that TP2 flags have to happen in a certain order. This order should work:
BACKUP
AUTHOR
ASK_EVERY_COMPONENT
AUTO_TRA
ALWAYS
ALLOW_MISSING
LANGUAGE
Can anybody comfirm that the order matters or is it just me that was having problems?

#2 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 25 January 2004 - 04:14 AM

Aside from the ALWAYS, the rest are fine. I've never used it I'm afraid.

how come you always look so damn cool in every photo I see you in?!?


Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.


Still a cyberjock, still hacking the matrix, still unsure of what that means.

TeamBG member - http://www.teambg.eu

#3 weimer

weimer
  • Member
  • 1569 posts

Posted 27 January 2004 - 12:46 PM

Wow, you're right, that parsing really doesn't work. Fixed. BACKUP, AUTHOR (which aren't really flags) any-flag, LANGUAGE (which isn't a flag) should now work.

#4 Idobek

Idobek

    Pocket Plane Gibberling

  • Member
  • 429 posts

Posted 28 February 2004 - 05:48 PM

From the READ_BYTE and IF_EVAL tutorial:

Use WRITE_ASCII for things like death variable, dialogues, scripts, etc. Note, that if you're WRITE_ASCIIing to say, the death variable, and the previous death variable entry is longer than the one you're writing, then you'll have spillover after WRITE_ASCII. To avoid this, embed a null character at the end of your string. So, if I have
WRITE_ASCII 0x280 ~Guy~
I would want to put a null character right after the y in Guy. You can do this by using a hex editor and inserting 00 after the y.

This should be updated to reflect that WRITE_BYTE can be used to remove spillover:
WRITE_ASCII 0x280 ~Guy~
WRITE_BYTE 0x283 0x00
I'd put in a WRITE_LONG there as well but I tend to the cautious. I think the words 'null' and 'hex editor' scare off people that other wise understood the tutorial.

#5 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 29 February 2004 - 11:23 AM

Sounds like we need a WRITE_ASCII_NULL command that writes the string plus a null character. Actually, does OCaml use '\000' as the NULL character? In that case, this might work:

WRITE_ASCII 0x123 ~My String\\000~

But I'm definitely not sure about that... It might be worth a test. (If "\\000" doesn work, "\\0" might).

There should be a way to write an embedded null character unless WRITE_ASCII strips out non-ascii chars (I'm not sure why it would do this).
I gotta get rid of this friggin idiotic signature...

#6 Idobek

Idobek

    Pocket Plane Gibberling

  • Member
  • 429 posts

Posted 29 February 2004 - 01:09 PM

I'm not sure a new command is needed. I just think the ReadMe should reflect that

WRITE_BYTE offset 0x00

can be used to clean out unwanted ASCII charaters.

#7 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 29 February 2004 - 05:57 PM

I'm not sure a new command is needed. I just think the ReadMe should reflect that

WRITE_BYTE offset 0x00

can be used to clean out unwanted ASCII charaters.

Actually, I take back what I said. WRITE_ASCII_NULL would be bad in cases where you're writing to a ResRef. For example, this:

WRITE_ASCII_NULL offset ~12345678~

Would write 9 bytes including the null termination, where as the ResRef field can only be a maximum of 8 bytes wide, so the 9th byte would currupt the file.

The problem with the WRITE_BYTE solution is that it's a bit error prone. If you don't coun't your offsets correctly or if you change the string you could be in for a suprise.

A somewhat better solution, if it's possible, would be to embed the null char. I'll have to see if this works:

WRITE_ASCII offset ~1234\\0~
I gotta get rid of this friggin idiotic signature...

#8 MagusWizardo

MagusWizardo

    Don't ask... please don't ask.

  • Member
  • 201 posts

Posted 01 March 2004 - 02:29 AM

Why the double-\ ? Only 1 of them should be needed if OCaml only uses one \ for the null.

#9 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 01 March 2004 - 05:50 AM

In some cases the \ needs to be "escaped". I'm not sure if that's true here or not, I might depend on how many times the string is evaluated.

I'll have to experiment and see if this works (in any config).
I gotta get rid of this friggin idiotic signature...

#10 -Guest-

-Guest-
  • Guest

Posted 11 March 2004 - 03:53 AM

BTW Idobek thanks for the tip. It's handy, and any time I can avoid using a hex editor I'm happy. ;)

Edit: *hlidskialf curses his work's computer system for logging him out AGAIN when posting.*

#11 Idobek

Idobek

    Pocket Plane Gibberling

  • Member
  • 429 posts

Posted 13 March 2004 - 08:50 AM

Er... I'd like to make an adjustment to my SET_2DA_ENTRY tutorial. The last piece of code should read:

To fix this all you need to do is add another column header using SET_2DA_ENTRY on a file and removing it once you are done, like so:

  SET_2DA_ENTRY 0 0 4 ~IDOBEK ROWNAME~
  SET_2DA_ENTRY 6 1 1 ~SAMURAI~
  SET_2DA_ENTRY 0 0 5 ~~

A much better solution.

#12 weimer

weimer
  • Member
  • 1569 posts

Posted 13 March 2004 - 02:56 PM

Updated.