Author Topic: dynamic order templates  (Read 2483 times)

0 Members and 1 Guest are viewing this topic.

Offline icekiss (OP)

  • Leading Rate
  • *
  • i
  • Posts: 5
  • Thanked: 6 times
dynamic order templates
« on: December 09, 2020, 05:43:06 PM »
This is something I already thought about back when I was playing VB6, years ago.  I did not have a forum account back then though, so never actually offered it up.

Fleet micromanagement seems to be a huge problem to me.  Because there is be a lot of stuff you need to repeat often:
Ferry automatic mines around, ferry terraformers around, move colonists, . . .  (surely many more, but those where already bad enough).

First, to be able to be able to move ships via order templates at all:
Add the "Tractor Any Ship in Fleet" order that got added to C# (see hxxp: aurora2. pentarch. org/index. php?topic=8495. msg118036#msg118036).
This will make ship movement orders repeatable and savable as a template.

Add a "REN" (for rename) button to Order templates.  Order the "Order Templates" list alphabetically.  This gives the player the power to set the order he sees the order templates in.

Now for the big one, that would easily top C#:
Add dynamic locations to fleet orders.  I'll try to describe how I'd achieve that, but this is obviously just one way of how to achieve that goal.
This needs 2 new bits of gui.  One when saving an order template, and one when using it.

SAVE:
Instead of just prompting for the name of the order template, show a bigger pop-up window.
Offer 3 checkboxes:
[ ] dynamic "from"
[ ] dynamic "to"
[ ] dynamic "via"
(A field for the order template name, and the buttons Cancel and Ok are still needed as well, of course. )
For every checkbox checked, you get to select one location from the list of locations used in your plotted moves (the moves which will make up the order template).  The same location can't be selected for multiple checkboxes.
When the game saves the order template, replace the selected locations for "from", "to" and "via" (if checked) with special values in the list of orders.
That special value should contain the system name of the replaced location, and whether it's "from", "to" or "via".
Bonus: To make this even more powerful, check if there are no other locations apart from the dynamic ones in the plotted moves, and whether they are all in the same system.  If both are true, set the system to a special value "current".

order template filter:
When deciding which order templates to list as usable, include those whose first order is using a dynamic "from", "to" or "via" value and where that value contains the current system name or the special value "current".

USE:
Scan the moves in the order template for special values "from", "to" or "via".  If any are found, then this is a dynamic order template.  Pop up a menu to select those locations.
I would show a window with up to 4 columns beside each other (if "from", "to" and "via" have been found in the move list).
One column for each dynamic location allows to select that system location (same list as "System Locations Available" when plotting a move normally).  And beside those a column "Plotted Move", showing the Moves the order template will add (with the selected dynamic locations filled in).
And below those columns the buttons Cancel and Ok.

I think that should be all that is needed.  What does it give you, for all that work?
- Simple order templates which stay in one star system are reusable in every star system.  Stuff like: Move n times automated mines from A to B.  On the last run, also move M mass drivers.  Make it into an order template once, and you are set up.
- Since you can add a 3.  dynamic location, you can add stuff like "refuel at C", and still have a template usable in any star system.
- Since you are saving the system name of the dynamic locations, you can still make sure the orders stay sane.
- I have no examples for dynamic order templates with different origin and destination systems, but that is simply because I haven't played far enough yet.  I am sure there are use cases, and the logic should be as flexible as is possible, while still being able to use the existing check logic.

Why 3 dynamic locations? You need at leaat 2, to be able to really make use of this.  Since the code needs to support more than 1 anyway, 3 is a nice balance between unnesecarilly limited and overkill, I think.  Not that I'd object against a GUI allowing an arbitrary amount of dynamic locations in any way, of course.  ;-)
« Last Edit: February 28, 2021, 05:42:47 AM by Kyle »
 
The following users thanked this post: waresky, TMaekler, Kyle, AJS1956

Offline Kyle

  • Moderator
  • Captain
  • *****
  • K
  • Posts: 472
  • Thanked: 973 times
  • Quasar4x dev
Re: dynamic order templates
« Reply #1 on: February 28, 2021, 05:48:12 AM »
Quote
Fleet micromanagement seems to be a huge problem to me.  Because there is be a lot of stuff you need to repeat often:
Ferry automatic mines around, ferry terraformers around, move colonists, . . .  (surely many more, but those where already bad enough).

I have this exact frustration as well which is why I'm working on ways to reduce micromanagement right now.  I'm already adding default and conditional orders.  I hadn't considered making order templates more powerful and dynamic, that's an interesting idea.  Might play around with dynamic defaults/conditions as well!
 
The following users thanked this post: AJS1956

Offline TMaekler

  • Vice Admiral
  • **********
  • Posts: 1112
  • Thanked: 298 times
Re: dynamic order templates
« Reply #2 on: March 01, 2021, 03:53:50 AM »
As long as you understand none of the ideas are guaranteed to make it in, you're welcome to post your ideas.. just please do it in a separate thread :)

