Problem with SitRep

Creation, discussion, and balancing of game content such as techs, buildings, ship parts.

Moderators: Oberlus, Committer

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

Problem with SitRep

#1 Post by Oberlus »

This code

techs/Defense.focs.txt

Code: Select all

            effects = [
                SetTroops value = min((NamedRealLookup name = "IMPERIAL_GARRISON_MAXTROOPS_EFFECT"), Value(Target.MaxTroops))
                GenerateSitRepMessage
                    message = "IMPERIAL_GARRISON_ACTIVATED"
                    label = "IMPERIAL_GARRISON_ACTIVATED_LABEL"
                    icon = "icons/sitrep/combat_damage.png"
                    parameters = [
                        tag = "empire" data = Target.Owner
                        tag = "planet" data = Target.ID
                        tag = "turn" data = Target.LastTurnColonized
                        tag = "system" data = Target.SystemID
                    ]
            ]
en.txt

Code: Select all

IMPERIAL_GARRISON_ACTIVATED
At %system%: %empire% colonized %planet% (LastTurnColonized %turn%).

IMPERIAL_GARRISON_ACTIVATED_LABEL
New colony
generates no SitRep

Before, I had an error on the tags, that caused the following error to appear in the SitRep window each turn a planet was colonized (by me or by AI):

Code: Select all

ERROR: IMPERIAL_GARRISON_ACTIVATED
Now I don't get any error nor any SitRep regardless of what empire is doing the colonization.

Help would be appreciated.

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

Re: Problem with SitRep

#2 Post by Geoff the Medio »

There is an option for showing sitreps with errors. Do you have it enabled?

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

Re: Problem with SitRep

#3 Post by Ophiuchus »

Tag type 'turn' probably does not exist. Use data maybe. Or data:turn
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
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Problem with SitRep

#4 Post by Oberlus »

Geoff the Medio wrote: Fri Oct 16, 2020 6:32 pm There is an option for showing sitreps with errors. Do you have it enabled?
I enabled it and now I can see the SitRep:

Code: Select all

At Centauri Sigma: Congregation colonized Centauri Sigma II (LastTurnColonized ERROR)
Ophiuchus wrote: Sat Oct 17, 2020 9:53 am Tag type 'turn' probably does not exist. Use data maybe. Or data:turn
I've tried with several other tags used in other SitReps: "ship", "rawtext", "data"... None work, I keep getting LastTurnColonized ERROR.

Data debug dump for that planet after colonization:
OBJ_PLANET 114: Centauri δ II at: Centauri δ owner: Congregation created on turn: -32768 specials: Meters: METER_TARGET_POPULATION: Cur: 10 Init: 9 METER_TARGET_INDUSTRY: Cur: 0 Init: 0 METER_TARGET_RESEARCH: Cur: 0.375 Init: 0.375 METER_TARGET_INFLUENCE: Cur: -1 Init: -1 METER_TARGET_CONSTRUCTION: Cur: 20 Init: 20 METER_TARGET_HAPPINESS: Cur: 20 Init: 20 METER_MAX_SHIELD: Cur: 1 Init: 1 METER_MAX_DEFENSE: Cur: 0 Init: 0 METER_MAX_SUPPLY: Cur: 1 Init: 1 METER_MAX_STOCKPILE: Cur: 0.02 Init: 0.02 METER_MAX_TROOPS: Cur: 9.3 Init: 9.3 METER_POPULATION: Cur: 1.045 Init: 1 METER_INDUSTRY: Cur: 0 Init: 0 METER_RESEARCH: Cur: 0.375 Init: 0 METER_INFLUENCE: Cur: -1 Init: -1 METER_CONSTRUCTION: Cur: 2 Init: 1 METER_HAPPINESS: Cur: 6 Init: 5 METER_SHIELD: Cur: 1 Init: 1 METER_DEFENSE: Cur: 0 Init: 0 METER_SUPPLY: Cur: 1 Init: 1 METER_STOCKPILE: Cur: 0.02 Init: 0.02 METER_TROOPS: Cur: 8 Init: 6 METER_REBEL_TROOPS: Cur: 0 Init: 0 METER_STEALTH: Cur: 5 Init: 5 METER_DETECTION: Cur: 50 Init: 50 species: SP_CRAY ResourceCenter focus: FOCUS_RESEARCH last changed on turn: 5 type: PT_BARREN original type: PT_BARREN size: SZ_MEDIUM rot period: 0.886716 axis tilt: 44.7885 buildings: colonized on turn: 5 conquered on turn: -65535 last attacked on turn: -1

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

Re: Problem with SitRep

#5 Post by Ophiuchus »

Oberlus wrote: Sat Oct 17, 2020 10:56 am I've tried with several other tags used in other SitReps: "ship", "rawtext", "data"... None work, I keep getting LastTurnColonized ERROR.
oh, my fault. yes i meant rawtext tag (there is no data tag). not at my computer to look up stuff.

you should be able to use tag = "turn" in the sitrep and %rawtext:turn% in stringtables to show that value.
Oberlus wrote: Sat Oct 17, 2020 10:56 am colonized on turn: 5
Hm. Should work. Could you try to ouput an int e.g. 5 ? Could you try to output that value (Target.LastTurnColonized + 33000)? Could you try to output that value (Target.LastTurnColonized + 66000)?
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!

Post Reply