Jump to content

Recommended Posts

  • Replies 135
  • Created
  • Last Reply

Top Posters In This Topic

Posted

I think Convenient Horses has some kind of script latency test. But that only determines an overall speed for your system. I don't think there is anyway to determine how fast or slow your script(s) execute.

 

Why? Do you think it takes too long or something?

Posted

No, the only lag I've noticed with the mod has to do with debug messages queuing. ArctusZurin got the idea in my head when he was talking about this mod causing hard drive thrashing. I'm just interested in optimizing it.

Posted

Well, debug messages can take up more time than the actual processing. I have a mod I am updating where I used debug messages to let me know if one aspect was working properly. The processes had completed but I had a massive wall of text slowly displaying in the upper left corner. Debug.trace statements will be faster as they show only in the papyrus log. But removing all debug statements is best as none of those process will then run. In a nutshell, one step towards optimization is to use as few notification statements as possible.

 

As far as drive thrashing, I suppose it is possible. Tho it depends on what all else the user has running on their system. It can very well be the case that by itself it is fine but when added with other stuff things happen. Always seems to be the last mod added that people claim is the cause of their problems rather than realizing that perhaps they've simply put too much in for their system to handle.

Posted

The mod is basically done. Just debugging some things. Hoping to test and tweak this week and have second beta release ready for this weekend.

I may start a signature weapons mod after this one.

Posted (edited)

I need a clever way to make sure the RevokeBladeCheck only triggers once a day. I have this, but I realize now that if someone waits for 24 hours this logic will fail.

note: RevokeTemperedBladeCheck initializes at 0

  Reveal hidden contents

 

Edited by irswat
Posted (edited)

When the player first gets the weapons use GetCurrentGameTime and store the result in a variable. Then when checking to temper or revoke use it again to compare against the first.

i.e.

 

Float StartTime

Float CurrentTime

Float EndTime

Bool RunOncePerDay = false

 

;when player first gets weapon

StartTime = Utility.GetCurrentGameTime()

EndTime = StartTime + 1

 

;later during the check to temper or revoke within the current day

If Utility.GetCurrentGameTime() < (EndTime) && RunOncePerDay == false

RunOncePerDay = true

;if player waits too long

ElseIf Utility.GetCurrentGameTime() >= EndTime

RunOncePerDay = false

 

;and when tempering or revoking

StartTime = Utility.GetCurrentGameTime()

EndTime = StartTime + 1

 

EDIT: GetCurrentGameTime() uses game days, thus the adding of 1 to StartTime is 24 hours later. Added some more stuff as I thought about the logic a bit more.

Edited by IsharaMeradin
Posted (edited)

that's great to know! thanks I may just incorporate it into the current method, crude though it may be, to handles situations where a person waits for anything more than 23 hours.

Edited by irswat
Posted

I have some stupid bug in here and I can't find the cause.

So I add dawnfang to my inventory. I go get 12 kills. I get the (fine) tempered blade. I wait a couple hours until it is night. Then I wait 12 hours until it is day. The script returns and equips the (fine) dawnfang as it's supposed to, but it also adds an untempered dawnfang. If anyone is interested in helping me debug this I'll pm the plugin.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...