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
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
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 (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
ubluntu View Drop Down
Forum Warrior
Forum Warrior


Joined: 24 Aug 2013
Status: Offline
Points: 324
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
Aral View Drop Down
Forum Warrior
Forum Warrior
Avatar

Joined: 20 Sep 2012
Status: Offline
Points: 205
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aral Quote  Post ReplyReply Direct Link To This Post 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.
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 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.



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: 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.
Back to Top
Rill View Drop Down
Postmaster General
Postmaster General
Avatar
Player Council - Geographer

Joined: 17 Jun 2011
Location: California
Status: Offline
Points: 7078
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rill Quote  Post ReplyReply Direct Link To This Post 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.
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: 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).


Back to Top
Arctic55 View Drop Down
Forum Warrior
Forum Warrior
Avatar

Joined: 26 Sep 2011
Status: Offline
Points: 379
Post Options Post Options   Thanks (0) Thanks(0)   Quote Arctic55 Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2014 at 06:46
Sweet!   
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.