Jump to content

Scripting ingestibles


Pellape

Recommended Posts

SOLVED

I started to mod Morrowind 2004 and Oblivion 2006...  I thought myself as an OBSE (fose) guru by now, well I am not.  😕

I want to make something similar as the Doctor's Bag from FNV to F3 so I made it easy, added all limbs restore 100 to an Apple, as an Apple a day, keeps the doctor away right?  Well with so many effects attached, the game crash as soon as I hover the mouse over the apple so I decided to add a script instead and when using "magic effects", in my experiance, we just have to add 1s to the scripted effect and compile the script as an effect. Well, here comes the problems with F3 as it has no magic, compared to Oblivion. It is only possible to attach Object scripts to an ingestible, not effect scripts and honestly, I have never scripted potions in Oblivion, only made loads of scripted spells.

I used this script I did found at a wiki:

scn RestoreAllBodyPartsSCRIPT
begin ScriptEffectStart
        RestoreActorValue PerceptionCondition 100
        RestoreActorValue EnduranceCondition 100
        RestoreActorValue LeftAttackCondition 100
        RestoreActorValue RightAttackCondition 100
        RestoreActorValue LeftMobilityCondition 100
        RestoreActorValue RightMobilityCondition 100
end
begin ScriptEffectUpdate
        RestoreActorValue PerceptionCondition 100
        RestoreActorValue EnduranceCondition 100
        RestoreActorValue LeftAttackCondition 100
        RestoreActorValue RightAttackCondition 100
        RestoreActorValue LeftMobilityCondition 100
        RestoreActorValue RightMobilityCondition 100
end
begin ScriptEffectFinish
        RestoreActorValue PerceptionCondition 100
        RestoreActorValue EnduranceCondition 100
        RestoreActorValue LeftAttackCondition 100
        RestoreActorValue RightAttackCondition 100
        RestoreActorValue LeftMobilityCondition 100
        RestoreActorValue RightMobilityCondition 100
end

I first compiled it as an effect and it did not show up as a choice as a script at the apple form so I made it into an object script, tested onactivate, onequip and nothing seems to run this script when my char eats those delicious fresh apples, well onactivate would have worked if I dropped the apple at the ground. 😉

scn RestoreAllBodyPartsSCRIPT
begin OnEquip
        RestoreActorValue PerceptionCondition 100
        RestoreActorValue EnduranceCondition 100
        RestoreActorValue LeftAttackCondition 100
        RestoreActorValue RightAttackCondition 100
        RestoreActorValue LeftMobilityCondition 100
        RestoreActorValue RightMobilityCondition 100
end

But honestly, when we eat fruit, do we really equip it? -May I equip a banana please?

I did check all the begin, if I could find any that would fit, but????

MenuMode is a choice, but then, how would the script know I ate it?  😉   Condition: If eaten, set doOnce to 1   😄  Still, it needs to trigger when the player or actor starts to eat it.

It all seemed so simple at first, the first apple was made in a few minutes with GECK.

I also must add that I did add the player to the last script: player.RestoreActorValue bla 100

Edited by Pellape
Link to comment
Share on other sites

  • Recently Browsing   0 members

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