[1.0.0] Clock
Moderator: Moderator
[1.0.0] Clock
This adds a clock to the game in the Minimalist UI, that tracks turns, global speed, attack/move/spell/mind/summon speeds, and can calculate how much stuff you can do before timed effects tick down again (and other turn based stuff happens).  Based on this thread.
Download Link
Credits: a fairly large majority of the code in this came from Zizzo's Online Indicator addon. I hope that they don't clash, since they share so much code.
			
			
									
									
						Download Link
Credits: a fairly large majority of the code in this came from Zizzo's Online Indicator addon. I hope that they don't clash, since they share so much code.
Re: [1.0.0] Clock
Nice!
It seems to work with the OldRPG tileset's OldWood GUI.
			
			
									
									It seems to work with the OldRPG tileset's OldWood GUI.
Ghoul never existed, this never happened!
						Re: [1.0.0] Clock
Excellent. Using it I stumbled upon a bug I think: http://forums.te4.org/viewtopic.php?f=42&t=36875
Using gauntlets increases attack energy required by 10%.
			
			
									
									Using gauntlets increases attack energy required by 10%.
MADNESS rocks
						Re: [1.0.0] Clock
I really need to find a way of choosing the proper weapon for the attack time calculation.  It's a bug here, not in the game.
			
			
									
									
						- 
				Zizzo
- Sher'Tul Godslayer
- Posts: 2536
- Joined: Thu Jan 23, 2003 8:13 pm
- Location: A shallow water area south of Bree
- Contact:
Re: [1.0.0] Clock
Oh dear. Online Indicator was a monstrous hack, and people are reusing it?lukep wrote:Credits: a fairly large majority of the code in this came from Zizzo's Online Indicator addon. I hope that they don't clash, since they share so much code.
 [sound F/X:  source diving] Ah, I see, Clock is basically just Online Indicator with its tooltip replaced with yours.  Yeah, those will probably step on each other's toes, then; even apart from the potential problems with multiple addons superloading the same method, it would be a matter of which addon ended up in control of the tooltip hotzone.
  [sound F/X:  source diving] Ah, I see, Clock is basically just Online Indicator with its tooltip replaced with yours.  Yeah, those will probably step on each other's toes, then; even apart from the potential problems with multiple addons superloading the same method, it would be a matter of which addon ended up in control of the tooltip hotzone."Blessed are the yeeks, for they shall inherit Arda..."
						Re: [1.0.0] Clock
Well...it still beats my first few attempts, hijacking the activation for the orb of scrying, trying (and failing) to get a new item made and added at birth, and then hijacking the description of the "attack" talent.  The dialogue is quite easy to move anywhere, it's just finding a good place to put it that's the issue.
EDIT: Actually, I may end up moving it, the mouseover of your character in the UI looks like a decent place.
			
			
									
									
						EDIT: Actually, I may end up moving it, the mouseover of your character in the UI looks like a decent place.
Re: [1.0.0] Clock
Is the following routine from Archery.lua the sort of thing you need?lukep wrote:I really need to find a way of choosing the proper weapon for the attack time calculation. It's a bug here, not in the game.
Code: Select all
--- Check if the actor has a bow or sling and corresponding ammo
function _M:hasArcheryWeapon(type)
	if self:attr("disarmed") then
		return nil, "disarmed"
	end
	if not self:getInven("MAINHAND") then return nil, "no shooter" end
	if not self:getInven("QUIVER") then return nil, "no ammo" end
	local weapon = self:getInven("MAINHAND")[1]
	local ammo = self:getInven("QUIVER")[1]
	if self.inven[self.INVEN_PSIONIC_FOCUS] then
		local pf_weapon = self:getInven("PSIONIC_FOCUS")[1]
		if pf_weapon and pf_weapon.archery then
			weapon = pf_weapon
		end
	end
	if not weapon or not weapon.archery then
		return nil, "no shooter"
	end
	if not ammo then
		return nil, "no ammo"
	else
		if not ammo.archery_ammo or weapon.archery ~= ammo.archery_ammo then
			return nil, "bad ammo"
		end
	end
	if type and weapon.archery ~= type then return nil, "bad type" end
	return weapon, ammo
endMADNESS rocks
						Re: [1.0.0] Clock
Yes, but currently I would need to do self:hasArcheryWeapon(), self:hasDealWeapon()... self:hasXXXWeapon() if I want all of the bases covered.  There isn't a generic _M:hasWeapon() that I could find.
			
			
									
									
						Re: [1.0.0] Clock
Does this work with 1.1.5 or 1.2.0?
			
			
									
									
						Re: [1.0.0] Clock
Just so you know, Zirael, the Chronometer addon does still work fine as of 1.2.1. I don't know if that's the same addon with a different name or a completely different addon with the same goal, but I see you asked about that on it's own addon page (I was gonna link you to it but I guess you already found it  ).
).
In fact, I sometimes consider "adopting" the Chronometer by re-releasing it as a 1.2.1 addon -- I don't think any of the original coders are still active, and I wouldn't claim to have any credit to the code of it. Just to get it up higher on the addons list and on Steam Workshop.
			
			
									
									
						 ).
).In fact, I sometimes consider "adopting" the Chronometer by re-releasing it as a 1.2.1 addon -- I don't think any of the original coders are still active, and I wouldn't claim to have any credit to the code of it. Just to get it up higher on the addons list and on Steam Workshop.
Re: [1.0.0] Clock
My clock is placed in the very lower right hand corner, underneath the un-movable UI elements (the ones to lock/unlock UI elements, show game log, etc).
Is there a way to move it?
			
			
									
									
						Is there a way to move it?