Page 2 of 2

Re: Questions from a new player

Posted: Sun Aug 19, 2018 7:19 pm
by Dilvish
Oberlus wrote: Sun Aug 19, 2018 12:14 pm This means I already have to scroll to look for the basic shipyard and the rest of required shipyards with current implementation. So increasing this by 2 or 3 extra buildings seems no burden to me.
I've been mulling on ways to reduce that kind of clutter and think I'll be able to make progress with it, I don't want to make the problem worse, especially in a way like this that could easily block any further improvement.

Ophiuchus wrote: Sat Aug 18, 2018 11:24 pmThe simplest approach would be probably to change the location condition to also accept an enqueued shipyard and up the build time for the orbital drydock from 5 to 9 (building the basic shipyard takes 4 turns).
This could work, but will also require many changes for FOCS and/or other code to work out.
I am prettty confident that would actually be a very simple little FOCS change.

Ophiuchus wrote: Sat Aug 18, 2018 11:24 pmanother more general approach could be to allow to enqueue items for which the location condition fails but the enqueueLocation succeeds; that item could would be added to the queue, but production would start/proceed not before the prerequisites are fulfilled
That's exactly what I was trying to suggest in my previous post. But Dilvish pointed out this would require many changes in many files or something? I really don't know how/what/where is implemented that an already queued building that does not fulfil the requirements won't get any PP invested on it, but if that is independent of the FOCS files, then this suggestion could be easy to implement (regardless of the many FOCS files that would require changes, easy ones I think).
My comment about a lot of changes being needed was about your proposal, Oberlus, was not directed at this 2nd idea from Ophiuchus, which I saw really as simply a poor alternate to his first suggestion. One significant difference between this EnqueueLocation suggestion and your suggestion, Oberlus, is that the former doesn't do anything to help with your primary motivation: "What is a burden is to have to manually queue each required building (as opposed as clicking on the last one you want and automatically adding all the prerequisites)."

