Jump to content

what is the most optimal way of applying scripts to weapons?


3aq

Recommended Posts

Recently, I've been getting into weapon scripting, the scripting portion is going fine and dandy, however just what exactly is the most optimal way of applying it though?

 

By that I mean it seems the process of applying it, the whole thing, seems very convoluted to me.

 

Appreciate any insight,

Edited by 3aq
Link to comment
Share on other sites

Depends on what you are trying to do.

- If you want the placed weapon to dance around when the player enters the room then attaching the script directly to the Object Reference is the way to go.

- If you want to hear "Ta Da !" every time the weapon is drawn then attaching the script to the weapon record would do it.

- If you are scripting for the Magic Effect so that things happen when using the weapon then you add the script to the Magic Effect record. The Magic Effect then goes onto an Object Effect (Enchantment) record and that goes onto the weapon record.

 

.... actually changing the draw sound would be easier than scripting the "Ta Da" - it's just example.

Edited by Jebbalon
Link to comment
Share on other sites

Got a script that grants your weapon a particular magic effect depending on the type of armor you are wearing (this is subjected to change)

 

the magic effect themselves are FF > self which is attached to a spell.. which is linked to an object effect that is applied via Magic effect FF > contact.

 

it's convoluted, but wait, there's more (and this is where I am stumbling)

 

I am unsure how to implement Perks and Keywords and Quest in to the mix, as I've seen various mods that uses a mixture of the three or even all 3.

 

What are the advantages? does one implementation gets read faster/ stabler than others?

Edited by 3aq
Link to comment
Share on other sites

They all process at roughly the same speed, definitely not discernable to the human eye anyway. As far as using them in script would be

 

Example.Haskeyword(keyword id) / == false

Example.IsQuestCompleted( quest id)/ == false

Example.HasPek(perk id) / == false

Or to check a quest specifially

Questname.GetStage(stagenumber)

Link to comment
Share on other sites

Okay...

I think what you are asking is how to get the script and effects onto the player and or weapon.

 

For that you want to use a Quest with an alias for the player.

Mark it for Start Enabled if you want it to apply from start of game. Or you'll have to have another way to start the quest.

Then attach the script to the Player alias. Or a perk if you have that set up.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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