Jump to content
KovaaK

Item Timer Trainer

Recommended Posts

This widget is designed to help players transition from using item timers to using only a game clock to time items.  If you are new to the game, I still fully encourage you to use Apheleon's Timer Timeline since it is a much better visual aid to let you focus on playing the game.

Options include:

  • Toggle whether to calculate based on if your game clock goes up or down
  • Enable or disable specific item types including: Red Armor, Yellow Armor, Green Armor, Mega, or Carnage
  • Option to hide minutes #

The idea is that you disable normal item timers and play with this on (perhaps only with Red and Mega shown), and try to get used to thinking in terms of "Red comes up at :14".  Then once you can get used to that, you can try to start calculating the times manually and disabling all timer widgets.

Note that in pre-match it functions exactly the same as the stock PickupTimers.lua, so you must have a gameclock going for it to act any differently.

nkaNdni.png

I tried to test this pretty thoroughly with respect to things like Overtime, so it should be good.  Let me know if you find any bugs though, or if you have any requests.

KovTimerTrainer.lua here.

Edited by KovaaK

Share this post


Link to post
Share on other sites

Hell yes! :D

 

Tested it and this is awesome!  Thanks for the tip about the warmup clock. That threw me off. Looking forward to training with this and weening off of the timer widgets altogether!

 

Thanks Kovaak!

Edited by frag'd

Share this post


Link to post
Share on other sites

When I use the timer during spec it doesn't work the same as when I am playing. If there is a way to fix that, I wouldn't mind.  

I'll also have to test this while watching server-side demos soon.

Edited by frag'd

Share this post


Link to post
Share on other sites

 

Note that in pre-match it functions exactly the same as the stock PickupTimers.lua, so you must have a gameclock going for it to act any differently.

​You can use the following hack to simulate a clock in warmup mode, requires that your fps are equal to your com_maxfps value:

local artificialTime = 0; -- defined in global scope
...
if world.gameState == GAME_STATE_WARMUP then
	local fps = consoleGetVariable("com_maxfps");
	local sgn = countUp and 1 or -1; -- count up or down

	-- increment/decrement time value tickwise
	artificialTime = artificialTime + 1 / fps * sgn;

	-- compute values for the clock
	minutes = math.floor(artificialTime / 60);
	seconds = math.floor(artificialTime % 60);
end
-- set clock to "minutes:seconds"
...

As used in my hud: http://www.reflexfps.net/forums/index.php?/topic/2342-hud-feedback-thread/&page=3#comment-21297

Share this post


Link to post
Share on other sites

​You can use the following hack to simulate a clock in warmup mode, requires that your fps are equal to your com_maxfps value:

Nifty and good to know.  Not sure I'll implement it though - since this widget isn't an actual clock, it would probably just confuse people.

Share this post


Link to post
Share on other sites

Would it be possible if you could make a widget along side this that states the time of item pickup, a la QL?

 

Cheers

Definitely would be possibly.  The lua variables that are exposed include game time as well as time until the item spawns.  It isn't too hard to work backwards from that to determine when the item was grabbed.

If you really want that done, I can take a look when I get some time.

Share this post


Link to post
Share on other sites

Here's a quick hack.  It basically looks at "time left until the item respawns" versus game clock, and goes back 25 seconds.  So, it can't work for mega without using a different method.  Also, it currently always shows the last pickup time until the item respawns, unlike QL.

A better way would be to have the widget looking for an increase in armor/health value that would correspond with the item being picked up.

Share this post


Link to post
Share on other sites

​You can use the following hack to simulate a clock in warmup mode, requires that your fps are equal to your com_maxfps value:

easier and does not require your fps to stay stable.

self being the widget's table so it's stored between draws.

self.time = (self.time or 0) + deltaTimeRaw;   -- increment a timer.
local seconds, minutes = math.floor(self.time), math.floor(self.time / 60);    --create seconds/minute values
nvgText(0,0,string.format("%02d", minutes) ..":" .. string.format("%02d", seconds));  -- print it in the middle of screen.

 

 

Share this post


Link to post
Share on other sites
On 31/1/2016 at 3:36 AM, face said:

Is there an updated version of this, doesn't seem to work anymore.

Replace line 165, "if not pickup.canSpawn then", with "if pickup.isOwnedByPlayer then" (no quotes), and it should work.

Share this post


Link to post
Share on other sites
On 3-2-2016 at 11:49 AM, matt_au said:

Replace line 165, "if not pickup.canSpawn then", with "if pickup.isOwnedByPlayer then" (no quotes), and it should work.

Still doesnt work for me.. I just get the regular timers to show and not the sexy training one...

Share this post


Link to post
Share on other sites

Ah I'm not sure what's going on then, sorry. Face told me it worked for him -- have you double-checked that you activated it properly? Also, are you aware that it's not supposed to be a drastic change (it just replaces the countdown timers with hh:mm timers), and it might not be different at all when you're in warmup mode?

edit: just noticed that my other post was pre-version 39, so it's possible some change in Reflex broke it again. It seems weird that it would break it in that particular way though (showing normal countdown timers), so do double-check that it's really activated

Share this post


Link to post
Share on other sites

Owh yeah it was in warmup, i feel stupid now.

I will check if it works later today when i have acces to my pc. Will report back.

 

EDIT: It works perfectly although a widget that only shows the order of the items spawning would be nice aswell.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×