Ticket #45489

City disorder counter

Eröffnet am: 2022-08-28 08:08 Letztes Update: 2023-02-18 05:19

Auswertung:
Verantwortlicher:
Typ:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
5

Details

Add counter_behavior "Disorder" - increased if city is in disorder at turn change, otherwise zeroed.

Ticket-Verlauf (3/27 Historien)

2022-08-28 08:08 Aktualisiert von: cazfi
  • New Ticket "City disorder counter" created
2022-09-27 22:13 Aktualisiert von: lachu
2022-09-27 22:13 Aktualisiert von: lachu
  • File 0001-OSDN-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10413) is deleted
2022-09-27 22:13 Aktualisiert von: lachu
  • File 0002-OSDN-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10417) is attached
  • File 0002-OSDN-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10416) is attached
2022-09-27 22:13 Aktualisiert von: lachu
  • File 0002-OSDN-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10416) is deleted
2022-09-27 22:13 Aktualisiert von: lachu
  • File 0002-OSDN-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10417) is deleted
2022-09-27 23:56 Aktualisiert von: lachu
Kommentar

Probably done. It requires ticket 45488 .

2022-12-05 23:16 Aktualisiert von: lachu
Kommentar

Reply To cazfi

Add counter_behavior "Disorder" - increased if city is in disorder at turn change, otherwise zeroed.

I see my patches lands on master, but it tickets associates to it was not closed. I prepare new patch for unhappy/disorder, witch is similar to newer for celebrating. Applying these patches requires of reverts previously patches.

2022-12-05 23:35 Aktualisiert von: cazfi
Kommentar

Reply To lachu

I see my patches lands on master, but it tickets associates to it was not closed.

I don't know what you refer to. Maybe you have accidentally committed (or cherry-picked) to your local master?

2022-12-06 00:55 Aktualisiert von: lachu
Kommentar

Reply To cazfi

Reply To lachu

I see my patches lands on master, but it tickets associates to it was not closed.

I don't know what you refer to. Maybe you have accidentally committed (or cherry-picked) to your local master?

Ok. I will see in log. I work on other branch and do not merge to master on local. I will check this.

2022-12-10 05:18 Aktualisiert von: lachu
Kommentar

Ok. I see this patch did not apply on master. I download freeciv source code, create new branch from master and try to apply. fc_types.h do not have counter celebrates patch applied. Should I provide changes based on master, so there could been problems apply this patch, if you apply city's celebrating patch? Or just leave it as it is. I am not 100% sure if I am rebase it on master, it would not apply if celebration was applied. Git tracks commit history (for each patch stores parent patch, so maybe it will be solved automatically?). I am beginner in programing, who develop single-person projects for many years.

2022-12-11 11:08 Aktualisiert von: cazfi
Kommentar

Reply To lachu

Ok. I see this patch did not apply on master. I download freeciv source code, create new branch from master and try to apply. fc_types.h do not have counter celebrates patch applied. Should I provide changes based on master, so there could been problems apply this patch, if you apply city's celebrating patch? Or just leave it as it is. I am not 100% sure if I am rebase it on master, it would not apply if celebration was applied. Git tracks commit history (for each patch stores parent patch, so maybe it will be solved automatically?). I am beginner in programing, who develop single-person projects for many years.

Whether patch applies depends mostly if the context of the changes is there or not. Can't replace code that is not there to begin with. You can look at the patch file to see what is expects to find as the "original code" (any lines it wants to remove, and any lines it's not going to touch but still lists as the context of the changed lines)

If your patch depends on another one, either logically or textually (it wouldn't apply), you should just mention that dependency while submitting it.

2022-12-11 23:50 Aktualisiert von: lachu
Kommentar
0001-OSDN-45489-S-awomir-Lach-slawek-lach.art.pl.patch(1KB)
Change implementation. Previous patch needs to be reverted before apply.

I download branch master (redownload freeciv sources) and apply celebration + given above. All applies.

2022-12-12 02:02 Aktualisiert von: lachu
Kommentar

Reply To cazfi

Reply To lachu

Ok. I see this patch did not apply on master. I download freeciv source code, create new branch from master and try to apply. fc_types.h do not have counter celebrates patch applied. Should I provide changes based on master, so there could been problems apply this patch, if you apply city's celebrating patch? Or just leave it as it is. I am not 100% sure if I am rebase it on master, it would not apply if celebration was applied. Git tracks commit history (for each patch stores parent patch, so maybe it will be solved automatically?). I am beginner in programing, who develop single-person projects for many years.

Whether patch applies depends mostly if the context of the changes is there or not. Can't replace code that is not there to begin with. You can look at the patch file to see what is expects to find as the "original code" (any lines it wants to remove, and any lines it's not going to touch but still lists as the context of the changed lines) If your patch depends on another one, either logically or textually (it wouldn't apply), you should just mention that dependency while submitting it.

My patches in this ticket requires Celebrating Ticket to be applied.

There you are patch to sandbox, to test modifications:

2022-12-12 01:59 Updated by: lachu

File 0001-OSDN-TICKET-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 11086) is attached

I have one question. When apply these patch, tile near city are colorized by red. It seems to work, because if city disorders for 6 turns, people stop working tile. When city was made content again, citizens working tiles again. I also discovered, that when terrain are red-colorized, I cannot assign citizens to any tile - there is no difference if counter/checkpoint requirement was fulfilled or not.

Maybe it is bug somewhere else?

2022-12-14 01:36 Aktualisiert von: lachu
Kommentar

There is some misclarification, when tile_workable is calculated. I think, that it is calculated, when city is build. But... It is calculated before client receives counters probably. How to made it recalculates, once city receive new counter values. I also do not known, if it is calculated before city's counter values' was allocated.

Could somebody look about this? Or maybe should I use other effect. I do not known, how to made player loose or government fall by effect.

2023-01-09 14:30 Aktualisiert von: cazfi
Kommentar

Reply To lachu

There is some misclarification, when tile_workable is calculated.

There are known issues with it; #44706 was just fixed, but #46425, #46424, and #46423 remain.

2023-01-18 02:12 Aktualisiert von: lachu
Kommentar

Reply To cazfi

Reply To lachu

There is some misclarification, when tile_workable is calculated.

There are known issues with it; #44706 was just fixed, but #46425, #46424, and #46423 remain.

I do not have to use Tile_Workable to just demonstrate counters. Maybe use just OutputBonus with negative number or similar effect?

2023-02-03 03:13 Aktualisiert von: cazfi
Kommentar

Reply To lachu

I do not have to use Tile_Workable to just demonstrate counters. Maybe use just OutputBonus with negative number or similar effect?

For testing purposes any effect you can detect can be used. I often use some output bonus with a very high value so that one certainly sees when it kicks in. Also the (gtk) client citydlg left-panel tooltip should list the effect in the breakdown of the output.

2023-02-12 03:43 Aktualisiert von: lachu
Kommentar

Reply To cazfi

Reply To lachu

I do not have to use Tile_Workable to just demonstrate counters. Maybe use just OutputBonus with negative number or similar effect?

For testing purposes any effect you can detect can be used. I often use some output bonus with a very high value so that one certainly sees when it kicks in. Also the (gtk) client citydlg left-panel tooltip should list the effect in the breakdown of the output.

2023-02-12 03:41 Updated by: lachu

File 0001-OSDN-TICKET-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 11604) is attached

Build city, made it disorder (for example by increasing population, increasing food stock to made starvation late) and wait 5/6 turns. Production should be ate by strike.

2023-02-16 05:03 Aktualisiert von: cazfi
Kommentar

Noticed that this patch does not update documentation comment in supplied rulesets. However, as they lack ALSO "Celebration" counter, we have to have separate ticket for the update of that documentation anyway, and I guess this one can go first already (the alternative would be that the documentation ticket would handle "Celebration" only, go in first, and then this one would be updated to contain documentation related to "Disorder")

2023-02-16 05:04 Aktualisiert von: cazfi
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Keine to Accepted
2023-02-16 05:09 Aktualisiert von: cazfi
Kommentar

Reply To cazfi

separate ticket for the update of that documentation

-> #47367

2023-02-18 05:19 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Dateianhangliste

Bearbeiten

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Anmelden