Play Now Login Create Account
illyriad
  New Posts New Posts RSS Feed - Alternative Sovereignty UI - WIP
  FAQ FAQ  Forum Search   Register Register  Login Login

Alternative Sovereignty UI - WIP

 Post Reply Post Reply Page  <1234>
Author
ubluntu View Drop Down
Forum Warrior
Forum Warrior


Joined: 24 Aug 2013
Status: Offline
Points: 318
Post Options Post Options   Thanks (0) Thanks(0)   Quote ubluntu Quote  Post ReplyReply Direct Link To This Post 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);
Back to Top
Albatross View Drop Down
Postmaster General
Postmaster General


Joined: 11 May 2011
Status: Offline
Points: 1118
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albatross Quote  Post ReplyReply Direct Link To This Post 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.


Edited by Albatross - 19 May 2014 at 09:49
Back to Top
Albatross View Drop Down
Postmaster General
Postmaster General


Joined: 11 May 2011
Status: Offline
Points: 1118
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albatross Quote  Post ReplyReply Direct Link To This Post 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)

Back to Top
Albatross View Drop Down
Postmaster General
Postmaster General


Joined: 11 May 2011
Status: Offline
Points: 1118
Post Options Post Options   Thanks (1) Thanks(1)   Quote Albatross Quote  Post ReplyReply Direct Link To This Post 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™.
Back to Top
Rill View Drop Down
Postmaster General
Postmaster General
Avatar
Player Council - Geographer

Joined: 17 Jun 2011
Location: California
Status: Offline
Points: 6819
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rill Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Albatross View Drop Down
Postmaster General
Postmaster General


Joined: 11 May 2011
Status: Offline
Points: 1118
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albatross Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Rill View Drop Down
Postmaster General
Postmaster General
Avatar
Player Council - Geographer

Joined: 17 Jun 2011
Location: California
Status: Offline
Points: 6819
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rill Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Albatross View Drop Down
Postmaster General
Postmaster General


Joined: 11 May 2011
Status: Offline
Points: 1118
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albatross Quote  Post ReplyReply Direct Link To This Post 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).
Back to Top
Albatross View Drop Down
Postmaster General
Postmaster General


Joined: 11 May 2011
Status: Offline
Points: 1118
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albatross Quote  Post ReplyReply Direct Link To This Post 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.


Edited by Albatross - 09 Jun 2014 at 19:17
Back to Top
Rill View Drop Down
Postmaster General
Postmaster General
Avatar
Player Council - Geographer

Joined: 17 Jun 2011
Location: California
Status: Offline
Points: 6819
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rill Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
 Post Reply Post Reply Page  <1234>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.