Rework diplomacy page
Since our arcology's neighbors have locations, I figured I'd see what I could do to move diplomacy to something a bit more graphical.
Thoughts?
Border color indicates ownership status (white is yours, blue owned, red not). FS diamonds each indicate one adopted FS, with color indicating whether they're shared (blue) or conflicting (red) with one of yours, and tooltips indicating the actual FS name. Ownership % is you (blue), public (yellow), foreign opposition (orange), and hostile (red), with tooltips indicating the meaning.
Merge request reports
Activity
added 1 commit
- a15e20ad - fix player owned percentage for non-player arcologies
Unfortunately that directional aspect is something that I want to move away from. You can see the discussion about Free City structure in the derelict City Map merge request.
For the time being, you can sort them by arcology number. When they lack a name, they are named by number, and even after losing that name, they don't exactly move, you know?
The cell renderer itself is actually pretty independent of direction; it just drops arcologies into a CSS container in a specified order. Here's the same game in three different modes:
Could add others pretty easily too, if something else makes sense (prosperity, ownership)?
If we move away from the direction grid, we can replace the grid layout itself with something else without too much trouble at all (or show the cells as overlays on the map, if you go for a map approach).
Edited by svornostI would suggest purple as it can be striking and seems to be unused. However when should it be triggered though? Odds are that most player's will not know who the rival is until the passage pointing it out is shown (the week or so) after crushing the failed state invasion attempt.
Edited by Blank_AltCrimson is almost indistinguishable to me; not sure how obvious you want it to be:
Blast's suggestion is purple:
Maybe maroon would be a compromise?
Edited by svornost
added 1 commit
- 12b5db94 - Split out container mode and render the cells a few different ways, since we...
added 1 commit
- b0057b30 - rename from grid to display, since only one of the render modes actually uses a grid container
16 if (typeof targetArcology.FSNull === "undefined") { targetArcology.FSNull = "unset"; } 17 18 let opinion = 0; 19 20 const {shared, conflicting} = FutureSocieties.diplomaticFSes(activeID, targetID); 21 22 for (const fs of shared) { 23 opinion += activeArcology[fs]; 24 opinion += targetArcology[fs]; 25 } 1 /** get one arcology's opinion of another 2 * @param {number} activeID index 3 * @param {number} targetID index 4 * @returns {number} opinion 5 */ 6 App.Neighbor.opinion = function(activeID, targetID) { - Resolved by svornost
- Resolved by svornost
- src/neighbor/neighborDisplay.js 0 → 100644
137 } else { 138 const conflict = diplo.conflicting.find((f) => f[0] === fs); 139 if (conflict) { 140 style = "red"; 141 } 142 } 143 frag.appendChild(withTooltip("⯁", FutureSocieties.displayName(fs), style)); 144 } 145 } 146 return App.UI.DOM.makeElement("div", frag); 147 } 148 149 function ownershipFrag() { 150 let frag = document.createDocumentFragment(); 151 const owned = arcID === 0 || arcology.government === "your trustees" || arcology.government === "your agent"; 152 const yourPercent = arcID === 0 ? `${arcology.ownership}%` : `${arcology.PCminority}%`; I think that looks considerably worse
and we don't do that for percentages elsewhere (sidebar, for instance).
Edit: I've looked into this in more detail, and there's no international consensus. ISO follows DIN and SI in prescribing a space, but every American and UK style guide I can find (including the Chicago MOS, APA, and the Oxford Style Manual) prescribe no space for percentages. Since we tend to follow American English style here, I'm going to stick with omitting the space, even though it might look wrong to some of our European players.
Edited by svornosteven though it might look wrong to some of our European players.
Oh, yes, it does. '%' is a regular unit, and SI rules mandate a space between a number and its unit.
Offtopic: while the current US language and measurement system is archaic as comparing to the Britisch English and the international unit system, maybe one can expect its modernisation, especially in a Free City?
Hah....the EU's English style guides were revised post-Brexit; the pre-Brexit ones specify, "with figures, use the per cent sign (%), closed up to the figure, e.g. 25%", but the post-Brexit ones specify, "Percentages: 15 % (the symbol is preceded by a hard space)." Someone in Brussels is going to be editing an awful lot of documents...
Most Free Cities, I'd expect, wouldn't speak English at all, and I'd be surprised if any outside of North America used Conventional units. We currently set arcology language to English only in North America and Australia, and for oceanic terrain. Maybe some particularly crazy leaders might invent their own unit system...and I could certainly imagine entrenched Roman Revivalist FC's adopting pedes, stadia, and congii, Edo Revivalist ones re-adopting the shakkanhō system, etc.
added 1 commit
- 33b86ee7 - Port most of neighborInteract.tw to DOM so it can be rebuilt dynamically when...
added 1 commit
- 86492afa - Move neighborDescription and neighborInteract twine source to src/neighbor
added 8 commits
-
86492afa...369010f2 - 7 commits from branch
pregmodfan:pregmod-master
- e241c38d - Merge branch 'pregmod-master' of ssh.gitgud.io:pregmodfan/fc-pregmod into diplomacy
-
86492afa...369010f2 - 7 commits from branch
OK, that's the rest of it in and tested, so I'm going to consider this ready (or at least ready for review).
It replaces the text list of the arcology/government/GSP since it contains all that information and more. Also moves the agent/agent-partner display down to the agent details for each arcology (so you just see the agent for the selected arcology)...I think this is better organizationally than having them interleaved but it does bury them one click deeper.
Almost everything in Neighbor Interact can now update dynamically without passage transitions, too. The responsiveness is really nice.
Edited by svornost