Jump to content

Scripting trouble


Highlord90

Recommended Posts

I created this script using a tutorial I found online-

 

scriptname MyFirstSpellScript
short updateCount
Begin ScriptEffectStart
RemoveAllItems
End
Begin ScriptEffectUpdate
set updateCount to updateCount + 1
End
Begin ScriptEffectFinish
Message "Spell is finished. ScriptEffectUpdate was run %.Of times," updateCount
End
And put in with a shield spell that had-

 

30 seconds long

300 shield points

 

but when I tried to use it with player.addspell and keyed in the ID it wouldn't work. It was basically the same message I got from keying a random ID that didn't exist so why wont it recognize my spell?

 

I'm currently working on mod that requires holy magic so I wanted to make the fireball/damage health spells look like I was casting an alteration spell like shield just for immersions sake. If anyone can at least tell me how to do that then that would be great but I'd like to know why it wouldn't accept this (apparently) basic script.

Link to comment
Share on other sites

For one, in case you entered the so-called EditorID, the nice human-readable string your can see and use everywhere inside the CS, the game doesn't know this one. It only knows the so-called FormID, the hexadecimal numeration.

For two, if you did use the FormID, make sure the 1st two of the 8 digits resemble the plugin's place in load order. They are different every time you load the plugin with the CS, unless you also load all other plugins and masters from your load order at the same time. You can easily read up the hexadecimal number of the place in Wrye Bash though, called "mod-index" there, if I'm not mistaken.

 

So, if you tried to call "player.addspell MyFancyNewSpell", it will absolutely never ever work.

If you tried "player.adspell 0000347a", it's likely not correct, because the "00" before the "00347a" cannot be the place of this plugin in load order. "00" is for Oblivion.esm. "0100347a" is also unlikely, unless the plugin actually is on 1st place right after the master.

Link to comment
Share on other sites

Here's the form ID, I wrote it out exactly like this but it didn't work

 

01000ED3

 

The esp is active to put the spell into the game and I followed the tutorial to the letter so what the heck is going on >.<

Link to comment
Share on other sites

Like I said, this FormID is only valid, if your plugin is at the absolute 1st place right after Oblivion.esm, no other ESMs or ESPs allowed to come before it.

 

The first two digits "01000ED3" tell which plugin/master in your load order the Form is to be found in.

 

If your plugin is at, say, 4th place, the FormID you'll have to use likely will be "04000ED3".

And keep in mind this is a hexadecimal value, so if your plugin is at the 10th place, the FormID likely will be "0A000ED3", NOT "10000ED3", which will reference the plugin/master at the 16th place.

 

But like I also said, it's best to just 'read up' the proper 'mod index' with a tool like Wyre Bash. It could be there's exceptions to the index being the actual # of the place in load order for certain plugins or masters. The tools will know.

 

And the CS is giving you a "01...", because this is the only plugin you loaded into it, thus at place 1 as far as the CS is concerned. This will not be its place when inside your game though!

 

 

Hope I'm making sense now and you'll figure it out. Merry Christmas and Happy Seasons!

Edited by DrakeTheDragon
Link to comment
Share on other sites

  • Recently Browsing   0 members

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