(Skip most if you want.)
Hello all. I joined these forums just tonight, and am pretty excited to be apart of a community that loves the same great games I do. (Morrowind for the win) I would like to get to know you all, and share information about the game, mostly the Construction Set. I am very new to modding, as I have just in the last few days learned very little about scripting and NPC making/making. I have big BIG plans, and ideas for the construction set, but am just toying with it to get a feel for everything.
To begin, I have little desire to make mods for the masses at the moment. I have some idea of how the CS works, and have tweaked mods that I love to play here and there, for example: Changing Playable Scamp race to nonbeast race (Big whoop) and heighth to match Scamp Lord mod's Scamp companion, and adding a vampire head to the scamp race (Just regular scamp head) I've moved some of Dave Humphry's furniture mod's houses around do to clipping in coexistence with Morrowind Rebirth. Just to name a little.
Most of my interest lies with vampire related mods. I love Vampire Embrace, and all of Carnithus' equipment mods, and I loved the idea of Bloodlines, although I can't really get it to work (Missing dialog) but I digress. I love the furniture mods, and I have a few, so I decided to make an empty tomb for my vampire scamp. I did so, and it's pretty nice if I do say so myself. Now to the questions.
I have looked through a few Scripting tutorials online, and have downloaded Morrowind Scripting for Dummies, I believe v.9. As well as The Script Library (Not sure by who) all which has helped.
I did the "My first script" tutorial with the riddle chest from Scripting for dummies and decided to go a step farther and create a companion (Just for experience)
What I've managed to do is create the NPC called Blood Runner and created a class for him (Also called Blood Runner, whodda thunk it?) and have placed him in my empty tomb, and created a short script for him that I am pretty proud of. I couldn't find any examples that were laid out for me like the riddle chest, so I used the bits of info that I gathered from each tutorial, and then things started to click.
The script basically does this. When you enter the tomb, and walk down the stairs, he's walking around. When you get close enough, and he detects you it causes a ForceGreeting saying that you don't belong there, closes interaction and begins a fight. After you get him below <=30 health he stops the fight and a message box opens with Blood Runner apologizing and asking to join you, if you say no fight continues if you say yes, message box opens with "The vampire pledges his devotion" and companion is set to True.
All of that works perfect. The only problem is with the greeting. I linked the greeting to Blood_Runner (My NPC's ID) and so it works right. The issue is when you talk to him after he joins you. It gives me the same "Get out of my tomb, you bastard!" greeting and then combat starts again. I can't for the life of me understand the dialog section of Scripting for Dummies and am having an issue figuring out how to make him use a different greeting. On the bright side, even though dialog is closed due to the "Goodbye" script command, the Companion Share button is present. So my script does work!!
Although I haven't added a follow script yet, so he kind of walks around and stands there and walks around still. So everything I did with my script works great! I will include it at the end for any tips, or advice on revising, shortening it or just short cuts.
So my real question is about dialog. Does anyone know of a tutorial out there on dialog that focuses on dialog, or dumbs things down a bit for newbies like me? Or if anyone would be willing to be bothered, and have their brain picked by me that would be helpful as well.
Here's my Blood Runner Companion Script.
Begin Blood_Runnerscript
If ( MenuMode= 1)
return
endif
Short DoOnce
Short companion
Short MakeFriends
Short Button
if ( GetDistance Player <= 1002)
if (GetDetected Player ==1 )
if (DoOnce ==0)
ForceGreeting
set DoOnce to 1
endif
endif
endif
If ( GetHealth <=30 )
If ( DoOnce==1 )
StopCombat
MessageBox "Stop! Wait, you're strong and cunning. Maybe I've misjudged you. Please, allow me to join you.", "Yes.", "No."
Set DoOnce to 2
StopCombat
endif
endif
If ( DoOnce==2 )
Set Button to GetButtonPressed
if ( Button==-1 )
Return
elseif ( Button==0 )
Set companion to 1
MessageBox "Thank you. You will not regret this, Master.", "I hope not."
Set DoOnce to 3
Else
MessageBox "Then die!"
StartCombat Player
endif
endif
If ( DoOnce==3 )
Set Button to GetButtonPressed
if ( Button==-1 )
Return
else
MessageBox "The vampire pledges his undaying devotion to you."
Set DoOnce to 4
endif
endif
End