Author Topic: Suspend spending if resources less than X  (Read 5990 times)

Offline tadrinth

  • Hero Member
  • *****
  • Posts: 507
Suspend spending if resources less than X
« on: September 28, 2016, 04:49:20 pm »
Well, since there's an interface forum, and there's no mention of this feature in the design doc so far as I can tell, and since it's one of my favorite features:

AIW1 has a feature where you can prevent spending on a control group unless you have at least X metal.  EG:
* You set a space dock to be in control group 1
* You set the space dock to loop build fighters (which are automatically put into group 1)
* You go into CTRLS and set X to be 100k

If you have less than 100k metal:
* The space dock won't make fighters
* Any fighters in group 1 that are damaged will be ignored by your engis

Otherwise, everything works as normal.

Things you can do with this:
* Always keep some metal in reserve for if you need to build something in a hurry (like a pile of turrets in a new colony).  If all your constructors are in control groups with X set to at least 200k, then even if you take heavy losses and need to refleet, you'll always keep at least 200k back for plopping down turrets.
* Channel excess metal into big projects: put your broken golems into control group 9, and set X to 1.9 million metal.  Put your highest priority golem into group 8, with X at 1.8 million.  Now you can leave all your golems set to build, any excess metal you have will go to building your next golem, and once it finishes, your excess metal will instead flow to the rest of your golems.   
* Deprioritize less critical ships like raid starships and scouts.  Maybe I want to build triangle ships, then frontline starships, then raid starships, then scouts; just put their constructors into control groups and set their X values to 100k, 200k, 300k, and 800k, and they'll always be built in that order.

It's a bit clunky tabbing through all the different control groups, though.  I think having one page for all the control groups would be easier.  And rather than an absolute metal number, having a slider for a percent of total metal to reserve would be easier to use.  IE, you can tell control group 1 to suspend spending if you're at less than 5% of your total metal. 

Offline kasnavada

  • Hero Member Mark II
  • *****
  • Posts: 986
Re: Suspend spending if resources less than X
« Reply #1 on: September 28, 2016, 05:16:25 pm »
* Any fighters in group 1 that are damaged will be ignored by your engis
And if that part could... not be. Or parametrized... I'd be happy.

Offline tadrinth

  • Hero Member
  • *****
  • Posts: 507
Re: Suspend spending if resources less than X
« Reply #2 on: September 28, 2016, 08:22:38 pm »
Yeah, good point.  I almost always want my engis to repair stuff.

However, there are exceptions.  If you capture a Mark V Ion Cannon and it takes any damage, it costs so much metal that the repairs can easily drain your economy.  I suspect repairing golems can break the bank pretty well also. 

Don't have a good solution; I would favor handling the default case and just making the repair costs not break the bank.


Offline Pumpkin

  • Hero Member Mark III
  • *****
  • Posts: 1,201
  • Neinzul Gardener Enclave
Re: Suspend spending if resources less than X
« Reply #3 on: September 29, 2016, 01:40:30 am »
That's an excellent idea to bring out.
I always put my mercenary space dock on "auto-hire when exceeding metal" and slowly build my own strategic reserve through the game. Using that for superweapons (and Trader's goodies) is also a neat option.

I have a humble suggestion: make it doesn't depend on control groups might be a good idea. Maybe it would be a per-spacedock tuning, or it could be a per-unit global tuning. Players could do things like you describe: triangle > starships > scouts, etc, and every space dock in the galaxy would automatically respect that.
Please excuse my english: I'm not a native speaker. Don't hesitate to correct me.

Offline Timerlane

  • Jr. Member
  • **
  • Posts: 51
Re: Suspend spending if resources less than X
« Reply #4 on: September 29, 2016, 11:39:47 am »
Yeah, good point.  I almost always want my engis to repair stuff.

However, there are exceptions.  If you capture a Mark V Ion Cannon and it takes any damage, it costs so much metal that the repairs can easily drain your economy.  I suspect repairing golems can break the bank pretty well also. 

Don't have a good solution; I would favor handling the default case and just making the repair costs not break the bank.
For Engineers at least, there already is the global 'Engineers Do Not Assist Large Projects' value in the Controls section(which I believe, is based on the build rate of the unit, listed next to the metal cost). That basically lets you exclude Superweapons from auto-repairs(though the game seems to ignore this with the Botnet Golem).

Offline tadrinth

  • Hero Member
  • *****
  • Posts: 507
Re: Suspend spending if resources less than X
« Reply #5 on: September 29, 2016, 01:39:29 pm »
For Engineers at least, there already is the global 'Engineers Do Not Assist Large Projects' value in the Controls section

The problem with 'don't assist large projects' is that it isn't really obvious what value to set it to, because the per-second metal costs aren't clear from the unit tooltips.  I have no idea where to set that value to get them to do what I want, so I set it to zero and rely on control groups instead.  This does occasionally result in my econ tanking if I capture something expensive and forget to put it into a control group. 

I have a humble suggestion: make it doesn't depend on control groups might be a good idea. Maybe it would be a per-spacedock tuning, or it could be a per-unit global tuning.

Can you tell me more about why this might be a good idea?

Making it per-unit sounds tremendously fiddly; AIW2 might have fewer unit types than AIW1 but that still sounds like a lot of sliders to set. if it's per-category, that might work.  If it's per-space-dock, you can't use it to control spending on things like repairing golems and building Zenith Trader goodies, which is a big disadvantage.

Offline Sestren

  • Newbie Mark III
  • *
  • Posts: 32
Re: Suspend spending if resources less than X
« Reply #6 on: September 29, 2016, 05:15:26 pm »
Per unit is less fiddly if your settings can be saved and reloaded from file every game (how CTRLS works now). Then, unless you are deviating heavily from your normal strategy, you only have to set things up once. Per category doesn't allow specific unit exceptions (really prioritizing one kind of unit due to some strategy) and a toggle makes everything harder to understand. I don't see that as a problem because most of the features discussed here are fairly advanced anyway (hell I didn't know about half of them until I read this thread but now I want to use them). The reason to not make it dependent on control groups is that 1) control groups take time to manually set up every game and 2) you have a finite number of them, which can be a problem if you already have a habit of using them for other purposes.

Per second metal costs are listed in the tooltip right next to the total metal cost. Actual build rate and metal per second used is (1+number_of_engineers*mark_of_engineers)*cost_per_second. The problem I have with that setting is that while I don't want to spontaneously start spending metal on new construction projects, I absolutely want to keep my existing stuff repaired and it doesn't distinguish the two in the case of superweapons and the like.

Offline tadrinth

  • Hero Member
  • *****
  • Posts: 507
Re: Suspend spending if resources less than X
« Reply #7 on: September 29, 2016, 07:17:10 pm »
Oh, you are 100% correct on the metal/s being in the tooltip, derp.  I guess my eyes just gloss over it since I never use it. 

You can import the settings associated with control groups as part of a CTRLS import. You still have to put the constructors into the groups, but that's about it. 


Offline Pumpkin

  • Hero Member Mark III
  • *****
  • Posts: 1,201
  • Neinzul Gardener Enclave
Re: Suspend spending if resources less than X
« Reply #8 on: September 30, 2016, 04:21:58 am »
Can you tell me more about why this might be a good idea?
Well, you and Sestren pretty much covered the drawbacks, which are very good points I didn't thought of. The ability to save/load options in a cross-game way is very interesting, indeed.

Well, I'll try to format that a bit.

Idea #1: per-unit-type suspend-metal-spending
(Players select a threshold for each unit type below which the unit is not produced and/or repaired.)
* Problem: many unit types. (Maybe only a few of them might need that kind of threshold, so maybe include a search option and display only restricted units/)
* Problem: buildings. (Trader's goodies, turrets, etc. Considered as units?)
* Galactic setting. (Advantage or restriction?)

Idea #2: per-space-dock suspend-metal-spending
(Each constructor / spacedock has a metal threshold below which it stops producing units.)
* Similar to AIW1's solution but without using the control group.
* Problem if constructor destroyed.
* Easy to sort metal-nice units and always-build units (by assigning them to the right constructor).
* Produced units are repaired no matter what.

What have I missed?
Please excuse my english: I'm not a native speaker. Don't hesitate to correct me.

Offline Tridus

  • Master Member
  • *****
  • Posts: 1,305
  • I'm going to do what I do best: lecture her!
Re: Suspend spending if resources less than X
« Reply #9 on: September 30, 2016, 01:39:12 pm »
I'm not sure how big a problem per-unit is, because really, how often do you want to set it per-unit?

This setting is awesome, but I only really use it for very big, very expensive things. Like, I don't want the SuperFortress building when I'm under X, but I'm not going to go around tinkering with 200 ships for 200 different values.

You would probably want to be able to save it as a default for future games, since it'll often be the same, but I don't think the case where people are doing it on more than a handful of units is common enough to worry about.