Print Page | Close Window

Alternative Sovereignty UI - WIP

Printed From: Illyriad
Category: Miscellaneous
Forum Name: Technology & data
Forum Description: Discussions on data dumps, downloads, and third party applications.
URL: http://forum.illyriad.co.uk/forum_posts.asp?TID=5587
Printed Date: 23 Sep 2020 at 06:55
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Alternative Sovereignty UI - WIP
Posted By: Albatross
Subject: Alternative Sovereignty UI - WIP
Date Posted: 17 May 2014 at 03:51
Thought I'd have a go at this. It takes data from the 'World Map'.



Screenshot here is at 200% browser zoom.
Graphics are the existing in-game assets.

For each sovereignty building, I've shown the equivalent in-town building, plus the resource that it enhances. To the bottom left is 'build level'/'claim level'. If build level is less than claim level, that text becomes red.

Todo:
* Add some indication of the terrain bonuses in the top-left.
* Add an icon for the currently-selected city.
* Colour the background cells slightly, to follow the existing sov colours. Current city will be slightly darker.
* Next to the current level, an up or down arrow if building or demolishing (from the Sovereignty listing), or if claiming sovereignty.
* For sov squares known to belong to this city, but that do not fit on this view, four 'gulley' areas around this grid (N, S, E, W) that have those squares in.
* See how many useful actions I can launch from a square pop-up (standard pop-up, plus Claim/Rescind Sov level, Upgrade/demolish building).
* Have some UI controls that show sovereignty expense, and the best-value upgrades.


-------------



Replies:
Posted By: KillerPoodle
Date Posted: 17 May 2014 at 04:07
Nice

-------------
"This is a bad idea and we shouldn't do it." - endorsement by HM

"a little name-calling is a positive thing." - Rill


Posted By: Rill
Date Posted: 17 May 2014 at 04:30
awesome!


Posted By: Brandmeister
Date Posted: 17 May 2014 at 04:52
You might not even need the text or background images. Just the X/Y and icon might do. All the sov icons would be unique.


Posted By: Arctic55
Date Posted: 17 May 2014 at 06:46
Sweet!   

-------------
I'm pressed but not crushed.
Persecuted but not abandoned.
Struck down but not destroyed.


Posted By: Albatross
Date Posted: 17 May 2014 at 15:15
Updated screenshots.

1: Town view (Safari, 200%)



2. Looking at other players' sovereignty. todo: I might replace × with level.



3. A test of all the sovereignty buildings (that I know of).




-------------


Posted By: Rill
Date Posted: 17 May 2014 at 22:32
Looks good!  I suggest making the Fisheries icon a food icon as well, since that is what is produced (and you can only build Fisheries on those squares anyway).  Just as a way to idiot proof it for folks like me who will look at the pictures to see what is produced or sped up.


Posted By: Albatross
Date Posted: 18 May 2014 at 00:58
Replies:
Indeed, the building icon is not necessary. If I need the space, then they disappear.
Fishery: I originally had it as a wheatsheaf - perhaps it should revert.

Next steps are to get some functionality in there, and use data from the sovereignty listing (which is not sitting in the background as data, but has to be parsed from what is displayed). I foresee the next session with this being next week.


-------------


Posted By: Albatross
Date Posted: 19 May 2014 at 02:31
Quick update: those × squares denoting 'other owner' now replaced by sovereignty level and town name. There's also a boundary to help separate towns' sovereignty areas.





-------------


Posted By: Aral
Date Posted: 19 May 2014 at 03:41
Perhaps you could change their color to designate neutral, NAP, etc?  

-------------
Aral Llc is not responsible for any grievous bodily harm sustained while reading this signature. No rights reserved.


Posted By: ubluntu
Date Posted: 19 May 2014 at 04:18
Originally posted by Albatross Albatross wrote:

Replies:
Indeed, the building icon is not necessary. If I need the space, then they disappear.
Fishery: I originally had it as a wheatsheaf - perhaps it should revert.

Next steps are to get some functionality in there, and use data from the sovereignty listing (which is not sitting in the background as data, but has to be parsed from what is displayed). I foresee the next session with this being next week.

Here is some code that I put together a while back to parse info from the sov page. Creating some ui to put that info into is still on my todo list.

Hope this helps.

