There ya go:
http://dmytry.pandromeda.com/tmp/lua_fo ... _build.lua
(rightclick, 'save target as', save into your LuaUI/Widgets folder)
edit: BrainDamage added XTA stuff.
edit2: Added BA energy generating structures.
What it does do: for example, you want to build metal extractor. When your cursor is over water, this widget will auto-switch to underwater metal extractor, when over land, to land metal extractor.
Mostly useful in combination with custom keybindings for common buildings - now you don't need separate keys for land and sea. Also saves time if you rarely play sea/land - if you click on land buildings by mistake, its alright.
To add support for other unit groups and mods:
Edit the 'unitlist' table. It consists of groups of equivalent units that are iterated through to find the unit that can be built. For example, first group lists all t1 mexes, land and sea.
Todo: also remove redundant entries from build menu?
Context Build - build sea or land stuff depending to context
Moderator: Moderators
Context Build - build sea or land stuff depending to context
Last edited by dizekat on 30 Jul 2009, 22:26, edited 2 times in total.
Re: Context Build - build sea or land stuff depending to context
Awesome idea, this sort of intuitive behaviour is one of the things spring has been missing for a long time.
Re: Context Build - build sea or land stuff depending to context
I don't really even play anymore and I think this is an awesome idea... Fewer buttons is always better in my opinion so I look forward to you figuring that out or Mod-designers implementing this feature as a gadget.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Context Build - build sea or land stuff depending to context
CA already implemented this as a gadget... only instead of implementing it as a gadget we just dropped the water buildings and made the land ones amph/float. Best non-gadget ever.SinbadEV wrote:I don't really even play anymore and I think this is an awesome idea... Fewer buttons is always better in my opinion so I look forward to you figuring that out or Mod-designers implementing this feature as a gadget.
Re: Context Build - build sea or land stuff depending to context
right, also cuts down number of models :/CarRepairer wrote:CA already implemented this as a gadget... only instead of implementing it as a gadget we just dropped the water buildings and made the land ones amph/float. Best non-gadget ever.SinbadEV wrote:I don't really even play anymore and I think this is an awesome idea... Fewer buttons is always better in my opinion so I look forward to you figuring that out or Mod-designers implementing this feature as a gadget.
Re: Context Build - build sea or land stuff depending to context
I'm getting spammed with "Can't build" or w/e from it but it still works.
In fact, I'm getting spammed with all sorts of info ingame. It's as if there's some sort of dbugging option set on.
I press my keybound keys, and it prints all the commands I have set to that key... When I press another key like Ins or Del, it will paste a load of crap....
I press stop, it will say "Stop".
Seriously, how do I turn this annoying thing off?
In fact, I'm getting spammed with all sorts of info ingame. It's as if there's some sort of dbugging option set on.
I press my keybound keys, and it prints all the commands I have set to that key... When I press another key like Ins or Del, it will paste a load of crap....
I press stop, it will say "Stop".
Seriously, how do I turn this annoying thing off?
Re: Context Build - build sea or land stuff depending to context
This is not working for spring spring_0.80.4.2 .
Re: Context Build - build sea or land stuff depending to context
This is nice, but I still like what CA did. It condenses your build menus as well.
Re: Context Build - build sea or land stuff depending to context
BD could u implement that tooREVENGE wrote:This is nice, but I still like what CA did. It condenses your build menus as well.