Make all colonies/outposts to start with 6/3 def. troops

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

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

Make all colonies/outposts to start with 6/3 def. troops

#1 Post by Oberlus »

Stemming from here.

When a planet is outposted, colonized or invaded, its defense troops are set to zero, and every turn including that one the meter grows to max., so that on the first turn you already have some troops there.
This makes "species exchange by fake conquest" too cheap compared to having to battle for a new species: while at war, each one sends a colony ship to an agreed system, the other sends one armed ship and the cheapest troop ship to arrive the turn the colony is stablished, next turn colony can be invaded, and voila, species exchange accomplished with minimum military investment. That is bad for balance with species gifting (that c/should imply an influence cost appart from any opinion/stability drawback to balance against military conquest to not make cooperation OP, as commented in the linked thread), and terrible for games with forbidden diplomacy (and hence no species gifting allowed).

The idea is to make all colonies to start with 6 def. troops (except NO_DEFENSE_TROOPS), which would force players exploiting exchange by conquest to spend PPs comparable to a player invading natives or a poorly defended (but defended nonetheless) colony, that is one medium troop ship and one small troop ship, which is still much less than what costs invading defended colonies (need more military strength and some more troop ships) but at leasts it takes a noticeable toll on PP allocation (now it's not the cost of a colony ship to get a new species, but a colony ship and a couple of troop ships, so your next outpost ship or colony building will have some delay).
TechCurrentlySuggested
DEF_ROOT_DEFENSESetTroops value = min(Value + 1, Value(Target.MaxTroops))SetMaxTroops value = Value + 6 (Early priority)
SetTroops value = min(max(Value + 1, 6), Value(Target.MaxTroops))
DEF_GARRISON_1SetMaxTroops value = Value + 10SetMaxTroops value = Value + 6
DEF_GARRISON_2SetMaxTroops value = Value + Target.Population * 2 * [[TROOPS_PER_POP]]No change
DEF_GARRISON_3SetMaxTroops value = Value + 16SetMaxTroops value = Value + 18
DEF_GARRISON_4SetMaxTroops value = Value + Target.Population * 2 * [[TROOPS_PER_POP]]SetMaxTroops value = Value + Target.Population * 4 * [[TROOPS_PER_POP]]

Maybe 6 is not enough and it should be 10. It seems to call for a game rule.

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

Re: Make all colonies/outposts to start with 6/3 def. troops

#2 Post by Oberlus »

The change in DEF_GARRISON_4 (from 0.4 to 0.8 per pop) is to make it less ridiculous, it's not about the main subject in the OP.
The change in DEF_GARRISON_1 (from 10 to 6) is to compensate for the extra troops we are giving in DEF_ROOT_DEFENSE.
The change in DEF_GARRISON_3 (from 16 to 18) is mostly cosmetical, to make final flat troop bonus 30 (it is 26 currently).

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

Re: Make all colonies/outposts to start with 6/3 def. troops

#3 Post by Geoff the Medio »

Fine by me, but regular player input would be good.

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

Re: Make all colonies/outposts to start with 6/3 def. troops

#4 Post by Oberlus »

Is it OK to put a flat bonus and a pop based bonus in the same effect like this?
FlatAndPopBonusesTogether.png
FlatAndPopBonusesTogether.png (8.33 KiB) Viewed 3568 times
That's 6 flat plus 1*0.2 pop-based.
If I set them up in two effects they both get "Self Defense" like:

Should I create a new label for one of them?
Self Defense +0.2
Empire base troops +6

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Make all colonies/outposts to start with 6/3 def. troops

#5 Post by LienRag »

Oberlus wrote: Fri Sep 11, 2020 11:56 am Stemming from here.

When a planet is outposted, colonized or invaded, its defense troops are set to zero, and every turn including that one the meter grows to max., so that on the first turn you already have some troops there.
This makes "species exchange by fake conquest" too cheap compared to having to battle for a new species:
Indeed. It also allows the use of stealth troop ships to ambush new colonies with minimum efforts...
It would be sad to be deprived of such opportunities.

wobbly
Cosmic Dragon
Posts: 1874
Joined: Thu Oct 10, 2013 6:48 pm

Re: Make all colonies/outposts to start with 6/3 def. troops

#6 Post by wobbly »

LienRag wrote: Sat Sep 12, 2020 2:16 am Indeed. It also allows the use of stealth troop ships to ambush new colonies with minimum efforts...
It would be sad to be deprived of such opportunities.
A single symbiote will fit 8 troops on an average species. It'd just mean you can no longer do it with 1 small.

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

Re: Make all colonies/outposts to start with 6/3 def. troops

#7 Post by Oberlus »

Oberlus wrote: Fri Sep 11, 2020 11:23 pm Is it OK to put a flat bonus and a pop based bonus in the same effect like this?
FlatAndPopBonusesTogether.png
That's 6 flat plus 1*0.2 pop-based.
If I set them up in two effects they both get "Self Defense" like:

Should I create a new label for one of them?
Self Defense +0.2
Empire base troops +6
Bump.

Alternatives:

1. Put together a flat and a pop-based bonus.

2. Create a new accounting label and place each bonus separately.

3. Get rid of the pop-based bonus from Self Defense.

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

Re: Make all colonies/outposts to start with 6/3 def. troops

#8 Post by Ophiuchus »

Oberlus wrote: Mon Sep 14, 2020 7:41 am 2. Create a new accounting label and place each bonus separately.

3. Get rid of the pop-based bonus from Self Defense.
One of those.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
drkosy
Space Dragon
Posts: 367
Joined: Sat Jul 11, 2020 9:41 am

Re: Make all colonies/outposts to start with 6/3 def. troops

#9 Post by drkosy »

There is one sideeffect: Every colony can build troop ships right from the start. I remember one game playing gysache (bad troops) and I always have to wait on new colonies till they could build troop ships. That was annoying and remembered me to the nervs of gysache. I resolved that by inventing planetary bunter complex, but that would't be necessary anymore...

Maybe this could be irrelevant, but at least I would like to mention that :oops:
Want some fresh experience? Try Kosymod

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

Re: Make all colonies/outposts to start with 6/3 def. troops

#10 Post by Oberlus »

drkosy wrote: Mon Sep 14, 2020 3:59 pm There is one sideeffect: Every colony can build troop ships right from the start.
You can do that as soons as you get the first garrison tech (Planetary Bunkers), which is one of the cheapest techs in the game, so you get that tech fast nevertheless even if not going to use it for troop ships (just to slow down enemy invasions). So everyone could have colonies with 2 troopers right after establishent as soon as turn 3 or 4. The change in gameplay should be negligible.

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

Re: Make all colonies/outposts to start with 6/3 def. troops

#11 Post by Ophiuchus »

Oberlus wrote: Mon Sep 14, 2020 5:05 pm
drkosy wrote: Mon Sep 14, 2020 3:59 pm There is one sideeffect: Every colony can build troop ships right from the start.
You can do that as soons as you get the first garrison tech (Planetary Bunkers), which is one of the cheapest techs in the game, so you get that tech fast nevertheless even if not going to use it for troop ships (just to slow down enemy invasions). So everyone could have colonies with 2 troopers right after establishent as soon as turn 3 or 4. The change in gameplay should be negligible.
Yes, currently planetary bunkers is currently a very cheap must-have no-brainer. The only choice you have is to delay research until you actually need the effect so you get more dividend from having other tech a bit sooner. So I think having troops from the start makes actually for a small gameplay improvement.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Make all colonies/outposts to start with 6/3 def. troops

#12 Post by LienRag »

Ophiuchus wrote: Tue Sep 15, 2020 10:32 am Yes, currently planetary bunkers is currently a very cheap must-have no-brainer. The only choice you have is to delay research until you actually need the effect so you get more dividend from having other tech a bit sooner. So I think having troops from the start makes actually for a small gameplay improvement.
That's true, with the caveat that no research is cheap at the beginning of the game, especially with a non-research oriented specie (these 5 Research Points are to be spent with parsimony).

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

Re: Make all colonies/outposts to start with 6/3 def. troops

#13 Post by Oberlus »

New PR.

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

Re: Make all colonies/outposts to start with 6/3 def. troops

#14 Post by Oberlus »

I'm having trouble to make this work as intended.

Current state of the PR ensures any new colony of a species with defensive troops starts with min(6, Target.MaxTroops). However, it also allows for just-conquered colonies to start with that minimum, which isn't intended.

This is the part of code (old) that enables the basic troop regeneration (+1) when there was no combat:

Code: Select all

        EffectsGroup    // regenerate troops, defense and shields if not attacked
            scope = And [
                Planet
                OwnedBy empire = Source.Owner
                (LocalCandidate.LastTurnAttackedByShip < CurrentTurn)
            ]
            priority = [[AFTER_ALL_TARGET_MAX_METERS_PRIORITY]]
            effects = [
                SetShield value = min(Value + [[PLANET_SHIELD_FACTOR]], Value(Target.MaxShield))
                SetDefense value = min(Value + [[PLANET_DEFENSE_FACTOR]], Value(Target.MaxDefense))
                SetTroops value = min(Value + 1, Value(Target.MaxTroops))
            ]
Two researchable defense techs increase the regeneration rate by +1 and +3 (so up to a maximum of +5 per turn, always if planet wasn't attacked previous turn (LastTurnAttackedByShip < CurrentTurn).

This is the (new) code that ups the initial regeneration of troops to 6 for (hopefully) newly created colonies:

Code: Select all

        EffectsGroup    // set troops to 6 if just colonized
            scope = And [
                Planet
                OwnedBy empire = Source.Owner
                (LocalCandidate.LastTurnAttackedByShip < CurrentTurn)
                (LocalCandidate.LastTurnColonized = CurrentTurn)
                (LocalCandidate.LastTurnConquered < CurrentTurn)
            ]
            priority = [[AFTER_ALL_TARGET_MAX_METERS_PRIORITY]]
            effects = SetTroops value = min((NamedRealLookup name = "IMPERIAL_GARRISON_MAXTROOPS_EFFECT"), Value(Target.MaxTroops))
It should happen only on the turn of colonization (after a colony ship colonized the planet/outpost or a colony building was produced in the outpost), and only if it wasn't attacked or conquered on previous turn.
It doesn't work as expected.

Imagine this scenario:
- Turn 100.
- System Sol has two colonies a and b of Human empire.
- There is a fleet of enemy Trith empire at Sol, with armed ships and troop ships. It has Garrison 2 and 4 techs (so maximum troop regeneration is +5).
- There is also an incoming Human combat fleet, ETA 1 to Sol.
- Trith orders invasion of colony a.
- Turn 101.
- Colony a has been invaded by Trith.
- Human combat fleet arrived at the system and destroyed Trith fleet (with loses).
- At colony a, LastTurnConquered should be equal to CurrentTurn, and so the minimum 6 troops effect should not trigger. Also, presumably, the invaded colony a should have been attacked by the Human combat fleet and so LastTurnAttackedByShip should be equal to CurrentTurn. However, colony a troops are 6.16.

Issues:
1. It should not be 6 at all, it should be something smaller since the effect should not trigger.
2. Even if it was expected to trigger, it should be 6, not 6.16.

How can I fix this?

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

Re: Make all colonies/outposts to start with 6/3 def. troops

#15 Post by Oberlus »

More on this:
When conquering a colony without any opposition (i.e. no armed ships from the defenders, just the planet being invaded), the initial troop regeneration seems is crazy. Some examples:

- Outpost with maximum troops 12 (Bunker +6, Fort. Network +18, Outpost -12) start at 12.
- Derthrean colony with maximum 30.8 (Imperial Gar. +6, Self Def. +0.27, Def. Mil. Training +0.53, Bunker +6, Fort. Network +18) starts at 18.
- Kobuntura colony with maximum 27.4 (Imperial Gar. +6, Self Def. +0.3, Def. Mil. Training +0.6, Bad Def. Troops -3.45, Bunker +6, Fort. Network +18) starts at 13.

They all should start at 6.
It's obvious I don't understand what's going on with these meters.

Post Reply