New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make some techs, buildings and planets detection depend on Infrastructure #377

Closed
wants to merge 9 commits into
base: master
from

Conversation

Projects
None yet
6 participants
@luiges90
Contributor

luiges90 commented Oct 10, 2015

As outlined in
http://www.freeorion.org/forum/viewtopic.php?p=78577#p78577 and
http://www.freeorion.org/forum/viewtopic.php?p=76452#p76452

I can't wait for implementation so I go ahead and implement this myself 馃槢


  • protection focus isn't changed for now, in fact I am more inclined to change the defense techs instead, but leave that for now
  • make detection tech affected by infrastructure, in order to implement planet detection grow over time.
  • Removed infrastructure deduction due to shipyards as AIs tend to build them everywhere throttling the infrastructure.
  • Changed base target infrastructure to 30, and make singularity-generation tech to give +10 target infra, and N-dim structure to give +20 infra (not stackable with each other) - so that the tech can get actually useful instead of being blocked by infrastructure not being able to reach the target
@@ -611,44 +595,42 @@ BuildingType
]
EnqueueLocation = [[ENQUEUE_BUILD_ONE_PER_PLANET]]
effectsgroups = [
EffectsGroup
EffectsGroup

This comment has been minimized.

@MatGB

MatGB Oct 10, 2015

Member

Tab added unnecessarily, we avoid tabs in the scripts preferring 4 spaces consistently

EffectsGroup
effects = SetTargetIndustry value = Value + Target.Population * 3 * [[INDUSTRY_PER_POP]]
EffectsGroup

This comment has been minimized.

@MatGB

MatGB Oct 10, 2015

Member

More tabs

@@ -339,7 +339,7 @@ Special
scope = Source
activation = OwnedBy affiliation = AnyEmpire
effects = [
SetDetection value = Value + 75
SetDetection value = Value + Min(Target.Construction / 30, 1) * 75

This comment has been minimized.

@MatGB

MatGB Oct 10, 2015

Member

Ooh, I like this idea, you always get the 75 but might get more if well developed.

This comment has been minimized.

@Vezzra

Vezzra Oct 11, 2015

Member

Actually, I think you got that a bit wrong - if I'm not mistaken, that formula means 75 is the max detection range you get, for which you need infra 30. Below infra 30, the detection range bonus is reduced accordingly - if you have infra 15 (half of 30), you get only half of the bonus (37.5 in this case). And so on. Note, min means taking the lower of Target.Construction/30 and 1. If Target.Construction goes beyond 30, min will yield just 1.

I definitely prefer it this way. Detection ranges are far too high IMO already.

This comment has been minimized.

@MatGB

MatGB Oct 11, 2015

Member

I keep making this mistake as well, I constantly read that as parsing "make this the minimum" when it's actually "pick the lowest", it needs to be max(x,y) to have the desired effect. which is "pick the highest" not "make this the maximum", actually glad it's not just me getting that syntax wrong regularly.

@@ -1311,7 +1313,7 @@ Special
Ship
]
effects = [
SetDetection value = Value + 60
SetDetection value = Min(Target.Construction / 30, 1) * Value + 60

This comment has been minimized.

@MatGB

MatGB Oct 10, 2015

Member

Pointless? Ships don't have a construction value and the special can only affect ships.

This comment has been minimized.

@luiges90

luiges90 Oct 10, 2015

Contributor

oops, I was adding too much lol 馃槢

@@ -1600,6 +1623,7 @@ Tech
ProductionCenter
OwnedBy empire = Source.Owner
Construction high = RootCandidate.TargetConstruction - 3
Construction low = 30

This comment has been minimized.

@MatGB

MatGB Oct 10, 2015

Member

Also not keen on gating this too high, if at all, a tech that's meant to improve your ability (in part) to recover from attack/invasion gated so it won't work for 30 turns after conquest/colonisation? Having some sort of gating makes sense, having this much I'm not sure on.

@MatGB

This comment has been minimized.

Member

MatGB commented Oct 10, 2015

I suspect your text editor has a funky tab/4 space setting that could be tweaked for FO work.

Overall, I'm keen on this and will be testing it but some of the choices, especially for Force Energy Structures, I'm not sure on (that tech is overpowered but stopping it from doing anything at all for ages isn't a good solution). Also not keen on the change to SubHab, that's an early growth tech meant to open up new planets for viability, gating it so it can only apply to established colonises prevents that.

@MatGB

This comment has been minimized.

Member

MatGB commented Oct 10, 2015

@Dilvish-fo, I suspect this'll require some AI changes as well, possibly some major adjustments given how much is gated, opinions?

@luiges90

This comment has been minimized.

Contributor

luiges90 commented Oct 10, 2015

I am using notepad++, and I forgot to cleanup those whitespaces after editing 馃槙

In my game I didn't touch the AI at all after making these changes, and the AI generally performed fine.

For SubHab gating, we already have Adequate planets opened up by Planetary ecology (which is a prereq for SubHab) so I guess we can still add it.

Not sure what to do with Force-energy structures tho...

@MatGB

This comment has been minimized.

Member

MatGB commented Oct 10, 2015

Yeah, I reread the thread and am wondering if the combination of PlanEc and gated SubHab might be better, I shall test it (finishing a game testing the production priorities stuff currently, don't want to test too much at once).

I think for Force Energy leave it (as in remove the changes), at least for now, it's already a problematic tech and judging the effect of all the other changes will be harder, I suspect that that change alone is the biggest cause of your graph changes you posted, and I'm far more worried about mid to late game balance/growth than I am about early game stuff.

And the thing with major changes is the AI makes judgements based on how it currently understands the way things work, so whether a planet is habitable or not is determined by AI calculation, etc and I'm still not clear on how it all works, if an AI makes a choice to colonise planet X and not Y based on a particular bonus (SubHab or OrbHab) kicking in when they're not actually there it's an issue that might not be obvious. Basically, I never commit any big change, even if it's mine, without Dilvish giving it a once over, just in case I've missed something, breaking the AI is something I've done too many times already ;-)

@@ -231,7 +231,6 @@ BuildingType
Planet
Object id = Source.PlanetID
]
effects = SetTargetConstruction value = Value - 10

This comment has been minimized.

@Vezzra

Vezzra Oct 11, 2015

Member

That change only affects a currently commented out building. However, if it were uncommented, I think this will lead to a parse error. So either you leave that commented out building completely unchanged, or you remove the entire EffectsGroup, not just its effects section (like you did with the other buildings).

@Vezzra

This comment has been minimized.

Member

Vezzra commented Oct 11, 2015

I can't wait for implementation so I go ahead and implement this myself 馃槢

Now, lets not get hasty... 馃槈

You're introducing a lot of changes here that try to implement still pending design discussion/decisions. Although I quite like some of them, others definitely need to be discussed first.

Everyone, please continue the discussion here.

@Vezzra

This comment has been minimized.

Member

Vezzra commented Oct 11, 2015

Another thing I noticed: the removeal of the gating in commit 8a26930 only changes the effectsgroups, I think you forgot to also change the respective entry in the stringtable accordingly.

@geoffthemedio geoffthemedio changed the title from Make some techs, buildings and planet detection depends on Infrastructure to Make some techs, buildings and planets detection depend on Infrastructure Oct 12, 2015

effects = SetTargetIndustry value = Value + Target.Population * 1.0 * [[INDUSTRY_PER_POP]]
effects = SetTargetIndustry value = Value + Target.Population * 3 * [[INDUSTRY_PER_POP]]

This comment has been minimized.

@Quix0r

Quix0r Jan 18, 2016

Still some whitespace here and some lines below.

@geoffthemedio

This comment has been minimized.

Member

geoffthemedio commented Mar 5, 2016

Anyone still interested in fixing up and incorporating these changes...?

@luiges90

This comment has been minimized.

Contributor

luiges90 commented Mar 5, 2016

Sorry I am getting busy these days. Anyone feel free to pick up where I left 馃槈

@MatGB

This comment has been minimized.

Member

MatGB commented Mar 6, 2016

It's been on my list for ages but it keeps getting bumped down in priority as things come up, I really like some of the ideas implemented, am ambivalent about others and oppose some (a few of which contradict stuff I've been working on in the background, for example).

So while I want to do stuff with it, it's not an immediate concern, especially given I'm not sure how the stuff I do like (infrastructure dependent growth specials, for example) will affect the AI.

@Vezzra Vezzra added this to the post 0.4.6 milestone Apr 22, 2016

@dbenage-cx

This comment has been minimized.

Member

dbenage-cx commented Jun 13, 2016

In the event someone looks at picking this up later, I implemented this branch from current state to new script layout here. Minor changes for whitespace and adding parenthesis.

@MatGB

This comment has been minimized.

Member

MatGB commented Jun 13, 2016

That's really helpful actually, there are some parts of this PR I like but that'll need AI adjustments, some that I'm meh about and some I want to do completely differently.

So I'll close this PR as we couldn't merge it in regardless, and at some point soon I'll go through your updated copy with some line notes so we can see where we're at on it.

@MatGB MatGB closed this Jun 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment