Energy shipyard locations

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Post Reply
Message
Author
Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Energy shipyard locations

#1 Post by Morlic »

Code: Select all

BuildingType
    name = "BLD_SHIPYARD_ENRG_SOLAR"
    description = "BLD_SHIPYARD_ENRG_SOLAR_DESC"
    buildcost = 1200
    buildtime = 5
    tags = "ORBITAL"
    location = And [
        Planet
        Not Contains Building name = "BLD_SHIPYARD_ENRG_SOLAR"
        Contains And [
            Building name = "BLD_SHIPYARD_ENRG_COMP"
            OwnedBy empire = Source.Owner
        ]
        Contains And [
            Building name = "BLD_SHIPYARD_BASE"
            OwnedBy empire = Source.Owner
        ]
        OwnedBy empire = Source.Owner
    ]
    EnqueueLocation = [[ENQUEUE_BUILD_ONE_PER_PLANET]]
    icon = "icons/building/shipyard-16.png"
The building has no star type restriction. Solar hulls, however, can only be built at black hole systems.

Intended for sake of pre-building the shipyard in case we move the planet, create a black hole etc. or an oversight?

The same issue applies to the basic energy shipyard...
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Energy shipyard locations

#2 Post by Dilvish »

For the solar shipyard, that seems likely an oversight, or at least a discretionary decision for which I'd make the contrary call-- the potential benefit of prebuilding seems far less significant to me than the potential confusion/cost/headache, and I'd recommend the restriction be added to the shipyard reqs.

For the basic energy shipyard, my recollection is that there was a zippy little hull that could be built with them at any star, but if that's not the case then it seems that suitable reqs should probably be added to this shipyard also.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

defaultuser
Juggernaut
Posts: 854
Joined: Wed Aug 26, 2015 6:15 pm

Re: Energy shipyard locations

#3 Post by defaultuser »

I have built solar shipyard setups at systems that needed to create a blackhole a few times, and used simultaneous build on both aspects. I personally think it unlikely that someone far enough along to be doing those sorts of builds would make a mistake. I would prefer the current rules.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Energy shipyard locations

#4 Post by MatGB »

That's close to my take on it. If you want to build solar hulls, and have to collapse a black hole to do it, that's a huge number of turns to research the tech, followed by ten turns to collapse the red star, followed by another 15 turns to get the shipyard going? Game's over by that point.

Having said that, I have toyed with allowing expansion shipyards to be buildable if their base yard is queued, I've only tested it with Organics and I find it more satisfying, so that would reduce the problem a bit, and we do need to go in and look at build times and research times properly at some point and decide how we want to jump with the inconsistencies.

All energy hulls need a powerful star, Compressed Energy and Energy Frigate need at least White, Quantum and Fractal need Blue, Solar needs Black Hole (where all can be built), and once you've keyed it to allow Red, White, Blue and Black you're not really excluding much.

Plus, I've used a Starlane Drive more than once to move planets into position.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

defaultuser
Juggernaut
Posts: 854
Joined: Wed Aug 26, 2015 6:15 pm

Re: Energy shipyard locations

#5 Post by defaultuser »

I'd be happy if you could add things on the build queue like you do on research. That is, if I want to build a Geointegration facility at my newly conquered Mu Ursh world, just add it and have Basic Shipyard and Orbital Drydock automatically added ahead of it.

Unless that's already in a newer build than I'm using.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Energy shipyard locations

#6 Post by Dilvish »

MatGB wrote:I have toyed with allowing expansion shipyards to be buildable if their base yard is queued, I've only tested it with Organics and I find it more satisfying,
Ah, that's a good idea. I think when this general idea had first come up we didn't have a good way to test for whether things had already been enqueued, and so the proposal had just been to allow things to be queued even if their prereqs weren't met (they would just sit on the queue until the prereqs did, if ever, get fulfilled), but that has obvious drawbacks and was rejected. Adding the enqueued condition like this though seems to me to be a really clean solution, and only requires scripting changes; I'd like to see it in more places.
defaultuser wrote:I'd be happy if you could add things on the build queue like you do on research. That is, if I want to build a Geointegration facility at my newly conquered Mu Ursh world, just add it and have Basic Shipyard and Orbital Drydock automatically added ahead of it. Unless that's already in a newer build than I'm using.
I agree that something like that would help reduce micromanagement and would be in keeping with our design principles (and more concretely, would save player time and reduce unintended build lapses). However, adding support for auto-enqueue build prereqs would require a bit of UI changes, and also either somewhat tricky analysis of prereqs or else a new specification field listing the prereqs that could be auto-built locally, and I suspect that either of those approaches would at times have trouble. I'd recommend we start by using Mat's enqueued prereq approach more broadly, and auto-enqueue of prereqs could be considered as a further refinement of that later on.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply