Relief shipments using Generic Supply Ships

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Message
Author
User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Relief shipments using Generic Supply Ships

#16 Post by Vezzra »

Ophiuchus wrote:@Vezzra I think you misunderstood what I am trying to achieve and how I do it.
Ah, ok, that's of course a bit different from what I thought. To my defense, what threw me was this:
Ophiuchus wrote:* Every turn the special increases the target industry by 5 and decreases the stockpile capacity by 5.
Which I read as "each turn the target industry meter gets increased by another 5 points" (essentially shoving 5 points from the stockpile to the target industry meter each turn). What's actually happening is that you increase the target and current industry meter when the stockpile gets created, and maintain that level until the stockpile is exhausted, at which point you decrease target and current industry by 5 back to their original value. What gets modified each turn actually is only the stockpile, which gets decreased by 5 each turn.

Which means, you solved the problem by capping the extra PP at 5, and then simply manipulate the industry meters and the stockpile in "steps of 5". At which point I wonder however if that still works once the stockpile has a value that's not divisible by 5. I didn't test it myself, but looking at your scripts it seems that if there is more than one colony with a beacon in a system, the payload of your supply ships gets evenly divided among those colonies.

What happens if a stockpile gets reduced to, lets say, 3? How do you handle that case? That would mean, on the turn when the last remaining points of the stockpile get "transferred", the stockpile doesn't get reduced by 5, but only by 3, and to reflect that only 3 and not 5 points have been left in the stockpile, on that turn target and current industry need to get reduced by 2, so the colony won't produce 5, but only 3 extra PP. And on the turn after that target and current industry must not be decreased by 5, but only by 3 of course (otherwise they would drop below their original value). I only took a quick glance at your scripts, and I didn't see anything that looked like handling that case, but of course I might have missed it.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Relief shipments using Generic Supply Ships

#17 Post by Vezzra »

Ophiuchus wrote:Having a ship with some production output would be a surrogate for supply ships, but for my use case it would need to be available from the start/early game. And production output is a lot more powerful than redistribution, so I don't see how to make a productive ship cheap enough for early game without unbalancing the whole game. So as dbenage-cx says, probably issue #543 is for the late game.
But the mechanic built into the engine to make #543 possible can still be used for your purpose, much like you currently use the colony resource output production mechanic. You raise the target and current industry meters for a couple of turns to produce the extra PP a supply ship is supposed to deliver.

Instead of "transferring" the "PP" "stored" on the ship, creating a special and juggling with the colony's meters (and all the hassle and potential interferences with the normal operation of the planetary meters), do the same with the ship. Once "unloading" is triggered for a supply ship (however that's done, by the beacon building you currently use, or maybe some more intuitive mechanic we haven't thought of yet), raise the target and current industry meters of the ship, keep running for a few turns (number of turns determined by "PP" "stored" and amount of "PP" "consumed" each turn), then the ship gets auto-scrapped. I expect that approach to be more robust considering potential side effects when interacting with planetary meters.

It's just a matter of proper scripting.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Relief shipments using Generic Supply Ships

#18 Post by Ophiuchus »

JFYI I made a new pull request #1090 with a KISS implementation for industrious outposts.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Relief shipments using Generic Supply Ships

#19 Post by Ophiuchus »

Vezzra wrote:... if there is more than one colony with a beacon in a system, the payload of your supply ships gets evenly divided among those colonies.

What happens if a stockpile gets reduced to, lets say, 3? How do you handle that case? That would mean, on the turn when the last remaining points of the stockpile get "transferred", the stockpile doesn't get reduced by 5, but only by 3, and to reflect that only 3 and not 5 points have been left in the stockpile, on that turn target and current industry need to get reduced by 2, so the colony won't produce 5, but only 3 extra PP. And on the turn after that target and current industry must not be decreased by 5, but only by 3 of course (otherwise they would drop below their original value).
Good catch.

Probably would give up the even distribution and unload randomly on one of the beacon planets.

One alternative would be to restrict building more than beacon, but I am not sure if it is possible (because you could queue on two planets in the same system at once).
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Relief shipments using Generic Supply Ships

#20 Post by Ophiuchus »

Vezzra wrote:...
Instead of ... juggling with the colony's meters (and all the hassle and potential interferences with the normal operation of the planetary meters), do the same with the ship. Once "unloading" is triggered for a supply ship(..), raise the target and current industry meters of the ship, keep running for a few turns (number of turns determined by "PP" "stored" and amount of "PP" "consumed" each turn), then the ship gets auto-scrapped. I expect that approach to be more robust considering potential side effects when interacting with planetary meters.
You are right, this sounds more robust than the current implementation. Also no side-effects with evacuation. I will definitely have a look at, if people (geoff?) decide that supply ships are not too micro to be included. Else I am not sure if it is worth it (cause the supply ships work well enough for my use case now).

