Jump to content

Guide to make a perm summon (OBSE)


Recommended Posts

Before I start, I suggest using Construction Set Extender. It is far superior. You can use the original Construction Set, but you have to link OBSE to it (Google is your friend)

I'll be telling you how to make a permenant summon in this really short, really quick guide. Some of you I'm sure already know how, and may have a better way of doing it, others may not. But due to the huge flexibility of this, and the laziness I am feeling, it is better to create the script yourself to tweak to your wants/needs. I have too much piled up right now to make a summon menu with consistent checks and all that so yeah. Here we go.

Step 1. Open up your construction set

Step 2. Open up your Oblivion.esm, and any other dependants that have a summon you want to use.

Step 3. Open up the Magic menu and choose spells. Right click anywhere, and select 'New'. When the box pops up, name your spell something memorable and unique. In this case, I'll be using RizBear. Name the spell whatever, I named it Bear. Set the 'Type' to 'Ability'. This is important. If you don't set it to Ability, it will just add the castable version, which is obviously not what we want. Now right click in the white box on the right, and select 'New'. Press 'S' to jump to the S' and select the creature you want to summon. Once that is done, hit 'Ok' and 'Ok' again. Now we have the summon ready.

Step 4. Open the script editor by clicking the pencil, or selecting 'GamePlay', 'Edit Scripts...'. Now starts the fun part. Name your script something memorable and unique as with the spell name, mine was RizBearScript. Make sure you set the script type to QUEST. This is very important. Now make the script like this

scn RizBearScript

short state

float fQuestDelayTime

Begin GameMode

End

Now a quick breakdown of what that means. 'short state' is the variable we are going to use as 'checkpoints' in the script. 'float fQuestDelayTime' is an OBSE function that tells the game to delay the quest by the time appointed in the script, and this is a constant, meaning if it is set to 5, it will run every 5 seconds and so on. 'Begin GameMode' is the block start we are going to use, since it's not an on equip effect or anything of the like. 'End' just tells the script that it has finished executing.

Check more block functions here "http://wiki.tesnexus.com/index.php/An_introduction_to_Oblivion_scripting" and more functions here "https://cs.elderscrolls.com/index.php?title=List_of_Functions"

Step 5. Now to fill the script in. We need to set the quest delay, so after 'Begin GameMode' add in 'let fQuestDelayTime := 5'. Should now look like this

scn RizBearScript

short state

float fQuestDelayTime

Begin GameMode

let fQuestDelayTime := 5

End

Step 6. Now we need to add in the variables, letting the script know when and what to do. So add in this bit after the fQuestDelayTime part

If state == 0

set state to 1

EndIf

Now, is this necessary? No, but for some reason my scripts always run better if I start it at zero and immediately set to one.

Step 7. Now you need to add in a check to see if your summon is already up. So add in this bit

If state == 1

If Player.HasSpell RizBear (your spell name)

Return

Else

Set State to 2

EndIf

EndIf

What that does is check to see if the player already has their summon, and if so, returns the script processing back to the top, otherwise, moving it to the next stage.

Step 8. Now that we have our check, we need to add in the summon. so beneath the check add in

If State == 2

Player.AddSpell RizBear (your spell name)

Endif

So your script should now look like this

scn RizBearScript

short state

float fQuestDelayTime

Begin GameMode

let fQuestDelayTime := 5

if state == 0

set state to 1

endif

if state == 1

if player.hasspell RizBear

return

else

set state to 2

endif

endif

if state == 2

player.addspell RizBear

set state to 3

endif

End

Now, all good and well, huh? Not quite. If you were to go in game, it would indeed summon your creature. However, if it ever died, it would never respawn. That's because the state is locked at 3 and never returns to the top of the script. To remedy that, we'll need to add in a reset to the script. Do that by adding this to the bottom of your script, before the End block.

Set state to 0

So all said and done, it should look like this.

scn RizBearScript
short state
float fQuestDelayTime
Begin GameMode
let fQuestDelayTime := 5
if state == 0
set state to 1
endif
if state == 1
if player.hasspell RizBear
return
else
set state to 2
endif
endif
if state == 2
player.addspell RizBear
endif
set state to 0
End

Now, when you start the game, you'll receive a bear, and should he ever fall in battle, he will be resurrected roughly 5 seconds later (varies depending on last script execution)

"But wait, Riz! It won't spawn in game!"


Well, yeah, silly.

Step 9. Creating the quest. This part is incredibly simple. Open your quest menu by clicking the big 'Q' or going to 'Characters', 'Quests...'. Once open, right click the left pane and select 'New'. Name it uniquely, I named mine RizBearQuest. Now, on the right side, just give your quest a name, I did Riz Bear. Now in the Script section, click the dropdown and scroll to your script and choose it. Once done, hit ok and you are good to go.

Step 10. Load up Oblivion, enable your plugin and start your game. You will receive your summon and it will respawn every time it dies. Good job, you!

Edited by Rizalgar
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...