Jump to content

Parse error prevents .tp2 installation


ericp07

Recommended Posts

I knew this would happen, just didn't know how or why the failure would occur *L*

 

When I ran weidu-mac to install my mod, a parse error occurred, reporting line 149, which reads:

 

COPY_EXISTING ~sppr410.spl~ ~override/EP#NCWB.spl~

 

The line below that says LAUNCH_PATCH_MACRO ~spell_to_innate~

 

Above the line is some blank space, preceded by the section to handle the NPC's custom kit. Below the line is a blank line, an END, another blank line, then the section to copy and patch the NPC's .cre file.

 

As I see no way to attach a file to this message, here's the content of my .tp2:

 

 

// Meleryn Gwaithoron: a joinable, romanceable NPC for BGII: SoA/ToB - Meleryn.tp2

BACKUP ~Meleryn/backup~
AUTHOR ~Eric P. (thustar@yahoo.com)~

// MODDER

VERSION ~v1~

BEGIN ~Meleryn Gwaithoron for SoA/ToB~

// Beast of Malar
// Hunting Panther form
COPY ~Meleryn/creatures/EP#MABHP.CRE~ ~override~
 SAY NAME1 ~Panther of Malar~
 SAY NAME2 ~Panther of Malar~
 SET_BG2_PROFICIENCY ~PROFICIENCY2WEAPON~ 3
// Hunting Panther pack leader (target for additional panther spawns)
COPY ~Meleryn/creatures/EP#MABHL.CRE~ ~override~
 SAY NAME1 ~Panther of Malar~
 SAY NAME2 ~Panther of Malar~
 SET_BG2_PROFICIENCY ~PROFICIENCY2WEAPON~ 3
// Hunting Panther's weapons
COPY ~Meleryn/items/EP#MABPB.itm~ ~override~ // Hunting Panther's bite attack
COPY ~Meleryn/items/EP#MABHF.itm~ ~override~ // Hunting Panther's fangs
 SAY NAME1 ~Fangs~
 SAY NAME2 ~Fangs of the Hunting Panther~
 SAY DESC ~Fangs of the Hunting Panther: These are the large, sharp teeth the Hunting Panther form of the Beast of Malar uses to clamp onto prey in order to make two rake attacks with its hind claws, as well as to deliver potentially fatal bites.~
 SAY UNIDENTIFIED_DESC ~Fangs: the teeth of a large feline predator~

COPY ~Meleryn/items/EP#MABPC.itm~ ~override~ // Hunting Panther's claw attack
COPY ~Meleryn/items/EP#MABHC.itm~ ~override~ // Hunting Panther's claws
 SAY NAME1 ~Claws~
 SAY NAME2 ~Claws of the Hunting Panther~
 SAY DESC ~Claws of the Hunting Panther: These are the large, razor-sharp claws the Hunting Panther form of the Beast of Malar uses to rend prey and to rake with its hind legs if it bites.~
 SAY UNIDENTIFIED_DESC ~Claws: the claws of a large feline predator~

// Claw Slayer form
COPY ~Meleryn/creatures/EP#MABCS.cre~ ~override~
 SAY NAME1 ~Slayer of Malar~
 SAY NAME2 ~Slayer of Malar~
 SET_BG2_PROFICIENCY ~PROFICIENCY2WEAPON~ 3
// Claw Slayer's weapons
COPY ~Meleryn/items/EP#MABSB.itm~ ~override~ // Claw Slayer's bite attack
COPY ~Meleryn/items/EP#MABCF.itm~ ~override~ // Claw Slayer's fangs
 SAY NAME1 ~Fangs~
 SAY NAME2 ~Fangs of the Claw Slayer~
 SAY DESC ~Fangs of the Claw Slayer: These are the large, sharp, daggerlike teeth that fill the Claw Slayer's wide mouth.~
 SAY UNIDENTIFIED_DESC ~Fangs: the teeth of a large feline predator~

COPY ~Meleryn/items/EP#MABSC.itm~ ~override~ // Claw Slayer's claw attack
COPY ~Meleryn/items/EP#MABCC.itm~ ~override~ // Claw Slayer's claws
 SAY NAME1 ~Claws~
 SAY NAME2 ~Claws of the Claw Slayer~
 SAY DESC ~Claws of the Claw Slayer: These are the large, curved, scimitarlike claws, including the hooks from the elbows of the creature's font legs.~
 SAY UNIDENTIFIED_DESC ~Claws: the claws of a large feline predator~

// Greater Werewolf of the Black Blood creature copying and naming
COPY ~Meleryn/creatures/EP#GWDR.CRE~ ~override~
 SAY NAME1 ~Black Blood Greater Werewolf~
 SAY NAME2 ~Black Blood Greater Werewolf~
// COPY ~Meleryn/creatures/EP#GW01.CRE~ ~override~
//   SAY NAME1 ~Black Blood Werewolf~
//   SAY NAME2 ~Black Blood Werewolf~