One other question, in regards of finding a better UI for triggering unload on disconnected outposts. Is it possible to use focus mechanic on ships? Or use bombarding/colonization mechanic for unloading?
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Captain M
Krill Swarm
Posts: 14
Joined: Fri Nov 20, 2015 12:08 pm

Re: Relief shipments using Generic Supply Ships

#21 Post by Captain M »

I was thinking about a similar concept for some time, nice something like this is already being implemented.
Here some ideas I came up with:

For the issue of distributing the PP, how about using a building (e.g. "supply distribution center")?
The building gets constructed through clicking on an "deploy supplies" button at the planet with colony or outpost (like colonize or invade), making one ship with a supply module land and thereby disappear as a colony or troop ship would.
From the next round, the colony or outpost takes PP from the stockpile in the building to boost its industry output, like it would from the supply lines, up to the maximum it can use for the projects currently being built, until the stockpile is used up.

- If another ship then lands, the stockpile is increased again - otherwise it remains at 0, or the building disappears.
- A basic supply module could e.g. provide 10 PP at a cost of 15 PP to build, a nanorobotic supply module 25 PP at a cost of 40 PP to build.
- If a ship has several supply modules, the stockpile in the building is the sum of the PP stored in the modules.
- If a colony ship has two internal slots, it could be possible to add a supply module which is unloaded at the time of colonization, making the extra PP available right when they are needed.
All code and graphics posted here are licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Relief shipments using Generic Supply Ships

#22 Post by Ophiuchus »

Captain M wrote:I was thinking about a similar concept for some time, nice something like this is already being implemented.
Here some ideas I came up with:

For the issue of distributing the PP, how about using a building (e.g. "supply distribution center")?
The building gets constructed through clicking on an "deploy supplies" button at the planet with colony or outpost (like colonize or invade), making one ship with a supply module land and thereby disappear as a colony or troop ship would.
Backend changes necessary ;). Nobody answered when i asked how to do this.
From the next round, the colony or outpost takes PP from the stockpile in the building to boost its industry output, like it would from the supply lines, up to the maximum it can use for the projects currently being built, until the stockpile is used up.
AFAIK this also needs backend changes. No way to peek into the production queue.
- If another ship then lands, the stockpile is increased again - otherwise it remains at 0, or the building disappears.
- A basic supply module could e.g. provide 10 PP at a cost of 15 PP to build, a nanorobotic supply module 25 PP at a cost of 40 PP to build.
- If a ship has several supply modules, the stockpile in the building is the sum of the PP stored in the modules.
My supply ships actually do this. Though no different supply modules for different ship lines external/internal was good enough for me.
- If a colony ship has two internal slots, it could be possible to add a supply module which is unloaded at the time of colonization, making the extra PP available right when they are needed.
I think this is not scriptable (i.e. would need backend changes). AFAIK there is nothing like event based effects like onColonization, onDestruction...

I think we had a lot of similar thoughts... but i implemented the minimal scriptable version ;)
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Captain M
Krill Swarm
Posts: 14
Joined: Fri Nov 20, 2015 12:08 pm

Re: Relief shipments using Generic Supply Ships

#23 Post by Captain M »

Yes, now I looked into the code and better understand the situation.
What is missing is a "land ship on own planet and unload something (e.g. building,troops etc.)" function.
Currently the possible interactions are indeed only colonize/outpost, bombard and invade.
All code and graphics posted here are licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.

dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: Relief shipments using Generic Supply Ships

#24 Post by dbenage-cx »

Ophiuchus wrote:Is it possible to use focus mechanic on ships?
You could set the scope/activation to only apply at planets with a specific focus. If that is a new focus, it will incur the cost of focus switching.
Some of the existing uses of focus are mostly due to no better mechanic in place, such as stargate.
For the use case here, I think the current use of a building is preferred if there is no specific planet condition to match against (barring some new mechanic).
Or use bombarding/colonization mechanic for unloading?
In its current state, it would need to be added (new Order, etc; most of the logic would be the same).
Since bombard needs to be fixed anyway, it might be nice to replace it with some kind of scriptable toggle button(s).
A bit more off-topic, but toggle icons for colonize/invade/bombard could help clean up the display as well.
Any content posted should be considered licensed GNU GPL 2.0 and/or CC-BY-SA 3.0 as appropriate.

Post Reply