Jump to content

Regen based on worn items


Recommended Posts

Posted

So here is the situation.

 

Currently my settings have 0 magickaratemult as default. To get any magicka regen I need to add it via potions, magic items, etc.

 

I have added it to some outfits, but more and more I feel like what I really want is for it to be added as long as I am wearing a cloth item in certain slots. 

 

particularly 32, 49, 33, and 37

 

The desired effect would be to add 20% magickaratemult per item worn in those 4 slots (for a max of 80%) as long as the item is cloth.

 

The questions is:

 

1. are there any mods that already do this? or something similar that can be altered like adds an effect that can be changed to magickaratemult (probably not but never hurts to ask)

 

2. What is the best way to go about doing this? I was thinking a perk or set of perks with a condition of has worn adding like magickaratemult 20%

 

sub-questions would this have to be 4 perks for each location? or is there a way to stack each condition thus getting the 20% per item? Is there a better way to do this?

 

I cannot script, so this all has to be CK (or better still xEdit)

 

 

 

Posted
12 minutes ago, Grey Cloud said:

Dunno but there are mage robes and whatnot which do this and you can enchant items to do it so could you not look at how such things do it?

That's how I am doing it now. 

 

I add the enchantment to the item. It works...

 

But what I want is something that incorporates all cloth items. so as long as the item worn is cloth I get the regen buff. 

Posted
14 minutes ago, Visio Diaboli said:

I think that'd require a script, but it should be a relatively easy one to make.

 

Give me like a half hour, I'll try since I need to get better with magic effects.

cool thank you

Posted

Slot 49? You've listed all of the main armor piece slots except helmet (which would be 31), and 49 which is unnamed.

 

Doesn't make a difference in programming it, I'm just making sure you listed the correct one.

Posted

Ahhh.... try this: <snip>

 

Sets GlobalVariable _FOC_SlotsPc based on the number of slots set in the mcm. 0.0 -> 1.0. Which can be used as conditions on a magic effect. If you are going to add a very large number of conditions/magic effects you might be better to create individual spells and add/remove them via script as every magic effect is present on the player whether or not it's condition is met (active/inactive).

 

Sorry @Visio Diaboli

Didn't want to say I was working on something in case I didn't come up with something. 

 

Note that this is NOT a finished thing!!

 

Note2: The slot monitoring is basically ripped from SLS bikini curse. As such it is 'lazy' like the bikini curse - Determining whether or not the curse should be active is not considered high priority. So there's delays. When testing, equip something, exit the inventory, wait 2 seconds. The variable should then update. 

Posted
11 minutes ago, Visio Diaboli said:

Slot 49? You've listed all of the main armor piece slots except helmet (which would be 31), and 49 which is unnamed.

 

Doesn't make a difference in programming it, I'm just making sure you listed the correct one.

I use a 

Top 32

Bottom 49

armor slotting system

 

I didn't want to include helms or circlets in the mix because I have a mod that unequips them outside of combat so they are not consistently worn. 

Posted
6 minutes ago, Monoman1 said:

Ahhh.... try this: Focus.7z

 

Sets GlobalVariable _FOC_SlotsPc based on the number of slots set in the mcm. 0.0 -> 1.0. Which can be used as conditions on a magic effect. If you are going to add a very large number of conditions/magic effects you might be better to create individual spells and add/remove them via script as every magic effect is present on the player whether or not it's condition is met (active/inactive).

 

Sorry @Visio Diaboli

Didn't want to say I was working on something in case I didn't come up with something. 

 

Note that this is NOT a finished thing!!

Hey if it works. This was beginning to take longer than I expected to be honest. You think creating a quest and player alias with equip/unequip item events that add/remove the spell when a cloth item is equipped/unequipped would have been optimal or is there a better way to do that?

 

That's what I was about to do but I don't know what hits performance and how hard too well yet.

Posted
13 minutes ago, Monoman1 said:

Ahhh.... try this: Focus.7z

 

Sets GlobalVariable _FOC_SlotsPc based on the number of slots set in the mcm. 0.0 -> 1.0. Which can be used as conditions on a magic effect. If you are going to add a very large number of conditions/magic effects you might be better to create individual spells and add/remove them via script as every magic effect is present on the player whether or not it's condition is met (active/inactive).

 

Sorry @Visio Diaboli

Didn't want to say I was working on something in case I didn't come up with something. 

 

Note that this is NOT a finished thing!!

Okay so now my brain feels like a freshly squeezed lemon... 

 

?

 

so that global variable could be used to activate a perk that did a magic effect?  

Posted
12 minutes ago, Visio Diaboli said:

Hey if it works. This was beginning to take longer than I expected to be honest. You think creating a quest and player alias with equip/unequip item events that add/remove the spell when a cloth item is equipped/unequipped would have been optimal or is there a better way to do that?

Yup that's basically what I did. It tries not to process every equip/unequip (though I'm not sure about that mechanism). Events can fire/get processed in ways you won't expect. And happen so fast that unless you were to delve deeper by adding lots of debugging you wouldn't really notice.

 

14 minutes ago, Visio Diaboli said:

That's what I was about to do but I don't know what hits performance and how hard too well yet.

For equip/unequip events I wouldn't worry too much. They're basically glacial as far as processing is concerned. Unless you're doing something mad on every event. 

Posted
13 minutes ago, Corsayr said:

so that global variable could be used to activate a perk that did a magic effect?  

Well I'd create a bunch of magic effects. Add them to a single spell. Then set the conditions on the spell to change between effects at certain values of the global. 

 

_FOC_SlotsPc         Magicka Mult

1.0                             100.0

>=0.75 & <1.0             75.0

>=0.5 & <0.75             50.0

>=0.25 & < 0.5            25.0

<0.25                            0.0

 

Here's a similar example of 'Jiggles' from SLS

 

Untitled.jpg.f6ab7f11197045a076db54277abe999c.jpg

Posted
12 minutes ago, Monoman1 said:

Well I'd create a bunch of magic effects. Add them to a single spell. Then set the conditions on the spell to change between effects at certain values of the global. 

 

_FOC_SlotsPc         Magicka Mult

0.0                               0.0

0.25                              25.0

0.5                                 50.0

0.75                              75.0

1.0                                100.0

 

Here's a similar example of 'Jiggles' from SLS

 

Untitled.jpg.f6ab7f11197045a076db54277abe999c.jpg

So something like this?

 

Spoiler

image.thumb.png.813852c862997ca675048a01bcb40e5a.png

 

Posted
3 minutes ago, Corsayr said:

So something like this?

Ah no. Conditions should be on the spell itself. Not on the magic effect. 

 

BTW. This kind of thing really is easier in the CK,

Posted
2 minutes ago, Corsayr said:

Would I add the has worn keyword cloth material condition to the quest alias? (to filter only cloth items)

Nope. I added checks via script. Also WornHasKeyword would check your entire character for the keyword. So if any slot was equipped with that keyword it would return true. 

Posted
11 minutes ago, Monoman1 said:

Ah no. Conditions should be on the spell itself. Not on the magic effect. 

 

BTW. This kind of thing really is easier in the CK,

So like this no global get value yet just laying out the effects

 

Spoiler

image.thumb.png.702508d80504a0f1baa9dc104ae57a27.png

 

Posted
4 minutes ago, Corsayr said:

So like this no global get value yet just laying out the effects

Yea. That looks ok. 

Just set flags: Disallow absorb, ignore resistance and no dual cast mods. Don't want the spell to just bounce off the player when applied. 

 

Don't think that last one would make any difference but I always set it on stuff like this. 

Posted
3 minutes ago, Corsayr said:

Then something like this for the first tier of magnitude .20?

Ah yea. Looks ok. You can fine tune it later. 

 

About your previous post. I'd question the purpose of a zero magnitude effect. If none of the conditions are met (<0.25) then none of the effects will be applied. It's a bit redundant. 

Posted
1 minute ago, Monoman1 said:

Ah yea. Looks ok. You can fine tune it later. 

 

About your previous post. I'd question the purpose of a zero magnitude effect. If none of the conditions are met (<0.25) then none of the effects will be applied. It's a bit redundant. 

okay great!  thanks

 

 

Posted

So test #1 was a fail 

 

The global value for _FOC_SlotsPC was correct but the items failed to produce magickateMult increase...

 

What is the exact test for cloth? keyword?

Posted
1 minute ago, Corsayr said:

So test #1 was a fail 

If the global is changing as expected then the problem must be on the spell. 

Ahhh. Stupid question but did you add the spell to the player? 

You can use mfg console to get an idea of what's going on. 

Posted
5 minutes ago, Corsayr said:

I did not add the spell to the player..

Couldn't count the number of times I've done that :P

 

If/when you finalize it I can add code to automatically add the spell to the player when the mod starts. Or via an enable/disable button.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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