Then do it (if nothing else breaks, including AI).
Excruciating FOCS doubts
Moderators: Oberlus, Committer
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Excruciating FOCS doubts
It's working for me now. With an exact copy of what wasn't working for me... Only difference is a newer build. Presumably I'd just stuffed something up on my end.
Re: Excruciating FOCS doubts
Is there a check for game setting Natives = None?
Re: Excruciating FOCS doubts
Did you find an answer for that?
And a totally different question:
I am trying to write a tutorial-ish for policies, and I lack knowledge on too many policies.
This is the FOCS effect's code for Colonialism policy (with my own comments for this question):
Code: Select all
01 // industry-focused planets collect industry output from neutral planets that are in nearby systems in the supply network
02 EffectsGroup
03 scope = And [ // Possible Targets: Colonies owned by Source.Empire supply-connected to and within 3 jumps off an unowned colony outside Target's system.
04 Planet
05 OwnedBy empire = Source.Owner
06 Focus type = "FOCUS_INDUSTRY"
07 ResourceSupplyConnected empire = Source.Owner condition = And [ // needs to be connected to at least one candidate to take industry from...
08 Not InSystem id = RootCandidate.SystemID
09 Planet
10 Species
11 Unowned
12 WithinStarlaneJumps jumps = 3 condition = RootCandidate
13 ]
14 ]
15 effects = SetTargetIndustry value = Value +
16 // adjust industry of planets that are collected from by the number of planets that might be simultaneously taking from them
17 (Statistic Sum
18 value = (LocalCandidate.Industry / // Take the industry generated in an unowned planet (just 0.2*pop unless it's an independent-ed world with retained techs)
19 max(1.0, // and divide it by the...
20 Statistic Count condition = And [ // ... count of Source.Empire planets outside "StatisticSum:LocalCandidate"'s system with industry focus supply-connected to...
21 Not InSystem id = RootCandidate.SystemID
22 Planet
23 OwnedBy empire = Source.Owner
24 Focus type = "FOCUS_INDUSTRY"
25 //... other Source.Empire planets outside "StatisticSum:LocalCandidate"'s system with industry focus within 3 jumps off "StatisticSum:LocalCandidate"
26 ResourceSupplyConnected empire = Source.Owner condition = And [
27 Not InSystem id = RootCandidate.SystemID
28 Planet
29 Species
30 OwnedBy empire = Source.Owner
31 Focus type = "FOCUS_INDUSTRY"
32 WithinStarlaneJumps jumps = 3 condition = RootCandidate
33 ]]))
34 condition = And [ // Each of the "StatisticSum:LocalCandidate"s: unowned colonies supply-connected to and withing 3 jumps off Target.
35 Not InSystem id = Target.SystemID
36 Planet
37 Unowned
38 Species
39 WithinStarlaneJumps jumps = 3 condition = Target
40 ResourceSupplyConnected empire = Source.Owner condition = Target
41 ])
- Lines 18-20, 25 & 34: Are the comments I added correct or am I misunderstanding the code?
- Lines 8, 21 & 27: why can't worlds collect from neutral planets in the same system? Couldn't I just remove those "Not InSystem" clauses?
- Line 18: that LocalCandidate.Industry is the Industry meter of an unowned planet, right? Is it intended or was is expected to be LocalCandidate.Population or something like that? With .Industry, if it works as I understood, the more industry-boost techs you get before making a world independent, the better (assuming that the Industry meter of the newly-independent world does keep the bonuses).
- Lines 26-32: why are the owned-planets-that-will-collect-from-the-unowned-candidate checked for being connected to other owned-planets-that-qualify-as-collectors?
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Excruciating FOCS doubts
I think there was/is another policy for that.
Of planets that match the Statistic sampling condition below, which is unowned planets, not the target object's system, with species, within 3 jumps of the target and supply connected by the source empire to the target.- Line 18: that LocalCandidate.Industry is the Industry meter of an unowned planet, right?
Industry was intended, but if you think it should be something else, perhaps it should...Is it intended or was is expected to be LocalCandidate.Population or something like that?
If a source planet is having its production taken by two collector planets, then each of the collectors only gets half as much. This way it's not useful to spam collector planets any more than necessary such that each source planet is collected from by at least one collector.Lines 26-32: why are the owned-planets-that-will-collect-from-the-unowned-candidate checked for being connected to other owned-planets-that-qualify-as-collectors?
Re: Excruciating FOCS doubts
currently, industry meter won't profit from previous owners tech (is not saved anywhere). I think (target) population is already.Oberlus wrote: ↑Fri Jul 29, 2022 11:46 am - Line 18: that LocalCandidate.Industry is the Industry meter of an unowned planet, right? Is it intended or was is expected to be LocalCandidate.Population or something like that? With .Industry, if it works as I understood, the more industry-boost techs you get before making a world independent, the better (assuming that the Industry meter of the newly-independent world does keep the bonuses).
maybe in 0.5+ we could add a (influence) project "Upgrade native technology" - so one could up the maxima without having to conquer the planet.
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!
Look, ma... four combat bouts!
Re: Excruciating FOCS doubts
Interesting...Ophiuchus wrote: ↑Sat Jul 30, 2022 7:56 am
currently, industry meter won't profit from previous owners tech (is not saved anywhere). I think (target) population is already.
maybe in 0.5+ we could add a (influence) project "Upgrade native technology" - so one could up the maxima without having to conquer the planet.
Re: Excruciating FOCS doubts
Re: Excruciating FOCS doubts
Ok Stringtables question:
So both those 5s need to be 5 * (GameRule name = "RULE_SHIP_STRUCTURE_FACTOR") and I could add a namedreal for organic hull structure, but then I'd need to do the same for every single value that has a structure entry in the pedia.
What I'd like to do is something like [[MACRO_SHIP_STRUCTURE(5)]] but apparently you can't within the stringtables?
Code: Select all
SH_ORGANIC_DESC
'''A living hull with one external slot and one internal slot.
Organic Growth: starts with 5 [[metertype METER_STRUCTURE]], but grows an additional 5 structure over 25 turns.
What I'd like to do is something like [[MACRO_SHIP_STRUCTURE(5)]] but apparently you can't within the stringtables?
Re: Excruciating FOCS doubts
Ok slight clarification, I can do:
[[MACRO_SHIP_STRUCTURE(1)]], [[MACRO_SHIP_STRUCTURE(2)]], [[MACRO_SHIP_STRUCTURE(3)]] etc. (but each would have to be a named real defined in-game with individual string entries.)
but not [[MACRO_SHIP_STRUCTURE(x)]]
Edit: I guess I'm looking for clarification about how best to update these.
- I can attach a named value to every hull, every weapon, every shield, every relevant tech
- I can attach a named value to individual values: structure = 1*scaling, structure = 5*scaling etc.
- Some better solution that I haven't thought of
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Excruciating FOCS doubts
I don't understand what you want to do or what the difficulty is...wobbly wrote: ↑Sun Jul 31, 2022 4:05 pm...those 5s need to be 5 * (GameRule name = "RULE_SHIP_STRUCTURE_FACTOR") and I could add a namedreal for organic hull structure, but then I'd need to do the same for every single value that has a structure entry in the pedia.
What I'd like to do is something like [[MACRO_SHIP_STRUCTURE(5)]] but apparently you can't within the stringtables?
Re: Excruciating FOCS doubts
These numbers are wrong. It's actually 3 * (GameRule name = "RULE_SHIP_STRUCTURE_FACTOR") = 24 and grows 3 * (GameRule name = "RULE_SHIP_STRUCTURE_FACTOR") = 24Geoff the Medio wrote: ↑Mon Aug 01, 2022 8:29 amI don't understand what you want to do or what the difficulty is...wobbly wrote: ↑Sun Jul 31, 2022 4:05 pm...those 5s need to be 5 * (GameRule name = "RULE_SHIP_STRUCTURE_FACTOR") and I could add a namedreal for organic hull structure, but then I'd need to do the same for every single value that has a structure entry in the pedia.
What I'd like to do is something like [[MACRO_SHIP_STRUCTURE(5)]] but apparently you can't within the stringtables?
Also wrong. Its capped at 20 * GameRule = 120
These numbers (+12 and -12) are correct with default game rules. They are actually +2 * 6 and -2 * 6 and are wrong if you change the game rules.
The pedia is full of these values. Some are correct for 4 round combat and weapon/shield scaling. Some are the old values from before 4 round combat and weapon/shield scaling. Some are namedvalues and auto-update if values are changed. Some are not namedvalues and don't update if values change. The ones with named values show correct values when you change the starting options. The ones without named values don't show correct values when you change starting options.
I would like to update these entries and I'm looking for the best way to handle it. Ideally I'd like to change 5 to 5 * Game Rule so that the pedia shows correct value for current game settings.
Re: Excruciating FOCS doubts
Note:
Simplest solution is I make sure that every value is correct for default settings, before release, and the bigger issue is sorted out later.
Simplest solution is I make sure that every value is correct for default settings, before release, and the bigger issue is sorted out later.
Re: Excruciating FOCS doubts
Can you publish what you do have now, and update as you go?
From what I have seen and read, you probably have the most knowledge of the subject, and we could all benefit from it.
In the future this could be placed in the Pedia