Yes. They are suggestions and it is your game - so you alone decide if my ideas have value or not. Same as with maingame Aurora  ;)

I'll jump into this thread for the ideas - title seems fitting. Hope iceless is fine with this...  ;D

Overhaul of the cargo transfer system:
The main idea is to minimise user input as well as automating as much as possible - even up to the level of exchanging cargo ships to newer versions to speed up cargo transfer - or do it with fewer but bigger ships. Though my system aims for the civilian arm of the users ships. They might not add anything to make warfare easier or with less user input.

First step is to integrate the civilian shipping with the users civilian ships. All become assets of one generalised cargo transfer system where the user specifies what planets supply goods and what planets do receive the goods. The user can add cargo missions to that transfer system and choose who should transport the items. For that he can either hire a civilian company or give the order to one of his own fleets or ships.

Step by Step guide:
a) In a new Dialog Screen the user can create "shipping orders" between "locations". Locations are either a "fleet" or a "planetary colony", as it is now implemented in Aurora; though it should be possible to add foreign colonies to allow interspecies cargo transfer. It should also be possible to include several locations into one route to build chains of cargo transfer.
Two kinds of orders should be buildable with this new shipping order system: specific amounts of goods as well as indefinite amounts of goods. Example: You want to transfer 5 Automines from Earth to Europa. You create that "shipping order" and assign a fleet to it (see point B). It though does not matter how many ships are in that fleet. If a fleet cannot fulfill the order in one run it will simply cycle through the order until the specified numbers are fulfilled. Your own fleets would basically act like their civilian counterparts.
If you would specify an indefinite amount of goods it would act the same way. Lets say you define the order as "load all installations of type X on planet Earth and move them to planet Mars" it would simply cycle through this command until there are no more installations of type X on Earth left.
Internally: It would be nice if that system could "only" include the locations and not the specific movement orders. Those should be auto-generated when the "shipping order" is executed.

b) After the order is created the user then can choose ships or fleets that should execute this order. Civilian contractors can offer to take on these routes or single missions and offer to execute the transfer for a given price. If you choose to transfer the cargo with your own ships you can give the order to an already assembled fleet or assemble a new one for this job. If those ships are not stationed at the start point of the route they will first transfer to that location before beginning the route.

c) There are several independent options to each route the user then can choose.
c.1) Send messages: If the fleet should send out messages at certain points you can link them to those points (like a planet or a loading order). Those then will be send out into the log at that point. If you want to move the message to another point you can just relink it to that point - and done.
c.2) Same with refuelling or replenishing or overhaul orders. You can specify those points separately - and add certain stations or planets where these functions can be performed - as well as the rules when they should get triggered. And then when they get triggered the fleet will then choose the closest point where to perform this. For example:

A cycling mineral transfer fleet ships minerals from "Europa" first to "Mars" and then to "Earth". It also is specified to refuel at "20% Fuel left". Lets say this happens around Jupiter. As refuel stations "Earth" and "Mars" are specified. So closest station would be Mars - which is where the autoroute then would divert the ship to before continuing its cargo transfer order. Next time this happens the ship is close to Europa, but has not loaded new minerals yet. It is just approaching Europa. Would be a loss in time and waste of fuel if it would auto return. So the game does a quick calculation if the ship would be able to reach the closest fuel depot whilst still executing the latest order - pick up minerals at Europa - and only "inserts" the refuel order after the pickup.

d) Switch / add Ships to Shipping Orders:
For indefinite cargo orders it should be possible to add new ships to an already existing shipping order. They would try to join that fleet as fast as possible and integrate into the transfer at whatever point. It would also be nice of you could order a shipyard to auto-join after construction.
A bit more complicated would be the case of exchanging older ship types with newer ones. But in general they can function identical to the add ships order by just splitting the two functions. a) You add the new ships to the "shipping order" and they get added as soon as they can. b) You specify a minimum number of ships for that fleet that should always be in there. c) You add a "this ship type leaves when cargo is empty" order. So the moment new ships are added to the fleet and you empty the cargo holds of the fleet that extra order is checked and any ship above the minimum number of ships is separated and returned to your specified place where they can be parked or dismantled.

So, I hope I have explained my idea as simple and understandable as possible. If not don't hesitate to ask questions.
Thanks for listening...  ;) Basically this system integrates both civilian shipping arms into one and separates shipping orders from the ship fleets itself (maybe it could also be made possible to give the same "cycle transfer order" to several fleets - not just a 1 to 1 direct link - as well as it separates all the "unrelated" orders from the direct orders so you don't need to reinvent the wheel again and again when you have to change anything in that order list. So yes, it would be nice and I think it should be possible to edit the transfer orders "easily" for that system only gives the "next" order to the fleet and then generates the follow order when that one order is done for.
 
The following users thanked this post: Kyle, Avalanche