The 2nd idea from Ophiuchus would be fairly easy to implement, but I called it a poor alternate to the first idea because the 2nd one would tremendously clutter the BuildDesignator (because a fourth of buildings have no EnqueueLocation condition, and of the ones that do, about half are simply [[[ENQUEUE_BUILD_ONE_PER_PLANET]] so 3/4 of buildings would be showing up as enqueueable even if not buildable), unless we wrote new EnqueueLocation conditions for every single building-- the revised EnqueueLocation would have to include the current EnqueueLocation condition plus all of the Location conditions other than any local building requirements. It would be much simpler to just edit the handful of applicable Location conditions (and in some cases probably buildtime also) in the manner suggested for Drydocks.

Re: Questions from a new player

Posted: Sun Aug 19, 2018 9:47 pm
by Ophiuchus
Dilvish wrote: Sun Aug 19, 2018 7:19 pm..
agree with everything ... so here is the implementation of the first proposal PR-2251 (though couldnt make the buildtime dependent on the existence of a shipyard)

Re: Questions from a new player

Posted: Mon Aug 20, 2018 5:16 am
by defaultuser
Jaumito wrote: Sun Aug 19, 2018 6:02 am On a related note, there are quirks with some of the shipyard upgrades that should probably be cleaned up. For instance, at the moment you can build orbital drydocks and advanced engineering bays (which supposedly are a drydock upgrade) concurrently, but nothing prevents you to pause production on the drydock until the bay is completed. So, if you want to build energy or organic hulls with trans-spatial drives somewhere, you can actually dispense with a drydock here, despite the (supposed) requirement. I don't think this is intended.
Sounds like a bug. You can do the same thing with the geointegration facility, pause the drydock and complete the "upgrade". However, it's useless because you can't build the ships with it. You have to go ahead and finish the drydock before you build self-grav or titantic hull ships.

Re: Questions from a new player

Posted: Mon Aug 20, 2018 7:02 am
by Jaumito
defaultuser wrote: Mon Aug 20, 2018 5:16 am Sounds like a bug. You can do the same thing with the geointegration facility, pause the drydock and complete the "upgrade".
Every upgrade to the orbital drydock, energy compressor, orbital incubator or asteroid processor is subject to this actually, but at the moment it's only "exploitable" with the advanced engineering bay for the trans-spatial drive, since the part only require a bay to build.

Not that big of an exploit anyway, since orbital drydocks are both cheap and useful on their own, but it still looks like a quirk or glitch, if not a bug. The obvious fix, if one is needed, would be to check that all required buildings are present when an upgrade is at 100% completion, when upgrades are allowed to be built concurrently with their requirement(s). If not, pause production of said upgrade until that condition is met.

Re: Questions from a new player

Posted: Mon Aug 20, 2018 7:10 am
by Dilvish
Jaumito wrote: Mon Aug 20, 2018 7:02 am The obvious fix, if one is needed, would be to check that all required buildings are present when an upgrade is at 100% completion, when upgrades are allowed to be built concurrently with their requirement(s). If not, pause production of said upgrade until that condition is met.
That particular approach to a fix would require quite a bit of coding & rescripting. It seems to me just fine, and far simpler, to simply add the necessary prereq buildings to the location condition for whichever parts need the advanced engineering.

Re: Questions from a new player

Posted: Mon Aug 20, 2018 8:42 am
by Jaumito
Dilvish wrote: Mon Aug 20, 2018 7:10 am
Jaumito wrote: Mon Aug 20, 2018 7:02 am The obvious fix, if one is needed, would be to check that all required buildings are present when an upgrade is at 100% completion, when upgrades are allowed to be built concurrently with their requirement(s). If not, pause production of said upgrade until that condition is met.
That particular approach to a fix would require quite a bit of coding & rescripting. It seems to me just fine, and far simpler, to simply add the necessary prereq buildings to the location condition for whichever parts need the advanced engineering.
I was thinking about how terraforming works when you have more than one running on the same planet: only one is completed, while the other(s) stay(s) in the queues at 100% but grayed out (IOW, paused) - so I assumed there was some kind of check there that could be used for building upgrades. But of course you know a lot more about the innards of the game than I do.

(Nitpick: had it been an easy fix, I still think that "particular approach" would have been better, anyway, as it's always best to solve problems upstream than downstream. Not a big issue here and now, as it's only the trans-spatial drive that's affected, but suppose there are more like that in the future? Or suppose the indirect requirements for a part change - due to, say, a tech tree overhaul? You'd have to update more files than you'd need to, if you make it a rule to specify indirect prereqs to the every ship part there is.)

Re: Questions from a new player

Posted: Mon Aug 20, 2018 11:10 pm
by defaultuser
Jaumito wrote: Mon Aug 20, 2018 7:02 am Every upgrade to the orbital drydock, energy compressor, orbital incubator or asteroid processor is subject to this actually, but at the moment it's only "exploitable" with the advanced engineering bay for the trans-spatial drive, since the part only require a bay to build.
Interesting. The only thing I use that building for is Logistics Facilitator builds.

Re: Questions from a new player

Posted: Tue Aug 21, 2018 5:54 am
by Dilvish
Jaumito wrote: Mon Aug 20, 2018 8:42 amI was thinking about how terraforming works when you have more than one running on the same planet: only one is completed, while the other(s) stay(s) in the queues at 100% but grayed out (IOW, paused) - so I assumed there was some kind of check there that could be used for building upgrades.
The Terraforming buildings work that way because their Location condition prohibits there being a Terraforming building already present. So even if you've been building them totally in parallel, on that last turn one of the queue entries gets its completion processed before the other, and then the 2nd queue entry cannot proceed until the Terraforming building that was produced by the first queue entry does its job and self-destructs.

Re: Questions from a new player

Posted: Tue Aug 21, 2018 12:51 pm
by Oberlus
Should the change done in #2251 to the orbital drydock be also applied to the rest of shipyard buildings that has as prerreq the basic shipyard?
I'm thinking of /default/scripting/buildings/shipyards/ENERGY_COMP.focs.txt, ENERGY_SOLAR.focs.txt, ORGANIC_CEL_GRO.focs.txt, ORGANIC_ORB_INC.focs.txt, ORGANIC_XENO_FAC.focs.txt (I may have missed some).

Re: Questions from a new player

Posted: Fri Sep 07, 2018 1:13 pm
by Ophiuchus
Oberlus wrote: Tue Aug 21, 2018 12:51 pm Should the change done in #2251 to the orbital drydock be also applied to the rest of shipyard buildings that has as prerreq the basic shipyard?
I'm thinking of /default/scripting/buildings/shipyards/ENERGY_COMP.focs.txt, ENERGY_SOLAR.focs.txt, ORGANIC_CEL_GRO.focs.txt, ORGANIC_ORB_INC.focs.txt, ORGANIC_XENO_FAC.focs.txt (I may have missed some).
Because the solution was so hacky i thought it shouldn't, but dilvish came up with something much better (disabling location after enqueueing until the prerequisites are finally built) which doesnt need the build cost recalculations, so i think that pattern should become the general solution and also applied to all further layers.