// Sudeiman creature copying and naming
COPY ~Meleryn/portraits/EP#Sudei.bmp~ ~portraits~
COPY ~Meleryn/characters/EP#Sudei.cre~ ~override~
 SAY NAME1 ~Sudeiman Rein~
 SAY NAME2 ~Sudeiman Rein~

// Villain NPCs

// Mehmen's special gear: Claws of Malar
COPY ~Meleryn/items/EP#MAPCL.ITM~ ~override~
 SAY NAME1 ~Claws of Malar~
 SAY NAME2 ~Claws of Malar~
 SAY DESC ~Claws of Malar: These clawlike devices are used by Malar's priests. The claws weigh 1 lb each. The priest of Malar can attack twice per round, once with each hand, using these weapons without disadvantage. The priest must allocate a weapon proficiency for these weapons in order to use them. A nonbeliever who uses the claws will suffer the wrath of the church.~
 SAY UNIDENTIFIED_DESC ~Claw bracers~

// Mehmen creature copying and naming
COPY ~Meleryn/portraits/EP#MehmS.bmp~ ~portraits~
COPY ~Meleryn/characters/EP#MEHME.CRE~ ~override~
 SAY NAME1 ~Mehmen Jassan~
 SAY NAME2 ~Mehmen Jassan~

// Taeghen creature copying and naming
COPY ~Meleryn/portraits/EP#TaegS.bmp~ ~portraits~
COPY ~Meleryn/characters/EP#TAEGH.CRE~ ~override~
 SAY NAME1 ~Taeghen Moondown~
 SAY NAME2 ~Taeghen Moondown~


BEGIN ~Meleryn Gwaithoron, a joinable NPC~

// Needle of Mielikki Kit

ADD_KIT ~EP#Needl~ // internal name of the kit
// appended to CLASWEAP.2da
~EP#Needl				1		   1		   1		   1		   1		   1		   1		   1~
// appended column-wise to WEAPPROF.2da
~EP#Needl 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5~	
// appended to ABCLASRQ.2da
~EP#Needl				13	   13	   14	   0	   14	   0~
// appended to ABCLSMOD.2da
~EP#Needl				0	   0	   0	   0	   0	   0~
// appended to ABDCDSRQ.2da
~EP#Needl				17	   17	   0	   0	   17	  0~
// appended to ABDCSCRQ.2da
~EP#Needl				15	   15	   0	   0	   15	  0~
// appended to ALIGNMNT.2da
~EP#Needl				1	   0	   0	   1	   0	   0	   1	   0	   0~
// appended to DUALCLAS.2da
~EP#Needl				0	   1	   0	   0	   0	   0~
// path to my CLAB-style 2da file 
~Meleryn/kit/EP#Needl.2da~
// PC races and classes allowed to use this kit, from KITTABLE.2da
~K_R_H K_R_E K_R_HE~
// usability flags, added to the end of the KITLIST.2da entry
~0x00004000	 12~
// HLA table to use; see LUABBR.2da
~Ra0~
// list of starting equipment for PCs starting in ToB. Appended column-wise to 25STWEAP.2da
~LEAT14 * HELM07 BAG25 RING06 RING31 CLCK02 BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 BOW18 SW1H39 STAF08~
// Lower, mixed, and help kit names and descriptions, added to KITLIST.2da 
SAY ~needle of mielikki~
SAY ~Needle of Mielikki~
SAY ~NEEDLE OF MIELIKKI: Needles are rangers who serve Mielikki. They are considered the most beloved of the Lady of the Forest. They sometimes serve as clergy, but most often act as the warrior arm of the faith and serve a defensive role, protecting the forests from marauders, humanoids, and the followers of the god Malar.~
 ~Mielikki grants her Needles a Call Woodland Beings ability.~
// change regular spell to innate
DEFINE_PATCH_MACRO ~spell_to_innate~ BEGIN
 READ_LONG  0x64 "abil_off" ELSE 0
 READ_SHORT 0x68 "abil_num" ELSE 0
 READ_ASCII ("%abil_off%" + 0x04) "bam" (8) // reads the bam filename from ability
 WRITE_SHORT 0x1C 4						 // sets spell type to innate (4)
 WRITE_LONG  0x34 1						 // sets spell level to 1 to avoid scripting issues
 WRITE_EVALUATED_ASCII 0x3A "%bam%" #8	  // writes the bam filename from abilities to spell icon
 FOR ( index = 0; index < abil_num; index = index + 1 ) BEGIN
WRITE_SHORT ("%abil_off%" + 0x02 + (0x28 * "%index%")) 4 // changes ability icon location to innate (4)
READ_SHORT  ("%abil_off%" + 0x12 + (0x28 * "%index%")) "speed" // reads casting speed
PATCH_IF ("%speed%" > 3) BEGIN
  WRITE_SHORT  ("%abil_off%" + 0x12 + (0x28 * "%index%")) ("%speed%" - 2) // reduces casting speed
END ELSE BEGIN
  WRITE_SHORT  ("%abil_off%" + 0x12 + (0x28 * "%index%")) 0 // makes instant
