Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

How do I get a Destruction spell to grant Destruction experience? I'm using a life drain effect on the spell I'm working on, and it's more than a little annoying that it can't do anything with regards to leveling up Destruction.

Make sure the type of your life drain MGEF is a Destruction type. There's a drop down somewhere for that. I believe you can also choose some stuff by clicking on the MGEF in your spell entry and editing the options below the MGEFs table.

Link to comment
Share on other sites

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

 

How do I get a Destruction spell to grant Destruction experience? I'm using a life drain effect on the spell I'm working on, and it's more than a little annoying that it can't do anything with regards to leveling up Destruction.

Make sure the type of your life drain MGEF is a Destruction type. There's a drop down somewhere for that. I believe you can also choose some stuff by clicking on the MGEF in your spell entry and editing the options below the MGEFs table.

 

The making sure it's set as Destruction was done quite a while ago. In any case, I think I've found what's wrong, so nevermind!

Link to comment
Share on other sites

 

 

How do I get a Destruction spell to grant Destruction experience? I'm using a life drain effect on the spell I'm working on, and it's more than a little annoying that it can't do anything with regards to leveling up Destruction.

Make sure the type of your life drain MGEF is a Destruction type. There's a drop down somewhere for that. I believe you can also choose some stuff by clicking on the MGEF in your spell entry and editing the options below the MGEFs table.

 

The making sure it's set as Destruction was done quite a while ago. In any case, I think I've found what's wrong, so nevermind!

 

And it was...?

Link to comment
Share on other sites

 

Scriptname ElloPerkScavenger extends activemagiceffect


Int Property NewAmount Auto
FormList Property RecipeList Auto
{A formlist of ConstructibleObject records aka Recipes}

Event OnEffectStart(Actor akTarget, Actor akCaster)
Int Index = 0
Int RLSize = RecipeList.GetSize()
While Index < RLSize
ConstructibleObject Entry = RecipeList.GetAt(Index) as ConstructibleObject
Entry.SetResultQuantity(NewAmount)
Index += 1
EndWhile
EndEvent

 

 

Would it be possible to edit this script so that it gives a different extra item when smelting? Eg: 1 iron ore = 1 iron ingot + 1 LItemGems10? Or would there be a better way of doing it? I looked at the MineOreScript but that is a little too complicated to change and add to the smelter (for me, anyway).

Link to comment
Share on other sites

 

Scriptname ElloPerkScavenger extends activemagiceffect

 

 

Int Property NewAmount Auto

FormList Property RecipeList Auto

{A formlist of ConstructibleObject records aka Recipes}

 

Event OnEffectStart(Actor akTarget, Actor akCaster)

Int Index = 0

Int RLSize = RecipeList.GetSize()

While Index < RLSize

ConstructibleObject Entry = RecipeList.GetAt(Index) as ConstructibleObject

Entry.SetResultQuantity(NewAmount)

Index += 1

EndWhile

EndEvent

 

 

Would it be possible to edit this script so that it gives a different extra item when smelting? Eg: 1 iron ore = 1 iron ingot + 1 LItemGems10? Or would there be a better way of doing it? I looked at the MineOreScript but that is a little too complicated to change and add to the smelter (for me, anyway).

Find the formlist and change the entries, I imagine.

Link to comment
Share on other sites

I guessed that part - but what would I change this line to, so that when I smelt I get two different items the original one stated in the recipe, plus one, unchanging, new one (LItemGems10)?

 

Entry.SetResultQuantity(NewAmount)

 

The CK only gives the possibility of creating 1 type of item.

 

I've no idea what commands I can use or how to use them, but if I had to guess I'd say something like

 

Entry.SetResultItem1(OldItem)

Entry.SetResultItem2(LItemGems10)

 

But I'd probably be completely wrong. But that's what I want it to achieve.

Link to comment
Share on other sites

The furniture workstations using the constructibleobject recipes can output only a single object.

 

Theoretically you might be able to use SetResult to change the created object to a formlist. But I have no idea if that would even work. The CK won't offer formlists when filling the result object. So the game engine may crash when trying to do so.

 

You could get away with creating unique objects that are used as the recipe results and have a script running on the player alias which looks for those unique objects and replaces them with the items that you want the player to actually have.

Link to comment
Share on other sites

What about a leveled item? 1 definite iron ingot, and then a LItemGems10 within 'ElloLItemIngotGem10' EDIT: I'm guessing no, because it won't show up at the smelter.

 

So you think perhaps a script that runs a check to see if the player is at the smelter, and then when an ingot is added, do an additem to the player? Can that be done on a chance basis, or be a levelled item? Like if the leveled item is a list of gems with only a 10% chance of receiving one?

 

Perhaps something similar to this, but without the chance, perhaps using a formlist of ingots, and the check for the smelter?

 

 

To give you a head start (i.e. something to look at as you learn what you need to do)

 

The following script compiles. It has not been tested to see if it actually works. It uses a random float between and including 0.0 and 1.0 instead of a random integer. Random values at or below .7 (70%) leave you with the "dud" weapon (the "dud" weapon is the one crafted by the recipe). Random values above .7 takes the "dud" weapon away and gives you the "decent" weapon.

 

It would be assigned to a player alias. (see sub-section Set Up a Reference Alias). It can be either a start game enabled quest or one that you start and leave running for as long as you want this process to be available.

 

 

ScriptName DudOrDecentWeapon Extends ReferenceAlias

Weapon Property DudWeapon Auto ;this is the weapon created by the crafting recipe
Weapon Property DecentWeapon Auto ;this is the weapon that has the fire resistance and fire damage

Event OnInit()
AddInventoryEventFilter(DudWeapon)
EndEvent

Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
If akBaseItem == DudWeapon
If Utility.RandomFloat(0.0,1.0) > 0.7
Self.GetReference().RemoveItem(DudWeapon,1,true) ;the true makes it so that there is no notification of removal
Self.GetReference().AddItem(DecentWeapon,1,true) ;the true makes it so that there is no notification of adding
EndIf
EndIf
EndEvent

 

 

Edited by Ellorienne
Link to comment
Share on other sites

I'm going to pretend that I know a little about scripting (I tried :ermm: )and ask if this comes close to what I might need? (once again I'm mashing together bits I've seen that do the parts that I need. Eventually I'll get closer to understanding what it all does and what I need to do...).

 

 

Scriptname ElloAddImproverScript extends ObjectReference

LeveledItem Property ElloLItemImprovers10 Auto

MiscObject Property IngotIron Auto

Event OnLoad()
BlockActivation(true)
endEvent

Event OnUnload()
; safety measure
UnregisterForEvents()
endEvent

auto STATE normal
Event OnActivate(ObjectReference akActionRef)
gotoState("busy")
; debug.trace(self + "OnActivate")
if akActionRef == Game.GetPlayer()
RegisterForEvents()
; ; debug.trace(self + "player activation START")
Activate(akActionRef, true)
; ; debug.trace(self + "player activation END")
else
; ; debug.trace(self + "NPC activation START")
; just activate it
Activate(akActionRef, true)
; ; debug.trace(self + "NPC activation END")
endif
gotoState("normal")
endEvent
endState

STATE busy
; do nothing
endState

Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
If akBaseItem == IngotIron
Self.GetReference().AddItem(ElloLItemImprovers10,1,true)
EndIf
EndEvent

bool isRegisteredForEvents = false

function RegisterForEvents()
; centralize this
isRegisteredForEvents = true
RegisterForAnimationEvent(Game.GetPlayer(), "AddToInventory")
RegisterForAnimationEvent(Game.GetPlayer(), "IdleFurnitureExit")
endFunction

function UnregisterForEvents()

 

Edited by Ellorienne
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...