Page MenuHomeWildfire Games

Allow entities to autoproduce.
Needs RevisionPublic

Authored by Freagarach on Mar 21 2020, 5:50 PM.

Details

Reviewers
wraitii
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#3914
Summary

This patch adds an Autoproduce tag to the production queue, which means that an entity bearing this tag will autoproduce when the queue is empty.
Currently a random template from the possible entities is chosen, but it might be better to specify a list of entities to autoproduce?

Also it would be nice to let users start/stop this behaviour via a button and to be able to specify a template and amount to autoproduce.

With D2657, it would become possible to let forests grow (autoproduce trees by trees).

Test Plan

Test, with the given template change, that entities are being produced automagically. Also test that when destroying a entity with the tag does not "steal" resources by starting another batch just before the entity is destroyed.

Event Timeline

Freagarach created this revision.Mar 21 2020, 5:50 PM
Owners added a subscriber: Restricted Owners Package.Mar 21 2020, 5:50 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1875/display/redirect

wraitii requested changes to this revision.Sat, May 30, 3:31 PM
wraitii added a subscriber: wraitii.

Other RTS games generally have a few buildings with this feature (I'm thinking of the terracotta army in RoN, but Age I think also has buildings like that).

I do think you should go a little beyond what you've done here, namely:

  • Add a button to the GUI to auto-queue the current production.
  • Let the template specify whether the player can control the production queue, or the entity does its own thing and you can't do anything about it.

Most likely we either want an entity to autoproduce on its own and not let the player control it, or give the player full control and not auto produce, so I would simply make the schema an "or": either you <autoproduce>SomeTemplate</autoproduce> or you have the ability to set entities, technologies, ...

Adding a batch count is also a desirable feature, can be an attribute of autoproduce imo.


Let me know if you disagree with the above.

This revision now requires changes to proceed.Sat, May 30, 3:31 PM