Guest Guest_Minotaur_* Posted February 17, 2006 Share Posted February 17, 2006 After a couple of Years, and after being given a HUGE amount of guidance from the friendly folk here - I am getting the rudiments of coding and making HUGE progress. I still need work, but… Anyway I am getting close to done, but have a few issues as far as (Ithink it would be) scripting and effects in coding. Just little problems I am having because I don’t know how to either make globals or how to write out certain scripted actions. Let me try to list my probs here and see if anyone can help or advise. These are all questions on coding for quests. 1. Okay, so I have a little sub quest where the party encounters and unhappy (Not Hostile) zombie. After some dialog options the player has the choice, depending on what path taken, to either kill the zombie (as a mercy killing that is requested rather than a battle) or, (if coding allows) to use a raise dead spell to bring him back to life (sorta like the bit in the city in the beginning of ToB). So, is there a way to code the thing so that if I choose to do a mercy killing, I can kill the zombie and not have every Other creature (Undead) in the area go hostile forever? I also want to give the party (2000XP) Experience for the mercy killing. Along the same lines, is it possible to code something to Raise the corpse with a scroll/spell - like at the city beginning of ToB with the little boy and his father? I am wondering if that was hardcoded in. Same as, I need to set globals for whatever I do, kill or raise and set different XP for whatever choice is made (2000XP to kill - 3500XP to raise) 2. One of my main (and small I think) problems is knowing How to Begin a quest (Not sure if it is coded right)- ---------------------------------------- IF ~OctoberInpartyTrue()~ THEN BEGIN OctSTB~ (SOMETHING MISSING HERE. NEED TO MAKE Script/.Cre that will trigger only IF October -NPC- In Party ) SAY ~Sigh. (Frown. Yawn)~ // What the new creature being greeted says when party approaches. IF ~~ THEN REPLY ~Hello friend, why so glum?~ GOTO OctSTB01 IF ~~ THEN REPLY ~What’s the problem with you, gnome?~ GOTO OctSTB01 IF ~~ THEN REPLY ~Boy you look like you’re having a really bad day. What’s up?~ GOTO OctSTB01 EXIT END IF ~~ THEN OctSTB01 SAY ~Hello outworlders.~ = ~Might I ask, have you ever been to the surface?~ IF ~~ THEN REPLY ~Certainly, we've come from there. That's where we live. Why?~ GOTO OctSTB02 IF ~~ THEN REPLY ~Yeah, it is home. Why?~ GOTO OctSTB02 END IF ~~ THEN OctSvirTrav02 SAY ~Sigh. You *LIVE* on the surface? Oh you are so lucky. Have you seen many things?~ = ~Great bodies of water, I believe called - lakes?~ = ~Sky?~ = ~Trees?~ ++ ~ Well sure. All the time, yes. Why?~ GOTO OctSTB03 ++ ~Yup, why do you ask?~ GOTO OctSTB03 ++ ~Nope, not us. I need to get going now.~ GOTO OctReject EXIT END IF ~~ THEN OctSTB03 SAY ~Sigh.~ = ~Always wanted to travel have I. Not happy being cooped up underground always. Mayor says I am aberation and not a good Svirfneblin but I cannot change.~ = ~Want to see Overworld Soooooo bad, but a lone Svirfneblin would not survive long out there I have been told. In any case, mayor won't let me leave... Especially now since those cursed Drow have been raiding us more often.~ = ~Mayor says every hand will be needed if dirty Drow attack.~ ++ ~Hmm, seems a shame not to be able to come and go as you please alright.~ GOTO OctSTB04 ++ ~That doesn’t seem right to me.~ GOTO OctSTB04 ++ ~Not my problem pal! Scram!~ GOTO OctReject ++ ~IsValidForPartyDialogue("Viconia")~ + ~Hold your tongue, insect, lest someone else be tempted to remove it and do it for you.~ + OctSTB04 ++ ~IsValidForPartyDialogue("October")~ + ~Can we not help him, <CHARNAME>, he’s just so cute.~ + OctSTB04 END END ---------------------- I only give this much as I have a Multisay in that last block with Viconia and October both react.) So, the quest is now started and if the player elects he can help out the gnome by, initially, going to talk to the Svirfneblin Mayor. Two things, if I understand it correctly, I can add a GLOBAL that will begin the talk “IF†the GLOBAL is met (and if it is Not then things just go along as usual. Right? More importantly, as I would be moving from one area (the Svirfneblin village) into another (Place I meet the mayor) do I have to Restart the quest to cary it on I mean, or is it all done with the GLOBALS? This is a question I have often as in this quest I tend to move to different areas a lot... 3. MUCH later I have the option for the Player to talk to a colorful background NPC who can offer information, items for sale and a couple of small subquests. I have two issues here. One, I have read the Tuto on “How to make a store/items†and I think I can do it, no problem. What I need is to set up the scenerio so that the option to seeing what is in stock, indeed, even knowing that this new background character IS a trader, is not availible Unless certain dialog chains are gone into. Not right from the git-go I mean. Thus, farther down in the dialog I have: -------------------------------------------- IF ~~ THEN LaveryQuestionsA SAY ~Sure, I might be able to help. I’ve seen lots around here, let me tell you. Ask away!~ ++ ~What do you do here?~ GOTO LaveryTraderA1 HERE is the option the player can take to go to the block leading to buy/sell ++ ~What can you tell me about King Fellis?~ GOTO LaveryKingInfoA ++ ~What can you tell me about the Chancellor?~ GOTO LaveryChancellorInfoA ++ ~I’ve seen the way you’re staring at October. Have you met before, and if so, can you tell me anything about her?~ GOTO LaveryOctoberInfoA ++ ~What can you tell me about this place?~ GOTO LaveryPlaceInfoA ++ ~What I really need to know is if you have any idea how I can get that damned necklace King Fellis refused to give me!~ GOTO Lavery07A ++ ~I can’t think of much to ask right now, other than how did you know I was ticked off in the first place?~ GOTO Lavery01A EXIT END ------------------------------------------- The Other issue, accessed from the same block, above, is where the PC asks Lavery about his relationship with October. No problem there, except that October has something to say when the chat rolls around. I need to do a CHAIN for October, Lavery and PLAYER1. Can I code it thus: ------------------------------------------- IF ~~ THEN LaveryOctoberInfoA SAY ~I was wondering if you were gonna get around to that, though I didn’t know if October mentioned me.~ == OCTOBJ ~Hey, I was just...~ == PLAYERJ ~No, she didn’t.~ == OCTOBJ ~I was going to tell you later on.~ == LAVERYJ ~Shame on you, Tobi!~ == PLAYERJ ~Hmmm.~ Etc. ---------------------------- I feel something is off there. 4. Is there a way to check for charisma number in order for a block of dialog to fire? I have a finish for a quest that is only supposed to happen if the PC has 14 or higher CHA, but don’t know how to code it such in the start. 5. This Might be a matter of Weight. The character Lavery (above) is a flirt and will come on to every female in the group and the PC if female. Problem. I need to get the Important dialog out there and I Don’t need the flirts falling all over themselves (I.E. From Imoen to Mazzy to Nalia etc. while neglecting the important Quest related dialog. Is it a matter of Weight, or do I need some other checks? The flirts cannot just be ignored as this character is based on flirts. 6. Last, is there a list someplace of scripting commands I can write out to make the various visual effects (warping in/out - magic shield bubbles etc) happen? And do I write them in after the regular GLOBALS? Oh, I am having One Small problem with the .Cre, though tutos say one thing I find that even following directions won’t do the deed in NI. Anyone have a bit of time for that? Thanks. Still creeping along. Minotaur Link to comment
Domi Posted February 17, 2006 Share Posted February 17, 2006 So, is there a way to code the thing so that if I choose to do a mercy killing, I can kill the zombie and not have every Other creature (Undead) in the area go hostile forever? I also want to give the party (2000XP) Experience for the mercy killing. Have you checked out IESDP? Make the CRE kill itself ActionOverride("CREATURE",Kill("CREATURE")) Check IESDP for the proper syntax for AddExperience; you have a choice of adding XP to the party or individually to an NPC. Along the same lines, is it possible to code something to Raise the corpse with a scroll/spell - like at the city beginning of ToB with the little boy and his father? I am wondering if that was hardcoded in. Same as, I need to set globals for whatever I do, kill or raise and set different XP for whatever choice is made (2000XP to kill - 3500XP to raise) Check the area script for the area you want (find Saradush in the list of TOB Areas, and then open the corresponding ARE file in NI, that will link you to BCS that you will find the sequence in). Adjust it for your character and trigger it from either the corresponding areal script or from CRE's override script. 2. One of my main (and small I think) problems is knowing How to Begin a quest (Not sure if it is coded right)- I don't understand your question. WHat you are having a problem with? Creating a BCS or DLG? A quest consist from the following parts: CRE - creatures that are participating BCS - scripts that govern the quest, and that can be assigned to either area (if the quest takes place in a certain area) or to a CRE's override script. The BCSs govern sequence of events, prompt the dialogues etc. GLOBALs - are the variables that track the quest progression and serve as conditions on dialogues associated with the quest. DLGs - dialogues associated with the quest. ITMs - items that will be used in the quest SPL - spells that will be used in the quest Example: I want to make Rinaldo the Fierce, in party NPC to talk to me about his family's Heirloom, the Very Big Sword of Holliness 2 hours after he had joined the party. I want Sir Rinaldo advise to go and talk to Noble Courtesan Fifi about the Heirloom. Courtesan Fifi admits that she has the sword but turns into a Hellhound and attacks. After her death I can collect the Heirloom. Rinaldo is overjoyed to find the Heirloom, party gets XP, and he gains a bonus to his Constitution. I will create CRE - Courtesan Fifi with assighned dialogue and override script. I will create a BAF that will be appended to Rinaldo's override scripts (turns BCS after compilation) that: starts the timer upon Rinaldo joining the group and prompts the dialogue once the timer had expired. I will track the GLOBAL that will tell me that Rinaldo had talked to my PC That Global value will create Fifi off screen and move her to whereever I want Fifi to be - via the combination of Rinaldo's override script and/or Areal script for the area where Fifi sprouts, and Fifi's own override script (if she needs to do Random walking or initiate dialogue on the sight of PC) So, once PC enters the area where Fifi is now lounging, her override script will prompt her initiate a dialogue (or, if you don't want her to initiate a dialogue, don't script it, just use the NumOfTimeTalkedTo(0) for her first line as a condition. Again, keep tracking GLOBALs You talked to Fifi, and Fifi Attacked - either through an action in her Dialogue, or through her script once you set a corresponding GLOBAL in her DLG Fifi is dead, the Heirloom which had an "Unstealable" flag on it materializes on her corpse. Rinaldo's ovveride script reacts on having the Heirloom in the inventory and he is prompted to make a joyous speech. In the joyous speech in DLG I add the AddXP for the party I will also set a GLOBAL value that from Rinaldo's override script will cast a SPL that increases Rinaldo's CON 1 point permanently. Link to comment
Domi Posted February 17, 2006 Share Posted February 17, 2006 I don't understand your other questions, except for this one: IF ~~ THEN LaveryOctoberInfoASAY ~I was wondering if you were gonna get around to that, though I didn’t know if October mentioned me.~ == OCTOBJ ~Hey, I was just...~ == PLAYERJ ~No, she didn’t.~ == OCTOBJ ~I was going to tell you later on.~ == LAVERYJ ~Shame on you, Tobi!~ == PLAYERJ ~Hmmm.~ Etc. Do you mean PlayerJ is the Charname (it is a BAD practice to leave PC only one responce)? Then you'd want to EXTERN into October's dialogue and use the regular SAY/++ construction, ie: IF ~~ Talk1.0 SAY ~I was wondering if you were gonna get around to that, though I didn’t know if October mentioned me.~ IF ~~ THEN EXTERN OCTOBJ Talk1.0 END IF ~~ Talk1.2 SAY ~Shame on you, Tobi!~ ++ ~Hmmm.~ EXIT END END APPEND OCTOBJ IF ~~ Talk 1 SAY ~Hey, I was just...~ ++ ~No, she didn’t.~ + Talk1.1 END IF ~~ Talk 1.1 SAY ~I was going to tell you later on.~ IF ~~ THEN EXTERN LAVERYJ Talk1.2 END If PLAYERJ is another NPC, then you do not need SAY, just use CHAIN. Link to comment
Guest Guest_Minotaur_* Posted February 19, 2006 Share Posted February 19, 2006 I don't understand your other questions, except for this one: IF ~~ THEN LaveryOctoberInfoASAY ~I was wondering if you were gonna get around to that, though I didn’t know if October mentioned me.~ == OCTOBJ ~Hey, I was just...~ == PLAYERJ ~No, she didn’t.~ == OCTOBJ ~I was going to tell you later on.~ == LAVERYJ ~Shame on you, Tobi!~ == PLAYERJ ~Hmmm.~ Etc. Do you mean PlayerJ is the Charname (it is a BAD practice to leave PC only one responce)? Then you'd want to EXTERN into October's dialogue and use the regular SAY/++ construction, ie: IF ~~ Talk1.0 SAY ~I was wondering if you were gonna get around to that, though I didn’t know if October mentioned me.~ IF ~~ THEN EXTERN OCTOBJ Talk1.0 END IF ~~ Talk1.2 SAY ~Shame on you, Tobi!~ ++ ~Hmmm.~ EXIT END END APPEND OCTOBJ IF ~~ Talk 1 SAY ~Hey, I was just...~ ++ ~No, she didn’t.~ + Talk1.1 END IF ~~ Talk 1.1 SAY ~I was going to tell you later on.~ IF ~~ THEN EXTERN LAVERYJ Talk1.2 END If PLAYERJ is another NPC, then you do not need SAY, just use CHAIN. <{POST_SNAPBACK}> OKAY then! Now I get it. I can make the PLAYERs dialog seperate from the other interjections in this case, where a PARTY NPC (Mine) and a background NPC are talking - or in this case where the Background NPC is talking to <CHARNAME> and someone else (My NPC) butts in. Gotcha! THANK YOU! Minotaur Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.