Jump to content

Recommended Posts

Posted (edited)

next update: Must get 12 kills every 12 hours to keep blade tempered. This should be fun.

there is another version of the dawn/dusk fang made by teh masterer, and after working on this so much I broke his on the first try. :-)

Edited by irswat
  • Replies 135
  • Created
  • Last Reply

Top Posters In This Topic

Posted (edited)

UPDATE:

patched up a potential "memory leak" in the ref alias inventory filter script. (palingard foresaw this and warned me but I didn't take his warning serious.)

  Reveal hidden contents



New function that will hopefully achieve the effect of removing the tempered blade if 12 kills are not achieved every 12 hours. I think I am going to write an MCM menu for this with a complex dynamic scaling for these blades that can be toggled for increased difficulty. However, the mod author doesn't want this to be the default setting so I will forgo it for now.

New function removes tempered blades if 12 kills are not achieved:

  Reveal hidden contents



I thought it was an efficient and novel approach to achieving the intended results that leverages the current dynamic of the script to keep this function simple.

 

  Reveal hidden contents



I'm calling this new function from the GetKillLevel function before tempering is calculated.

Edited by irswat
Posted

Out of curiosity...

Are the weapons supposed to lose all tempering if there aren't enough kills? I'd be a bit upset if I'd worked hard to get it to one step away from max and for whatever reason wasn't able to get that 12th kill in. Might be trickier to achieve but a gradual decrease in temper level may be worth considering.

Posted

I agree with Ishara, you could probably just implement the reverse tempering to drop the temper down incrementally for every 12 hours that doesn't achieve the proper kills. This is extremely important for players that play with mods like Living Takes Time, you can lose 12 hours just creating a couple of pieces of armor.

Posted

Like I said the mod author wants it a specific way and that's how I'm going to script it, but I think I will include an MCM menu with some options. It will give me a chance to learn how to make MCM mods too. Thanks for your help guys.

If this works I'm going to be very excited because I feel like it was a clever and efficient way to tackle the problem of implementing the feature post facto.

basically during the day it checks the number of kills you got the night before, and at night it checks the number of kills you got the day before. If not at least twelve it simply resets those variables. Although I will need to call the function somewhere else because the getkilllevel function is only called after a kill, so for example if the player simply has the blade in their inventory for days on end, the function to revoke the tempered blade will never trigger.

Posted

I thought you had an OnUpdate event somewhere that triggered the weapon swap between day and night versions. If so, that might be a good place to check if the weapon(s) need tempered or need un-tempered.

Posted (edited)

 

  Reveal hidden contents



that's basically what I did. Still need to test it.

Edited by irswat
Posted (edited)

I love when I break a script that was formerly working.

It was the case that I could take the dawnfang throw it on the ground, wait until night time, pick it up, and it would trigger the OnItemAdded event update causing the dawnfang to be removed and replaced with the duskfang. I received a report of hard drive thrashing by ZurinArctus which I guessed was caused by some sort OnItemAdded event loop, so I added a conditional statement to prevent the script from firing unless it is possible that the item added was one of the fang blades (either dawnfang, duskfang, or one of the tempered variants.) Since I added this conditional statement the OnItemAdded the script is no longer detecting when a fangblade is added to inventory, as such in the above described test the incorrect blade is not removed and replaced with the correct blade.

Also. I am concerned that the function I wrote to check a players whether a persistent temperedblade reference is in the players inventory. When I goto fill the property in the CK I have these two options:

  Reveal hidden contents



I'm not sure which option to choose, or whether I should choose none.

My concern is that palingard was correct earlier when he suspected this method would not work even though I am using the persistent reference flag for the tempered blade. I have a trick up my sleeve if this is the case, it involves moving the blades and putting them in a hidden container somewhere when they are removed, but I could use some help.

Here are the OnItemAdded ref alias script, and the function that determines whether a tempered blade is in the players inventory

  Reveal hidden contents


  Reveal hidden contents

 

Edited by irswat
Posted

If you will be assigning a variable with a value in script, you do not need to set it up as a property

 

i.e. Instead of

Form Property SomeForm Auto

you can do

Form SomeForm

 

If you are needing to reference that variable on another script, you will need to set it up as a property but you can hide it so that the CK doesn't see it.

i.e.

Form Property SomeForm Auto Hidden

 

That might help with the property question you had. As far as the other stuff, I'm not sure. I'm not seeing anything at the moment.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...