END
 END


COPY_EXISTING ~sppr410.spl~ ~override/EP#NCWB.spl~
 LAUNCH_PATCH_MACRO ~spell_to_innate~

END

// Meleryn creature copying and naming
COPY ~Meleryn/characters/EP#Mel.cre~ ~override~
END

// Meleryn's portrait set, by Nix (edited by Eric P.)
COPY ~Meleryn/portraits/EP#MelS.bmp~ ~portraits~
COPY ~Meleryn/portraits/EP#MelM.bmp~ ~portraits~
COPY ~Meleryn/portraits/EP#MelH.bmp~ ~portraits~
END

// Meleryn's alternate portrait set, edited by Eric P. (original artist unknown)
COPY ~Meleryn/portraits/EP#Mel3S.bmp~ ~portraits~
COPY ~Meleryn/portraits/EP#Mel3M.bmp~ ~portraits~
COPY ~Meleryn/portraits/EP#Mel3H.bmp~ ~portraits~
END

// Meleryn's pendant
COPY ~Meleryn/items/EP#MELAM.ITM~ ~override~
 SAY NAME1 ~Unicorn Pendant~
 SAY NAME2 ~Unicorn Pendant~
 SAY DESC ~A Mielikkian's holy symbol, this pendant appears as the head of a sleeping unicorn on a blue field. The item is blessed to protect a follower of the Lady of the Forest from damage, as well as to hit better and do extra damage against lycanthropes.~
// Meleryn's belt
COPY ~Meleryn/items/EP#BPM.ITM~ ~override~
 SAY NAME1 ~Belt of Priestly Might~
 SAY NAME2 ~Belt of Priestly Might~
 SAY DESC ~This broad leather belt is stamped on the front with Mielikki's holy symbol of a sleeping unicorn facing left. It grants the wearer a bonus to Armor Class and to Strength while worn.~
 SAY UNIDENTIFIED_DESC ~Leather belt~
// Meleryn's scimitar
COPY ~Meleryn/items/EP#DET2.ITM~ ~override~
 SAY NAME1 ~Dagnir en Tigin +2~
 SAY NAME2 ~Dagnir en Tigin +2~
 SAY DESC ~Scimitar +2, "Dagnir en Tigin": Bane of the Beast is a finely-crafted scimitar is enchanted to do extra damage to lycanthropes, to cause bleeding wounds whenever it hits an opponent, and to temporarily suppress regeneration in creatures possessing that ability.~
 LAUNCH_PATCH_FUNCTION ADD_ITEM_EFFECT
INT_VAR
  opcode = 139 // display string
  target = 2   // the guy you hit
  parameter1 = 54355 // string: Bleeding
  // etc if needed (probability1 is 100 by default)
  // there are plenty of items using opcode 139 on hit (e.g. miscbc) to look at for seeing how the opcode can be set up
 END
COPY ~Meleryn/items/EP#DET3.ITM~ ~override~
 SAY NAME1 ~Dagnir en Tigin +3~
 SAY NAME2 ~Dagnir en Tigin +3~
 SAY DESC ~Scimitar +3, "Dagnir en Tigin": Bane of the Beast is a finely-crafted scimitar is enchanted to do extra damage to lycanthropes, to cause bleeding wounds whenever it hits an opponent, and to temporarily suppress regeneration in creatures possessing that ability.~
 LAUNCH_PATCH_FUNCTION ADD_ITEM_EFFECT
INT_VAR
  opcode = 139 // display string
  target = 2   // the guy you hit
  parameter1 = 54355 // string: Bleeding
  // etc if needed (probability1 is 100 by default)
  // there are plenty of items using opcode 139 on hit (e.g. miscbc) to look at for seeing how the opcode can be set up
 END
COPY ~Meleryn/items/EP#DET5.ITM~ ~override~
 SAY NAME1 ~Dagnir en Tigin +5~
 SAY NAME2 ~Dagnir en Tigin +5~
 SAY DESC ~Scimitar +5, "Dagnir en Tigin": Bane of the Beast is a finely-crafted scimitar is enchanted to do extra damage to lycanthropes, to cause bleeding wounds whenever it hits a foe, and to temporarily suppress regeneration in regenerating creatures.~
 LAUNCH_PATCH_FUNCTION ADD_ITEM_EFFECT