function parse_sov(){
sov = [];
jQuery.each($("#sovAccordion").children(".ui-accordion-content").children(".generic"),
function(key,value){
s = {
wood: $($(value.rows[16].cells[0] ).children()[0].rows[1].cells[1]).html(),
clay: $($(value.rows[16].cells[0] ).children()[0].rows[2].cells[1]).html(),
iron: $($(value.rows[16].cells[0] ).children()[0].rows[3].cells[1]).html(),
stone: $($(value.rows[16].cells[0] ).children()[0].rows[4].cells[1]).html(),
food: $($(value.rows[16].cells[0] ).children()[0].rows[5].cells[1]).html(),
claim_level: $(value.rows[4].cells[2]).html().match(/\(([^\)]+)\)/)[1],
claim_status: $(value.rows[4].cells[3]).html().trim(),
distance: $(value.rows[12].cells[1]).html().match(/x (.*)/)[1] -0.0,
gold_cost: $(value.rows[13].cells[3]).html().match(/<b>= ([^<]+)<\/b>/)[1] -0,
research_cost: $(value.rows[13].cells[1]).html().match(/<b>= ([^<]+)<\/b>/)[1] -0,
x: $( "input[name=ClaimX]" , $($(value.rows[22].cells[1])[0])).val() -0,
y: $( "input[name=ClaimY]" , $($(value.rows[22].cells[1])[0])).val() -0,
sov_id: $( "input[name=SovereigntyID]" , $($(value.rows[19].cells[0])[0])).val(),
sov_level: $(value.rows[11].cells[1]).html().match(/x (.*)/)[1] -0,
};
sov.push( s);
//console.debug(s);
}
);
return sov;
}
var sov = parse_sov();
console.log(sov);


Posted By: Albatross
Date Posted: 19 May 2014 at 09:33
Originally posted by Aral Aral wrote:

Perhaps you could change their color to designate neutral, NAP, etc?  
That does happen here: in fact, this does slightly more than the standard colouring: allies and confed are more distinct. By drawing in the boundaries, I'm solving a the subtle problem with the World Map, where it's difficult to distinguish different cities' sovereignty.

One main reason this UI is being written, is because it can be difficult to interpret sovereignty in the World Map because the blobs seem to spread a bit too much, obscuring the status of individual squares. The other reason is that the Sovereignty Held By This Town listing is difficult to visualize, and some vital info is hidden in the 'concertina-d' details.
Originally posted by ubluntu ubluntu wrote:

Here is some code that I put together a while back to parse info from the sov page ...
Yes, thanks, that would be a massive shortcut! I've already done a few of these, just as a proof-of-concept.


-------------


Posted By: Albatross
Date Posted: 20 May 2014 at 02:14
Quick update: notable basic resources - a quick win.

Todo:
(1) draw resource icons with the numbers (I've quickly put w/c/i/s/f here)
(2) update this again to do production bonuses (which requires a lot of data look-ups based on terrain types)



-------------


Posted By: Albatross
Date Posted: 21 May 2014 at 02:11
Production Bonuses

Some design decisions coming up. Sovereignty bonuses (percentage, resource, building) are now extracted from the map, but the information somehow needs to be condensed to fit.

As the fastest proof-of-principle, I've (below) just presented it as text (messy but functional!)



Dropping the 'building text' (like "TraG" for "Training Ground") gives me two lines to play with.

If I'm to use icons to show the special production bonuses for the square, then I need to somehow avoid their confusion with the resource produced by the actual sov building present. The current favourite plan is to use the top-left (2 lines) to present a ghosted icon for +1%, two icons for +2%, and 3 for +3%.

Thinking now about how this bonus information is used.
  • Perhaps bonuses should be highlighted if your sov building does not make use of the square's bonus. Such a situation might be if you have a Farmstead on a 20-clay square, or a Clay Pit on an 8% Ranged Unit square.
  • Should the +3% (8%) stand out more than the +1% (6%) tiles, to draw attention to the more valuable squares?

Geeky stuff

1. I've found more accessible resources, and the proper CDN URL lookup. Hope to implement it soon. Previously I was scaling and clipping an icon montage - big faff.
2. I'm thinking of releasing this script to the wild! Soon™.


-------------


Posted By: Rill
Date Posted: 21 May 2014 at 04:08
Wow.  Looking really cool.

I'm not sure showing the pics for the sov buildings is that useful since many of us don't have a visual representation of what those buildings look like.  It's pretty but doesn't add that much information.  Or maybe that's just me.

When you mouse over each square does it "pop up" with things fully spelled out?  Because that would be awesome.


Posted By: Albatross
Date Posted: 21 May 2014 at 11:05
Originally posted by Rill Rill wrote:

I'm not sure showing the pics for the sov buildings is that useful ...  It's pretty but doesn't add that much information.  Or maybe that's just me.
It's just me too. And it might just be everyone else also.

Next revision will be a clutter cull. It might not look as pretty, but it will be informative, useful, cleaner code, and cleaner look. I might even change it all for Canvas drawing, rather than the current HTML table.

Pop-ups are planned, mostly to provide detail and actions. As a design choice, I don't like activating anything exclusively on a hover, as it excludes the touch-screen users. Maybe pop-ups would work on a click/tap, like they do in Illy itself.


-------------


Posted By: Rill
Date Posted: 21 May 2014 at 16:23
Pop on click would be great, and thanks for thinking of the multiple touch-screen users.  I'm not one of them right now, but I know an increasing number of Illyrians are.


Posted By: Albatross
Date Posted: 22 May 2014 at 19:14
Building backgrounds culled. Gives me enough room to put squares' resource bonuses in the background. I haven't quite got the emphasis as I want it; there will be some tweaking.


Incidentally, this is a thief-making city, turned all the way up to 11.

I've also constructed the graphics in a cleaner way (but you wouldn't notice that by looking - it's a code thing).

Next:
* icons for the squares' production bonuses, on top of those backgrounds, in the top-right.
* indicate unsettleable squares. (I keep seeing good settle spots here, only to find they're water).


-------------


Posted By: Albatross
Date Posted: 26 May 2014 at 02:02
Announcing the rough-and ready release of IllyPal, which includes the alternative Sovereignty map shown in this thread. There are still lots of to-dos.

To launch it, go to your browser's console, and paste this:
$.getScript('http://goo.gl/z4O0qT') - see later post for URL

If you're worried about 'spying' or malicious software, then I'm happy for someone to audit the code to make sure it doesn't post any data.

Here's what you get
  • A floating window, a bit like IllyTools. Drag the top bar to move it; press the '×' to close it.
  • IllyPal tab: version number, and a links to the release notes.
  • Trade Hubs tab: just a few Hubs that I find handy. It gives direct access to 'Send Resources', Inventory, and Orders for the listed hubs. I want to make this more useful by letting each player build their own list, with data held only locally to the browser.
  • Sov tab: as discussed in this thread.
  • Moving Diplo/Military: Centre the map on your target, and it'll make a list. The inferred statistics shown are approximate only, and are not intended to be accurate (the devs deliberately varied the data to make this difficult to track, so I've not attempted to hack that here). Note also that the Size column no longer works.
  • Harvestables: lists the 'Trade v2' harvestable items on the map, with optional filter. Results have pop-ups, as if you clicked on the map square.
Enjoy!

Finally...
  1. I'm nowhere done with this, but my free time is unpredictable, so I make no promises about future updates.
  2. All the data shown here can be accessed through the regular UI, and no extra data requests are made to illyriad servers. Despite this, I might receive a take-down notice if I've done something inadvertently bad, in which case, this script will disappear without notice.
  3. It would be nice to see screenshots used to illustrate interesting uses of sovereignty.


-------------


Posted By: Rill
Date Posted: 26 May 2014 at 02:08
The moving diplo/military shows units in an area and the players to whom they belong?  And this information would not be available for military if sent on Covert?

Just trying to make sure I understand how this works.

Thanks!


Posted By: Albatross
Date Posted: 26 May 2014 at 02:11
Originally posted by Rill Rill wrote:

The moving diplo/military shows units in an area and the players to whom they belong?  And this information would not be available for military if sent on Covert?

Just trying to make sure I understand how this works.

Thanks!
It does not show player names; just your diplomatic status with the units. So the covert aspect does not really apply here.


-------------


Posted By: Albatross
Date Posted: 27 May 2014 at 17:57
FYI, I've not enabled this to work in Broken Lands.

My local copy is enabled for BL, but the BL map hasn't yet been properly generated there, so it's not worth publishing it (and I won't make IllyPal more robust to get around any map problems that currently exist, until BL is formally released).


-------------


Posted By: Albatross
Date Posted: 27 May 2014 at 23:16
There'll be chance for me to do a bit more on IllyPal later in the week. I might be a poor judge of what's really wanted, so here are some ideas. Cast your votes...
  1. Your own list of Hubs.
  2. Sov map: see production bonuses.
  3. Sov map: see basic units.
  4. Sov map: 'Key' to show detail of one square, just like Illy's own map, and simplify the grid view more.
  5. Sov map: building/demolishing indication.
  6. Sov map: smaller squares, to more can fit on-screen (tentative). Scrollable.
  7. Sov map: add actions: Claim/Rescind, Upgrade/Demolish.
  8. New tab: Timers. From any Illy page, add a reminder timer along with the current URL and a comment. When the time approaches, you can view the tab, and click the URL to get to that page again. Exact functionality TBC.
  9. On the IllyPal tab, tick-boxes to switch other tabs on or off. This keeps the UI small, and as a stretch goal, I might add "workspaces" to select these in bulk.
  10. Anything else?
At the moment, I'm not considering service provision to make IllyPal speak to external databases, mostly because it could get expensive, so new things in the foreseeable future will be implemented using local storage.

As a reminder, here's what we have so far...




-------------


Posted By: Brandmeister
Date Posted: 28 May 2014 at 01:09
Master incoming attacks and diplos, master outgoing list. Same for trade goods.


Posted By: Albatross
Date Posted: 29 May 2014 at 02:08
Just a refresh of a few minor tweaks:
$.getScript('http://goo.gl/cmhMw1') see below


-------------


Posted By: Albatross
Date Posted: 29 May 2014 at 22:28
Originally posted by Brandmeister Brandmeister wrote:

Master incoming attacks and diplos, master outgoing list. Same for trade goods.
That would need active scanning of mission pages (reached via footprint icons), and accumulation of timers (see previous post), which is on the to-do list, but a little while off yet.

-------------


Posted By: Albatross
Date Posted: 30 May 2014 at 00:10
New version:
$.getScript('http://goo.gl/hy5o7F')

Release Notes:
  • Basic resource stockpiles (wood, clay, iron, stone, food, gold) now appear in the Harvestables tab.
  • Converted the Moving Units output to a table.
  • Up-to-date 'public' version will always be on the above URL; no changing with every release.


-------------


Posted By: Albatross
Date Posted: 09 Jun 2014 at 18:09
Quick update: v14.06.001.

This one takes data from both the World Map and the Sovereignty listing. So it'll show current increases or decreases of both sovereignty claim and sovereignty building level.


Dev note: Although it's a small change, there's been a lot of back-end refactoring to implement a cache of sovereignty data. There are still improvements to me made here, to reduce its memory footprint.


-------------


Posted By: Albatross
Date Posted: 09 Jun 2014 at 19:23
We'd love to see screenshots of your sovereignty! This is an opportunity to help others out, by explaining how you use your Sovereignty, and what makes it effective for what you want to do.

-------------


Posted By: Albatross
Date Posted: 10 Jun 2014 at 12:13
Here's an example of how a developing sovereign estate looks through IllyPal's Sov map.

http://johnvalentine.co.uk/i/sovgrid11a.png" rel="nofollow">
(Click to view 200%)

It draws attention to:
  1. Under-development; squares that are not taking full advantage of sovereignty claims (-207|294, -206|294). Their stats appear red. If you're building up to claim level, then it does not appear red (-206|296), and has a green bar above.

  2. Basic resource bonuses in the surrounding landscape. For example, the wood bonus at -207|296, or the iron bonus at -209|295. This can be useful for examining small parts of the map for settle spots, or just checking if you're making best use of basic resource bonuses (-207|296).

  3. Unit production bonuses are currently shown as grey text. We'll be looking to improve that soon. On this map you can see "Cav" (cavalry unit production) and "Di.u" (diplomatic unit) bonuses.

Next steps

Actions! We're likely to add actions to these squares, so you can upgrade/demolish directly. The game's existing interface has safeguards to ensure you can't do anything silly by accident; we'll try to do the same while keeping it convenient.

Less clicking! We want to remove the "New Sovereignty" button, and instead just ride along with page refreshes.

If you think of something else that would help you here, then don't hesitate to suggest it.


-------------


Posted By: Albatross
Date Posted: 11 Jun 2014 at 17:40
Broken Lands: Where will you settle? Where will you mine?
Not here — I'm sure your could find better!




-------------


Posted By: Rill
Date Posted: 11 Jun 2014 at 18:01
awesome Alba!


Posted By: Albatross
Date Posted: 13 Jun 2014 at 13:18
Here's what a first claim looks like: 0/0 means no building, and no claim yet. However, there's a green bar above the claim level, indicating that it's increasing.




-------------


Posted By: Tensmoor
Date Posted: 15 Apr 2020 at 00:40
Updated and now available again (with permission from Albatross).

https://illypal.dewt.me.uk/Illypal.user.js" rel="nofollow - https://illypal.dewt.me.uk/Illypal.user.js



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net