Jump to content


Photo

Modding assistance request and rumination


  • Please log in to reply
46 replies to this topic

#21 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 11 May 2013 - 01:31 PM

#EAADSF (curse)

 

It's working, but my invisible creature isn't so great.   I think.   Or it's nearinfinity not working.

 

It's showing a puff of smoke where the "invisible" creature is created.   I copied an invis creature found in Monk Sun Soul Mod kit.   not sure if there's a puff of smoke in that one by default or if I'm doing something wrong.   The cre was type genie.  


Edited by smeagolheart, 11 May 2013 - 01:40 PM.


#22 Argent77

Argent77
  • Administrator
  • 1447 posts

Posted 11 May 2013 - 02:15 PM

How do you summon your helper creature?  If you add the summoning effect directly into your spell, it uses a (hardcoded?) visual effect to summon the creature.

 

You can suppress this effect if you use an EFF file instead. Good examples how this is done are the elemental summoning spells (SPWI621, SPWI622 or SPWI623). Their associated EFF files have a field 'Resource2' or '2.Resource' which contains the visual effect to show (e.g. SPPORTAL). If you create your own EFF file, add NONE instead of SPPORTAL and there should be no visual effect anymore.



#23 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 11 May 2013 - 02:23 PM

@Argent77, others...

 

Here's what I have so far.   I'm using a beta version of weidu, so if you run it, it may overwrite your weidus with itself.

 

Please have a look, give it a try and let me know what you think.   This is my first weidu mod.   I plan to add it to misc released mods if it's good.

 

It adds a merchant, Panver, to friendly arm inn.  he sells tomes that give kits, so it's for bgt, tutu or ee (in theory), you should be able console him in in BG2 - s9panver.    He's along the wall near the main entrance.

 

edit:  added temp use spell, missed it in first post...

Attached Files


Edited by smeagolheart, 11 May 2013 - 02:47 PM.


#24 Ulb

Ulb
  • Modder
  • 373 posts

Posted 11 May 2013 - 02:54 PM

Only took a quick look, but I think theres some glitch in your addkit script.

    ReallyForceSpellRES("IKitAno2",Myself)

needs to either be an actionoverride too, or at least have LastSummonerOf(Myself) as a target. (In that case, make sure the spell is set to target a preset target and not set to target self.)

ReallyForceSpellRES("IKitAno2",LastSummonerOf(Myself))
ActionOverride(ReallyForceSpellRES("IKitAno2",LastSummonerOf(Myself))

 

 



#25 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 11 May 2013 - 02:56 PM

Only took a quick look, but I think theres some glitch in your addkit script.

    ReallyForceSpellRES("IKitAno2",Myself)

needs to either be an actionoverride too, or at least have LastSummonerOf(Myself) as a target. (In that case, make sure the spell is set to target a preset target and not set to target self.)

ReallyForceSpellRES("IKitAno2",LastSummonerOf(Myself))
ActionOverride(ReallyForceSpellRES("IKitAno2",LastSummonerOf(Myself))

 

It doesn't really do anything, I'm probably going to remove it, if it's not needed?   I updated the download with the file at least to copy over, if you don't have it.  It should work as is (with that code in).

 

...I'm working on the effect @Argent77 described.   I'll probably remove that line if it's not needed in next version


Edited by smeagolheart, 11 May 2013 - 02:58 PM.


#26 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 11 May 2013 - 03:07 PM

I made an effect to use by modifing one in game already, stuck in override.  

 

NI doesn't see it as something I can pick..   I think I have to name it something or something... or add it in TP2..   Any suggestions?


Edited by smeagolheart, 11 May 2013 - 03:08 PM.


#27 Ulb

Ulb
  • Modder
  • 373 posts

Posted 11 May 2013 - 03:16 PM

Hm, modifying an existing .eff file should work just fine.



#28 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 11 May 2013 - 03:21 PM

Can you attach this to one of the tome items like s9tome01?

Attached Files



#29 Ulb

Ulb
  • Modder
  • 373 posts

Posted 11 May 2013 - 04:31 PM

Yes.

 

Attached File  S9TOME01.ITM   362bytes   146 downloads

 

(By the way, you can just choose to edit those parameters as a string too.)



#30 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 11 May 2013 - 04:46 PM

I'm still getting the smoke animation from summoning *scratches head*.  EDIT: got it by adding none to resource2 in the eff file..  putting it all together now..


Edited by smeagolheart, 11 May 2013 - 04:50 PM.


#31 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 11 May 2013 - 07:15 PM

Alrighty, here's the next version.   Should be kinda final.   Everything should work.   I'll probably go back at some point and create quests or something as an additional option instead of a merchant, but it should work as is.

Attached Files



#32 Argent77

Argent77
  • Administrator
  • 1447 posts

Posted 12 May 2013 - 01:34 AM

First, you should resize your portrait to 38x60 pixels. In the current state it will crash the game when you move your mouse cursor over it (tested on BGT installation).

Your helper creature uses the 'summoned' gender. I think this might cause problems in certain situations. As The Imp already mentioned, the game has a hardcoded limit how many summons are allowed at the same time. Change it into whatever you want, except 'summoned'. You should also set its script name to something unique. 'WISH02' is already in use by another creature.

Everything else works great. :new_thumbs:  I can't see the puff of smoke anymore, so the EFF file is working as it should.
 

 

Edit: Just noticed that your TP2 file contains a leading backslash character in your BACKUP declaration. You need to specify a relative path (WITHOUT leading backslash) or your mod will create a new directory structure in the root folder of the current disk drive whenever you install it.


Edited by Argent77, 12 May 2013 - 04:24 AM.


#33 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 12 May 2013 - 06:53 AM

Thank you I'll make those changes...   Let me know anything else, first weidu mod and all..   Does the script, instead of wish02, have to exist?


Edited by smeagolheart, 12 May 2013 - 06:56 AM.


#34 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 12 May 2013 - 10:38 AM

http://www.shsforums...-bgee/?p=558137

 

posted to misc released mods yay :)


Edited by smeagolheart, 12 May 2013 - 10:38 AM.


#35 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 17 May 2013 - 03:44 PM

Hey guys... I can't find anything any comparable code that does something like this..

I want to ask through subcomponents how many you want my merchant in stock.

So....
how many?
1
2
6
or none

and use that answer as %ANSWER%

then later...
ADD_STORE_ITEM + ~s9tome30~ #1 #0 #0 ~IDENTIFIED~ #~%ANSWER%~

So that I don't have to copy the same the code 4 times like this:

ADD_STORE_ITEM + ~s9tome30~ #1 #0 #0 ~IDENTIFIED~ #1 //1 items
or
ADD_STORE_ITEM + ~s9tome30~ #1 #0 #0 ~IDENTIFIED~ #2 //2 items
etc

so what I wrote doesn't work. Is there a way to do this without rewriting the same code a bunch of times?

#36 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 18 May 2013 - 12:28 AM

ALWAYS
DEFINE_ACTION_FUNCTION patch_sto
  INT_VAR
    quantity = 1
BEGIN
  COPY_EXISTING mystore.sto override
    ADD_STORE_ITEM myitem #1 #0 #0 identified (quantity)
  BUT_ONLY
END
END
BEGIN ~Subcomponent 1 name~ SUBCOMPONENT ~General name~
OUTER_SET quantity = 1
LAF patch_sto INT_VAR quantity END
BEGIN ~Subcomponent 2 name~ SUBCOMPONENT ~General name~
OUTER_SET quantity = 2
LAF patch_sto INT_VAR quantity END
//etc

Note the syntax for quantity in ADD_STORE_ITEM.

The other way of doing this would be with READLN, but that's for chumps (only use it if you want to bother the user and/or if the user is allowed to provide a large range of answers).



#37 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 18 May 2013 - 09:26 AM


BACKUP ~kittomes\backup~
AUTHOR ~Smeagolheart~
VERSION ~v2.0~

ALWAYS
	INCLUDE ~kittomes/lib/always.tpa~
 
// Game platform check; Code from ~CoM_Solaufein @ "http://www.teambg.org"~ & G3 www.gibberlings3.com

ACTION_IF FILE_EXISTS_IN_GAME ~neera.dlg~ THEN BEGIN  //BGEE
		PRINT ~BG:EE install detected~
		INCLUDE ~kittomes\lib\tbgcom_bgee_vars.tpa~
	END ELSE BEGIN
	ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.are~ THEN BEGIN //TuTu
		PRINT ~Tutu install detected.~
		INCLUDE ~kittomes\lib\g3_tutu_cpmvars.tpa~
	END ELSE BEGIN
    ACTION_IF FILE_EXISTS_IN_GAME ~AR7200.are~ THEN BEGIN  //BGT
		PRINT ~BGT install detected.~
		INCLUDE ~kittomes\lib\g3_bgt_cpmvars.tpa~
	END ELSE BEGIN FAIL ~Please install on BG:EE, Tutu or BGT.~
	END
	END
	END
END
 

BEGIN ~Kit Tomes for BG:EE, BGT and TuTu~
    DESIGNATED 0
//Main Component
//-----------------------------------------------------------------------------------------------------------------------------

//Effects
//--------------------------------------------
COPY ~kittomes\EFF\S9SPWI01.EFF~ ~override\S9SPWI01.EFF~

//Scripts
//--------------------------------------------
//Invisibile Creature
COPY ~kittomes\CRE\S9KTAdd.cre~ ~override~
COMPILE ~kittomes\BAF\S9KTAdd.baf~ ~override~
//Dialogues
COMPILE ~kittomes/dlg~ ~override~
COMPILE ~kittomes/dlg/extend~
//--------------------------------------------
//Create Tomes; adds current descriptions of classes to them
//--------------------------------------------
/*
	Fighters =-
*/
// Barbarian (fighter kit according to the BG2 engine)
COPY ~kittomes\itm\s9tome01.itm~ ~override\s9tome30.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~Book of the Barbarian~ 
  SAY DESC #45869
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 30
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END

//Berserker
COPY ~kittomes\itm\S9tome01.itm~ ~override\S9tome01.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~Book of the Berserker~ 
  SAY DESC #25201
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 1 
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END

//Wizard Slayer
COPY ~kittomes\itm\S9tome01.itm~ ~override\S9tome02.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~Book of the Wizard Slayer~
  SAY DESC #25203
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~ 
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 2 
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END
  
//Kensai
COPY ~kittomes\itm\S9tome01.itm~ ~override\S9tome03.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~Book of the Kensai~
  SAY DESC #25204
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 3 
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END

/*
	Paladins =-
*/
// Cavalier
COPY ~kittomes\itm\S9tome04.itm~ ~override\S9tome04.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~Manual of the Cavalier~
  SAY DESC #25206
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 4
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END

// Inquisitor
COPY ~kittomes\itm\S9tome04.itm~ ~override\S9tome05.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~Manual of the Inquisitor~
  SAY DESC #25207
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 5 
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END

// Undead Hunter
COPY ~kittomes\itm\S9tome04.itm~ ~override\S9tome06.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~Manual of the Undead Hunter~
  SAY DESC #25208
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 6 
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END

/*
	Rangers =-
*/
// Stalker
COPY ~kittomes\itm\S9tome07.itm~ ~override\S9tome07.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~The Stalker's Guide~
  SAY DESC #25211
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 7
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END
  
//Beast Master
COPY ~kittomes\itm\S9tome07.itm~ ~override\S9tome08.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~The Beast Master's Guide~
  SAY DESC #25212
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 8
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END

/*
	Thieves =-
	Probably gonna run into a problem with Skill Points...  
	These are placed in "special store"
*/
//Assasin
COPY ~kittomes\itm\S9tome09.itm~ ~override\S9tome09.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~Lexicon of the Assasin~
  SAY DESC #25213
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 9
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END

//Bounty Hunter
COPY ~kittomes\itm\S9tome09.itm~ ~override\S9tome10.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~Lexicon of the Bounty Hunter~
  SAY DESC #25215
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 10
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END

etc....

//Transmuter
COPY ~kittomes\itm\s9tome21.itm~ ~override\s9tome28.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~Tome of the Transmuter~
  SAY DESC #9571
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 28
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END

//Wildmage
COPY ~kittomes\itm\s9tome21.itm~ ~override\s9tome29.itm~
  SAY NAME1 #7150 
  SAY NAME2 ~Tome of the Wildmage~
  SAY DESC #54892
  SAY UNIDENTIFIED_DESC #17278
  SAY 0xde ~Gained new class capabilities permanently~
	LPF ADD_ITEM_EFFECT
INT_VAR
	opcode = 265
	target = 1 // 1 is 'self'
	parameter1 = 29
	timing = 1 // instant
STR_VAR
	resource = S9KITTOM // global variable
END

COPY ~kittomes\itm\S9DAXE01.itm~ ~override\S9DAXE01.itm~
  SAY NAME1 ~Durin's Axe~ 
  SAY NAME2 ~Durin's Axe~
  SAY DESC #6656
  SAY UNIDENTIFIED_DESC #6656

COPY ~kittomes\itm\s9deed.itm~ ~override\s9deed.itm~
  SAY NAME1 ~Deed to Castle Halwater~ 
  SAY NAME2 ~Deed to Castle Halwater~
  SAY DESC ~This letter contains the deed to Castle Halwater in distant Featherdale.  All that is required to claim the property is a small deposit of 3,000 gp to be sent to Prince Idjomonai, which will be returned once all of the paperwork is done.~

//Creatures / Actors
//--------------------------------------------
COPY ~kittomes\bmp~ ~override~

COPY ~kittomes\CRE\s9PANVER.CRE~ ~override\s9PANVER.cre~
  SAY 0x8 ~Panver~
  SAY 0xC ~Panver~
COPY ~kittomes\CRE\s9Durin.CRE~ ~override\s9Durin.cre~
  SAY 0x8 ~Durin~
  SAY 0xC ~Durin~
COPY ~kittomes\CRE\s9Zankas.CRE~ ~override\s9Zankas.cre~
  SAY 0x8 ~Zankas~
  SAY 0xC ~Zankas~ 
COPY ~kittomes\CRE\s9walori.CRE~ ~override\s9walori.cre~
  SAY 0x8 ~Sir Walorin Daleborn~
  SAY 0xC ~Sir Walorin Daleborn~   
COPY ~kittomes\CRE\s9kevian.CRE~ ~override\s9kevian.cre~
  SAY 0x8 ~Lord Kevian Chandler~
  SAY 0xC ~Lord Kevian Chandler~   
COPY ~kittomes\CRE\s9vicgol.CRE~ ~override\s9vicgol.cre~
  SAY 0x8 ~Vicgold~
  SAY 0xC ~Vicgold~    
COPY ~kittomes\CRE\s9magsti.CRE~ ~override\s9magsti.cre~
  SAY 0x8 ~Magstine~
  SAY 0xC ~Magstine~
COPY ~kittomes\CRE\s9Martha.CRE~ ~override\s9Martha.cre~
  SAY 0x8 ~Marthana Shipsail~
  SAY 0xC ~Marthana Shipsail~
COPY ~kittomes\CRE\s9Oti.CRE~ ~override\s9Oti.cre~
  SAY 0x8 ~Lord Oti~
  SAY 0xC ~Lord Oti~
COPY ~kittomes\CRE\s9Butler.CRE~ ~override\s9Butler.cre~
  SAY 0x8 ~Butler Travenhurst~
  SAY 0xC ~Butler Travenhurst~  
COPY_EXISTING ~sirine01.cre~ ~override/s9sirine.cre~
  SAY 0x8 ~Diseased Sirine~
  SAY 0xC ~Diseased Sirine~
  ADD_CRE_ITEM ~S9DAXE01.itm~ #0 #0 #0 ~NONE~ ~inv4~
  WRITE_ASCII PORTRAIT_SMALL ~s9siren~
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Tome Store
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ALWAYS
DEFINE_ACTION_FUNCTION patch_sto
INT_VAR
	quantity = 1 
COPY ~kittomes\sto\s9panver.sto~ ~override\s9panver.sto~
	LAF patch_sto INT_VAR quantity
	ADD_STORE_ITEM + ~s9tome29~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // Wildmage
	ADD_STORE_ITEM + ~s9tome28~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // transmuter
	ADD_STORE_ITEM + ~s9tome27~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // necromancer
	ADD_STORE_ITEM + ~s9tome26~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // invoker
	ADD_STORE_ITEM + ~s9tome25~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // illusionist
	ADD_STORE_ITEM + ~s9tome24~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // enchanter
	ADD_STORE_ITEM + ~s9tome23~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // diviner
	ADD_STORE_ITEM + ~s9tome22~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // conjurer	
	ADD_STORE_ITEM + ~s9tome21~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // abjurer
	ADD_STORE_ITEM + ~s9tome20~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // lathander
	ADD_STORE_ITEM + ~s9tome19~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // helm
	ADD_STORE_ITEM + ~s9tome18~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // talos	
	ADD_STORE_ITEM + ~s9tome17~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // avenger	
	ADD_STORE_ITEM + ~s9tome16~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // shapeshifter	
	ADD_STORE_ITEM + ~s9tome15~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // totemic druid	
	ADD_STORE_ITEM + ~s9tome08~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // beast master	
	ADD_STORE_ITEM + ~s9tome07~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // stalker	
	ADD_STORE_ITEM + ~s9tome06~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // undead hunter
	ADD_STORE_ITEM + ~s9tome05~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // inquisitor	
	ADD_STORE_ITEM + ~s9tome04~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // cavalier
	ADD_STORE_ITEM + ~s9tome03~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // kensai
	ADD_STORE_ITEM + ~s9tome02~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // wizard slayer	
	ADD_STORE_ITEM + ~s9tome01~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // berserker
	ADD_STORE_ITEM + ~s9tome30~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // Barbarian 
	BUT_ONLY
//Thief/Bard Tome Store
COPY ~kittomes\sto\s9panves.sto~ ~override\s9panves.sto~
	ADD_STORE_ITEM + ~s9tome14~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // Skald
	ADD_STORE_ITEM + ~s9tome13~ #1 #0 #0 ~IDENTIFIED~ (quantity)  //Jester
	ADD_STORE_ITEM + ~s9tome12~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // Blade
	ADD_STORE_ITEM + ~s9tome11~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // Swashbuckler
	ADD_STORE_ITEM + ~s9tome10~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // Bounty Hunter	
	ADD_STORE_ITEM + ~s9tome09~ #1 #0 #0 ~IDENTIFIED~ (quantity)  // Assassin	
	BUT_ONLY
END
END
END	
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// OPTIONAL COMPONENTS: Number of items in stock
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BEGIN ~1~ 
SUBCOMPONENT ~Number of Tomes Sold by Panver~ 
OUTER_SET quantity = 1
LAF patch_sto INT_VAR quantity END

BEGIN ~2~ 
SUBCOMPONENT ~Number of Tomes Sold by Panver~ 
OUTER_SET quantity = 2
LAF patch_sto INT_VAR quantity END

BEGIN ~6~ 
SUBCOMPONENT ~Number of Tomes Sold by Panver~
OUTER_SET quantity = 6
LAF patch_sto INT_VAR quantity END

BEGIN ~None~ 
SUBCOMPONENT ~Number of Tomes Sold by Panver~
OUTER_SET quantity = 0
LAF patch_sto INT_VAR quantity END
	
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// OPTIONAL COMPONENTS: Tome Locations
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
BEGIN ~Merchandise & Quest Rewards-> Panver is in the Elfsong Tavern~
SUBCOMPONENT ~Tome Locations~
REQUIRE_COMPONENT ~setup-kittomes.tp2~ 0 ~You must install the main component before any others. Please exit and
begin again.~
//This set of actions places quest givers at certain locations who can reward PC with Kit Tomes.  Locations are in Beregost, Temple of the Morning and just north of Beregost Coast Way.
//Panver the Tome Merchant will be available in the Elfsong Tavern in Baldur's Gate if more tomes are needed later.
//determine gametype to determine location to place actor(s)

	EXTEND_BOTTOM ~centeol.bcs~ ~kittomes/baf/centeol.baf~

	EXTEND_BOTTOM ~%EBaldursGate_ElfsongTavern_L1%.bcs~ ~kittomes/baf/panver2.baf~
		EVALUATE_BUFFER
	EXTEND_BOTTOM ~%Beregost%.bcs~ ~kittomes/baf/fighter.baf~	
		EVALUATE_BUFFER	
	EXTEND_BOTTOM ~%Temple%.bcs~ ~kittomes/baf/clericpal.baf~
		EVALUATE_BUFFER	
	EXTEND_BOTTOM ~%CloakwoodLodge%.bcs~ ~kittomes/baf/druidra.baf~
		EVALUATE_BUFFER	
	EXTEND_BOTTOM ~%CloakwoodNestSpiderNest%.bcs~ ~kittomes/baf/centeol.baf~
		EVALUATE_BUFFER	
	EXTEND_BOTTOM ~%CoastWay%.bcs~ ~kittomes/baf/thiefba.baf~
		EVALUATE_BUFFER			
	EXTEND_BOTTOM ~%Beregost_TravenhurstManor_L1%.bcs~ ~kittomes/baf/thiefba2.baf~
		EVALUATE_BUFFER	

	EXTEND_BOTTOM ~%ArchaeologicalSite_Tomb%.bcs~ ~kittomes/baf/tomb.baf~	
		EVALUATE_BUFFER		
		
	EXTEND_BOTTOM ~%EBaldursGate_ElfsongTavern_L1%.bcs~ ~kittomes/baf/panver2.baf~	
		EVALUATE_BUFFER
		
	EXTEND_BOTTOM ~%ShipwrecksCoast%.bcs~ ~kittomes/baf/sirens.baf~	
		EVALUATE_BUFFER		
		
BEGIN ~Merchandise Only-> Panver is outside the Friendly Arm Inn~
SUBCOMPONENT ~Tome Locations~
REQUIRE_COMPONENT ~setup-kittomes.tp2~ 0 ~You must install the main component before any others. Please exit and
begin again.~
//Panver the Tome Merchant will be available outside the Friendly Arm Inn selling tomes.

	EXTEND_BOTTOM ~%FriendlyArmInn%.bcs~ ~kittomes/baf/panver.baf~
		EVALUATE_BUFFER

 

I'm getting a GLR parse error at 640 which is the start of the stuff ALWAYS again and DEFINE_ACTION_FUNCTION patch_sto.   I tried putting this up where the other always is, but got an error there too..


Edited by smeagolheart, 18 May 2013 - 09:56 AM.


#38 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 18 May 2013 - 10:46 AM

First off, you can only ever have 1 ALWAYS, which is why you are getting this parse error. Secondly, the syntax for your function definition is wrong, which is why you got the other parse error. You are missing a BEGIN before the first action (COPY, in this case) and you need to remove the LAF line from inside the function. There is also an END too many.

 

You may also want to use something like PATCH_FOR_EACH tome IN s9tome29 s9tome28 /* etc */ BEGIN ADD_STORE_ITEM "%tome%" /* etc */ END instead of having a long list of near-identical ADD_STORE_ITEMs like that.



#39 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 18 May 2013 - 12:46 PM

Thanks Wisp.  I think it's working now.  Thanks!



#40 smeagolheart

smeagolheart
  • Member
  • 278 posts

Posted 19 May 2013 - 10:58 AM

I'm failing at basic dialogue, can someone point me in the direction?

 

This is an interruption, via an EXTERN from a different creature (S9MAGSTI 0).   So now I want BG1 style Minsc to interject if present in party then pass the convo back to S9MAGSTI 1.  


CHAIN IF ~InParty("minsc") InMyArea("minsc") !StateCheck("minsc",CD_STATE_NOTVALID)~ THEN ~S9VICGOL~ 0
~I am Vicgold Otterbight.  I am a fierce, bold and decisive Ranger.  Call me Vic!  Heed what Magstine tells you.  Say, have you seen any ferrets around here?~
== minsc ~Ferrets? This guy must be mad, right <CHARNAME>?~ GOTO EXTERN ~S9MAGSTI~ 1

 

It doesn't work.   It doesn't like the goto and I'm not sure if aught else is messed up as well.  Can someone point me in the right direction?