INT_VAR
  opcode = 139 // display string
  target = 2   // the guy you hit
  parameter1 = 54355 // string: Bleeding
  // etc if needed (probability1 is 100 by default)
  // there are plenty of items using opcode 139 on hit (e.g. miscbc) to look at for seeing how the opcode can be set up
 END
 ADD_CRE_ITEM ~leat02~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~ // Leather armor +1
 ADD_CRE_ITEM ~EP#MELAM~ #0 #0 #0 ~IDENTIFIED~ ~AMULET~ // Unicorn Pendant
 ADD_CRE_ITEM ~ax1h02~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~ // Battle axe +1
 ADD_CRE_ITEM ~EP#DET2~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP // Dagnir en Tigin +2
 ADD_CRE_ITEM ~bow01~ #0 #0 #0 ~IDENTIFIED~ ~INV1~ // Composite long bow
 ADD_CRE_ITEM ~arow02~ #12 #0 #0 ~IDENTIFIED~ ~QUIVER1~ // Arrows +1
 ADD_CRE_ITEM ~arow05~ #7 #0 #0 ~IDENTIFIED~ ~QUIVER2~ // Arrows of Biting
 SAY NAME1 ~Meleryn Gwaithoron~
 SAY NAME2 ~Meleryn Gwaithoron~
 WRITE_SHORT 0x244 0 // doesn't change
 WRITE_BYTE  0x246 ~%EP#Needl%~ // the internal name of my kit, surrounded by %
 WRITE_BYTE  0x247 0x40 // doesn't change
 SAY BIO ~When you ask her about her past, MELERYN tells you that she was born and raised in the forest of Cormanthor, where her parents and extended family taught her nature lore and many useful skills. She describes how she received a vision of Mielikki, the Lady of the Forest, asking her help in rescuing a unicorn from a group of Malarites who had planned to sacrifice the noble creature to their foul god. She tells you how she became inspired to dedicate her life to serving Mielikki, and of the raid on her family camp that resulted in her father's death. She shares a few highlights of her adventures in her profession of trail guide, and ends by explaining how she came to be in Amn, following another vision of her goddess directing her to hunt down the People of the Black Blood, who have ranged south from the High Forest to prey upon animals and servants of the good and neutral nature deities.~
 SAY MORALE ~~ []
 SAY HAPPY ~~ []
 SAY UNHAPPY_ANNOYED ~Just once, I'd like a day without mayhem.~ [sorscha_]
 SAY UNHAPPY_SERIOUS ~Mark my words, you'll *pay* for that!~ [sorschaw]
 SAY UNHAPPY_BREAKING ~~
 SAY LEADER ~The light ever guides me...and now...us!~ [sorschab]
 SAY TIRED ~There are only so many hours in a day, and I've lost count! Could we stop and rest?~ [sorschac]
 SAY BORED ~I've got much to accomplish, and it's not getting done standing here.~ [sorschad]
 SAY BATTLE_CRY1 ~Bright Lady, let my strike be swift!~ [sorschaa]
 SAY BATTLE_CRY2 ~For justice. For freedom!~ [sorscha8]
 SAY BATTLE_CRY3 ~Whatever it takes, you *will* fall!~ [sorscha9]
 SAY BATTLE_CRY4 ~~ []
 SAY DAMAGE ~Unh!~ [sorschal]
 SAY DYING ~Uh-uhhh...uhhh...~ [sorscham]
 SAY HURT ~Unh! I can't take much more of this.~ [sorschae]
 SAY AREA_FOREST ~Nothing grants me a moment's peace more quickly than the quiet of the wood.~ [sorschan]
 SAY AREA_CITY ~I've never understood how people can be *comfortable* in a...crowd.~ [sorschao]
 SAY AREA_DUNGEON ~I vastly prefer fresh air to this kind of confinement. Could we please finish up?~ [sorschap]
 SAY AREA_DAY ~It's a relief to see daylight. I've become too accustomed to shadow.~ [sorschaq]
 SAY AREA_NIGHT ~Night's cloak is drawn across the land. Once, there was only dark...but see? There are the stars. The light is winning.~ [sorschar]
 SAY SELECT_COMMON1 ~Yes.~ [sorschaf]
 SAY SELECT_COMMON2 ~My path is clear.~ [sorschag]
 SAY SELECT_COMMON3 ~You need something done?~ [sorschah]
 SAY SELECT_COMMON4 ~~ []
 SAY SELECT_COMMON5 ~~ []
 SAY SELECT_COMMON6 ~As always, ready to serve.~ [sorscha0]
 SAY SELECT_ACTION1 ~The world *will* be the brighter for my having lived. I swear it!~ [sorschai]
 SAY SELECT_ACTION2 ~Easily enough.~ [sorschaj]
 SAY SELECT_ACTION3 ~That's no problem.~ [sorschak]
 SAY SELECT_ACTION4 ~One of these days, you'll provide a challenge.~ [sorschas]
 SAY SELECT_ACTION5 ~Simple and straightforward.~ [sorschat]
 SAY SELECT_ACTION6 ~As you will, it shall be done.~ [sorschau]
 SAY SELECT_ACTION7 ~Naturally.~ [sorschav]
 SAY SELECT_RARE1 ~You *must* understand: I've never wanted anything more than peace, but I've found that I've no choice but to fight!~ [sorschax]
 SAY SELECT_RARE2 ~Lady of light, lend me the strength to do one more impossible thing doday.~ [sorschay]
 SAY CRITICAL_HIT ~Struck to the heart!~ [sorschaz]
 SAY CRITICAL_MISS ~Pathetic!~ [sorscha1]
 SAY TARGET_IMMUNE ~No good: I can't hit hard enough.~ [sorscha2]
 SAY INVENTORY_FULL ~You'll be sorry to hear this, but...I'm no pack mule.~ [sorscha3]

