Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Script Requests


Tonycubed2
 Share

Recommended Posts

I'm starting to work on a mod that causes an animal to appear skinned after you take it's pelt. I'm considering using the scripts from the Glenmoril Witches to accomplish this, but have no ideas what I'm doing with Papyrus. Any help would be really appreciated.

The idea is that on taking the pelt either the texture would update to the skinned version, or the game would delete the corpse and place a skinned container in its place. I'm not sure exactly how the game handles beheading the witches, but it seems like the perfect jumping off point.

Link to comment
Share on other sites

  • 2 weeks later...

I'm trying to disable the ability to use spells when a certain item is equipped. This is what I have.



ScriptName TIS_Ench_S_BonusMP_Corrupt Extends ObjectReference

{...Of Corruption}

Actor Player


Float StartMagicka

Float StartMagickaRate


Event OnEquipped(Actor akActor)

akActor = Game.GetPlayer()

Player = Game.GetPlayer()

StartMagicka = Player.GetAV("magicka")

StartMagickaRate = Player.GetAV("MagickaRate")

Player.ModAV("magicka", -(StartMagicka))

Player.ModAV("MagickaRate", -(StartMagickaRate))

EndEvent


Event OnUnequipped(Actor akActor)

akActor = Game.GetPlayer()

Player = Game.GetPlayer()

Player.ModAV("magicka", StartMagicka)

Player.ModAV("MagickaRate", StartMagickaRate)

EndEvent

Any ideas why it compiles, but won't fire in-game?

Link to comment
Share on other sites

Working on an alternative absorb effect, instead of using the spell to drain health points, i'd rather use the spell to drain by a percentage (30%) of the target's Max health. Here is what I have...

ScriptName TIS_Ench_S_AbsorbHP_3p Extends ActiveMagicEffect

{...Of The Leech}

Event OnEffectStart(Actor akTarget, Actor akCaster)

Float TargetMaxHealth = akTarget.GetAVPercentage("Health")

debug.trace("We got the target's max health!")

akTarget.DamageActorValue("Health", TargetMaxHealth * 0.3)

debug.trace("We damaged the target's health!")

akCaster.RestoreActorValue("Health", TargetMaxHealth * 0.3)

debug.trace("We healed the player the drained damage")

EndEvent

I tried to look at the logs, and it seems that the script never fires, but the effects of the magic effect that the script is attached to work. Any ideas?

  • Upvote 1
Link to comment
Share on other sites

You need to specify how you have the spell setup, what effects and their values they have, anything that has to do with the spell in question.

Also, the path you have the script attached to the spell and how the magic effect is setup.

Or you could upload your mod for people to look over to see if you did something wrong.

I would also remove the 'trace' and make it a message instead so you see immediatly if its working or not.

Debug.MessageBox("Hello, world!")

Link to comment
Share on other sites

Sure thing Willie,

This is the MagicEffect

http://i1271.photobucket.com/albums/jj638/Triple_Sixes/AbsorbMagicEffect.png

This is the Enchantment

http://i1271.photobucket.com/albums/jj638/Triple_Sixes/AbsorbEnchantment.png

This is the Weapon

http://i1271.photobucket.com/albums/jj638/Triple_Sixes/AbsorbWeapon.png

Here is the script that is being run, successfully(by that I mean it fires, but doesn't absorb), if I may add, since the debug.messagebox lines showed in-game.

ScriptName TIS_Ench_S_AbsorbHP_3p Extends ActiveMagicEffect

{...Of The Leech}

Event OnEffectStart(Actor akTarget, Actor akCaster)

Float TargetMaxHealth = akTarget.GetAVPercentage("Health")

debug.MessageBox("We got the target's max health!")

akTarget.DamageActorValue("Health", TargetMaxHealth * 0.03)

debug.MessageBox("We damaged the target's health!")

akCaster.RestoreActorValue("Health", TargetMaxHealth * 0.03)

debug.MessageBox("We healed the player the drained damage")

EndEvent

Also, is there a way I can just skip the magic effect nonsense and apply the script OnHit? or does that only work when the objectreference gets hit?

Edited by TripleSixes
Link to comment
Share on other sites

can one make a script that allows the pc to use up a dragon soul but gain the benefit of levelling up without levelling up (promts the augment stats+perk point)?

You can use ModAV to adjust the number of Dragon souls the player has.

ModAV also allows you to modify skill values without leveling up.

http://www.creationkit.com/Actor_Value_List

Link to comment
Share on other sites

Sure thing Willie,

What value is in your calculations? Add them to the messagebox displays.

Float TargetMaxHealth = akTarget.GetAVPercentage("Health")

debug.MessageBox("We got the target's max health!" + TargetMaxHealth)

If the '+' does not work, try & or &&. I cant remember who to add the strings together.

Link to comment
Share on other sites

What value is in your calculations? Add them to the messagebox displays.

Float TargetMaxHealth = akTarget.GetAVPercentage("Health")

debug.MessageBox("We got the target's max health!" + TargetMaxHealth)

If the '+' does not work, try & or &&. I cant remember who to add the strings together.

You solved my issue! Having used the value in the message box, I was able to see the inner workings of the script, and see that I'm not looking for the percentage, I was in need of the baseAV, having made that change, the script runs perfectly now!

@ Ansem

If you wanted to use the same principle for a gravity spell (like in the FF series) here you go:

ScriptName YourScriptNameHere Extends ActiveMagicEffect

{Absorbs Actor Value based on Target's Base/Max Value}

Float X = #.##; Put a number 0.00-1.00 (0.5 being 50% damage, 0.25 being 25% damage, 0.75 being 75% damage, etc.) damage=amount absorbed

String ActorValue = Health; Could replace with Magicka to get the osmose effect from ff7

Event OnEffectStart(Actor akTarget, Actor akCaster)

Float TargetAV = akTarget.GetBaseActorValue("ActorValue")

akTarget.DamageActorValue("ActorValue", TargetAV * X)

akCaster.RestoreActorValue("ActorValue", TargetAV * X)

EndEvent

But if you really wanted to get 100% accurate as it was in FF, replace GetBaseActorValue with GetAV (i'm not sure if this works, but it just makes sense).

Edited by TripleSixes
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

@pokemonshiny - It barely works for the player. You may need to look at existing werewolf NPCs, but I suspect it would not be an easy thing to do.

@Kellender - You will need to attach the perk properties to your script:

Perk Property SkillPerk01 Auto

Perk Property SkillPerk02 Auto

Then in an onactivate event, you would add those perks to the player.

Game.GetPlayer().AddPerk(SkillPerk01)

Game.GetPlayer().AddPerk(SkillPerk02)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...