Utility script: Automatically use Dedicated Race Colors on Starmap

« Back to Developers

2679 days, 22 hours, 56 minutes ago
Profile Image
dtolman
Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Wish every race had their own dedicated color for ships, planets, minefields, etc? Well, this is the add-on for you.

Now every race is assigned its own unique color for everything! Any feedback on colors is appreciated.

http://userscripts.org/scripts/show/130549

---
Updates:
- have changed webmine style so that they now have bright borders and a darker center. This should help differentiate them from regular minefields.
2679 days, 9 hours, 53 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Race Colors on StarmapWrite Reply
UPDATED!
I - changed the colors to look prettier.
II - Fixed some bugs in my code, should work just about perfectly now (need to optimize, but thats long term).

Here are the colors I used.
// Race 1 (Fed) - White
// Race 2 (Lizard) - Green
// Race 3 (Birds) - Crimson
// Race 4 (Fascists) - Pink
// Race 5 (Privateers) - Lime
// Race 6 (Cyborg) - Magenta
// Race 7 (Crystals) - Yellow
// Race 8 (Empire) - Purple
// Race 9 (Robots) - Gray
// Race 10 (Rebels) - Aqua
// Race 11 (Colonies) - Blue
// Unknown/Unexplored - Tan
// Unoccupied - Chocolate

Thoughts on colors, etc, very much welcomed!
2678 days, 17 hours, 48 minutes ago
Profile Image
kedalion
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Very nice! :)

Btw. your post only shows 11 races, but in the code you even have full giant melee support... It looks quite awesome. I had no idea that I had so much information about the whole map...

I'm a bit surprised as I thought to remember that the map is being loaded as .png from the server.

Edit: Just checked the .png referenced in the JSON and it appears not to be used... maybe all dynamic SVG now. Anybody figured out more here?
2678 days, 12 hours, 23 minutes ago
View kira benodo's profile
kira benodo
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Very nice indead and usefull.

Sorry I have a but, the white of "my" Feds is to similar to unknown/unexplored - tan.
Please change the coulour or make them all mine ;-)

Thanks for the tool!
2678 days, 12 hours, 9 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Glad that everyone likes it!


---

Kedalion - I left in the default colors for the races past 11. Couldn't be bothered  to document them all. Next step is to change the colors in the game graphs so they match my new color scheme :)

---

For the unexplored planet colors, any other opinions? I'm playing Feds in a game, and I thought the difference was enough to be picked out at a glance.
The x11 color chart I've been using can be found at:
http://en.wikipedia.org/wiki/Web_colors

I might also lighten the Race 11 color a smidge to Royal Blue. Those ships can be tough to pick out on a background




2678 days, 10 hours, 31 minutes ago
View nitemare's profile
nitemare
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
It's a nice try, but I think it needs some changes in the colours. They should be not so strong.

 In the other hand It paints the same colour, the minefields that the planets and ships. This wanna say that when there are a lot of overlapping minefields the planets and the hips disappear.

 I didn't try, but It looks like that it paints webminefields and minefields in the same colour too making it really dangerous when facing the crystals..

Here you have a screenshot in order you can see what happens with overlapping minefields.

Regards,

 Nite

2678 days, 10 hours, 31 minutes ago
View nakor's profile
nakor
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Hi!

Great work, dtolman! :)
I hope the Planets Nu team integrates something like this some day - with customizable colors. Till then... can you tell me how to change the colors in your script, dtolman?
2678 days, 10 hours, 16 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
See what you mean Nite. I might use an alternate palette for the minefields then. Maybe a slight shift in color so things don't get lost at max saturation. In the meantime, I uploaded 0.4, which makes webmine fields a bit darker than before.

---

Nakor - I have two new var's defined that are used for Colors. Colors (english) and ColorsA (hex code).

I use ColorsA for everything in code, and Colors to remind me what its supposed to be. If you want to modify the script, ColorsA needs to be modified in two places, as I overwrite two different functions.


2678 days, 9 hours, 56 minutes ago
View nakor's profile
nakor
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
EDIT:
I see, thanks.
2678 days, 8 hours, 5 minutes ago
View thin lizzy's profile
thin lizzy
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply

really cool.. that's what i was waiting for a long time!

could it be possible to use the same colours for the races like they are used for the graphs? 
most people (including me) are used to these... and the new ones are a bit confusing...
and i agree that webs should have their own colour - they are something completely different
from regular mines..

:)
2678 days, 7 hours, 41 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
I tried the regular colors on the graphs and... I thought my eyeballs were going to explode. 4 variants on yellow/orange :P

UPDATE - I have changed webmines so they are a bit darker than regular mines, and have a nice bright border. I think it looks pretty nice myself. Please try it out and let me know.
----

anyone know how to get this to show up on the developer forum again? I edited the first post... and now it doesn't show up there :( :( :(
2677 days, 22 hours, 0 minutes ago
View vepr's profile
vepr
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
nice script.  the only thing that would be nice is if you could retain your current color choices for your own planets.  having my planets recolored into a color I don't like was disappointing, i like my nice light blue empire.  The rest is very useful. 
2677 days, 10 hours, 45 minutes ago
View nakor's profile
nakor
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
I tried out various colors for the races and think I finally found some acceptable ones (which are not too gaudy):

// Fed --- Yellow
// Lizard --- White
// Birds --- DarkGreen
// Fascists --- Red
// Privateers --- Cyan
// Cyborg --- Teal
// Crystals --- DeepPink
// Empire --- SaddleBrown
// Robots --- SteelBlue
// Rebels --- Olive
// Colonies --- RosyBrown
// Unknown/Unexplored --- DarkGray
// Unoccupied --- Tan

If you find other colors which are pleasing for the eye, please let me know. :)

2677 days, 10 hours, 37 minutes ago
View nakor's profile
nakor
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
@dtolman:
It would be fantastic, if you could manage to get the things done thin lizzy and vepr already suggested:
- own race is always colored in "cyan" (any other race may not have that color then of course)
- webmines have their own color
- same colors are used for the graphs

2677 days, 9 hours, 9 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
I can post an alternate version where your race is always cyan - not a problem. Will do it tonight or tomorrow.

For the webmines, I think having a different look (the ring around the outside) is better than a different color. If you think the effect isn't pronounced enough let me know, I can tweak it a bit.

I'm going to tweak a few of the colors. If any are particularly hated let me know.
Feds white, Lizards green, Empire purple, and Robots grey will stick though - author's prerogative :)
2677 days, 8 hours, 51 minutes ago
View nakor's profile
nakor
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Awesome! Looking forward to it... :)
2677 days, 7 hours, 10 minutes ago
View vepr's profile
vepr
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Hey dtolman,

Appreciate all the effort. 

The point is not to make your race always be cyan however.  Everyone likes different colors.  Mine for example are blue with a white fade, which I set in settings.  I find it soothing.  The problem is that someone else may like them green, or purple, or whatever.  To make this script truly great, you need to make it grab personal preferences for our own colors from the setting page and then set all the other colors as you assigned them.   If you don't, then only the people who like cyan planets will be happy.

Keep up the good work

Vepr
2677 days, 6 hours, 17 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Hmmm... good point. Thats a whole 'nother level. I'll look into it, see what I can do. Configurable is obviously better.
2677 days, 3 hours, 27 minutes ago
View mjs68508's profile
mjs68508
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
I am also one of those who color codes my planets based production, SB defense etc.

What if instead of a script that replaces all colors permanently, how about a script that only changes the colors when you press an "owner" button in the map tools drop down (like minerals, HYP circles, etc)? It would be nice to have this feature "on call" to be able to visualize empire shapes and relationships, and then have it disappear when we press "x."
2676 days, 11 hours, 5 minutes ago
View vepr's profile
vepr
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
having it as an optional but easilly accessible overlay would be the best implementation.  is that possible as a greasemonkey addon however?  or will this need to be implemented by the developers?
2676 days, 7 hours, 59 minutes ago
View mjs68508's profile
mjs68508
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
vepr,

Check his temperature script:


