Jump to content


Photo

Help with Item/Store Mod


  • Please log in to reply
9 replies to this topic

#1 Maurolava

Maurolava
  • Member
  • 10 posts

Posted 27 October 2007 - 07:15 PM

I'm making a Store/Item mod, I'm currently testing it, but I found a few problems that I don't seem to be able to fix. Please help me

1. I made a long bow that will create its own arrows, however when I try to test it, the bow doesn't show animation, and I can't make it work. I checked the gesen bow as reference, but I don't seem to know what I did wrong

2. I also made a figurine that will summon a great air elemental, however when I try to use it, it does not summons anything, as with the bow I use a existing item to see my mistake, but can find why

3. I found a tutorial to add an upgradeable item to Cromwell/Cespenar, however I will like to make my item be upgradeable by my  own merchant, does anyone know how to code that?

4. Last question, how do I code my .tp2 to tell there is more than 1 component, there is actually 3. Any example can be welcome.

Thank you in advance,

Maurolava

#2 Gabrielle

Gabrielle

    Do what thou wilt

  • Member
  • 1567 posts

Posted 27 October 2007 - 07:45 PM

1. I made a long bow that will create its own arrows, however when I try to test it, the bow doesn't show animation, and I can't make it work. I checked the gesen bow as reference, but I don't seem to know what I did wrong

I don't know what program you are using. I am using IEEP for this reply. In the Use Graphic button it brings up Use Ability Graphic screen. It should be set to Seeking Arrow.

2 I don't know.

3. I found a tutorial to add an upgradeable item to Cromwell/Cespenar, however I will like to make my item be upgradeable by my own merchant, does anyone know how to code that?

Read my tutorial on making upgradeable items with your own store clerk.

4

Look at the TP2 file for Unfinished Business or Weimer's Tactics. They have multiple components.

Edited by Gabrielle, 27 October 2007 - 07:47 PM.

For all of your BG modding needs: Chosen of Mystra.

This is The End.

#3 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9197 posts

Posted 27 October 2007 - 09:00 PM

Hey Maurolava!

It'd help to know what program you're using, then we can answer your questions more precisely :) Interested to know what kind of mod you're making! Always great to see new modding faces around... :D

#4 Maurolava

Maurolava
  • Member
  • 10 posts

Posted 28 October 2007 - 07:49 AM

It'd help to know what program you're using, then we can answer your questions more precisely


I'm sorry, I'm using DLTCEP

Read my tutorial on making upgradeable items with your own store clerk.


Gabrielle, thank you very much for you tutorial, that helps a lot!

I am using IEEP for this reply. In the Use Graphic button it brings up Use Ability Graphic screen. It should be set to Seeking Arrow.


I have never used IEEP, but I guess I can give it a try. However if you or anyone else know how to fix this on DLTCEP I'll greatly appreciated.

Thank you in advance,

Maurolava

#5 Miloch

Miloch

    Barbarian

  • Modder
  • 6544 posts

Posted 29 October 2007 - 07:17 AM

However if you or anyone else know how to fix this on DLTCEP I'll greatly appreciated.

For the bow, go to the item Extended Effects tab in DLTCEP. If it produces its own ammo, you'll probably have Projectile type set to 0-None. You'll have to set Projectile animation to something to see it. You can use 2-Arrow or 97-Color spray or anything you want, within reason (some values might crash the game). Some of the CoM mods (BG1 Adventure etc.) have several examples of items like this.

For the air elemental summoning, you will probably have an extended effect of opcode 148 (cast spell at point) and then your resource will be whatever that summoning spell is (spwi621 or something). You want to set the number of charges too (could be 1 per day etc. if you're using BG2).

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#6 Maurolava

Maurolava
  • Member
  • 10 posts

Posted 29 October 2007 - 09:04 AM

For the bow, go to the item Extended Effects tab in DLTCEP. If it produces its own ammo, you'll probably have Projectile type set to 0-None. You'll have to set Projectile animation to something to see it. You can use 2-Arrow or 97-Color spray or anything you want, within reason (some values might crash the game). Some of the CoM mods (BG1 Adventure etc.) have several examples of items like this.


What I got wrong was not the Projectile animation, but instead I forgot to change the Attack type from 4-bow to 2-projectile. Now I can see the bow :)