// Audio

COPY ~Meleryn/audio/EP#blank.mus~ ~music~
COPY_EXISTING ~songlist.2da~ ~override~
SET_2DA_ENTRY 0 2 3 ~EP#BLANK.MUS~

ACTION_IF ("%WEIDU_OS%" STRING_COMPARE_CASE ~WIN32~ = 0) THEN BEGIN // if Windows
 COPY ~Meleryn/audio/sorscha*.wav~ ~sounds~
 AT_NOW ~Meleryn/audio/melaudio.bat~
 AT_INTERACTIVE_UNINSTALL ~Meleryn/audio/melaudiouninstall.bat~
END ELSE BEGIN // if OS X or Linux
 AT_NOW ~sh Meleryn/audio/melaudio.sh~
 AT_UNINSTALL ~sh Meleryn/audio/melaudiouninstall.sh~
END

// Dialogue compilation

COMPILE ~Meleryn/dialogue/EP#Mel.d~
~Meleryn/dialogue/EP#MelB.d~
~Meleryn/dialogue/EP#MelJ.d~
~Meleryn/dialogue/EP#MelP.d~
~Meleryn/dialogue/EP#Mel25.d~
~Meleryn/dialogue/EP#Hi25B.d~
~Meleryn/dialogue/EP#Hi25J.d~
~Meleryn/dialogue/EP#Hi25P.d~
~Meleryn/dialogue/EP#Mehme.d~
~Meleryn/dialogue/EP#Taegh.d~
~Meleryn/dialogue/EP#Sudei.d~

// Script compilation

COMPILE ~Meleryn/script/EP#Mel.baf~
~Meleryn/script/EP#MABSH.baf~
~Meleryn/script/EP#MEHME.baf~
~Meleryn/script/EP#TAEGH.baf~
~Meleryn/script/EP#MABAT.baf~
~Meleryn/script/EP#Sudei.baf~
EXTEND_BOTTOM ~AR1100.bcs~ ~Meleryn/script/AR1100.baf~
EXTEND_BOTTOM ~AR1200.bcs~ ~Meleryn/script/AR1200.baf~
EXTEND_BOTTOM ~AR2600.bcs~ ~Meleryn/script/AR2600.baf~
EXTEND_BOTTOM ~AR6200.bcs~ ~Meleryn/script/AR6200.baf~

// Epilogues

COPY ~Meleryn/BlankEpilogue.2da~ ~override/EP#MelD.2da~

	REPLACE_TEXTUALLY ~PORTRAIT~ ~EP#MelH~ // The biggest portrait file I have for the NPC

	REPLACE 99999 ~Meleryn stayed with <CHARNAME> for x amount of time, doing this and that. Then, she headed east, toward her home.~

// 2da appending

APPEND ~pdialog.2da~
~EP#Mel EP#MelP EP#MelJ EP#MelD EP#Mel25 EP#Me25P EP#Me25J EP#Me25D~
UNLESS ~EP#Mel~

APPEND ~interdia.2da~
~EP#Mel EP#MelB EP#MeB25~
UNLESS ~EP#Mel~

 

 

What went wrong, and how can I fix it? I've gotten the NPC to successfully install before, but that was before I started adding all sorts of stuff to the mod.

 

Thanks!

Eric

Link to comment

You have an action (COPY_EXISTING) in a patch environment (DEFINE_PATCH_MACRO). It looks like you need to reorder your code by moving the END after the COPY_EXISTING to before the COPY_EXISTING, like so:

END

COPY_EXISTING ~sppr410.spl~ ~override/EP#NCWB.spl~
 LAUNCH_PATCH_MACRO ~spell_to_innate~

Link to comment
You might want to consider using WeiDU v226 instead of v218.

 

I wasn't aware there was a version higher than 225, which I just downloaded the other day. Can't keep up with the versions anymore. My only hesitation in upping to 226 is that, usually, brand-new versions don't function as they should when I run them. I'll take a chance with this, though.

 

I'm installing to a secondary BGII installation that has only five or six mods installed (a "near vanilla" install). I did that when WeiDU was at v218.

 

Thanks,

Eric

Link to comment
You have an action (COPY_EXISTING) in a patch environment (DEFINE_PATCH_MACRO). It looks like you need to reorder your code by moving the END after the COPY_EXISTING to before the COPY_EXISTING, like so:

END

COPY_EXISTING ~sppr410.spl~ ~override/EP#NCWB.spl~
 LAUNCH_PATCH_MACRO ~spell_to_innate~

 

This surprises me, as someone else coded that section for me. I'll make the change, replace my WeiDU v218 with v226, and give it another go.

 

Thanks,

Eric

Link to comment
You have an action (COPY_EXISTING) in a patch environment (DEFINE_PATCH_MACRO). It looks like you need to reorder your code by moving the END after the COPY_EXISTING to before the COPY_EXISTING, like so:

END

COPY_EXISTING ~sppr410.spl~ ~override/EP#NCWB.spl~
 LAUNCH_PATCH_MACRO ~spell_to_innate~

 

This surprises me, as someone else coded that section for me. I'll make the change, replace my WeiDU v218 with v226, and give it another go.

 

Thanks,

Eric

 

Dang it! I should have known...WeiDU v226 is for PC. It will not work on a PPC Mac :)

 

[Edit] The version I downloaded from weidu.org yielded a bunch of .exe and .dll files, all useless on a PPC Mac. So, I need to find and d/l the Mac-friendly version. I'll search for it. [/Edit]

 

Also, no amount of rearranging the END line after the kit section of the .tp2 has any effect, as I still get the parse error (expected END) near the COPY_EXISTING line.

 

[Edit] My mistake; after adding an additional END, weidu-mac gets through this section with no problems. [/Edit]

 

Still stuck, and now out of ideas. Please help!

Thanks,

Eric

Link to comment

Hey, ericp07, you know COPY statements don't need an END, right?

 

You have a series of these:

 

// Meleryn creature copying and naming
COPY ~Meleryn/characters/EP#Mel.cre~ ~override~
END

 

BEGIN ~my component #1~

 

and

 

COPY

 

and

 

COPY_EXISTING

 

all do not need an END declaration. The patches within a COPY-related statement do only when they are things like PATCH_IF, etc. So,

 

here is a complete statement of copying :

 

/* Meleryn creature copying and naming */
COPY ~Meleryn/characters/EP#Mel.cre~ ~override~

/* Meleryn's portrait set, by Nix (edited by Eric P.) */
COPY ~Meleryn/portraits/EP#MelS.bmp~ ~portraits~
COPY ~Meleryn/portraits/EP#MelM.bmp~ ~portraits~
COPY ~Meleryn/portraits/EP#MelH.bmp~ ~portraits~

/* Meleryn's alternate portrait set, edited by Eric P. (original artist unknown) */
COPY ~Meleryn/portraits/EP#Mel3S.bmp~ ~portraits~
COPY ~Meleryn/portraits/EP#Mel3M.bmp~ ~portraits~
COPY ~Meleryn/portraits/EP#Mel3H.bmp~ ~portraits~

 

and the macro,

 

// change regular spell to innate
DEFINE_PATCH_MACRO ~spell_to_innate~ BEGIN // defining the instruction set for future use
 READ_LONG  0x64 "abil_off" ELSE 0	  
 READ_SHORT 0x68 "abil_num" ELSE 0
 READ_ASCII ("%abil_off%" + 0x04) "bam" (8) // reads the bam filename from ability
 WRITE_SHORT 0x1C 4						 // sets spell type to innate (4)
 WRITE_LONG  0x34 1						 // sets spell level to 1 to avoid scripting issues
 WRITE_EVALUATED_ASCII 0x3A "%bam%" #8	  // writes the bam filename from abilities to spell icon
 FOR ( index = 0; index < abil_num; index = index + 1 ) BEGIN // iterate through the abilities
WRITE_SHORT ("%abil_off%" + 0x02 + (0x28 * "%index%")) 4 // changes ability icon location to innate (4)
READ_SHORT  ("%abil_off%" + 0x12 + (0x28 * "%index%")) "speed" // reads casting speed
PATCH_IF ("%speed%" > 3) BEGIN
  WRITE_SHORT  ("%abil_off%" + 0x12 + (0x28 * "%index%")) ("%speed%" - 2) // reduces casting speed
END ELSE BEGIN
  WRITE_SHORT  ("%abil_off%" + 0x12 + (0x28 * "%index%")) 0 // makes instant
END // of the PATCH_IF-END-ELSE-BEGIN- statement
 END // of iterating through the possibilities
END // of defining the instruction set for future use

/* Use the macro */
COPY_EXISTING ~sppr410.spl~ ~override/EP#NCWB.spl~
   LAUNCH_PATCH_MACRO ~spell_to_innate~

Link to comment
There's a 226 for Mac.

 

Plus some of what cmorgan said.

 

The left-over ENDs were there because I had tried to set up the .tp2 to install by component, but I couldn't get that to work, as I wasn't setting it up properly. I removed the BEGIN statements from what would have been the subcomponents, but forgot to also remove the ENDs. That's been fixed, and the install process gets farther along now, until...

 

