チケット #45072

Sandbox: Demonstrate counters

登録: 2022-07-09 05:19 最終更新: 2023-04-16 20:31

報告者:
担当者:
チケットの種類:
状況:
完了
コンポーネント:
マイルストーン:
優先度:
5 - 中
重要度:
5 - 中
解決法:
修正済み
ファイル:
6

詳細

sandbox ruleset should have a demonstration of using counters.

チケットの履歴 (32 件中 3 件表示)

2022-07-09 05:19 更新者: cazfi
  • 新しいチケット "Sandbox: Demonstrate counters" が作成されました
2022-08-01 21:15 更新者: lachu
コメント

I copy example from some patch example ruleset's changes.

But I decided to add one more thing - reduce production for conquered cities.

I set def value to 6, checkpoint to 5, so If player create city, there;s no production penalty. But server sets the counter's value to 0, when city was conquered. Taking above in mind, each city's tile should get food penalty, when city is conquered, but no when founded.

But something do not work.

2022-08-02 01:11 更新者: ihnatus
コメント

Yup, currently "OWNED" counters are zeroed any time a city gets an owner and for complicated effects we must have a control of the reason why it happens (like the "reason" parameter in "transfer_city" callback). But now for new cities we may turn the effect off by "Age" requirement.

2022-08-02 03:27 更新者: lachu
コメント

Reply To ihnatus

Yup, currently "OWNED" counters are zeroed any time a city gets an owner and for complicated effects we must have a control of the reason why it happens (like the "reason" parameter in "transfer_city" callback). But now for new cities we may turn the effect off by "Age" requirement.

The reason may be good, but currently we have default value. When city is built, it counters get the default values. When conquered, OWNED are zeroed. I check in the code twice.

2022-08-02 06:53 更新者: ihnatus
コメント

Reply To lachu

The reason may be good, but currently we have default value. When city is built, it counters get the default values. When conquered, OWNED are zeroed. I check in the code twice.

Hm yes, looked at it, likely some inconsistency but that's an early realization any way. As a wild guess, some underflow in tile output value?

2022-08-02 23:24 更新者: lachu
コメント

It looks like client do not update tile information on minimap. But I update ruleset too.

2022-08-06 14:30 更新者: cazfi
コメント

Reply To lachu

... client do not update ...

You've not implemented #41123. Likely we need also another network protocol change ticket before the client side really begins to work.

2022-10-23 15:06 更新者: cazfi
コメント

- Add note about the counters to README.sandbox
- The unhappiness happen also when one builds a new city, not only when one is conquered from the enemy, doesn't it?
- Collect those counter names for translation ( use _() ), give them more descriptive names from the point of view of the player
- Place counters after their documentation in game.ruleset. Now they seem to be after team names
- Why are you making those effects 'quiet'?
- There's no "range" for counters in the ruleset format. Remove attempts to set it

2022-10-23 18:53 更新者: lachu
コメント

Reply To cazfi

- Add note about the counters to README.sandbox
- The unhappiness happen also when one builds a new city, not only when one is conquered from the enemy, doesn't it?

I must check. I used default value to makes it working. Have you tested sandbox with my patch?

- Collect those counter names for translation ( use _() ), give them more descriptive names from the point of view of the player
- Place counters after their documentation in game.ruleset. Now they seem to be after team names
- Why are you making those effects 'quiet'?
- There's no "range" for counters in the ruleset format. Remove attempts to set it

2022-10-25 21:16 更新者: None
コメント

Reply To [comment:12505:45072:64637

- The unhappiness happen also when one builds a new city, not only when one is conquered from the enemy, doesn't it?

Counter do not work for new cities (do not meet condition). New city are not additional unhappy, because counters. I test two times. You must place city with size 5/6 and producing good amount of food to keep citizens alive. There are unahappy citizens due to city's size, but after 10 turns nothing changes.

2022-10-26 22:36 更新者: lachu
コメント

Reply To cazfi

- Add note about the counters to README.sandbox
- The unhappiness happen also when one builds a new city, not only when one is conquered from the enemy, doesn't it?
- Collect those counter names for translation ( use _() ), give them more descriptive names from the point of view of the player
- Place counters after their documentation in game.ruleset. Now they seem to be after team names
- Why are you making those effects 'quiet'?
- There's no "range" for counters in the ruleset format. Remove attempts to set it

0001-OSDN-45072-S-awomir-Lach-slawek-lach.art.pl.patch(3KB)

Documentation, allow translations, parts of game.ruleset relocated, remove junks, QUIET is FALSE now
2022-11-20 01:58 更新者: lachu
コメント

Reply To (Anonymous)

Reply To [comment:12505:45072:64637

- The unhappiness happen also when one builds a new city, not only when one is conquered from the enemy, doesn't it?

Counter do not work for new cities (do not meet condition). New city are not additional unhappy, because counters. I test two times. You must place city with size 5/6 and producing good amount of food to keep citizens alive. There are unahappy citizens due to city's size, but after 10 turns nothing changes.

This was my post, sorry.

2022-12-19 12:52 更新者: cazfi
コメント

This one has been on hold as I want to think how it's supposed to work. Currently it seems like taking advantage of a bug or at least confusing semantics.

2023-02-16 04:04 更新者: cazfi
コメント

I think we'll change this to use #47366, once it exist.

2023-03-14 23:38 更新者: lachu
コメント

Reply To cazfi

I think we'll change this to use #47366, once it exist.

Sorry for asking, but does anybody remember, what works wrong? I test again to check if file 11835 in ticket 45889 repair the issue. But it seems everything worked. Maybe there exist corner cases, where it does not work. I read calculating tile output on city mini-map does not worked, but it worked now.

2023-03-17 02:01 更新者: lachu
コメント

Reply To cazfi

This one has been on hold as I want to think how it's supposed to work. Currently it seems like taking advantage of a bug or at least confusing semantics.

Maybe it now works thanks to #41123? I will clone main branch and revert this merge to test if it is related.

2023-03-26 19:54 更新者: cazfi
コメント

Reply To lachu

Reply To cazfi

I think we'll change this to use #47366, once it exist.

Sorry for asking, but does anybody remember, what works wrong?

Implementation based on #47366 would be cleaner (or more proper way to do it), I think.

2023-03-31 18:00 更新者: lachu
コメント

I think adding implementation from celebration counter example should do the trick. Or do you prefer if we add example for each kind of counter? Edit: owned counter could be used to increase city defense after some turns of owned. Additional condition could be existence of city walls Another example could be existence of cultural building and owned value to produce culture.

(編集済, 2023-03-31 18:05 更新者: lachu)
2023-04-02 21:17 更新者: lachu
コメント

Reply To cazfi

Reply To lachu

Reply To cazfi

I think we'll change this to use #47366, once it exist.

Sorry for asking, but does anybody remember, what works wrong?

Implementation based on #47366 would be cleaner (or more proper way to do it), I think.

0001-OSDN-45072-S-awomir-Lach-slawek-lach.art.pl.patch(2KB)
Reducing production on disorder and produces culture for old city, which celebrating
2023-04-08 18:50 更新者: cazfi
コメント

Can you also add something to the README.sandbox, as this a difference between civ2civ3 and sandbox?

2023-04-10 17:52 更新者: lachu
コメント

Reply To cazfi

Can you also add something to the README.sandbox, as this a difference between civ2civ3 and sandbox?

0001-OSDN-45072-S-awomir-Lach-slawek-lach.art.pl.patch(1KB)
Documentation.

Keep as separate patch.

2023-04-10 18:19 更新者: cazfi
コメント

Loading ruleset with --warnings:

sandbox/game.ruleset: unused entry: counter_owned1.target
sandbox/game.ruleset: unused entry: counter_owned2.target
sandbox/game.ruleset: unused entry: counter_celebrating1.target
sandbox/game.ruleset: unused entry: counter_disorder1.target

Ruleset format has no 'target' property for counters.

2023-04-12 03:31 更新者: lachu
コメント

Reply To cazfi

Loading ruleset with --warnings: {{{ sandbox/game.ruleset: unused entry: counter_owned1.target sandbox/game.ruleset: unused entry: counter_owned2.target sandbox/game.ruleset: unused entry: counter_celebrating1.target sandbox/game.ruleset: unused entry: counter_disorder1.target }}} Ruleset format has no 'target' property for counters.

0001-OSDN-45072-S-awomir-Lach-slawek-lach.art.pl.patch(2KB)
<counter>.target fields removed
2023-04-14 11:27 更新者: cazfi
  • 担当者(未割り当て) から cazfi に更新されました
  • 解決法なし から 受領 に更新されました
コメント

So, I'm taking files 12159 and 12145, in that order?

2023-04-14 15:25 更新者: lachu
コメント

Reply To cazfi

So, I'm taking files 12159 and 12145, in that order?

Apply files you mentioned in random order. These patches do not touch the same files.

2023-04-16 20:31 更新者: cazfi
  • 状況オープン から 完了 に更新されました
  • 解決法受領 から 修正済み に更新されました

添付ファイルリスト

編集

ログインしていません。ログインしていない状態では、コメントに記載者の記録が残りません。 » ログインする