Page 1 of 1

Nuke Button

Posted: 25 Jul 2009, 21:09
by very_bad_soldier
Displays a graphical button that informs you about loading progress of your nuke launchers.
Left-Click to select next nuke launcher.
Double-Click to actually aim with next nuke launcher.
Next nuke launcher is the one that has the most stockpiled nukes ready.

Compatible mods: CA,BA,XTA
(Others can be added by extending the internal unit list)

Idea by manolo_.

Download via SpringDownloader or at http://www.springinfo.info/?p=695.

Re: Nuke Button

Posted: 25 Jul 2009, 21:24
by hoijui
coool! :D

is the nuke icon hidden as long as you dont have nuke silos?
would be good i think, would make nukes/this part of the widget more special when it is visible.

also, when seeng this, i immediatly though on "the big red button" :D

maybe an other icon.. then, when you have like 4 or 5 nukes (in one or better multiple silos), you select a target for each of them...
and when you press the big red button, they all launch, and the widget plays Wagner (as in Apocalypse Now).

:D

Re: Nuke Button

Posted: 25 Jul 2009, 22:13
by very_bad_soldier
lol yeah, would be nice ;)

I would even have a proper icon for it (from my first try), looks a bit more "brutal" :mrgreen:

PS. Yes, button is only visible when you actually got at least one nuke silo.

Re: Nuke Button

Posted: 25 Jul 2009, 22:31
by hoijui
niiiice! :D

Re: Nuke Button

Posted: 26 Jul 2009, 10:28
by manolo_
thx :)

edit: suggestion: when i click on the nuke button, dont select the building, i want to have the attack command inserted

Re: Nuke Button

Posted: 26 Jul 2009, 10:30
by manolo_
double post

Re: Nuke Button

Posted: 26 Jul 2009, 20:32
by ChaosMonkey
i find it annoying that it shows allies nukes aswell

Re: Nuke Button

Posted: 26 Jul 2009, 21:59
by very_bad_soldier
manolo_ wrote:thx :)
edit: suggestion: when i click on the nuke button, dont select the building, i want to have the attack command inserted
This is considered a feature to protect yourself from nuking yourself by accident. Just double-click.
ChaosMonkey wrote: i find it annoying that it shows allies nukes aswell
oops yes. Its fixed hopefully, thx for the hint. Could not test the fix though.

Re: Nuke Button

Posted: 29 Jul 2009, 08:27
by manolo_
what about mininukes? ;)

Re: Nuke Button

Posted: 28 Aug 2009, 19:27
by thedude
How can I use it with other mods?
I added this lines to the widgetcode

Code: Select all

unitList["shortnameofmymod"] = {} --initialize table

unitList["shortnameofmymod"]["mysuperweapon"] = {}

But the Widget/Spring tells me "Unsupported Game, shutting down...".
Have I to change things in my mod like adding some files or else?

Re: Nuke Button

Posted: 28 Aug 2009, 19:58
by very_bad_soldier
Hm, thats the correct way to do it. But I did something stupid probably:
curModID = upper(Game.modShortName or "")
if ( unitList[curModID] == nil ) then
spEcho("<Nuke Icon> Unsupported Game, shutting down...")
widgetHandler:RemoveWidget()
return
end
I compare to the uppercase version of modShortName. So if your mods shortname is "myMod", try entering "MYMOD" in the table. I dont know why I did it in the first place frankly.

If it still doesnt work, maybe send me your mod and I will take a look.

Re: Nuke Button

Posted: 29 Aug 2009, 19:01
by thedude
Thx it works.
At first I tried to change the shortname of my mod (modinfo.tdf). When I started spring the shortname was the same as before. Only after replace the whole mod from the modfolder and starting spring again then exit spring and put the mod into the modfolder spring changed the name. Doesn't spring look on eveery start for the modnames or is there a bug? (I use 0.79.1.0)

Re: Nuke Button

Posted: 11 Sep 2009, 14:43
by NTG
it would be nice if clicking on button wouldn't select nuke launcher that already have attack command... otherwise, if you have 2 silos (or more) and launch first missile, you need to wait before nuke launches or manually select another silo :(
also, may i suggest to add a possibility to select all silos ready to fire?