Lua idea - budgeting

Lua idea - budgeting

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
RogerN
Posts: 238
Joined: 24 Jul 2006, 23:29

Lua idea - budgeting

Post by RogerN »

This is an idea I had, and I don't know if it's even possible with Lua... but I think it could reduce the micromanagement of building econ considerably and add a lot to the strategy element of the game.

Basically, I would like to have a widget/system which allows you to manage the stuff you're building by using a slider to devote a fixed percentage of your income to building more econ. The widget would track how much metal/energy was being spent on war vs. econ, and temporarily pause construction projects when needed in order to stay close to your budget. For example, I might set the slider to 30% econ, and the widget would pause my construction vehicles building solars or fusions periodically to make sure that at least 70% of my metal is going toward more tanks.

This way you can specify your budget strategy directly instead of trying to find the optimum number of builders to put on each task in order to meet your goals.

Is something like that even possible?
User avatar
Otherside
Posts: 2296
Joined: 21 Feb 2006, 14:09

Re: Lua idea - budgeting

Post by Otherside »

There is a widget in CA that does something vaguely similar to this.

Its called priority and it gives Labs/constructors or specific buildings a priority of what should be finished first.

So if you want to finish a fusion first but do not want to have to pause or cancel other projects just set priority to high and it will direct the majority of resources to the fusion.

It has 3 levels of priority High/Normal/Low

High is very useful on commanders and cons when expanding or wanting to rush defenses.

Its not exactly what your looking for i know but its similar and could be used as an idea for the widget you want.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Lua idea - budgeting

Post by manolo_ »

nice, could u post a link to it? i wanna try it out
YHCIR
Posts: 190
Joined: 12 Aug 2006, 23:06

Re: Lua idea - budgeting

Post by YHCIR »

OPs idea sounds like what CA has but better but more automated (and much more complicated).

Maybe someone could just hack together CAs widget and some script that just flips med/low/high priority based on the users selection on the slidebar.
e.g. 50% eco 50% defensive would set all tank/offensive builders to low and set some eco to high, some defensive to high.

Would also be cool if all units constructing mex were automatically set to high priority until they finish building, then revert.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Lua idea - budgeting

Post by TheFatController »

I initially wrote smart nanos so it would assist building with nanos only with excess resources if idle by using bursts, it ended up sending something rediculous like 2000 commands a minute with 15 nano turrets and 1 factory so I scrapped it.

Something like this would be better done in the engine.
User avatar
Tribulexrenamed
Posts: 775
Joined: 22 Apr 2008, 19:06

Re: Lua idea - budgeting

Post by Tribulexrenamed »

manolo_ wrote:nice, could u post a link to it? i wanna try it out
User avatar
Otherside
Posts: 2296
Joined: 21 Feb 2006, 14:09

Re: Lua idea - budgeting

Post by Otherside »

its somewere in CA go find it :p
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Lua idea - budgeting

Post by Beherith »

Heres a great way of implementing this. Its how I do it.
A lab has the buildpower of a basic con unit. If you assign two cons to your lab and have two making wind or adv solars in a large grid, then you have a 3:2 ratio of econ and army. After tekking use separate nanos for lab and eco and just queue up lots of shit for eco.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Lua idea - budgeting

Post by CarRepairer »

Beherith wrote:Heres a great way of implementing this. Its how I do it.
A lab has the buildpower of a basic con unit. If you assign two cons to your lab and have two making wind or adv solars in a large grid, then you have a 3:2 ratio of econ and army. After tekking use separate nanos for lab and eco and just queue up lots of shit for eco.
Or, instead of doing all that fun math just set the priority to high for whatever you want to build fastest gg lern2play.
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: Lua idea - budgeting

Post by yanom »

How about a lieutenant unit? it uses an AI program to give orders to whatever units are attached to it
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Lua idea - budgeting

Post by hoijui »

i see two main issues:
1. the one TheFatController mentoned: you have to make sure not to pause/unpause every frame -> reduce commands
2. you had to manually define or automatically evaluate what is eco and what is war.

then there may be problems with the GUI to use, but i have no idea about that.
Post Reply

Return to “Lua Scripts”