If he did exactly this with "ownership," say, with the default colors on the game page graphs, it would be very helpful and cool. The current colors are fine and I use my own color scheme for special planets. But, to be able to use the drop down map tools menu to get a temporary snapshot of overall planet ownership would be helpful.
2675 days, 5 hours, 26 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
FYI - I updated the temperature script so it now shows:
Ownership (with default color scheme)
Number of Clans (with Temp or Owner)
Temperature

2673 days, 7 hours, 8 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
This has been updated again.

As requested, this Mod can now be activated/deactivated from within the Planets Client.

To change settings - go to the Setting Page, look to the bottom under special commands, click the new button to activate/deactivate the mod (will need to zoom in/out of the starmap to refresh).

Look for more user controllable settings coming soon!
2673 days, 3 hours, 50 minutes ago
View vepr's profile
vepr
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
i see the special commands button, but there is nothing there to select.  am i missing something?
2673 days, 3 hours, 9 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Sorry about that - there was a mistake in the version I uploaded.

It should work properly now (v0.6). 
2673 days, 2 hours, 4 minutes ago
View vepr's profile
vepr
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
It works! great.   is there a way to use your existing color scheme for your own planets?
2673 days, 1 hours, 11 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Next version... coming soon... watch this space :)
2672 days, 16 hours, 52 minutes ago
Profile Image
herbert
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
very useful script - thank you
2672 days, 10 hours, 29 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
UPDATE! v0.7 is now out!
Want to use the default color scheme for your race? Done!
By default the game will now use the aqua/green color scheme for your own race.

Like my new color instead? No problem, its now configurable from the dashboard->setup screen (along with the entire mod).

next up this week - learning java script cookies to see if I can save these settings on your local computer!
2672 days, 10 hours, 24 minutes ago
View nitemare's profile
nitemare
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
hi dtolman,

I have installed it and there is no options in settings. 

 I'm using chrome ;D

 Regards,

 Nite
2672 days, 10 hours, 23 minutes ago
View nitemare's profile
nitemare
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Forget it, it is working now ;D

 Thanks!!
2672 days, 1 hours, 56 minutes ago
View vepr's profile
vepr
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Its getting better and better with each version. 

my empire now looks like I am used to.  It even took the colors I changed in the settings for my own planets and used them... NICE!

There are a few issues that could be better.  For example, a lot of the races use colors that are the same as the planet labeling colors that are accessible to us in the "notes" menu.  Since I color code all my useful planets, it seem like I have a bunch of random enemy planets all over my empire.  Is there a way to set the default enemy race colors to be two tone like our own planets and less saturated?  they just need a hint of color, not be super color intense.   That way, the color labeling system which a lot of us use will remain useful. 


2670 days, 7 hours, 17 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
UPDATE! v0.8 of the mod is now out! This version will now save your "my race color" settings so that it will remember what you set them to last time.

Now that I've figured out cookies, I'll start looking into allowing users to select their own colors for the first 11 race slots (and look into this whole two-tone issue).
2667 days, 0 hours, 3 minutes ago
View vepr's profile
vepr
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
this mod is getting better.  good work dtolman, we all appreciate it a great deal.

 there are a few things that are preventing me from using it full time still.  one is the fact that some races use the same colors as the default color codes you can find in the notes menu.  the other is that it would be nice if in addition to using our own selected colors for our own race as was established in the last update, we could also use our own colors for both the unexplored and the explored but uninhabited planets.  lastly, is there a way to set it that the mod does not get turned on by default when the game is loaded?  even if i turn it off, if i reload the game, it defaults to the mod being activated. 
2666 days, 22 hours, 2 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Just made a quick change - v.81 should now save both the overall mod and your own races color choices to the cookie.

Will be looking into customizable colors next, then two tone colors.
2665 days, 5 hours, 30 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
MAJOR UPDATE!!!! User customizable colors!

v0.9 is now OUT! You can specify your own colors for the first 11 races, unknown planets, and unoccupied planets. Use #FFFFFF or white - however you want to input it.
Make a change, and next time you redraw the starmap, it'll be there.
I also show the current color choices in setup - it doesn't refresh automatically, so you need to click setup again after you make a color change.

If you screw up the colors really bad, there is a button that sets it to use the default Mod colors.

The code is the equivalent of finger painting, so I expect there will be updates throughout the next week to clean it up.

Oh yeah - and it all saves to cookies, so it should save even when you close and reopen your browser.

2665 days, 5 hours, 5 minutes ago
View vepr's profile
vepr
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
just installed the new mod.  i see no changes.  how do i set the colors?
2665 days, 4 hours, 59 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Hi,
Make sure only v0.9 is enabled, and that you refresh the planets website. If you go to the settings screen, on the bottom, you should see the changes.

Oh - and I just made a slight change. A debugging pop-up was left in there by accident.
2665 days, 4 hours, 34 minutes ago
View vepr's profile
vepr
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
great!  now all we need is to enable two tone colors to better differentiate from own labeled planets and to allow it to have more than the first 12 players to allow for giant melee games.  Strong work!
2662 days, 4 hours, 10 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
MAJOR UPDATE!!!
Version 1.0 is now out - with all intended basic functionality*

-The mod now supports color gradients (I'll whip up some default ones over the weekend - it still uses solid colors without user changes)
-Minefields and vectors will be drawn using the second color of a set
-Mod will preview the color gradient on the settings screen (on firefox. Chrome needs different preview code which I will add this weekend)
-Added color reset button so that if colors are too messed up, it will overwrite your values with defaults
-rewrote the backend code to be a lot cleaner and more efficient


If there are any problems (or suggested race colors) please let me know.

*on Firefox
2662 days, 0 hours, 55 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
v1.12 now out. Minor bug fixes, a new default color set... and preview for Chrome.

Of course it broke preview on Firefox. Looking into it.

EDIT: v1.13 now out. Everything should be working in preview.
2661 days, 7 hours, 48 minutes ago
View vepr's profile
vepr
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Color gradients!! Woohoo!!!

the mod is almost perfect now.  Is it possible to expand it to include more than 11 races for the giant melee games? 
2661 days, 6 hours, 43 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
On the roadmap. Need to address some technical aspects  first (consolidating a potential 100+ cookies into, at the very least, a handful).
2661 days, 5 hours, 23 minutes ago
View nitemare's profile
nitemare
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Great job, it works perfect!!! 
2661 days, 5 hours, 13 minutes ago
View nitemare's profile
nitemare
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
There is one thing that you should change. When 2ships from different races are over the same planets 2 circles appear but both of them are of the same colour. It varies, not always has the colour of the same race but it always of only one colour.
2659 days, 10 hours, 51 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
v1.2 is now out:
-When you make a change in the settings screen, it will now redraw the map instantly with the proper colors. No more +/- on the starmap after making a change.
-Addressed nitemare's issue as best I could. Different sized circles around planets for player owned, allied, and enemy ships. Player owned ships will always be the right color.

Making it so each race color appears would be... problematic. Just fixing it so allied and enemy ships have different colors would require rewriting the code more extensively - so I'm not planning on addressing this unless its a real problem for players.
2658 days, 23 hours, 38 minutes ago
View vepr's profile
vepr
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
dude, all that work to improve the game, and you weren't even playing the registered version.  What gives?  I bought you registration for 3 months.  Enjoy and thanks for all the effort.

Support the developers people!
2658 days, 23 hours, 22 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Thanks! I've been mainly in a private "welcome back to VGA" game with friends from college, so wasn't planning on registering until our next game...

But I enjoy coding and don't do much in my current position - so nice small incremental projects like this has been lots of fun!  Plus my games look purty now with all the colors! Double bonus!
2656 days, 7 hours, 35 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
v1.4 is now out. Settings page code completely rewritten to avoid effecting other mods. I've also added in a basic way to update races beyond race 11. One note - any changes you make in the settings page will be reflected on the map instantly, but won't be displayed on the setting page itself until after you click Settings again to refresh the page (I need to look into that).
2644 days, 10 hours, 34 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
1.5 is now out - I made some modifications so that this will work with the new client. If there are any problems on the new site, please let me know.
2642 days, 4 hours, 18 minutes ago
View saimud's profile
saimud
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Thanks for your work, this is a very helpful mod. However, I have been playing around with different colors and now I am experiencing troubles with the "reset all to custom color settings" - the button does not seem to work. Could you please check this or post the hex codes of your standard colors so that I can reset them manually?
2642 days, 3 hours, 26 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Won't be able to update this for a week. In the meantime look in the script for colorsa and colorsa2

Oh and you can use regular words like red white lightblue etc
2635 days, 7 hours, 53 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Color reset seems to be working fine for me - next time you try clicking it, then click on the settings button again to refresh the settings screen (it doesn't refresh that screen automatically - sorry).

If it still fails, please let me know your browser and version, I can try it out myself - it works for me on my Chrome and FF installs.
2630 days, 3 hours, 18 minutes ago
Profile Image
kedalion
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
dtolman, I used your script as a starting point for a territory map (as was used in the timelapse project) utility script:  http://planets.nu/discussion/utility-script-territory-map

I ended up not drawing inside the drawMap function, but I'm still using your default colors. I can see many possible problems when working multiple addons, but these two should work fine.
2622 days, 11 hours, 44 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
This has been updated to work with the latest update. I've also improved the activate/deactivate functionality so that if the mod is turned off from settings, everything should work normally (I missed the waypoint function before - sorry).

---

Kedalion - I'm downloading your territory map code now - great concept!
2618 days, 1 hours, 2 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Just wanted to note that a form of this is now in the Relationship screen of the UI.
I will continue to support this however as it has features not found in the official version:
-_all_ colors supported by javascript are selectable
-both color tones selectable for better customization
-Minefields show up with player colors as well, not just ships and planets
-Web mines are shown with a different style, to make them visually distinct.
2617 days, 0 hours, 4 minutes ago
View beacon's profile
beacon
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
hmm...thinking about the colors, why not use the same colors as for the scores? I just happened to copy those today, maybe you want to use those in future. They are not dependant on the race, but only on the "slot". As there are 30 slots in a giant Melee, there are 30 values also
ff0000
4169e1
008000
800080
ffa500
ffff00
00ffff
808000
ff7f50
ff1493
ffffff
7b68ee
a0522d
87ceeb
ff6347
f5deb3
f08080
2f4f4f
008080
b22222
808000
9370db
00ff00
4b0082
d2b48c
9acd32
daa520
f0f8ff
6b8e23
ff4500


rgds
Beacon


2594 days, 12 hours, 24 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
v1.6 is now out!

Sharp eyed observers will notice that the Note->Add Color screen includes 22 new colors - the colors for the first 11 race slots for the Color Mod! 

Note that this only works for colors in the #xxxx format - if you use words such as lightgrey they'll appear as black - I'll work and see if I can shoehorn those colors as well.
2589 days, 22 hours, 29 minutes ago
View vepr's profile
vepr
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
dtolman, how do i set races beyond the first 11 in melee games?  there is a slot where you can manually enter the race number, but it only allows you one other race above the first 11.  what if i want to set colors for all the other races?
2589 days, 14 hours, 5 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Hi,
You can use the additional slot for any race number - you just need to do it one at a time... enter in the race number and the two values, then enter in another race number and another two values, etc.


2449 days, 6 hours, 10 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
In my own personal games I've seen some odd on-screen results from running this mod  - sections of screen disappearing, ship warplines appearing without ships (or disappearing).

I'm not entirely sure what is causing this, but I believe it could be related to changes made in the new Planets 1.31 client release. I will investigate.

Also - for the new play.planets.nu client, I should have a new version of the mod written this week. With the new client the mod had to be re-written from scratch.
2447 days, 9 hours, 51 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
v1.7 is  now out. This includes a complete rewrite of the code to support the new v3 client on play.planets.nu.

One caveat: the refresh is not working on the map screen, so to force any changes in the settings screen to show you must hit the i, followed by o key (go back a turn, go forward a turn) to force a refresh. I'll try to find a better method.

For the original planets.nu client, I am aware there are some odd screen drawing bugs. Workaround:
Go to the dashboard and ship list. Click on a ship. It will redraw the map and everything should work OK.

If any bugs are found with this applied, please let me know and I will look into it immediately.
2439 days, 0 hours, 32 minutes ago
View thin lizzy's profile
thin lizzy
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply

yessss.. ssss.. i really like it by now!

the only wish i would have is a way to distinguish webs from regular mines
when using my own colours, and maybe a colour picker or something similar.
i just don't understand hex colours..
(but these things are mini - once set up, this works really great!)
2438 days, 22 hours, 39 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
You can actually use blue, green, aqua, and regular color words now (my wife didn't like entering in hex numbers either when using it).

I'll look into the web/regular issue for default color schemes - should be easy fix.
2419 days, 6 hours, 17 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
For this on play.planets.nu (aka - planets.nu client v3), I've added to this my mod to display the ship name on the map when there is an explosion. TWO mods for one great price in v1.8!

For those on regular old planets.nu, no change.

--
EDIT - I also added back the mod colors in the diplomacy screen color picker. I had removed it as it wasn't working properly before. Just in case anyone was trying to use the mod colors there.

--

Thin Lizzy - I checked my code, and it should be displaying regular and web minefields differently no matter what is set, as long as the mod is on. Regular minefields look normal, and web mines have a bright ring around the outside of the minefield to distinguish it.

If its not working, please post a screenshot showing both minefield types.
2298 days, 7 hours, 22 minutes ago
Profile Image
gudmo
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Now you have to fix this for test.planets.nu :D
2298 days, 7 hours, 10 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Yeah - Joshua is messing with the code a lot still, so I don't want to start work until its more stable. Dunno what he changed, but it killed that mod completely.
2295 days, 7 hours, 39 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
OK - I've split the codebase for the original client:
http://userscripts.org/scripts/show/130549

and the new play.planets.nu client:
http://userscripts.org/scripts/show/166183

If there are any issues, let me know.
2295 days, 7 hours, 37 minutes ago
Profile Image
gudmo
gudmoWrite Reply
Looks like it works now.. .Thank you Dtolman...
2117 days, 13 hours, 5 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
The mod for the "new" interface has been updated to v2.03 to address a bug. Please download from http://userscripts.org/scripts/show/166183
2117 days, 13 hours, 1 minutes ago
Profile Image
gudmo
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Awesome stuff Dtolman... Great work. D:
2117 days, 11 hours, 20 minutes ago
Profile Image
dan!
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
I like it but the crystal webmines need to remain purple
2070 days, 5 hours, 21 minutes ago
View red megaman's profile
red megaman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Seems like the new script (v2.03) removes the little boxes around planets with notes.

I quite like those boxes, but if this is a feature, which lines should I comment out to get them back?

Other than that, great work :-)  I'll use the script even if I don't get my boxes back.
2070 days, 5 hours, 7 minutes ago
Profile Image
toxis142
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Does this script function with team games/giant melee's?
2070 days, 3 hours, 20 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
@red+megaman
Looks like they made a change to a function I'm overwriting - it worked previously. I'll take a look and get it fixed this week.
@toxis142
This works with all games - for giant melees you can update the races above 12 one at a time through the setup screen.
2070 days, 3 hours, 17 minutes ago
Profile Image
toxis142
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Perfect, thanks.
2070 days, 3 hours, 6 minutes ago
View red megaman's profile
red megaman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Thanks a lot :-)
2070 days, 2 hours, 4 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
OK - should be fixed in the newly uploaded v2.04 at http://userscripts.org/scripts/show/166183.

Someone pointed out that laying minefields in another races name is causing issues. I'm not liking how minefield preview is looking in general with the mod, so I'll look to revamp that next.
1987 days, 6 hours, 4 minutes ago
Profile Image
night2day
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Great. I will try this immidiatly. I hope I can configure my old Echoview settings again. :)
Is a grided fillcolor for webmines like in Echoview possible?
1986 days, 13 hours, 25 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
No grid fillcolor - it was difficult to see multiple webmine fields I found. I came up with an alternate coloring scheme that seems to work OK as a visual differentiator.
1985 days, 13 hours, 10 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
v2.11 of the new client color mod is now posted. I've fixed a bug which resulted in allied ships not appearing properly when around planets.

New version can be downloaded at:
http://userscripts.org/scripts/show/166183
1985 days, 6 hours, 43 minutes ago
Profile Image
glyn
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Thanks, had to stop using because of the hidden allied ships bug.
1768 days, 6 hours, 33 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
v2.12 of the Color Coding UI mod is now available. I've merged in changes made by Josh to improve performance - it should now have similar performance with or without the mod:
https://greasyfork.org/scripts/2591-color-coding-for-planets-nu
(the original mod for the old interface is unchanged)
1739 days, 23 hours, 51 minutes ago
Profile Image
lordlancelot
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Amazing !!!

This able us, to have different color for each game, setting them in diplomacy screen, the remove not color option is also a great one.

Keep up the good work.

http://vgaplanets.org/index.php/Planets_Nu_Client_Add-ons
1739 days, 23 hours, 48 minutes ago
Profile Image
lordlancelot
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
remove "note"

edit button anyone ?
1739 days, 22 hours, 5 minutes ago
Profile Image
glyn
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Agreed... this ain't fark.com where you have to worry about people changing their posts to "win" some stupid online political battle.
1739 days, 19 hours, 38 minutes ago
Profile Image
mule
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
I like this script, but when playing Crystals I can't tell if my mines are web mines or regular mines. That is an important bit of info.
1739 days, 19 hours, 21 minutes ago
Profile Image
glyn
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
How about Webs the same colour as was assigned to owners Race, but a thicker line for the perimeter and reversed gradient compared to Minefields?

I have multiple overlapping Webs in multiple Races names... even harder to tell what is going on once I select a ship set to Minesweep.

1739 days, 18 hours, 57 minutes ago
Profile Image
glyn
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Is using a pattern fill out of the question? Fill Webs with image of spider!

Could make them actually look like a spider web just using four lines and two rows of bezier curves (16 in total ).
1739 days, 18 hours, 46 minutes ago
Profile Image
glyn
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
So it still doesn't quite work for Melee games as you can't change assigned colours for all of them... but another Crystalline players Webs do match his races colour I noticed, so I'm happy to see that!
1739 days, 18 hours, 36 minutes ago
Profile Image
glyn
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Nevermind, got it working in a Melee game by using the Diplomacy Color picker... I have to Exit and re-enter for some changes to take effect.

Also, thanks for having exploded ships names view-able on Starmap.
1739 days, 8 hours, 21 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Actually - the webs do have a reverse gradient and a thicker bright border line. They should be identifiable by the thicker bright border ring and non-flat coloring (thats how I spot 'em).

I use my mod 100% of the time, so believe me, I want webs to stand out, and I think they do. But there's always room for improvement - if you want to mess with how they show up, edit the file and look for these lines:
grad.addColorStop(0.9, colorToRGBA(color, 0.15));
grad.addColorStop(1, colorToRGBA(color, 0.3));
the first value is where the gradient starts - so webs only go between 0.9 and 1.0. The second value is the percent opacity and color gradient. So webs go 0.9 to 1.0, which gives the bright outer line, and 0.15 to 0.3 for color

For comparison regular mines go 0 to 1, with a gradient of 0.4 to 0.2:
grad.addColorStop(0, colorToRGBA(color, 0.4));
grad.addColorStop(1, colorToRGBA(color, 0.2));

If you want to mess with the options and find something better - please, let me know!
1739 days, 8 hours, 17 minutes ago
Profile Image
mule
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
I thought I noticed the gradient and border, but it's way too subtle for me. I want there to be no doubt, I screw up enough without help. :)
1739 days, 8 hours, 6 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
I tried making the disk of the webfields brighter/stand out more originally - but the problem is when you have multiple overlapping web fields it was literally a bright white blotch on the screen - you couldn't even see ships!

So I had to dial it back - as far as I can see the only place you can make stand out without messing up overlapping minefields is the edge - the current bright ring edge, with the subtle reversed gradient on the rest, was the compromise I came up with.
1739 days, 7 hours, 55 minutes ago
Profile Image
mule
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
I tried changing:
grad.addColorStop(1, colorToRGBA(color, 0.3));

to:
// grad.addColorStop(0.5, colorToRGBA(color, 0.45));

and that seems to add enough border to distinguish the borders enough for me. Thanks for the suggestion!
1739 days, 0 hours, 24 minutes ago
Profile Image
glyn
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Dtolman: I liked your reverse gradient so much, subconsciously I wanted to take credit for it! :p

But by thicker line I meant a solid line at least 2+ pixels wide. I'll see if I can figure out how and make sure it doesn't artificially make the Web look bigger than it is. If it looks good, I'll post a screenshot with the results and code changed.
1509 days, 8 hours, 35 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
v2.2.2 is now posted - I've updated the script to play nice with the Sphere add-on.

https://greasyfork.org/en/scripts/2591-color-coding-for-planets-nu

As always, if you have a problem with any of my scripts, please PM me or post on the relevant script thread - I can't fix what I don't know about!
1504 days, 6 hours, 10 minutes ago
Profile Image
anaconda
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
After installing this version (2.22) it stopped working for me; friendly planets and ships are now blue and all else red, like it is supposed to be? before installing it an hour ago it was working like a dream.

- using firefox 38.0.5.
- disabling all other scripts i use did not help. i tried to relaunch fox also in between, and did disable this one too, closed fox and relaunched, enbaled, closed, relaunched... nothing seems to get it working for me anymore.

am i missing something my self?
1504 days, 6 hours, 2 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
That's the version I tested it on... Are you running it from planets.nu/ (standard client), or from planets.nu/home (old client?), or from another web URL altogether?

The add-on does run (or not) based off the URL.
1504 days, 5 hours, 38 minutes ago
Profile Image
anaconda
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
planets.nu (the same i have ben using all the way)

And, like said, it worked so far just fine. i was updating all other plugins i am using the same time and was wondering maybe it conflicts with something else? BUT after disabling everyting (incl. this one) and relaunching it still wont work :/ is there older version available i could run to test whats going on?
1504 days, 5 hours, 34 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Odd. Is this happening on all games? You can install the old version by going to:
https://greasyfork.org/en/scripts/2591-color-coding-for-planets-nu?version=24004
1504 days, 5 hours, 28 minutes ago
Profile Image
anaconda
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
every game i am involved with.

thanks for the link, i will test it tonight (EU).
1504 days, 5 hours, 14 minutes ago
Profile Image
anaconda
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
ok, the old version works just fine as expected - even with all the scripts i updated today.

now trying to install the new version again, maybe there was some problem in installing it in the first place :/
1504 days, 5 hours, 3 minutes ago
Profile Image
anaconda
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Old version (2.2) works fine, the new one does not.

Maybe platform has something to do with it? Mine is Macbook Pro (2010) running Yosemite 10.10.3
1504 days, 3 hours, 43 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
I just made a small change and updated the version to 2.23. Can you download it, refresh the page, and try loading it again?
1504 days, 3 hours, 27 minutes ago
Profile Image
anaconda
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Great, it is working now!
1504 days, 3 hours, 26 minutes ago
Profile Image
anaconda
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
Thank you!
1311 days, 6 hours, 44 minutes ago
Profile Image
dtolman
RE: Utility script: Automatically use Dedicated Race Colors on StarmapWrite Reply
I found a serious bug in the v2.3 planets.nu mod that could result in all sorts of graphical oddities (such as minefield preview not working) - if you picked race colors from the already in-game diplomacy screen. Also fixed some minor issues I found in the code (no known bugs).

v2.3.1 is posted at https://greasyfork.org/en/scripts/2591-color-coding-for-planets-nu

As always, if there are any requests for changes to this mod, let me know.