Prospector v1.9
Moderator: Moderators
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Prospector v1.9
Prospector
This widget calculates the amount of metal a mex will extract when you're about to build it. Doesn't account for spots being already occupied. Nothing fancy. May optimize/merge into another widget later.
Version History:
v1.9
Now displays extraction pre-game when metal map is on instead.
v1.8
Fixed bug where pregame circle was not being drawn level with the ground.
v1.7
Now displays extraction pre-game when Shift is held.
v1.4
Hack to get around broken gl.GetTextWidth. Tooltips should have properly-sized backgrounds now.
v1.2
Fixed for new Spring, a few optimizations.
v1.1
Fixed for even footprints.
v1.0
First forum release.
Get it from caspring: http://trac.caspring.org/browser/trunk/ ... pector.lua
Dev Notes
As with all my widgets, several of the major config variables are at the top.
Pregame extraction display looks for a unitname="armmex". If there is no such mex, it uses the weakest mex (i.e., lowest positive extractsMetal).
This widget calculates the amount of metal a mex will extract when you're about to build it. Doesn't account for spots being already occupied. Nothing fancy. May optimize/merge into another widget later.
Version History:
v1.9
Now displays extraction pre-game when metal map is on instead.
v1.8
Fixed bug where pregame circle was not being drawn level with the ground.
v1.7
Now displays extraction pre-game when Shift is held.
v1.4
Hack to get around broken gl.GetTextWidth. Tooltips should have properly-sized backgrounds now.
v1.2
Fixed for new Spring, a few optimizations.
v1.1
Fixed for even footprints.
v1.0
First forum release.
Get it from caspring: http://trac.caspring.org/browser/trunk/ ... pector.lua
Dev Notes
As with all my widgets, several of the major config variables are at the top.
Pregame extraction display looks for a unitname="armmex". If there is no such mex, it uses the weakest mex (i.e., lowest positive extractsMetal).
Last edited by Evil4Zerggin on 23 Jan 2009, 21:07, edited 11 times in total.
Re: Prospector v1.0
cool pies! I've gotten used to the widget that tells you how much m you reclaim, this will be just as indispensable.
Re: Prospector v1.0
nice idea, but the background of the font isnt used for the whole length of the font
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Prospector v1.0
Yeah, the background thing is a bit wierd; I'm already making its width equal to gl.GetTextWidth times a correction factor, but the necessary correction factor seems to vary from machine to machine. In any case, you can change TEXT_CORRECT_X in the file itself to change the background width (I think Licho used 2.1, while 1.75 works on my current machine).
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: Prospector v1.0
I haven't tried it so not sure if its a big deal or not but you could probably cache the result of 'IntegrateMetal' and update it a few times a second rather than each frame, looks good tho :)
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Prospector v1.0
Yeah, it's a pretty unoptimized widget. I'd probably put in a MouseMove callin, check if I need to update, and cache the result. Maybe after I finish working on SWIW's weapon CEGs :p
Re: Prospector v1.0
What about S44's CEGs!? 

Re: Prospector v1.0
WZ 1v1 Flozi to determinate on who's cegs zerg works on 

- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Prospector v1.1
Fixed for mexes with even footprints.
As for CEGs, the later you get your CEGs, the more experience I'll have by then :p
As for CEGs, the later you get your CEGs, the more experience I'll have by then :p
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Prospector v1.2
Fixed for new Spring; unitDef.ysize got renamed to unitDef.zsize. Also a couple optimizations.
Re: Prospector v1.2
I can see this replacing easymetal...
Re: Prospector v1.4
request:
situation: when u play an unknown map and u dont know what a metalspot gives as M-output(before choosing startpositions). with this lua u will see the m-output (for normal metal spots, not metal areas) while choosing the startpos.
situation: when u play an unknown map and u dont know what a metalspot gives as M-output(before choosing startpositions). with this lua u will see the m-output (for normal metal spots, not metal areas) while choosing the startpos.
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Prospector v1.7
Good idea. Done. Hold Shift pregame to see.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Prospector v1.2
No, they're two completely different things that can complement eachother.MidKnight wrote:I can see this replacing easymetal...
Re: Prospector v1.7
seems to be a bug there:
while holding shift (in the startpos-phase) the circle isnt on the right place
while holding shift (in the startpos-phase) the circle isnt on the right place
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Prospector v1.8
Ah, I see, it wasn't being drawn at ground level. Fixed.
Re: Prospector v1.8
Hi,
can the shift key replaced with other key ?
It is a little bit confusing by fast scrolling [with shift pressed]
And btw. great Widget
Regards
R-TEAM
can the shift key replaced with other key ?
It is a little bit confusing by fast scrolling [with shift pressed]
And btw. great Widget

Regards
R-TEAM
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Prospector v1.9
I've changed it so that it displays automatically when you're looking at the metalmap pregame.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Prospector v1.0
But the mod they must 1v1 in has to be one of emmanuel's mods.Hoi wrote:WZ 1v1 Flozi to determinate on who's cegs zerg works on
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: Prospector v1.9
En Garde!

