Search

Search found 456 matches

by Niobium
16 Mar 2013, 03:25
Forum: Balanced Annihilation
Topic: custom formations lines do not look right (stipples spacing)
Replies: 4
Views: 1929

Re: custom formations lines do not look right (stipples spac

The implementation of the varying line spacing (stipple) is... not good. local _,zoomY = GetCameraPosition() zoomY = zoomY/470 --magic number with 20 units its 27 stipp with 30 its 39 local lineStipple = lineLength/((GetSelectedUnitsCount()-1)*zoomY) --TODO fix the pattern and rest of math -so that ...
by Niobium
26 Dec 2012, 15:29
Forum: Balanced Annihilation
Topic: Clear out your widget folders and solve bugs!
Replies: 23
Views: 3547

Re: Clear out your widget folders and solve bugs!

That would be a good solution. But where do you think should that version come frome? Widgets do not carry a version information in their headers. You can find some that encoded a version string inside their description in an arbitrary format but that will be very unreliable to parse Im afraid. Ofc...
by Niobium
26 Dec 2012, 11:50
Forum: Balanced Annihilation
Topic: Clear out your widget folders and solve bugs!
Replies: 23
Views: 3547

Re: Clear out your widget folders and solve bugs!

I imagine there are a lot of people playing with ancient copies of widgets who: won't see this post, won't be able to follow the technical steps, or just think the widget-related bugs they are experiencing are just nuances of the mod/engine. So a better solution to this would be to change the widget...
by Niobium
07 Dec 2012, 11:57
Forum: Lua Scripts
Topic: Wind Speed Display
Replies: 26
Views: 3584

Re: Wind Speed Display

Theres no need for any font handling whatsoever: gl.Text(format('%.1f', wind), iconWidth + 13, 15, MyFontSize) Only in tweak mode is easy, just add 'Tweak' to the callins: function widget:TweakMousePress(mx, my, mButton) function widget:TweakMouseMove(mx, my, dx, dy, mButton) Given someone has probl...
by Niobium
21 Oct 2012, 18:42
Forum: Balanced Annihilation
Topic: Teleportation Via Intruders
Replies: 18
Views: 3227

Re: Teleportation Via Intruders

I don't play any more so I'll give out one of my favorite intruder exploits. The exploit combines springs odd ground-transport mechanics with the intruders release-held-units-on-death to teleport crawling bombs into an enemies seemingly-safe base. Instructions: (The blue L shape is the intruder, the...
by Niobium
07 Oct 2012, 02:10
Forum: Lua Scripts
Topic: LEDZ widgets: nukeTracker.lua
Replies: 33
Views: 15169

Re: LEDZ widgets: nukeTracker.lua

Honestly? The entire thing :-/ However, making gui in chili is apparently the easiest thing you will ever do (one of the reasons why some lua people only make things that are compatible with chili). Are there actually things that interfere, as in things break in the widget and/or chilli if both are...
by Niobium
03 Oct 2012, 10:38
Forum: Lua Scripts
Topic: Correct callin to use for user events
Replies: 4
Views: 1184

Re: Correct callin to use for user events

Don't worry about optimizing the code, simply poll the players start position every time you may be interested in it (In a :Draw_ callin if you are going to be drawing something, or :Update_ for non-drawing work). A short bug-free widget that is easy to understand and maintain is much better than on...
by Niobium
23 Sep 2012, 14:02
Forum: Lua Scripts
Topic: Area Mex gadget support for multiple mexes
Replies: 8
Views: 1554

Re: Area Mex gadget support for multiple mexes

Same pattern as the other

Code: Select all

spGiveOrderToUnit(unitID, mexBuildCommandID, {orderedCommands[i].x,0,orderedCommands[i].z} , {"shift"})
Becomes

Code: Select all

TellUnitToBuildMexAt(unidID, orderedCommands[i].x, orderedCommands[i].z)
by Niobium
23 Sep 2012, 10:56
Forum: Lua Scripts
Topic: Area Mex gadget support for multiple mexes
Replies: 8
Views: 1554

Re: Area Mex gadget support for multiple mexes

That gadget is absolutely atrocious, it really should be deleted and rewritten for scratch. However, if you are after a quick fix. I'd replace the lines that look like this: spGiveOrderToUnit(unitID, mexBuildCommandID, {data.mex[i].x,0,data.mex[i].z} , {"shift"}) With an appropriate call t...
by Niobium
08 Sep 2012, 14:59
Forum: Balanced Annihilation
Topic: Suggestion
Replies: 15
Views: 2162

Re: Suggestion

There's a couple of concerns with the general idea of reducing com wreck metal: It reduces the risk when using com as a bomb -> more combombs It reduces the reward for killing an enemy commander -> less motivation to attack commanders/armies with a commander It makes teching slower and more difficul...
by Niobium
13 Aug 2012, 09:59
Forum: Lua Scripts
Topic: CustomFormations +1
Replies: 1
Views: 1144

Re: CustomFormations +1

Appears to be a bug that was solved in the main custom formations widget long ago.

Replace line 757

Code: Select all

if (#fNodes == 1) then
With

Code: Select all

if fDists[#fNodes] < 20 then
by Niobium
08 Aug 2012, 11:17
Forum: Balanced Annihilation
Topic: Brainstorm - How to mitigate the effect of cheap scout spam
Replies: 66
Views: 10016

Re: Brainstorm - How to mitigate the effect of cheap scout s

Imo the best solution is to allow AA to fire at land scouts. Long-range weapons Fast-moving projectiles Tracking projectiles All the above means AA are the perfect units for destroying scouts before they enter the range of your other units and bait their shots. Low collateral/side-effects Compared t...
by Niobium
15 Jul 2012, 07:00
Forum: Balanced Annihilation
Topic: BA relevant info about Spring 89
Replies: 28
Views: 7738

Re: BA relevant info about Spring 89

There is a new lock on target feature of units retaining their target after getting a move order , but it has some small issues: ... 2. If a unit is ordered to attack another unit, and the target goes out of range, the unit stops aiming and shooting at any other unit . 3. There is no visual indicat...
by Niobium
09 Jun 2012, 03:42
Forum: Balanced Annihilation
Topic: [SOLVED] hotkeys for ships
Replies: 7
Views: 1266

Re: hotkeys for ships

It's simple: Ships can't build anything that is on the hotkey (It's all land units), so the hotkey doesn't do anything. Solutions are all modside: - Add land variant to ships buildorders (odd) - Add underwater variant to toggle (which would then need to be toggled through for units that can build bo...
by Niobium
27 May 2012, 00:29
Forum: Lua Scripts
Topic: How to: Set text colour (color) for markers/messages
Replies: 6
Views: 1673

Re: How to: Set text colour (color) for markers/messages

Niobium, your points are very true. A bit cutting though. It may be a bit wrong but you don't have to lambast anyone over it. I don't know or care who wrote the code. My post says nothing about anyone, just the quality of the code. I'm not interested in who is a good or bad at coding, or who is bet...
by Niobium
26 May 2012, 06:33
Forum: Lua Scripts
Topic: How to: Set text colour (color) for markers/messages
Replies: 6
Views: 1673

Re: How to: Set text colour (color) for markers/messages

To be more general, see the color2incolor and incolor2color functions here: http://code.google.com/p/zero-k/source/browse/trunk/mods/zk/LuaUI/Widgets/chili/Headers/util.lua Wow, that code sucks. It has almost as many problems as lines. For reference: function color2incolor(r,g,b,a) local colortable...
by Niobium
07 May 2012, 09:04
Forum: Game Development
Topic: Invulnerable units
Replies: 4
Views: 1081

Re: Invulnerable units

Relevant:
Spring.SetUnitNeutral(number unitID, boolean neutral) -> nil
by Niobium
04 May 2012, 13:48
Forum: Lua Scripts
Topic: Unit Custom Range Rings Widget
Replies: 20
Views: 3344

Re: Unit Custom Range Rings Widget

What it would look like in the other structure, missing any optimization of course: local ringsDefs = { [UnitDefNames.armcom.id] = { { color = {1, 1, 1, 0.25}, radius = 350 }, { color = {1, 1, 0, 0.5}, lineWidth = 2, radius = 250 }, }, } local ringedUnits = {} function widget:Initialize() for _, uId...
by Niobium
04 May 2012, 12:14
Forum: Lua Scripts
Topic: Unit Custom Range Rings Widget
Replies: 20
Views: 3344

Re: Unit Custom Range Rings Widget

Don't use pairs either. Keep track of two tables, one indexed by unitID and the other iterable. These tables need references to each other to handle delete operations. Ugh... Do not follow this advice. This pattern leads to large, ugly, unreadable, hard to understand, hard to maintain, bug prone co...

Go to advanced search