Page 1 of 1

Do fleets still create resources?

Posted: Sun May 24, 2020 8:26 am
by adrian_broher
The Fleet class implementation has a `Fleet::ResourceOutput(ResourceType)` method, but as far as I know and from what I have grepped so far the only things that produce resources considered by the Empire are ResourcesCenters, which are implemented only by Planets. Is this stale code or a partially implemented feature?

Re: Do fleets still create resources?

Posted: Sun May 24, 2020 9:08 am
by Oberlus
adrian_broher wrote: Sun May 24, 2020 8:26 am The Fleet class implementation has a `Fleet::ResourceOutput(ResourceType)` method, but as far as I know and from what I have grepped so far the only things that produce resources considered by the Empire are ResourcesCenters, which are implemented only by Planets. Is this stale code or a partially implemented feature?
There was some ship parts to produce some resources (research, AFAIK), that were disabled. I guess that decision came from the difficulty to avoid snowballing with such mechanics and/or the micromanagement of ships it could imply.

Once influence upkeep is introduced, with ships consuming influence points every turn, snowballing would not be unsolvable and some interesting ship parts could use that code when not causing micromanagement.

I can't come up with any valid example right now. E.g. base hulls with asteroid/gas harvesters could substitute outposts for the Microgravity Ind. and GG Generator flat bonuses, making their production and their upkeep stackable as well as destroyable by enemies. I don't think that would be a bright idea, but the point is some cases could be interesting.

If removing the code could improve performance or memory consumption, I would comment it out rather than delete.

Re: Do fleets still create resources?

Posted: Sun May 24, 2020 9:16 am
by Geoff the Medio
There was mention recently of ways to make new species different. A species that only lives on ships, and thus uses ships to generate resources, would be potentially quite interesting.

Re: Do fleets still create resources?

Posted: Sun May 24, 2020 9:43 am
by adrian_broher
Oberlus wrote: Sun May 24, 2020 9:08 am If removing the code could improve performance or memory consumption, I would comment it out rather than delete.
Dead code obstructs the view on what is important and creates in-code dependencies for no good reason.

Regarding "commenting out code": Eh, I won't even bother to explain why, have 3 random article from the internet:

https://kentcdodds.com/blog/please-dont ... d-out-code
https://www.nayuki.io/page/dont-share-c ... d-out-code
https://blog.submain.com/delete-comment ... t-reading/

Re: Do fleets still create resources?

Posted: Sun May 24, 2020 1:34 pm
by labgnome
Geoff the Medio wrote: Sun May 24, 2020 9:16 am There was mention recently of ways to make new species different. A species that only lives on ships, and thus uses ships to generate resources, would be potentially quite interesting.
You'd need a "shipyard ship" to make that work, and a way to upgrade it, or be stuck with the basic starter ships. But it's a worthwhile idea this thread from way-way back mentions "nomads", although I don't know that they were meant to be playable.

Re: Do fleets still create resources?

Posted: Sun May 24, 2020 2:29 pm
by Ophiuchus
labgnome wrote: Sun May 24, 2020 1:34 pm
Geoff the Medio wrote: Sun May 24, 2020 9:16 am There was mention recently of ways to make new species different. A species that only lives on ships, and thus uses ships to generate resources, would be potentially quite interesting.
You'd need a "shipyard ship" to make that work, and a way to upgrade it, or be stuck with the basic starter ships. But it's a worthwhile idea this thread from way-way back mentions "nomads", although I don't know that they were meant to be playable.
Brittle "research ship" (easy-to-kill by hidden strike fleet) producing RP would be also an option without shipyard ship. maybe in combination with stellar tomography (?). For scaling that would probably better work as a kind of boost-a-planet (e.g. producing RP on outposts in the same system) or supply-connected bonus to planets.

Re: Do fleets still create resources?

Posted: Sun May 24, 2020 2:51 pm
by labgnome
Ophiuchus wrote: Sun May 24, 2020 2:29 pm
labgnome wrote: Sun May 24, 2020 1:34 pm
Geoff the Medio wrote: Sun May 24, 2020 9:16 am There was mention recently of ways to make new species different. A species that only lives on ships, and thus uses ships to generate resources, would be potentially quite interesting.
You'd need a "shipyard ship" to make that work, and a way to upgrade it, or be stuck with the basic starter ships. But it's a worthwhile idea this thread from way-way back mentions "nomads", although I don't know that they were meant to be playable.
Brittle "research ship" (easy-to-kill by hidden strike fleet) producing RP would be also an option without shipyard ship. maybe in combination with stellar tomography (?). For scaling that would probably better work as a kind of boost-a-planet (e.g. producing RP on outposts in the same system) or supply-connected bonus to planets.
I was referring to the living only in ships part of the post.

