Do fleets still create resources?

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderators: Committer, Committer

Post Reply
Message
Author
User avatar
adrian_broher
Programmer
Posts: 1155
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Do fleets still create resources?

#1 Post by adrian_broher » 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?
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Oberlus
Cosmic Dragon
Posts: 2769
Joined: Mon Apr 10, 2017 4:25 pm

Re: Do fleets still create resources?

#2 Post by Oberlus » Sun May 24, 2020 9:08 am

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.
Last edited by Oberlus on Sun May 24, 2020 9:24 am, edited 1 time in total.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12687
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Do fleets still create resources?

#3 Post by Geoff the Medio » 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.

User avatar
adrian_broher
Programmer
Posts: 1155
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Do fleets still create resources?

#4 Post by adrian_broher » Sun May 24, 2020 9:43 am

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/
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
labgnome
Juggernaut
Posts: 777
Joined: Mon Mar 02, 2015 5:57 pm

Re: Do fleets still create resources?

#5 Post by labgnome » 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.
All of my contributions should be considered released under creative commons attribution share-alike license, CC-BY-SA 3.0 for use in, by and with the Free Orion project.

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

Re: Do fleets still create resources?

#6 Post by Ophiuchus » 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.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Furthermore, I propse... we should default to four combat rounds instead of three ...for the good of playerkind.

User avatar
labgnome
Juggernaut
Posts: 777
Joined: Mon Mar 02, 2015 5:57 pm

Re: Do fleets still create resources?

#7 Post by labgnome » Sun May 24, 2020 2:51 pm

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.
All of my contributions should be considered released under creative commons attribution share-alike license, CC-BY-SA 3.0 for use in, by and with the Free Orion project.

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

Re: Do fleets still create resources?

#8 Post by Ophiuchus » Sun May 24, 2020 3:42 pm

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.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Furthermore, I propse... we should default to four combat rounds instead of three ...for the good of playerkind.

User avatar
labgnome
Juggernaut
Posts: 777
Joined: Mon Mar 02, 2015 5:57 pm

Re: Do fleets still create resources?

#9 Post by labgnome » Sun May 24, 2020 9:51 pm

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.
All of my contributions should be considered released under creative commons attribution share-alike license, CC-BY-SA 3.0 for use in, by and with the Free Orion project.

User avatar
adrian_broher
Programmer
Posts: 1155
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Do fleets still create resources?

#10 Post by adrian_broher » 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.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Oberlus
Cosmic Dragon
Posts: 2769
Joined: Mon Apr 10, 2017 4:25 pm

Re: Do fleets still create resources?

#11 Post by Oberlus » Mon May 25, 2020 5:45 pm

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.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12687
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Do fleets still create resources?

#12 Post by Geoff the Medio » 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.
ShipResearch_MeteorBlizzard.png
ships in a meteor blizzard generating research
ShipResearch_MeteorBlizzard.png (327.65 KiB) Viewed 512 times

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

Re: Do fleets still create resources?

#13 Post by Ophiuchus » Sun Jun 07, 2020 9:47 am

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 :)
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Furthermore, I propse... we should default to four combat rounds instead of three ...for the good of playerkind.

User avatar
adrian_broher
Programmer
Posts: 1155
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Do fleets still create resources?

#14 Post by adrian_broher » Sun Jun 07, 2020 9:56 am

> 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.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12687
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Do fleets still create resources?

#15 Post by Geoff the Medio » Sun Jun 07, 2020 11:28 am

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.

Post Reply