ERROR: [Meleryn/items/EP#DET5.itm] -> [override] Patching Failed (COPY) (Failure("not a vaild CRE file"))
Stopping installation because of error.

 

Well, of course it's not a valid CRE file, you dumb bunny. It's an .itm file! This is very odd, as EP#DET5.itm is set up exactly the same way as EP#DET2.itm and EP#DET3.itm, and yet both of the first two install just fine, then weidu-mac chokes on the third one. Again, I'm stumped.

 

I'll see what all else I can fix, and check back here soon for further assistance. So close, and yet so far...

Thanks!

Eric

Link to comment
The left-over ENDs were there because I had tried to set up the .tp2 to install by component, but I couldn't get that to work, as I wasn't setting it up properly. I removed the BEGIN statements from what would have been the subcomponents, but forgot to also remove the ENDs.
Component-BEGINs do not need ENDs. I would imagine the resulting parse errors kept things from working.

 

ERROR: [Meleryn/items/EP#DET5.itm] -> [override] Patching Failed (COPY) (Failure("not a vaild CRE file"))
Stopping installation because of error.

 

Well, of course it's not a valid CRE file, you dumb bunny. It's an .itm file! This is very odd, as EP#DET5.itm is set up exactly the same way as EP#DET2.itm and EP#DET3.itm, and yet both of the first two install just fine, then weidu-mac chokes on the third one. Again, I'm stumped.

 

I'll see what all else I can fix, and check back here soon for further assistance. So close, and yet so far...

Thanks!

Eric

You are invoking ADD_CRE_ITEM on the file, among other things.

Link to comment
The left-over ENDs were there because I had tried to set up the .tp2 to install by component, but I couldn't get that to work, as I wasn't setting it up properly. I removed the BEGIN statements from what would have been the subcomponents, but forgot to also remove the ENDs.
Component-BEGINs do not need ENDs. I would imagine the resulting parse errors kept things from working.

 

ERROR: [Meleryn/items/EP#DET5.itm] -> [override] Patching Failed (COPY) (Failure("not a vaild CRE file"))
Stopping installation because of error.

 

Well, of course it's not a valid CRE file, you dumb bunny. It's an .itm file! This is very odd, as EP#DET5.itm is set up exactly the same way as EP#DET2.itm and EP#DET3.itm, and yet both of the first two install just fine, then weidu-mac chokes on the third one. Again, I'm stumped.

 

I'll see what all else I can fix, and check back here soon for further assistance. So close, and yet so far...

Thanks!

Eric

You are invoking ADD_CRE_ITEM on the file, among other things.

 

Not intentionally, I'm not. At least, not that I'm aware of. EP#DET5.itm is meant to exist as the third and final upgrade to the weapon, and it is to be available in ToB only (carried by the guy who will use it to replace EP#DET3.itm when the time is right). When the NPC spawns, she's supposed to appear with EP#DET2.itm in hand. All ADD_CRE_ITEM lines are meant to give the NPC her starting gear when she spawns. I wondered about the location of that portion of code. Should I move the ADD_CRE_ITEM lines to another location?

 

Thanks,

Eric

Link to comment
There's a 226 for Mac.

 

Plus some of what cmorgan said.

 

Found v226 for Mac. Interestingly, the file's not named weidu-mac anymore, but simply weidu. Well, that's the name of the folder, and Mac won't accept a filename that's the same as a folder name in the same directory. I renamed the file "weidu-mac" and placed a copy in the BGII - SoA folder, and can now use it in a Unix shell as normal. (For me, "normal" still means installing a mod by manually entering "./weidu-mac mymod.tp2 --tlkout dialog.tlk --log mymod.DEBUG" at the prompt).

 

Thanks,

Eric

Link to comment

Well, you need to move this:

  ADD_CRE_ITEM ~leat02~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~ // Leather armor +1
 ADD_CRE_ITEM ~EP#MELAM~ #0 #0 #0 ~IDENTIFIED~ ~AMULET~ // Unicorn Pendant
 ADD_CRE_ITEM ~ax1h02~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~ // Battle axe +1
 ADD_CRE_ITEM ~EP#DET2~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP // Dagnir en Tigin +2
 ADD_CRE_ITEM ~bow01~ #0 #0 #0 ~IDENTIFIED~ ~INV1~ // Composite long bow
 ADD_CRE_ITEM ~arow02~ #12 #0 #0 ~IDENTIFIED~ ~QUIVER1~ // Arrows +1
 ADD_CRE_ITEM ~arow05~ #7 #0 #0 ~IDENTIFIED~ ~QUIVER2~ // Arrows of Biting
 SAY NAME1 ~Meleryn Gwaithoron~
 SAY NAME2 ~Meleryn Gwaithoron~
 WRITE_SHORT 0x244 0 // doesn't change
 WRITE_BYTE  0x246 ~%EP#Needl%~ // the internal name of my kit, surrounded by %
 WRITE_BYTE  0x247 0x40 // doesn't change
 SAY BIO ~When you ask her about her past, MELERYN tells you that she was born and raised in the forest of Cormanthor, where her parents and extended family taught her nature lore and many useful skills. She describes how she received a vision of Mielikki, the Lady of the Forest, asking her help in rescuing a unicorn from a group of Malarites who had planned to sacrifice the noble creature to their foul god. She tells you how she became inspired to dedicate her life to serving Mielikki, and of the raid on her family camp that resulted in her father's death. She shares a few highlights of her adventures in her profession of trail guide, and ends by explaining how she came to be in Amn, following another vision of her goddess directing her to hunt down the People of the Black Blood, who have ranged south from the High Forest to prey upon animals and servants of the good and neutral nature deities.~
 SAY MORALE ~~ []
 SAY HAPPY ~~ []
 SAY UNHAPPY_ANNOYED ~Just once, I'd like a day without mayhem.~ [sorscha_]
 SAY UNHAPPY_SERIOUS ~Mark my words, you'll *pay* for that!~ [sorschaw]
 SAY UNHAPPY_BREAKING ~~
 SAY LEADER ~The light ever guides me...and now...us!~ [sorschab]
 SAY TIRED ~There are only so many hours in a day, and I've lost count! Could we stop and rest?~ [sorschac]
 SAY BORED ~I've got much to accomplish, and it's not getting done standing here.~ [sorschad]
 SAY BATTLE_CRY1 ~Bright Lady, let my strike be swift!~ [sorschaa]
 SAY BATTLE_CRY2 ~For justice. For freedom!~ [sorscha8]
 SAY BATTLE_CRY3 ~Whatever it takes, you *will* fall!~ [sorscha9]
 SAY BATTLE_CRY4 ~~ []
 SAY DAMAGE ~Unh!~ [sorschal]
 SAY DYING ~Uh-uhhh...uhhh...~ [sorscham]
 SAY HURT ~Unh! I can't take much more of this.~ [sorschae]
 SAY AREA_FOREST ~Nothing grants me a moment's peace more quickly than the quiet of the wood.~ [sorschan]
 SAY AREA_CITY ~I've never understood how people can be *comfortable* in a...crowd.~ [sorschao]
 SAY AREA_DUNGEON ~I vastly prefer fresh air to this kind of confinement. Could we please finish up?~ [sorschap]
 SAY AREA_DAY ~It's a relief to see daylight. I've become too accustomed to shadow.~ [sorschaq]
 SAY AREA_NIGHT ~Night's cloak is drawn across the land. Once, there was only dark...but see? There are the stars. The light is winning.~ [sorschar]
 SAY SELECT_COMMON1 ~Yes.~ [sorschaf]
 SAY SELECT_COMMON2 ~My path is clear.~ [sorschag]
 SAY SELECT_COMMON3 ~You need something done?~ [sorschah]
 SAY SELECT_COMMON4 ~~ []
 SAY SELECT_COMMON5 ~~ []
 SAY SELECT_COMMON6 ~As always, ready to serve.~ [sorscha0]
 SAY SELECT_ACTION1 ~The world *will* be the brighter for my having lived. I swear it!~ [sorschai]
 SAY SELECT_ACTION2 ~Easily enough.~ [sorschaj]
 SAY SELECT_ACTION3 ~That's no problem.~ [sorschak]
 SAY SELECT_ACTION4 ~One of these days, you'll provide a challenge.~ [sorschas]
 SAY SELECT_ACTION5 ~Simple and straightforward.~ [sorschat]
 SAY SELECT_ACTION6 ~As you will, it shall be done.~ [sorschau]
 SAY SELECT_ACTION7 ~Naturally.~ [sorschav]
 SAY SELECT_RARE1 ~You *must* understand: I've never wanted anything more than peace, but I've found that I've no choice but to fight!~ [sorschax]
 SAY SELECT_RARE2 ~Lady of light, lend me the strength to do one more impossible thing doday.~ [sorschay]
 SAY CRITICAL_HIT ~Struck to the heart!~ [sorschaz]
 SAY CRITICAL_MISS ~Pathetic!~ [sorscha1]
 SAY TARGET_IMMUNE ~No good: I can't hit hard enough.~ [sorscha2]
 SAY INVENTORY_FULL ~You'll be sorry to hear this, but...I'm no pack mule.~ [sorscha3]

 

Presumably to be directly beneath this line:

COPY ~Meleryn/characters/EP#Mel.cre~ ~override~

Link to comment

Hah! Now it (weidu) says my NPC's own .cre file is not a valid .cre file!

 

ERROR: [Meleryn/characters/EP#Mel.cre] -> [override] Patching Failed (COPY) (Failure("not a vaild CRE file"))
Stopping installation because of error.

 

The installer got past the kit, then copied and patched two files, and then I got the error. I've reorganized so that "// Meleryn creature copying and naming" comes after launching the patch macro for the kit's granted innate ability. The .tp2 wants to COPY the character's .cre to override, then do the ADD_CRE_ITEM thing, give the character her NAME1 and NAME2, add the kit name, then specify all the audio lines.

 

Uh-oh...I may have found the problem (or one of them, anyway). Haven't even gotten this far to get another error yet, but I see that one of the ADD_CRE_ITEM lines references an item that, at that point in the install, hasn't been copied yet (said item being EP#DET2, her scimitar).

 

Clearly, more work needs doing on this, and I appreciate the help, as I can't test anything till I can get this mod installed.

 

Thanks,

Eric

Link to comment

Archived

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

×
×
  • Create New...