WIP Score counter, Score superweapon
Note: this is still quite WIP. Some extra things are unfinished, documentation incomplete and bugs may appear. PR ineligible for public testing.
Implements a customizable score counter, SuperWeapon granting via score and possibly customizable text alignment for strings.
Copy of documentation on SW granting:
- It is now possible to award specific countries with single-use Super Weapons for reaching a defined milestone in game score.
ScoreSuperWeaponN.Typespecifies the Super Weapon type that will be granted. This tag is mandatory.ScoreSuperWeaponN.Scoresets the amount of score players of this country have to earn to receive aforementioned Super Weapon. This tag defaults to 0, meaning that the Super Weapon will be instantly awarded.
In rulesmd.ini:
[SOMECOUNTRY] ; Country
ScoreSuperWeaponN.Type=SOMESWTYPE ; SuperWeaponType
ScoreSuperWeaponN.Score=0 ; integer
; where N = 0, 1, 2, ...
Copy of documentation on score counter:
- This opt-in counter displayes the in-game score (value of killed units minus value of dead units) for the player.
- The counter is displayed with the format of
(Points)Label. The label is★ U+2605by default. - You can adjust counter position by
Sidebar.ScoreCounter.Offset, negative means left/up, positive means right/down. - You can supply your own color through
Sidebar.ScoreCounter.Color, in RGB values. The color is white (255,255,255) by default. - You can specify text alignment with
Sidebar.ScoreCounter.Align, accepted values areLeft,Right,Center/Centre. Defaults toLeft. - You can also change the default position of the counter from the top of the sidebar to the command bar with
Sidebar.ScoreCounter.DrawOnCommandBar. Defaults tono.
In uimd.ini:
[Sidebar]
ScoreCounter.Show=no ; boolean
ScoreCounter.Label=<none> ; CSF entry key
In rulesmd.ini:
[SOMESIDE] ; Side
Sidebar.ScoreCounter.Offset=0,0 ; X,Y, pixels relative to default
Sidebar.ScoreCounter.Color=255,255,255 ; R,G,B
Sidebar.ScoreCounter.Align=Left ; Left, Right, Center/Centre
Sidebar.ScoreCounter.DrawAtCommandBar=no ; boolean
Note: For the label to work, you need to download the improved font (v5 and higher) or draw your own icons.
Nightly build for this pull request:
- compiled-dll-9a3ced57a1a808e2f1821a77f92349b593abe01e.zip This comment is automatic and is meant to allow guests to get latest nightly builds without registering. It is updated on every successful build.
ScoreCounter.Label=
- if a SW is granted by a building, then by points, if you remove the building the SW disappears and only becomes available via said building
- they do not respect SW.NegBuildings. as in points take precedence over prerequisites
- they also ignore SW.AuxBuildings and AuxBuilding
Suggestion: What about new tags for using score points like consumable points each time is used a SW? By using 1 time a SW the needed points will get substracted to the total points count & the SW that doesn't have the needed consumable points should disappear from the sidebar until you reach again the needed points.
Right now the focus is on visuals and bugfixing, though I've noted requested feature list down below. Priority one is correct command bar drawing, as this seems to be the best option to convey information without clutter. Of course, having the counter on the sidebar will still remain possible.
Ideas to consider later:
- Implement score cost (addition/substraction of score) for SWs as a parallel mechanic to score milestone (the current one),
- Reactivate unused [TECHNO]->Points to be used for scoring purposes instead,
- Respecting SW tags like AuxBuildings or NegBuildings,
- Suggested things that I've already forgotten