However you're right, we could have research or production boosting ship parts anyways, however that should probably wait until after fleet upkeep with influence is a thing.

Re: Do fleets still create resources?

Posted: Sun May 24, 2020 3:42 pm
by Ophiuchus
labgnome wrote: Sun May 24, 2020 2:51 pm I was referring to the living only in ships part of the post.

However you're right, we could have research or production boosting ship parts anyways, however that should probably wait until after fleet upkeep with influence is a thing.
For industry to be of use you have to have something to build, so shipyard ship producing PP is quite natural combination. Of course now we have imperial stockpile so both could make sense naturally out of supply networks.

I was starting to think if resource producing ships/fleet make sense or not. If you are able to create such ships it would be similar to creating your own planets powered by your growing PP so very easy to do wrong.
If you are just able to get a few similar to like you can get monster ships this is not a problem.
But if you can just very few of those, maybe adding effects in a different way might make more sense.

Also space-born influence-producing species might make sense.

Re: Do fleets still create resources?

Posted: Sun May 24, 2020 9:51 pm
by labgnome
Ophiuchus wrote: Sun May 24, 2020 3:42 pm For industry to be of use you have to have something to build, so shipyard ship producing PP is quite natural combination. Of course now we have imperial stockpile so both could make sense naturally out of supply networks.
It would make sense but I see no reason that they need to be tied together. You could have "factory ships" with production generating production and a mothership "shipyard ship" that actually builds your ships. Now weather or not this could be coded is another matter entirely.
I was starting to think if resource producing ships/fleet make sense or not. If you are able to create such ships it would be similar to creating your own planets powered by your growing PP so very easy to do wrong.
If you are just able to get a few similar to like you can get monster ships this is not a problem.
But if you can just very few of those, maybe adding effects in a different way might make more sense.
The resource generating parts should require a LOT of upkeep. Either that or be something you can only find, maybe as a boon from ancient ruins.
Also space-born influence-producing species might make sense.
My understanding is that all species will produce influence. However a ship-dwelling species will need to be able to produce influence for ship upkeep. So maybe an influence generating part as well. As you won't have any population on planets.

Actually that makes me think, should ship-dwelling species get troops? They could snowball really fast with troops.

Re: Do fleets still create resources?

Posted: Mon May 25, 2020 4:58 pm
by adrian_broher
The discussion about implementing some ship-faring-only species is nice and dandy regarding gameplay ideas, but misses the point of this thread.

I would like to know why there is a second, different, incomplete and seemingly unused programming interface for describing resource centers and if there is an immediate need for that, which cannot be covered by resource centers.

Re: Do fleets still create resources?

Posted: Mon May 25, 2020 5:45 pm
by Oberlus
adrian_broher wrote: Mon May 25, 2020 4:58 pm The discussion about implementing some ship-faring-only species is nice and dandy regarding gameplay ideas, but misses the point of this thread.

I would like to know why there is a second, different, incomplete and seemingly unused programming interface for describing resource centers and if there is an immediate need for that, which cannot be covered by resource centers.
Summing up, it's not used now, and no body is working on it right now, but it will be used in the future, after Government/Influence is finished and merged.
Removing that code from master and placing it in a new branch ShipsAsResourceCenters (instead of the bad idea of commenting it out) seems like a reasonable approach.

Re: Do fleets still create resources?

Posted: Sun Jun 07, 2020 9:43 am
by Geoff the Medio
Ships generating resources is now used. After https://github.com/freeorion/freeorion/pull/2978 ships in a meteor blizzard generate research.
ships in a meteor blizzard generating research
ships in a meteor blizzard generating research
ShipResearch_MeteorBlizzard.png (327.65 KiB) Viewed 602 times

Re: Do fleets still create resources?

Posted: Sun Jun 07, 2020 9:47 am
by Ophiuchus
Geoff the Medio wrote: Sun Jun 07, 2020 9:43 am Ships generating resources is now used. After https://github.com/freeorion/freeorion/pull/2978 ships in a meteor blizzard generate research.
Wow, funky :)

Re: Do fleets still create resources?

Posted: Sun Jun 07, 2020 9:56 am
by adrian_broher
> Ships generating resources is now used.

But certainly not over the interface mentioned in OP and I'm not sure if the meter is considered when summing up reserach points.

Re: Do fleets still create resources?

Posted: Sun Jun 07, 2020 11:28 am
by Geoff the Medio
adrian_broher wrote: Sun Jun 07, 2020 9:56 am
Fleet::ResourceOutput is used for creating the fleet research output icon shown in the screenshot, in https://github.com/freeorion/freeorion/ ... .cpp#L1584
I'm not sure if the meter is considered when summing up reserach points.
What do you mean by "summing up research points"? They are added to the empire's research output in the situation illustrated above.