Unciv
Unciv copied to clipboard
Feature request: Add scoreboards to mod uniques
Is your feature request related to a problem? Please describe. When I was making a mod,I found a problem: I would to set a rule like "If xxx units' amount is below/above/equals to n, then ...". However, soon I realized that a scoreboard was what I need. After a period of thinking, in my submission scoreboard system is needed to be added to uniques in mod related json files since it can be used as a greatly convenient counter or a timer.
Describe the solution you'd like So I sort out the existing thoughts and list what uniques are need to be added below. 2 conditional uniques: "<when scoreboard [scoreboardName] is [below/above] [amount]>", "when scoreboard [scoreboardName] equals to [amount]>" 2 global/triggerable uniques: "Set scoreboard [scoreboardName] with [amount]"(This one may be used to both create and reset scoreboard...If it is technically practicable), "Add [amount] to scoreboard [scoreboardName]"
In technical perspective, does it just need to add a map variable in runtime? I mean, is it easy to add this function? Anyway, I think this is a good idea for mod making. Hope to be adopted.
Sorry what? What is the context? You want civwide counters, or global ones? What's the actual usage?
Emmm...My meaning is, I would to create global number recorders that is not dependent on other objectives. It is just like scoreboards in Minecraft command system, just to record numbers and every uniques in all mod related json files can read or modify the numbers. Sorry for your confusion caused by my poor English.
Oh...It seems I closed the issue wrongly...
Let me try to reopen it... Sorry I am a new guy in Github
My question remains, are these numbers the same for every civ? Or did each civ have his own counter?
Same for all
Well, could it be two parts: some numbers are global while others are unique? Is that too difficult to make it?
If adding this function will disorganize your releasing plan, I prefer give up my suggestions... Sorry for disturbing...
Sorry what
Exactly my first reaction :upside_down_face: - but I think I get it.
prefer give up
There's no "give up" in Unciv. Applied to your input - ideas can always help even if rejected.
If I understand you correctly, part 1 would be the ability to mod e.g. a "[-25% Production] [in all cities] <when scoreboard [Production Rank] [is equal to] [1]>" that would apply the every civ, giving a penalty to only the leader... (And possibly lead to an oscillation due to the penalty dropping the leader to rank 2). The scoreboard names in your conditional would by some mapping rule allow using any number visible on the new "Demographics" scoreboard, the one you need to set an option for? I can imagine that working, though I wouldn't have fun coding it. Part 2 - "Set scoreboard" - impossible as those are calculated on the fly, you can't with one trigger magically set a Civ's production rank. So you must be referring to new, arbitrary columns that get their value rows only through your uniques? You would need tons of those for any meaningful result. My rough estimate - abort abort captain, even estimating the use/effort ratio gives me headaches. But thanks for the idea. (Phantasizing) Scenarios with goals... Map editor placing events on tiles backed by python scripts... Triggered Uniques with python scripts for trigger condition and/or effect...
There's no "give up" in Unciv. Applied to your input - ideas can always help even if rejected.
Thanks for encouraging me, I just was ... I was a bit of nervous because my English isn't good and I didn't mean to make anyone inconvenient.
As SomeTroglodyte said, this is probably what I meant. I want to have a conditional unique to limit where the unique affects. Maybe it can be like this situation in the future: affecting game with scripts...
Here I am trying to explain my idea more clearly: In game there are scoreboards, whose names are global and unique, but every civ has a individual value for every scoreboard. The data structure of scoreboard is same as a Excel sheet table: Civs are used as rows while all scoreborads are used as columns. Values are inside of this table, and there are conditional uniques can call values in specific row/column or exactly call a value in a specific cell. Besides, there should be uniques can operate these values, or declare/remove scoreboard.
Those above are all of what I think, and I am sure those are the true ones needn't to be changed more.
Scoreboards with specific values for civilizations can in theory be done using resources. Some buildings/tiles can add resources, and with conditionals you can check if you have enough/too many of a specific resource. Global scoreboards are a bit more difficult, I don't think you can do those currently.
Closing due to lack if interest. Niche request and not in scope of project.