Author Topic: Tutu Conversion Snag (suggestions welcome!)  (Read 12573 times)

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Tutu Conversion Snag (suggestions welcome!)
« on: April 16, 2006, 05:22:39 PM »
Right, so I managed to convert the mod up until the Creature Restorations component:

Code: [Select]
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////                                                  \\\\\
///// Creature Restorations                            \\\\\
/////                                                  \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

BEGIN ~Creature Restorations~

COPY_EXISTING AR2608.ARE OVERRIDE // Add READ4 to Candlekeep library
              AR2610.ARE OVERRIDE
  PATCH_IF (SOURCE_SIZE > 0x11c) BEGIN
    PATCH_IF !("%SOURCE_RES%" STRING_COMPARE_CASE "AR2608") BEGIN
      actLoc = 1108
    END ELSE actLoc = 1272
    READ_LONG 0x54 actOff
    FOR (READ_SHORT 0x58 numAct; numAct; numAct -= 0x1) BEGIN
      READ_ASCII actOff + 0x80 actor
      READ_SHORT actOff + 0x20 xPos
      PATCH_IF ((xPos == actLoc) && !("%actor%" STRING_COMPARE_CASE "READ3")) BEGIN
        WRITE_ASCII actOff + 0x80 READ4 #8
      END
      actOff += 0x110
    END
  END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING AR2609.ARE OVERRIDE // Add READ4 to Candlekeep library
  PATCH_IF (SOURCE_SIZE > 0x11c) BEGIN
    READ_LONG 0x54 actOff
    FOR (READ_SHORT 0x58 numAct; numAct; numAct -= 0x1) BEGIN
      READ_ASCII actOff + 0x80 actor
      READ_SHORT actOff + 0x20 xPos
      PATCH_IF (((xPos == 547) || (xPos == 1293)) &&
                !("%actor%" STRING_COMPARE_CASE "READ3")) BEGIN
        WRITE_ASCII actOff + 0x80 READ4 #8
      END
      actOff += 0x110
    END
  END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING AR2611.ARE OVERRIDE // Add READ4 to Candlekeep library
  PATCH_IF (SOURCE_SIZE > 0x11c) BEGIN
    READ_LONG 0x54 actOff
    FOR (READ_SHORT 0x58 numAct; numAct; numAct -= 0x1) BEGIN
      READ_ASCII actOff + 0x80 actor
      PATCH_IF !("%actor%" STRING_COMPARE_CASE "READ3") BEGIN
        WRITE_ASCII actOff + 0x80 READ4 #8
      END
      actOff += 0x110
    END
  END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING HAFFG2.CRE OVERRIDE // Halfling Woman (Mabledale), AR4006
              HALFG2.CRE OVERRIDE // Halfling Man (Bunsen), AR4013
              MTOB4.CRE OVERRIDE  // Commoner, AR0104
              MTOB5.CRE OVERRIDE  // Commoner, AR0705
  WRITE_EVALUATED_ASCII 0x280 "%SOURCE_RES%" #18 // Script name
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING TRAVEL.CRE OVERRIDE // Traveler (Wade), AR2301
  WRITE_ASCII 0x280 WADE #18 // Script name
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING AR0104.ARE OVERRIDE
              AR4006.ARE OVERRIDE
              AR4013.ARE OVERRIDE
  PATCH_IF (SOURCE_SIZE > 0x1cc) BEGIN
    READ_ASCII 0x94 script
    PATCH_IF !("%script%" STRING_COMPARE_CASE "") BEGIN
      WRITE_EVALUATED_ASCII 0x94 "%SOURCE_RES%" #8 // Area script
    END
  END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING AR0800.BCS OVERRIDE
  DECOMPILE_BCS_TO_BAF
  REPLACE_TEXTUALLY ~Exists(\"BERSCH\")~ ~Exists("HERSCHEL")~
  REPLACE_TEXTUALLY ~CreateCreature(\"BERSCH\",~ ~CreateCreature("HERSCH",~
  COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES

//////////////////////////////////////////////////
// Add patron to Splurging Sturgeon inn (upstairs)
<<<<<<<< .../bg1ub/ex_ar0104.baf
IF
Global("UB_MTOB4_SPAWN","GLOBAL",0)
!Exists("MTOB4")
!Dead("MTOB4")
THEN
RESPONSE #100
CreateCreature("MTOB4",[518.252],2) // Commoner
ActionOVERRIDE("MTOB4",Face(2))
SetGlobal("UB_MTOB4_SPAWN","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR0104.BCS ~.../bg1ub/ex_ar0104.baf~

////////////////////////////////////////////
// Add patron to Elfsong Tavern (main level)
<<<<<<<< .../bg1ub/eb_0705.baf
IF
Global("UB_MTOB5_SPAWN","GLOBAL",0)
!Exists("MTOB5")
!Dead("MTOB5")
THEN
RESPONSE #100
CreateCreature("MTOB5",[851.367],0) // Commoner
SetGlobal("UB_MTOB5_SPAWN","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR0705.BCS ~.../bg1ub/eb_0705.baf~

/////////////////////////////////////////////////////////////
// Create FAI traveler when bandit subplot starts (Chapter 3)
<<<<<<<< .../bg1ub/eb_2301.baf
IF
Global("CHAPTER","GLOBAL",3)
!Exists("WADE")
!Dead("WADE")
THEN
RESPONSE #100
CreateCreature("TRAVEL",[691.398],0) // Traveler
END
>>>>>>>>
EXTEND_BOTTOM AR2301.BCS ~.../bg1ub/eb_2301.baf~

/////////////////////////////////////////////////
// Add Mabledale to home in Gullykin (downstairs)
<<<<<<<< .../bg1ub/eb_ar4006.baf
IF
Global("UB_HAFFG2_SPAWN","GLOBAL",0)
!Exists("HAFFG2")
!Dead("HAFFG2")
THEN
RESPONSE #100
CreateCreature("HAFFG2",[357.257],9) // Halfling Woman
ActionOVERRIDE("HAFFG2",Face(9))
SetGlobal("UB_HAFFG2_SPAWN","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR4006.BCS ~.../bg1ub/eb_ar4006.baf~

//////////////////////////////////////////////
// Add Bunsen to home in Gullykin (main level)
<<<<<<<< .../bg1ub/eb_ar4013.baf
IF
Global("UB_HALFG2_SPAWN","GLOBAL",0)
!Exists("HALFG2")
!Dead("HALFG2")
THEN
RESPONSE #100
CreateCreature("HALFG2",[311.179],0) // Halfling Man
SetGlobal("UB_HALFG2_SPAWN","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR4013.BCS ~.../bg1ub/eb_ar4013.baf~

/////////////////////////////////////////////
// Restore the Friendly Arm Inn serving wench
COPY_EXISTING AR0114.ARE OVERRIDE // Blushing Mermaid
WRITE_ASCII 0x2ac ~SERWEN~        // Changes FRIWEN to SERWEN
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING AR0705.ARE OVERRIDE // Elfsong
WRITE_ASCII 0x2ac ~SERWEN~        // Changes FRIWEN to SERWEN
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING FRIWEN.CRE OVERRIDE // Serving Wench
WRITE_ASCII 0x2cc ~FRIWEN~        // Assigns the unused dialog, FRIWEN.DLG
BUT_ONLY_IF_IT_CHANGES

// Add the Serving Wench to the Friendly Arm Inn
<<<<<<<< .../bg1ub/ub_ar2301.baf
IF
Global("UB_FRIWEN_SPAWN","AR2301",0)
!Exists("FRIWEN")
!Dead("FRIWEN")
THEN
RESPONSE #100
CreateCreature("FRIWEN",[1073.690],4) //
SetGlobal("UB_FRIWEN_SPAWN","AR2301",1)
END
>>>>>>>>
EXTEND_BOTTOM AR4013.BCS ~.../bg1ub/ub_ar2301.baf~

//////////////////////////////////////////////
// Add the Lecturing Farmer to Wyrm's Crossing
COPY_EXISTING FARM4.CRE ~OVERRIDE/UBFARM5.CRE~ // Copies FARM4
SAY NAME1 ~Farmer~
SAY NAME2 ~Farmer~
WRITE_ASCII 0x280 ~UBFARM5~ #8                 // Sets Death Variable
WRITE_ASCII 0x2cc ~UBFARM5~ #8                 // Sets Dialogue

<<<<<<<< .../bg1ub/ub_ar0900.baf
IF
Global("UB_FARMER5_SPAWN","GLOBAL",0)
THEN
RESPONSE #100
CreateCreature("UBFARM5",[4716.3663],2)
SetGlobal("UB_FARMER5_SPAWN","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR0900.BCS ~.../bg1ub/ub_ar0900.baf~

/////////////////////////
// Feldane, an Old Friend
COPY_EXISTING FELDAN.CRE OVERRIDE
WRITE_ASCII 0x280 ~Feldane~ #8    // Sets Death Variable
WRITE_ASCII 0x2cc ~UBFELDAN~ #8   // Sets Dialogue
BUT_ONLY_IF_IT_CHANGES

<<<<<<<< .../bg1ub/ub_ar2626.baf
IF
Global("UB_FELDANE_SPAWN","GLOBAL",0)
THEN
RESPONSE #100
CreateCreature("FELDAN",[2965.1824],3)
SetGlobal("UB_FELDANE_SPAWN","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR2626.BCS ~.../bg1ub/ub_ar2626.baf~

///////////////
// Nashkel Girl
<<<<<<<< .../bg1ub/ub_ar4806.baf
IF
Global("UB_GIRLBE_SPAWN","GLOBAL",0)
THEN
RESPONSE #100
CreateCreature("GIRLBE",[605.317],1)
SetGlobal("UB_GIRLBE_SPAWN","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR4806.BCS ~.../bg1ub/ub_ar4806.baf~

/////////////////////////
// Baldur's Gate Merchant

COPY_EXISTING FATMAN.CRE ~OVERRIDE/UBSHOPGE.CRE~
SAY NAME1 #9432
SAY NAME2 #9434
WRITE_ASCII 0x2cc ~SHOPGE~ #8

<<<<<<<< .../bg1ub/ub_ar1100.baf
IF
Global("UB_SHOPGE_SPAWN","GLOBAL",0)
THEN
RESPONSE #100
CreateCreature("UBSHOPGE",[3109.2627],0)
SetGlobal("UB_SHOPGE_SPAWN","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR1100.BCS ~.../bg1ub/ub_ar1100.baf~

/////////////////////////////////
// Wilton, Farmer Brun's Neighbor

COPY_EXISTING WILTON.CRE OVERRIDE
ADD_CRE_ITEM ~CLCK01~ #1 #0 #0 ~NONE~ ~INV1 INV2~ // Adds Cloak of Protection +1
WRITE_ASCII 0x2cc ~UBWILTON~                      // Assigns edited dialog file
WRITE_ASCII 0x280 ~Wilton~                        // Assigns death variable
WRITE_SHORT 0x240 0x03                            // Fix his morale setting
BUT_ONLY_IF_IT_CHANGES

<<<<<<<< .../bg1ub/ub_ar1403.baf
IF
Global("UB_WILTON_SPAWN","GLOBAL",0)
!Exists("Wilton")
!Dead("Wilton")
THEN
RESPONSE #100
CreateCreature("WILTON",[471.272],6)
SetGlobal("UB_WILTON_SPAWN","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR1403.BCS ~.../bg1ub/ub_ar1403.baf~

/////////////////////////////////
// Corianna, the Petrified Ranger

COPY ~bg1ub/creature/ubcorian.cre~ ~OVERRIDE~
SAY NAME1 #15552
SAY NAME2 #15574

<<<<<<<< .../bg1ub/ub_ar3400.baf
IF
Global("UB_CORIANNA_SPAWN","GLOBAL",0)
!Exists("UBCORIAN")
!Dead("UBCORIAN")
Global("UB_HELPCORIANNA","GLOBAL",0)
THEN
RESPONSE #100
CreateCreature("UBCORIAN",[4611.3449],2)
SetGlobal("UB_CORIANNA_SPAWN","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR3400.BCS ~.../bg1ub/ub_ar3400.baf~

/////////////////////////////////
// Compile all relevant dialogues

COMPILE ~bg1ub/creature/UBCRE.d~

The problem is that these creatures are not include in Tutu, because they didn't exist in the original game.  If I want to bring them over, I have to edit their dialogs, scripts, etc--which isn't a big deal.  Their soundsets, however, are.  Ideas?
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #1 on: April 16, 2006, 06:34:31 PM »
A lot of these are in BG (just unused), aren't they? Does Tutu not convert everything?

Unless anyone has specific custom sounds, I'd just use generics. Sheep haven't been puttin' out, lately.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #2 on: April 16, 2006, 06:40:50 PM »
No, Tutu won't carry over files that aren't used in the original game.  I've had to copy over scripts and stuff, which is no big deal, but .cre files are a whole other matter.  :(
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #3 on: April 16, 2006, 06:46:54 PM »
Is this all going to be in one version?

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #4 on: April 16, 2006, 06:51:34 PM »
No, I'm just going to do two separate packages--one for BG1 and one for Tutu.
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #5 on: April 16, 2006, 06:59:09 PM »
Why not just SAY all the sounds to known Tutu strings? Most of the creatures look generic, so I'm sure the sounds will have been converted, even if the cre defs weren't...

But, yeah, I can't think of any simple way to work around it. Hopefully a Tutu buff has better ideas.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #6 on: April 16, 2006, 07:07:40 PM »
Why not just SAY all the sounds to known Tutu strings? Most of the creatures look generic, so I'm sure the sounds will have been converted, even if the cre defs weren't...

Cuz I lazied out.  :(
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline Macready

  • Planewalker
  • *****
  • Posts: 1801
    • EasyTutu
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #7 on: April 20, 2006, 08:32:03 AM »
Hello -

If you can pick a "model" CRE for each CRE you will be adding, it is really easy to WeiDU-ize a routine where you open the existing model, read its soundset, and graft it onto the new CRE you are adding.  I have code for exactly this sort of thing already written, if you want it.
EasyTutu: Tutu installation made simple.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #8 on: April 20, 2006, 09:15:34 AM »
I will gladly take anything I can get at this point.  :)
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline Macready

  • Planewalker
  • *****
  • Posts: 1801
    • EasyTutu
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #9 on: April 20, 2006, 09:40:28 AM »
Hello -

I will gladly take anything I can get at this point.  :)

OK.

Code: [Select]
/* Read strrefs from existing creature */
COPY_EXISTING ~_ghoul.cre~ ~override/macdummy.cre~

  /* Read creature soundset array in one chunk */
  READ_ASCII 0x00A4 "creatureSoundset" (400)

  INNER_ACTION BEGIN
    /* Copy in new version, update strrefs */
    COPY ~icelusCRE~ ~override~

      /* Write creature soundset array in one chunk */
      WRITE_EVALUATED_ASCII 0x00A4 "%creatureSoundset%" #400
  END

  BUT_ONLY_IF_IT_CHANGES

The CRE listed on the first line (_ghoul.cre here) is the "model" CRE.  You change this CRE name to whatever existing Tutu CRE is to be your soundset model.  The ~icelusCRE~ in the INNER_ACTION block is your new CRE.  You'll want to stick two SAY lines in the INNER_ACTION block in order to set NAME1 and NAME2 for your CRE.  The BUT_ONLY_IF_IT_CHANGES bit at the end will prevent the model CRE from being copied to macdummy.cre (nothing changed, we just read the soundset).

That's it -- when ~icelusCRE~ is installed, it will sound like a ghoul.
EasyTutu: Tutu installation made simple.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #10 on: April 20, 2006, 10:50:33 AM »
Cool, that will hopefully cut down on some work.  I think there may be only a couple of new NPCs that have less-than-ordinary soundsets.
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline Salk

  • Planewalker
  • *****
  • Posts: 873
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #11 on: April 29, 2006, 01:57:37 PM »
No, I'm just going to do two separate packages--one for BG1 and one for Tutu.

Ice,

any chance that the TuTu version will work with BGT-WeiDu ?

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #12 on: April 30, 2006, 05:41:17 PM »
Ice,

any chance that the TuTu version will work with BGT-WeiDu ?

No, not without some extra work.  Since I do not use BGT-WeiDU, and likely never will, I'm not inclined to do much work for a BGT version of the mod.  It will be hard enough to keep up with two versions.  If someone wants to make a BGT version, then they will be welcome to do so, but will have to take on the responsibility of managing the BGT support, as well.
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline SimDing0™

  • Back In Black
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3496
  • Gender: Male
  • Word Enhancer
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #13 on: May 01, 2006, 06:41:44 PM »
Please do not do this. Let them submit code to you if you must, but I hate having two versions of mods floating round. It's your call, but my policy on my mods will always be "people can submit whatever changes they want, but ultimately I maintain them".

Alternatively, BGT players can use DSotSC.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #14 on: May 01, 2006, 07:28:50 PM »
Are you saying that I should let them submit the packages to me, but they're ultimately responsible for keeping them up-to-date?
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #15 on: May 01, 2006, 08:06:01 PM »
I think he's saying that you should let them submit the packages to you, but you're ultimately responsible for making them work? You know you want to!

Offline Salk

  • Planewalker
  • *****
  • Posts: 873
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #16 on: May 02, 2006, 02:07:01 AM »
Well, Ghreyfain has allowed Ascension64 to convert and mantain Sirine's Call and Indira and it seems to me this is not causing any fuss nor confusion... ;)


Offline SimDing0™

  • Back In Black
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3496
  • Gender: Male
  • Word Enhancer
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #17 on: May 02, 2006, 10:43:02 AM »
I'm saying an altered version of your mod should not be available in some random unrelated place. If someone can submit some easy changes to make it work with BGT that won't get in the way, then that's fine, but if they want a whole separate package to host elsewhere then I recommend something impolite.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Tutu Conversion Snag (suggestions welcome!)
« Reply #18 on: May 02, 2006, 01:34:30 PM »
I recommend something impolite.

I can certainly handle that.

But, yeah, I see what you mean.  If someone wants to make a BGT version, then they can send it to me and I'll upload it.  Beyond that, though, I won't offer support or updates to it (someone else will have to do that).
<Moongaze> Luckily BWL has a very understanding and friendly admin.

 

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)?: