Author Topic: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu  (Read 26317 times)

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #75 on: June 02, 2007, 12:18:44 AM »
Yeah, 'cause we all know that everyone delimits the entries with tabs... ;)

In my defense, this code A) does nothing worthwhile, and B) was written before anybody cared to notice that OCaml regexp was even worse than we'd imagined.

That said, I'm pretty sure you can just remove that whole bit entirely. I'd be immensely surprised if any of the stuff we wrote needed it, and it's probably even uselesser for Tutu.

Offline Nythrun

  • Planewalker
  • *****
  • Posts: 89
  • Gender: Female
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #76 on: June 02, 2007, 10:44:07 AM »
Never said it was an important bug, I just leapt at the opportunity to condescend to OCaml regexp, on the off chance that someone browsing the .tp2 might think that it had finally gotten out of the Paeleolithic :D

Regardless, please make your next BG1 UB royalty check out to me so that I may buy bigg a MacBook.

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #77 on: June 08, 2007, 12:12:32 PM »
this isn't available in WeiDU regexp (hence the various workarounds).
Eh... so what's the workaround?  Why is the [ \t] even necessary?  [Edit: why *would* it be necessary, that is, if it functioned as expected.]  As devSin suggests, animate.ids in Tutu already has these entries (but I guess it's still useful for BG1).  However, even in Tutu, race.ids should be appended for missing entries like succubus, sirine, etc.
« Last Edit: June 08, 2007, 01:12:15 PM by Miloch »

Offline Ascension64

  • Moderator
  • Planewalker
  • *****
  • Posts: 472
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #78 on: June 09, 2007, 12:02:23 AM »
\t is a regexp for the tab character, so 2DA/IDS files constructed with tab delimiting would be catered for. For this particular purpose, you can easily do a NOT wildcard, i.e.

Code: [Select]
APPEND ANIMATE.IDS "0xD400 BIRD_INSIDE"      UNLESS "^0xD400[^A-Za-z0-9]"

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #79 on: June 09, 2007, 01:47:06 AM »
Yeah, I know it's a tab.  I'm just wondering why someone would put something like 0xD400 in the identifier rather than the value column, or why one would have to delimit a search for it, since all values appear to be 0x#### (four digits in hex).  And I guess the flip side to that is: why do it for animate.ids but not for race.ids, where the values are shorter and thus subject to more ambiguity?

Anyway, I guess you can just remove all the APPEND animate.ids entries here from the Tutu version.

Offline Ascension64

  • Moderator
  • Planewalker
  • *****
  • Posts: 472
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #80 on: June 10, 2007, 01:42:14 AM »
That's why its redundant...and erroneous...as was the whole impetus for the original comment.

Offline Nythrun

  • Planewalker
  • *****
  • Posts: 89
  • Gender: Female
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #81 on: June 10, 2007, 03:45:23 AM »
Stats.ids in BG1/BG2/Tutu contains tab delimitation.

Level 1 NPCs and Fixpack both have variables that you can evaluate into a tab if pressing the tab key is somehow repugnant.

It's always erroneous to help.

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #82 on: June 10, 2007, 11:00:12 AM »
Miloch, please doublecheck that the materials are actually in vanilla EasyTutu or completely unnessesary; regardless of the massive overload of experienced and competent modders in slight disagreement here I patch EasyTutu and Tutu v4 with the ANIMATE.IDS, etc., to make sure that everything called for in-project is actually covered. Plus, not to be a jerk or anything, but I have found that many modders who add to both Tutu and BGT  playing experiences do not have the skills that devSin, Nythrun, and Ascension64 do. It is safer to fix it for them in advance than trust that some idiot like me will actually check that everything in the mod works completely on all platforms...

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #83 on: June 10, 2007, 05:32:06 PM »
I'm not sure who's in disagreement.  Nythrun brought it up (though her comment had to do with syntax), devSin said it's probably unnecessary, I confirmed the animate.ids entries are already present in unmodded EasyTutu (but not the race.ids entries).  Ascension64 said it's redundant (though I'm not sure what he means by the rest of his last comment).  If he's working on a combined BG1/Tutu/BGT version, he could of course just skip it for all but BG1.  That assumes animate.ids is even used for anything... I think this is more of a "happy modder" type of component than anything else (which is fine).

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #84 on: June 10, 2007, 06:33:39 PM »
It's never wrong to add entries to the IDS files. The only circumstance where it may be undesirable is when another modder is installing it (with WeiDU, the last symbol for any particular value wins, so you may be appending your own entries that will take precedence over another modder's entries); it won't have any affect on the normal player.

Since the TotSC animations aren't used in any of the dialogues and none of the code we compile uses the symbols, it doesn't matter for BG1UB, but it doesn't hurt either.

Offline Ascension64

  • Moderator
  • Planewalker
  • *****
  • Posts: 472
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #85 on: June 10, 2007, 07:05:40 PM »
It is redundant because animate.ids does not require it (as you said Miloch, and devSin said it does nothing worthwhile).
It is erroneous because the regexp does not work in OCaml (as stated by Nythrun and devSin).

Clear things up?

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #86 on: June 10, 2007, 07:50:12 PM »
This: "erroneous...as was the whole impetus for the original comment" seemed to suggest the comment was erroneous, rather than the comment was that the code was erroneous.  But whatever... sounds like we're all in agreement.  More or less.

Offline Ascension64

  • Moderator
  • Planewalker
  • *****
  • Posts: 472
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #87 on: June 10, 2007, 08:32:07 PM »
OK, I see. I meant it to be read as "The whole impetus for the original comment was that the code was erroneous."

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #88 on: June 10, 2007, 08:58:10 PM »
Since it's engendered such discussion, I just wanted to mention that the code does work and will do the right thing in almost all cases. In the unlikely situation that any of the values being appended appear in the IDS file and are followed by a tab, the append will happen anyway, but it will still be functioning nearly-correctly.

2DA and IDS files shouldn't use tabs to separate columns anyway, so you could almost consider it a feature that tabs aren't correctly matched by the caml regexp.

Offline Ascension64

  • Moderator
  • Planewalker
  • *****
  • Posts: 472
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #89 on: June 11, 2007, 07:15:42 AM »
Quote
Since it's engendered such discussion, I just wanted to mention that the code does work and will do the right thing in almost all cases. In the unlikely situation that any of the values being appended appear in the IDS file and are followed by a tab, the append will happen anyway, but it will still be functioning nearly-correctly.
Yes, obviously, [ \t] will also pick up a space character. So duplicate column 0 entries still work nearly-correctly? What would happen?

Quote
2DA and IDS files shouldn't use tabs to separate columns anyway, so you could almost consider it a feature that tabs aren't correctly matched by the caml regexp.
Nythrun just said "Stats.ids in BG1/BG2/Tutu contains tab delimitation". So I suppose they shouldn't use tabs, but you'd still have to use a different regexp to catch Stats.ids entries, like [^A-Za-z0-9_], right?

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #90 on: June 11, 2007, 12:19:26 PM »
Yes, obviously, [ \t] will also pick up a space character. So duplicate column 0 entries still work nearly-correctly? What would happen?
I'm not sure what you're asking. If there is more than one symbol for the same value, it should work correctly (the APPEND won't happen if there are any lines beginning with "VALUE "). If you want to append your own symbol where one already exists, you wouldn't use UNLESS with the (Column 0) value, and it would work fine (but WeiDU will choose the last defined symbol -- the one you just appended -- when decompiling scripts and when compiling dialogues). (Near Infinity works opposite here, and the first defined symbol wins, so it shouldn't change NI's decompile behavior at all).

Nythrun just said "Stats.ids in BG1/BG2/Tutu contains tab delimitation". So I suppose they shouldn't use tabs, but you'd still have to use a different regexp to catch Stats.ids entries, like [^A-Za-z0-9_], right?
It's common to use a bit of code to create a 4-byte value with the characters you want to test for. Nythrun has a cleaner bit of code, but it usually resembles
Code: [Select]
INNER_PATCH 1234 BEGIN
  WRITE_BYTE 0x0 0x20 // Space
  WRITE_BYTE 0x1 0x9  // Tab
  WRITE_BYTE 0x2 0xd  // CR
  WRITE_BYTE 0x3 0xa  // LF
  READ_ASCII 0x0 whitespace (4)
END
When constructing your expression, you'd use [%whitespace%] to match any spaces, tabs, or line breaks in the source string. (But be aware that I've had only limited success getting this to actually work correctly with WeiDU on Mac OS X.) It's almost never necessary when specifying constraints for APPEND, etc., however (but it would be useful in the case where a string you wanted to match already had tabs or line breaks).
« Last Edit: June 11, 2007, 12:21:05 PM by devSin »

Offline Ascension64

  • Moderator
  • Planewalker
  • *****
  • Posts: 472
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #91 on: June 12, 2007, 07:10:46 AM »
Makes sense to me. Thanks.

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #92 on: August 16, 2007, 12:35:49 PM »
As per this discussion, the following code adjustments have been made to BG1 NPC latest internal:
the Diary "fixes" of any kind have been moved to an optional component in the "Tweaks" section. The two options are the version in UB3 or the fixed version that ran originally in BG1 NPC as an undocumented "fix"  (also I am pretty sure created by SixofSpades).
Code: [Select]
BEGIN @1114 /* The BG1 NPC Project: SixofSpades Extended Sarevok's Diary */
  SUBCOMPONENT @1115  /* The BG1 NPC Project: Sarevok's Diary Adjustments. */
  GROUP @1065 /* The BG1 NPC Project: Tweaks */
  REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
  /* SixofSpades Sarevok's Diary changes, Tutu/BGT */
  COPY_EXISTING ~%tutu_var%SCRL3F.itm~ ~override~
    SAY UNIDENTIFIED_DESC @575
    SAY DESC @575
    WRITE_SHORT 0x1c 0x25 // Sets item category from Scrolls to Books
    WRITE_BYTE 0x4c 0x08 // Sets weight to 8 lbs
    BUT_ONLY_IF_IT_CHANGES

BEGIN @1116 /* The BG1 NPC Project: Sarevok's Diary Date Changes only */
  SUBCOMPONENT @1115  /* The BG1 NPC Project: Sarevok's Diary Adjustments. */
  GROUP @1065 /* The BG1 NPC Project: Tweaks */
  REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
  /* Fixing Sarevok's Diary dates changed only, Tutu/BGT */
  COPY_EXISTING ~%tutu_var%SCRL3F.itm~ ~override~
    SAY UNIDENTIFIED_DESC @2
    SAY DESC @2
    WRITE_SHORT 0x1c 0x25 // Sets item category from Scrolls to Books
    WRITE_BYTE 0x4c 0x08 // Sets weight to 8 lbs
    BUT_ONLY_IF_IT_CHANGES
« Last Edit: August 16, 2007, 12:37:36 PM by cmorgan »

Offline Ascension64

  • Moderator
  • Planewalker
  • *****
  • Posts: 472
Re: [Release] BG1 Unfinished Business v4 Beta 2 for Tutu
« Reply #93 on: August 17, 2007, 07:31:14 AM »
OK, thanks for the information.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: