Darmoth Posted November 7, 2003 Share Posted November 7, 2003 Yeah... so... I'm an idiot when it comes to modding for Morrowind, although I'm pretty damn good with Neverwinter Nights... But I digress. I'm trying to script a "respawning" plugin, that will, for some kind of penality, which gets progressivly larger each time you die, let your character wake up in the nearest Imperial, or Tribunal temple, an unknown amount of time passed... to go with it I want to add 'dreams' that the player experiances durring the time he/she is outcold, much like the dreams you have in the main quest, or every night as a vampire. Any help to do this would be greatly apprecaited... See, I'm trying to get rid of the save/die/reload syndrome. Link to comment Share on other sites More sharing options...
Switch Posted November 7, 2003 Share Posted November 7, 2003 Whoa if you're new to this you might wanna start with something a bit simpler. :P Personally I don't know a thing about scripting... you'd have to ask someone like Lord of the Cheese, or maybe Marxist. Or maybe even Baphomet, he knows of just about every mod out there, someone may have already done this! ^_^ Link to comment Share on other sites More sharing options...
Darmoth Posted November 7, 2003 Author Share Posted November 7, 2003 Yeah, I know it's kinda complicated to start with... I know someone else did it, it was called the "Resurrection" mod... you would respawn in the Balmora temple, with 200 gold bounty... but that seems a little... TOO simple. I want something with some more depth, roleplay wise I mean. Link to comment Share on other sites More sharing options...
Marxist ßastard Posted November 7, 2003 Share Posted November 7, 2003 Oh, joy... First, you'll obviously have to have a conditional to check wether the PC is alive. If ( Player->GetHealth <= 1 ) should serve that purpose nicely, but, if it would work, GetHealth == 0 would be more accurate. In theory, there would be a frame or so with which the script could be executed, but you'll obviously want to test that out. This should always be before anything else to conserve time so that there is the shortest intereval possible between executions of this script. So then the PC is at death's door... Before you get to the payload of the script, it will be necessary to check if there's a condition active that will disable it. Mainly, you'll have to check if the PC is in the Puzzle Canal's central level, where this script will get its feet stepped on by a resurrect script in the original game. If you want to have additional conditions to meet, they would need to be here. For example, it'd be ideal to have some sort of "Totem of Death" object that would break this script, so that it wouldn't interfere with other mods' resurrect scripts (Ones that would mimic the Puzzle Canal script, not full-on resurrect mods). To do this, you'd just have to have a Misc. Object sort of like an Ash Statue with a script attatched that will set a Global true if the PC so chooses. On the side of this script, you'd just have to check to see if the Global is true before continuing. You'd probably also want a conditional to check if the PC has been resurrected more than a certain number of times, so the feature won't get whored. If you want to, now would also be the time to write in variable registering... If it turns out that the PC keeps taking a dirtnap while this part of the script is executed, then you might want to either turn on MenuMode or move this section of the script directly after its payload is delivered. Since you're going to have the PC teleported to either an Imperial Cult marker or a Tribunal Temple marker, you'll have to put a little song-and-dance here to see if the PC is closest to a Temple or Imperial Cult shrine. An alternative is to check if the PC is higher in rank within either of these factions. The two are not mutually exclusive, so you can work out a system so that if the PC is of such-and-such rank in either faction, the routine that checks to see which type of shrine is closer is overridden and the PC will always be teleported to either the closest Temple shrine or the closest Imperial Cult shrine. If you've chosen to implement a resurrect counter that will make it so that the script it disabled if the PC is resurrected so many times, this would be the place to +1 said counter. Next would be the meat of the script, where the PC's health will be magically restored. Making an ability with Restore Health 32 000 and doing an AddSpell with that will serve this purpose admirably. If you want to make the script foolproof, you'd probably want to delay your Removespell with a small loop so that the ability will be there for more than a second and support will be there for charachters with more than 32 000 health. This would also be a nice place for a fade to black. Your basic purpose has been served, so now onto more options... Tepeportation will be simple enough. Create two abilities, one with Almsivi Intervention and one with Divine Intervention. Then, just call back the variable you assigned earlier to see which type of shrine the PC will teleport to, and AddSpell accordingly. Remove the spell afterwards so that the PC won't have CE Intervention. Put up a message box with the text you want displayed. Last, but certainly not least, is the punitive aspect of the script. Just subtracting from the PC's four highest attributes will give a good amount of depth roleplay-wise, and will be simple enough to code in. If you want something more complex, you could try your hand at making the amount subtracted random and have a messagebox informing the PC of how much has been taken away from each attribute. Link to comment Share on other sites More sharing options...
Darmoth Posted November 8, 2003 Author Share Posted November 8, 2003 :wacko: Darmoth likey the big shiney F5 and F9 keys. Uh huh. Yeah. Uh, buh bye now. :blink: Link to comment Share on other sites More sharing options...
Switch Posted November 8, 2003 Share Posted November 8, 2003 I told you you needed to start with something simpler. :P Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.