For the air elemental summoning, you will probably have an extended effect of opcode 148 (cast spell at point) and then your resource will be whatever that summoning spell is (spwi621 or something). You want to set the number of charges too (could be 1 per day etc. if you're using BG2).


Actually, I got this working using opcode 67 Creature Summoning. I had try to use the one that the black spider figurine uses (177: EFF file) but I did not have a EFF to summoned my air elemental. :doh:

Anyway thank you very much Miloch for your help! :new_thumbs:


I have a new problem though, is with the dialog for my merchants, I was able to make them work before, but after I update them to add the upgrade item, now the don't have anything to say. Again don't know why. I'll post one of the merchant dialogs if someone notice what I did wrong.

Edit: Okay, I made work again, the merchants can talk now, but the upgrade option does not work or the last option in my dialog does not work either, when my merchant is attack it goes back "again" option, did I code that part wrong?

BEGIN ~mlfelidg~

IF ~NumTimesTalkedTo(0)~ first
SAY ~Ah, my good friend, I have a number of items that you may just want to have a peek at.  One never knows what exotic piece might strike your fancy.~
++ ~Sure, I'll take a look.~ + start
++ ~No, thank you.~ + insist
END

IF ~~ insist
SAY ~I think you should reconsider.  I've just got a shipment of unique pieces from the Orient, which you might have some use for.~
++ ~Well, in that case I guess I will take a look at what you have.~ + start
++ ~I said no. Now buzz off.~ + bye
END

IF ~~ start
SAY ~Good choice!~
IF ~~ DO ~StartStore("mlfelino",LastTalkedToBy())~ EXIT
END

IF ~~ bye
SAY ~Well, you know where to find me.~
IF ~~ EXIT
END

IF ~NumTimesTalkedToGT(0)~ again
SAY ~Ah, my good friend has returned. Do you want to see my collection of magical items? One never knows what exotic piece might strike your fancy.~
++ ~Sure, I'll take a look.~ DO ~StartStore("mlfelino",LastTalkedToBy())~ EXIT
++ ~No, thank you.~ + farewell
END

IF ~~ farewell
SAY ~No problem. I'll be always happy to meet you.~
IF ~~ EXIT
END

IF ~PartyHasItem("mlitem11")~ item
SAY ~What's that you got there, my friend?~
++ ~I got this hammer sometime ago, the merchant I bought it from mention very special. Do you know anything about it?~  GOTO 1
++ ~I don't know what you talking about, I'm just gonna go now!!~ + farewell
END

IF ~~ THEN BEGIN 1
  SAY ~Interesting, let me see... Hmm Sensou Hammer you say? Now that's rare. I could improve it... I know magic that I offer, wiser protection fer you, my friend. All I need besides this is a fire agate, a sunstone, potion of fire resistance and 10000 gold pieces. How about it, eh?~
  IF ~~ THEN REPLY ~No, not right now.~  GOTO farewell
  IF ~PartyHasItem("mlitem11")
PartyHasItem("misc16")
PartyHasItem("misc18")
PartyHasItem("potn02")
PartyGoldGT(9999)
~ THEN REPLY ~Sure thing. Go ahead and make it.~ DO ~TakePartyGold(10000)
TakePartyItem("mlitem11")
DestroyItem("mlitem11")
TakePartyItem("misc16")
DestroyItem("misc16")
TakePartyItem("misc18")
DestroyItem("misc18")
TakePartyItem("potn02")
DestroyItem("potn02")
GiveItemCreate("mlitem12",Player1,1,1,1)
~ EXIT
END

IF ~Global("mlfelinoAttacked","LOCALS",1)~ THEN BEGIN leave
  SAY ~Aww, isn't that cute?~
  IF ~~ THEN DO ~CreateVisualEffectObject("spdimndr",Myself)
Wait(1)
DestroySelf()
~ EXIT
END

Edited by Maurolava, 30 October 2007 - 05:18 AM.


#7 Maurolava

Maurolava
  • Member
  • 10 posts

Posted 04 November 2007 - 08:04 AM

Bump, please help

#8 Miloch

Miloch

    Barbarian

  • Modder
  • 6544 posts

Posted 04 November 2007 - 09:20 AM

I'm afraid I don't know a whole lot about dialogue coding. At what point does the upgrade not work? I assume you have all the items you've listed.

Where are you setting the variable mlFelinoAttacked, is it in the CRE script? You might try changing it to a GLOBAL though really, a LOCALS should work here too.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#9 Maurolava

Maurolava
  • Member
  • 10 posts

Posted 04 November 2007 - 07:08 PM

I'm afraid I don't know a whole lot about dialogue coding.  At what point does the upgrade not work?  I assume you have all the items you've listed.


All the items are listed, the merchant can talk and the store works,  but the part on where it detects the item to be upgraded (in this case "mlitem11") just does not trigger. I don't know why  :(

Where are you setting the variable mlFelinoAttacked, is it in the CRE script?  You might try changing it to a GLOBAL though really, a LOCALS should work here too.


Yes, it is in the CRE script, this is the script:

IF
OR(2)
  AttackedBy([PC],DEFAULT)
  AttackedBy([GOODCUTOFF],DEFAULT)
THEN
  RESPONSE #100
  SetGlobal("mlfelinoAttacked","LOCALS",1)
  StartDialogNoSet([PC])
END

This I put on the Override Script, is that correct?

#10 Miloch

Miloch

    Barbarian

  • Modder
  • 6544 posts

Posted 05 November 2007 - 09:11 PM

Ok. Well this turned out to be quite simple - dunno why no one else noticed it since you posted the code on two forums :blink:.

The PartyHasItem and attacked blocks are never going to fire, the way you have them right now. That's because you have blocks with conditions NumTimesTalkedTo(0) and NumTimesTalkedToGT(0) before them. One of those conditions is always going to be true - either you've talked to him previously or not.

So to fix it, simply move the last few blocks starting with PartyHasItem to the beginning. That way, if you have the stuff for the upgrade or if you attack him, he'll respond to those conditions first rather than making the usual chit-chat ;).

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle