Utility Script: Enemy Ship List Plugin

« Back to Developers

2220 days, 11 hours, 49 minutes ago
Profile Image
kedalion
Utility Script: Enemy Ship List PluginWrite Reply
Utility Script - Enemy Ship List Plugin: I made a new plugin for the NU v3 UI which keeps track of all enemy ships you ever see in the game. It generates several lists with different filters. Manual editing allows to correct information in case you know 'more' than the system.

2220 days, 11 hours, 24 minutes ago
View emork the lizard king's profile
emork the lizard king
RE: Utility Script: Enemy Ship List PluginWrite Reply
To all ambitious and/or lazy commanders: Give this AWESOME script a try!

As a friend commented when I showed him a screenshot: We're slowly getting close to EchoView. :)
2220 days, 11 hours, 19 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Emork, you are quick. Was just about to thank you and @kwesy for testing, but couldn't figure out how to use your long username with the @ tag...
2220 days, 10 hours, 34 minutes ago
View mjs68508's profile
mjs68508
RE: Utility Script: Enemy Ship List PluginWrite Reply
After one installs it and opens one's turn, how is this ship list accessed?

Thanks.
2220 days, 10 hours, 32 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
You should see a new red entry on the dashboard: "Alien Ships". Inside you can go to the 'Configuration' tab where you'll find documentation and the options to scan through all past turns.
2220 days, 9 hours, 58 minutes ago
View veldan's profile
veldan
RE: Utility Script: Enemy Ship List PluginWrite Reply
Okay, I think I have a problem loading any scripts you write kedalion. Using Chrome with tampermonkey

I have two scripts that have always worked for me (fcode random button and load ships into VCR)

But I am having trouble loading this script. I actually just reinstalled tampermonkey on chrome and then removed and reinstalled the two user scripts that I have that do load up in tampermonkey (fcode random button and the load ships into VCR scripts). But even though I download and installed this script in the exact same manner as the two other scripts it still doesn't become an active script for nu.

Can anyone help?

Kedlion is there anything you have to code for tampermonkey to ensure it sees these scripts as eligible for nu?
2220 days, 9 hours, 55 minutes ago
View mjs68508's profile
mjs68508
RE: Utility Script: Enemy Ship List PluginWrite Reply
Same problem for me. Big Beefer's Hover Text and Tax Assistant work fine. But, this one doesn't.

Also using Chrome & Tampermonkey. Tampermonkey shows this and I Enabled it in Tampermonkey. But, still no-go.
2220 days, 9 hours, 44 minutes ago
View veldan's profile
veldan
RE: Utility Script: Enemy Ship List PluginWrite Reply
And Mike if you left-click on the little tampermonkey icon on chrome (on the same line as the address bar) does it only show the hover text and tax assistant as active even though you might other nu script(s) active?
2220 days, 9 hours, 40 minutes ago
View veldan's profile
veldan
RE: Utility Script: Enemy Ship List PluginWrite Reply
Holy hell, I think I de-bugged this.

Kedalion your line

// @include http://planets.nu/#/*

I changed to

// @include http://planets.nu/*

Now it works.
2220 days, 9 hours, 35 minutes ago
View veldan's profile
veldan
RE: Utility Script: Enemy Ship List PluginWrite Reply
Silly activity feeds. What I meant was change;

// @include http://planets.nu/#/*

to

// @include http://planets.nu/*
2220 days, 9 hours, 34 minutes ago
View veldan's profile
veldan
RE: Utility Script: Enemy Ship List PluginWrite Reply
bah! Why don't these things actually post what is the text window?

Anyway you're smart enough to figure it out.. now to start using some of your great scripts, now that I know what the problem has been!
2220 days, 9 hours, 14 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
That seems to be a tampermonkey thing. When using the script in Chrome directly, my choice of path worked just fine and prevented old client versions from using it.

I uploaded a new version with the adjusted path and simply put a NU version check at the beginning to prevent it from running in the old client. Thanks Veldan!

msj, did you get it running?
2220 days, 6 hours, 58 minutes ago
View mjs68508's profile
mjs68508
RE: Utility Script: Enemy Ship List PluginWrite Reply
Yup, it works, now.

Thank you.


2219 days, 15 hours, 38 minutes ago
Profile Image
kwesy
RE: Utility Script: Enemy Ship List PluginWrite Reply
The enemyShipList plugin and the TaxAssistant plugin don't like each other.
When I install both (in Firefox) I get JavaScript errors upon running the shiplist update (from turn 1 to current turn). The error doesn't point to the code of one of the two userscript extensions. It happens inside GreaseMonkey.

I also tried to change the order of the two scripts in GreaseMonkey but that didn't solve the problem.
2219 days, 15 hours, 18 minutes ago
Profile Image
theevilwillow
RE: Utility Script: Enemy Ship List PluginWrite Reply
I tried the plugin in two games. It looks like it cannot distinguish between different games played on the same machine. (Firefox/Win7/GreaseMonkey)
2219 days, 14 hours, 16 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Hmmm, I've tested it with a lot os different game mixed in between, but never had that problem. I'll put in a fix/check later today. Should be easy enough. Also will check what's up with that tax assistant interference.
2219 days, 8 hours, 41 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Ok, the leak to other games has been fixed and uploaded.

Turns out I forgot one line of code. It just never showed up for me as I have to refresh the webpage after every code change. Then the browser memory gets cleaned and there was just nothing to leak over...

As for the interference with Beefer's tax plugin: I have looked at the code and don't see why they should interfere. So I tested them together in Chrome + Tampermonkey and in Firefox + Greasemonkey... as far as I can tell they both seem to work just fine. I also ran the tax assistant alone to see if any additional features would pop up, but seems all the same.

2218 days, 20 hours, 24 minutes ago
Profile Image
kwesy
RE: Utility Script: Enemy Ship List PluginWrite Reply
My problem with the TaxAssistant in conjunction with the EnemyShiplist disappeared when I updated the TaxAssistant from version 0.10 to 0.12.
Just mentioning it here in case somebody else has that problem.
2218 days, 18 hours, 8 minutes ago
View lord helmet's profile
lord helmet
RE: Utility Script: Enemy Ship List PluginWrite Reply
The EnemyShipList is not up to date with some changes in the interface, I fear. I'm not even using it myself right now, because it's too buggy. But it's on my to-do-list and maybe next week I can try to put it right.
Is anyone using it on the old interface (planets.nu/home)? In that case I'd try to keep it downwardly compatible (is this the term?).
2218 days, 17 hours, 41 minutes ago
Profile Image
kwesy
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Helmet:
Not sure if we are talking about the same plugin.
This thread is about Kedalions new plugin (see start of thread).
2218 days, 17 hours, 37 minutes ago
View veldan's profile
veldan
RE: Utility Script: Enemy Ship List PluginWrite Reply
Helmet the term is backward compatible. But you had the idea.
2218 days, 15 hours, 41 minutes ago
Profile Image
jellyfishspam
RE: Utility Script: Enemy Ship List PluginWrite Reply
this looks really cool. does it only start keeping track from when you install it or can it go through old turns and gather information from them?
2218 days, 15 hours, 39 minutes ago
Profile Image
kwesy
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Jelly:
It can go through old turns. See the "Configure" option in the plugins menue (at the top of the alien shiplist).
2218 days, 15 hours, 27 minutes ago
View lord helmet's profile
lord helmet
RE: Utility Script: Enemy Ship List PluginWrite Reply
Oh boy, I should shut up. This script is so great, I will stop development on my feeble try immediately!
When using local storage, you really need to save the game id or something, because otherwise it transfers shiplists to the other game, and it needs to be reset every time.
2218 days, 14 hours, 26 minutes ago
Profile Image
johnny rotten
RE: Utility Script: Enemy Ship List PluginWrite Reply
The function to include the previously played turns is not working for me. Trying the first time, i had got an error message and now the lists are gone. All buttons in the configuration tab don't have any effect at all any more. It might be a cool feature, but here it seems to be bugged.
2218 days, 14 hours, 22 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Helmet, I have to admit I was looking for existing script like this and somehow overlooked yours. Only saw the improved ship list addon from dtolman. I'll have to go check out yours. Didn't want to ruin your efforts.

Is it still bleeding over into other games? You have version v1.02?
2218 days, 14 hours, 18 minutes ago
Profile Image
johnny rotten
RE: Utility Script: Enemy Ship List PluginWrite Reply
Hello, sorry to interrupt,
it says: "This enemy ship list is based on information from turn 1 up to turn 0" and there is no information at all, no function is working any longer.
2218 days, 14 hours, 17 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Johnny, can you tell me what browser/monkey you are using? Any other plugins enabled? Do you see any error messages?
2218 days, 14 hours, 11 minutes ago
Profile Image
johnny rotten
RE: Utility Script: Enemy Ship List PluginWrite Reply
I installed Greasemonkey just about 3 days ago to be able to run the scripts for this site, so i guess it is the newest version, i can not see what version it is.
Firefox is always updated, atm. it says that it is Version 22.0
The first error message did not have an option whether to keep a script running or not, i could just close it, nothing else. Unfortunately, i can not tell what it said.
2218 days, 14 hours, 10 minutes ago
Profile Image
johnny rotten
RE: Utility Script: Enemy Ship List PluginWrite Reply
It is greasemonkey 1.10
2218 days, 13 hours, 59 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
So an error message 'popped' up (in a window or box)? And none of the buttons in the configuration tab do anything? Try the bottom one for starters. Or manual time travel to turn 1. The script version you have installed is v1.02? Do you have other plugins enabled?
2218 days, 13 hours, 45 minutes ago
Profile Image
johnny rotten
RE: Utility Script: Enemy Ship List PluginWrite Reply
I have been able to get the error box again, it says:

parsererror Error: jQuery183013955030832165483_1373982151498 was not called

I have also installed all avaible userscripts for the new version of planets.nu that were listed on the planets mag website as avaible scripts, along with it the very useful tax assisstant script from Beefer.

I have tried all 3 buttons on the bottom of the configuration tab (Update list..., Reset list..., Erase list...) and the auto-update button, but it doesn't do anything any longer. I have done this in 3 of the 6 games i play, the result is always the same. I will try out the time machine once more, but i have done this and it didn't do anything as well.
2218 days, 13 hours, 43 minutes ago
Profile Image
johnny rotten
RE: Utility Script: Enemy Ship List PluginWrite Reply
edit: Version of shiplist-plugin is 1.02, all userscripts are updated, i checked that before.
2218 days, 13 hours, 41 minutes ago
Profile Image
johnny rotten
RE: Utility Script: Enemy Ship List PluginWrite Reply
Hmmm, the Time Machine function doesn't work anymore in these games. I can not open up a previous turn, there is no effect at all.
2218 days, 13 hours, 34 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Ok, I'd guess it's a weird interaction between plugins. Did you have all the other plugins running before already and everything was working fine? Unfortunately, you'll have to do trial and error here by disabling all script and reenabling them one by one and see when it starts getting funky. Once you see the errors begin, try to isolate it by taking other scripts away. Maybe you can find which one or two scripts are causing this. (You'll have to reload the game page after enabling/disabling plugins.)
2218 days, 13 hours, 29 minutes ago
Profile Image
johnny rotten
RE: Utility Script: Enemy Ship List PluginWrite Reply
Yes, all other plugins were installed before and everthing was fine. I installed your script today as the last one so far. I have now deactivated the shiplist 1.02 for the time being, hope the time machine will be o.k. again... :-D
2218 days, 13 hours, 14 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Ok, please let me know if that works and if you find anything else.
2218 days, 12 hours, 13 minutes ago
View ryder cross's profile
ryder cross
RE: Utility Script: Enemy Ship List PluginWrite Reply
Nicely done. Love this feature. Is there anyway to separate ally ships from the enemy ship list?
2218 days, 12 hours, 13 minutes ago
Profile Image
johnny rotten
RE: Utility Script: Enemy Ship List PluginWrite Reply
With the script disabled, everything is like before, Time Machine also works again as normal.
2218 days, 12 hours, 3 minutes ago
View tom n's profile
tom n
RE: Utility Script: Enemy Ship List PluginWrite Reply
Nice! Any way to show amount of damage? That would really help. ;-)
2218 days, 11 hours, 58 minutes ago
View lord helmet's profile
lord helmet
RE: Utility Script: Enemy Ship List PluginWrite Reply
@tom+n Would you rely on it? Damage can change quickly...
2218 days, 11 hours, 53 minutes ago
View ryder cross's profile
ryder cross
RE: Utility Script: Enemy Ship List PluginWrite Reply
Ignore my comment above, I didn't realize there were tabs. Damage levels would be a good to have as tom mentioned.
2218 days, 11 hours, 49 minutes ago
View emork the lizard king's profile
emork the lizard king
RE: Utility Script: Enemy Ship List PluginWrite Reply
Hmmm, you can't rely on the damage you've ssen - not even in the very next turn. Depends on ship and loacation of course. A damaged Instru in open space with 80 fighetrs before the fight will keep it's damage level for some time.
2218 days, 9 hours, 18 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
I thought about including damage, but I agree with Helmet and Emork. It's likely very short term and unreliable. I can put it in if you want. Doesn't take much space and is easy enough to ignore if unwanted.

I also just realized that 'mine hit' and 'web hit' messages actually contain the ship ID. I'll see if I can incorporate that information.
2218 days, 8 hours, 34 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Johnny, I just went to planetsmagazine.com and installed pretty much all plugins there that I could find and still cannot get any trouble in Chrome/Tampermonkey and Firefox/Greasemonkey.
Here is a list of the plugins with the installed versions:

Planets.nu - Enemy Ship List Plugin - 1.02
Planets.nu show ship history - 0.5
Planets.nu Tax Assistant - 0.12
Planets.nu Colonial Minesweep Display - 0.1
Color Coding for Play.Planets.nu v2.02 - 2.02
Planets.nu Fleet UI - 0.6
Planets.nu - improved Ship List View v1.8 - 1.8
Planets.nu message links add-on - 0.8
Planets.nu improved hover text - 0.14

As far as I can tell all of them are working. (I don't have dark sense or super spy nor colonial sweeping, so for those two plugins I can't check, but there are no error messages.) Time machine still works, and the enemy ship list addon reads in all turns just fine. So I can't reproduce the error you are getting unless you can give me more info.
2218 days, 8 hours, 17 minutes ago
Profile Image
johnny rotten
RE: Utility Script: Enemy Ship List PluginWrite Reply
I have installed the following plug-ins:

Planets.nu - improved Ship List View v1.8
Planets.nu Extended History Graphs Addon 0.52
Planets.nu improved hover text 0.14
Planets.nu minefield preview enhancement 0.8
Planets.nu show ship history 0.5
Planets.nu Tax Assistant 0.12

The plug-ins:
Color Coding for Play.Planets.nu v2.02
Planets.nu - Enemy Ship List Plugin 1.02
are installed but deactivated.
I didn't like the color-thing so much and the text of the exploding ships (would be quite useful) was not readable when two ships had exploded in the same location (i guess).

I don't know how i can give you any more information... but thank you very much. I am trying to report this to help you improve the program. In our company i am famous for bug-reporting btw., i seem to be able to produce the most improbable errors... :-D
2218 days, 7 hours, 43 minutes ago
View lord helmet's profile
lord helmet
RE: Utility Script: Enemy Ship List PluginWrite Reply
The script gets stuck for me when Tax Assistant is active too. I get some error like "JSON.parse unexpected end of data", but I think this is a bug in beefer's tax script.
2218 days, 7 hours, 40 minutes ago
View lord helmet's profile
lord helmet
RE: Utility Script: Enemy Ship List PluginWrite Reply
Well... maybe I pointed at beefer too quickly, it might be my own mistake because I always modify his script a little for my own purposes.
2218 days, 7 hours, 31 minutes ago
View tom n's profile
tom n
RE: Utility Script: Enemy Ship List PluginWrite Reply
Thanks for that list of updated scripts!
On the "damage" issue, I understand that the data has to be taken with a grain of salt, but as Emork mentioned there are many cases where it can be super helpful. When pursuing an uncloaked enemy ship around in a warpwell for instance after it was damaged several turns ago.
2218 days, 5 hours, 11 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Ok, I included the damage and will roll that out with the next update.

Helmet, kwesy also had issues with those two plugins together, but they disappeared once he updated the tax assistant to the newest version.
2218 days, 1 hours, 43 minutes ago
Profile Image
jellyfishspam
RE: Utility Script: Enemy Ship List PluginWrite Reply
i would just like to say..... this is an awesome script (especially after i went and added past turns).

beware that if for some reason you can't access a turn in your history (it's not known why but i can't access anything older than turn 10), the script will wind up in an endless loop trying to load a turn that it can't. just fyi.
2218 days, 0 hours, 31 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Jellyfishspam, I noticed the endless loop and put a fix in already, but haven't released it yet. I think Johnny saw the same error when he couldn't use time machine any more. (Though the plugin itself should not be able to cause the disfunctional time machine.) I have a game where my first 36 turns are just not accessible. Anything after that works fine.
2199 days, 1 hours, 37 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Updated to v1.03...          

I added crew and damage fields to the ship data and added some minor fixes to the import behavior.

2198 days, 21 hours, 49 minutes ago
View lord helmet's profile
lord helmet
RE: Utility Script: Enemy Ship List PluginWrite Reply
While updating my simulator addon, I looked into your code and saw that you initialize your ShipMin with .fuel but you use .neutronium later. I don't think it has any consequence. Also there's a tiny typo (search for "wird") - thanks for the reference ;)
2198 days, 14 hours, 18 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
All fixed. Thanks for catching it.

I have to thank for the sweet integration. :)
2181 days, 14 hours, 29 minutes ago
View figak's profile
figak
RE: Utility Script: Enemy Ship List PluginWrite Reply
I'm using this addon every turn multiple times. It's great!

When I click on an enemy ship it takes me to it's last reported position. It also allows me to see a list of known enemy ships.

My request is two fold:

1)  Some sort of enemy ship history: to track and study single ship movements.
2)  Some sort of enemy fleet history: Show where the enemy ships were found, possibly differentiating how long ago (example: brighter is last turn, darker the longer the time)



2153 days, 17 hours, 35 minutes ago
View figak's profile
figak
RE: Utility Script: Enemy Ship List PluginWrite Reply
Example, in one of my games an enemy ship has been destroyed by minehit. I have the damage so I can guess what hull it was. But I when I check this addon I see the SDSF that my ally has built for that slot and I can't check if I knew already what was this ID.

Hence my request to get a small "this is what changed in this turn".
2114 days, 8 hours, 51 minutes ago
View figak's profile
figak
RE: Utility Script: Enemy Ship List PluginWrite Reply
I really like the single player view line telling me what is known out of what is available.

Another suggestion: Get this line for all races in a table?
Warships - Freighters vs Races each with a score (x/y).
2104 days, 0 hours, 34 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Ok, so I started putting new things in, but will release them all together. So if you have new suggestions/requests, now is a good time.

I added the last suggestion from @figak: summary table showing ratio of know to unknown ships for all players.

Not sure yet how to go about the "what's changed" section, but that seems doable.
I do like the visualization of ships on the map. Just with the ship history is a bit more tricky.
And I'm planning on adding calculations to show min and max possible fuel.
2030 days, 13 hours, 38 minutes ago
Profile Image
hugh42
RE: Utility Script: Enemy Ship List PluginWrite Reply
Hi Kedalion,
I just tried the script and its awesome. Now I can stop doing the ship tracking with a sheet of paper.

However, I have one question: I understand why you do not parse explosion reports (ship ip missing). But why don't you parse combat reports. I am thinking of reports such as
ID#xxx has destroyed the ship ID#yyy under the command of .

As far as I have seen these reports contain all necessary data from VCRs to clear the shiplist from destroyed ships.
2028 days, 22 hours, 44 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Hugh42, thanks for the suggestion. I'll see to incorporate it into the new version. I have a couple other fixes and additions already, but not released yet.
2025 days, 9 hours, 14 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Ok, I just uploaded version 1.06. I incorporated the combat message parsing that @Hugh42 proposed. I extended it to get some messages he was missing as well as reading the VCRs. VCRs are still problematic as I only get the start state of the ships, but not the outcome of the battle or the status of the ship afterwards. This can be complemented by using the combat messages, but again that only works for own battles. Therefore, the script is ignoring information from ally VCRs. Those still need to be entered manually.

Additionally, I added the new tab that @Figak was proposing. The 'Intel Summary' is also the default start page now. It shows the total number of (assumed to be) know ships for each player split by warships and freighters. Clicking on a player entry will directly open the single player view.

Still in the queue are:

- Min/max fuel estimates like helmet's script had it,
- Military score estimates for each ship (thanks @Azzazzello),
- A map visiulization of ship locations,

I'm not sure yet how and if I can do the history feature @Figak was talking about. But my hope is that the map visualization will be good enough for that.

Let me know if there are any issues with the new version.
2024 days, 15 hours, 14 minutes ago
Profile Image
kwesy
RE: Utility Script: Enemy Ship List PluginWrite Reply
I think the "Other Players" tab is not doing what it should.
It opens the "Intel Overview" page.

In your code it says (in the "showEnemyShips" function):
[...]
if (!view)
view = 6;
[...]

Since "view" is "0" when clicking on "Other Players" I assume you can simply leave those two lines out.


Nice new features btw :-)
2024 days, 11 hours, 22 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Kwesy: Thanks for catching that.

It's fixed now and I directly changed the code so the selected view stay persistent when you switch for example to the 'starships' or 'starbase' tab in between. When you come back, you are still on the same tab instead of the summary page.
2016 days, 18 hours, 30 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
New version: I added the ability to show all (last) enemy ship locations on the map using the 'EnemyShips' map tool.
2016 days, 18 hours, 25 minutes ago
Profile Image
gudmo
RE: Utility Script: Enemy Ship List PluginWrite Reply
Very cool stuff....

Any chance to add a mouseover effect to show the ship info and the age of the information ?
2016 days, 9 hours, 0 minutes ago
View nakor's profile
nakor
RE: Utility Script: Enemy Ship List PluginWrite Reply
Hi kedalion,

I would really like to try out this script. Can you make it available for the old planets.nu interface as well?
2016 days, 8 hours, 38 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Nakor: I'm not planning to extend this back to the old client. But there was a script from @Lord+helmet that did the same for the old client.

Why are you still sticking with the old client? I'm curious which feature (or addons) it offers that you don't have in the new version. In my own experience the new client runs so much faster and nicer. Once most good plugins were ported, I wouldn't want to go back.
2016 days, 8 hours, 35 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Gudmo: Should be possible, but it might get confusing unless I disable the normal mouse over effects. An alternative to indicate the age would be the thickness of circles or transparency. Any opinions or other ideas?
2016 days, 8 hours, 0 minutes ago
View nakor's profile
nakor
RE: Utility Script: Enemy Ship List PluginWrite Reply
Thanks for the hint with Lord Helmet's script! I will definitely test that one.

To be honest I don't know what the new version does offer me what the old version does not have. I just tried to open my games in the new client to have a look at it again, but my games do not even open. What are the benefits of the new version?

Apart from that I feel lost in the new interface. It's overloaded and I cannot identify a clear structure. Especially the activity forums are a mess in my opinion.
I rather stick to the old version. There I know where to find the things I need.
2016 days, 7 hours, 35 minutes ago
View mip40's profile
mip40
RE: Utility Script: Enemy Ship List PluginWrite Reply
I also took a long time before i switched to the now interfac, also with me it took so long as i didn't want to lose the old Forum. However, performance reasons made me switch in the end :(

one minor bug in the skrips:

The intel overview shows me 42/40 on my capital ships and 12/14 on my freighters.
2016 days, 7 hours, 35 minutes ago
View mip40's profile
mip40
RE: Utility Script: Enemy Ship List PluginWrite Reply
and i hate the lack of an edit button in the "activity feed"
2016 days, 7 hours, 27 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Mip40: Unfortunately, I cannot do anything about it in the general case. I've seen this in couple games of mine. If you build a capital ship without beams and tubes, then it shows 0 beams for it. But NU also uses 0 beams for other player's ships if the number of beams is not known. Thus, my script assumes it is a warship with unknown number of beams even though it counts as freighter in the scores.

I will fix this for own ships, but for foreign ships it there is nothing I can do... :/
2015 days, 23 hours, 15 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Mip40: Just uploaded a new version which fixes it for own ships.
2015 days, 19 hours, 7 minutes ago
Profile Image
kwesy
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Nakor:
> I just tried to open my games in the new client to have a look at it again, but my
> games do not even open.

I assume that is because you have some userscripts that are incompatible to the new site. Try disabling all userscripts and then reload the game.

IMHO the new site is a lot better in several facets. Even the Activity feed is not so bad as its reputation. I assume it will get improved sooner or later. Try to get used to it :-)
2014 days, 7 hours, 45 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Hmmm, what do you mean? In the same color as the normal in game (red = enemy, blue >= safe passage)? Or do you also have another plugin running which colors each race? (Dedicated colors for races plugin or similar)
2014 days, 6 hours, 4 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: Enemy Ship List PluginWrite Reply
Actually, even the base client can assign distinct colors for each player under the diplomacy menu. You can find the settings in the vgap.relations array.

I believe there is also a plugin which offers additional color options.
2013 days, 20 hours, 42 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Wow, I never noticed that little button there. Is anybody using those colors?

If chosen, I could use the color from the diplomacy menu and otherwise the current defaults... Though there is a chance for overlap if only some race have assigned colors.
2013 days, 20 hours, 24 minutes ago
View figak's profile
figak
RE: Utility Script: Enemy Ship List PluginWrite Reply
Hehe i use them, very handy ;)
2011 days, 10 hours, 11 minutes ago
View mip40's profile
mip40
RE: Utility Script: Enemy Ship List PluginWrite Reply
Sometimes - only when using chrome - i get muliple sets of "Alien Ships" Icons. Anybody else has this problem?
2004 days, 4 hours, 41 minutes ago
Profile Image
oho
RE: Utility Script: Enemy Ship List PluginWrite Reply
Is anybody else having problems with this plugin recently?

When I try to open my games, I get stuck to the “travelling to the echo cluster…” screen. I attribute the problem to this script as I tested it and having this script enabled (whether as the only script or among others) prevents me from accessing any games.

Initially the problem occurred about a week or two ago, when I tried to view some finished games that I had not opened before (at that point I could still access my own games and any finished games that I had viewed before). Today I disabled all my scripts to test whether that would let me view finished games (it worked), but when I re-enabled this I could no longer access any games.

I was not updated to the latest version when the problem occurred (but updating did not solve it) so the problem was not caused by any recent changes in the script code. I am using Chrome – is there any other info I could provide to help to solve this?
2003 days, 21 hours, 12 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Oho Which game and player number are you looking at? Do you get any error messages in the console? (Right click > Inspect Element > Console) What output are you getting there?
2003 days, 11 hours, 19 minutes ago
Profile Image
oho
RE: Utility Script: Enemy Ship List PluginWrite Reply
The problem occurs when trying to look at any player in any game (including my own ongoing game: 73842, player 10). When I click “play”, I get stuck and there are the following messages in the console:

EnemyShipList plugin version: v1.1 VM49:10

event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

Failed to load resource: the server responded with a status of 403 (Forbidden) http://profiles.planets.nu/18827

Uncaught QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of 'EnemyShipListPlugin.73842.10.shiplist' exceeded the quota.


Another example is when I try to view a finished game 72883, player 8. I get similar errors:

EnemyShipList plugin version: v1.1 VM49:10

Failed to load resource: the server responded with a status of 403 (Forbidden) http://profiles.planets.nu/708

event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

Failed to load resource: the server responded with a status of 403 (Forbidden) http://profiles.planets.nu/18827

EnemyShipListPlugin: No previous data found for enemy ship list. Starting at current turn. VM49:250

Uncaught QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of 'EnemyShipListPlugin.72883.8.shiplist' exceeded the quota.
2003 days, 10 hours, 46 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Oho It appears you opened and indexed too many games and the stored list exceed the quota allowed by chrome. I assume you opened a lot of finished games and all the indexed lists are never being removed...

So far I never ran into this problem. I'll look into it to see if there is a good fix for this. But for now you can quickly clear the local storage by going to chrome://settings/cookies and finding entries planets.nu or play.planets.nu (depending on which site you are using). Click on 'local storage' and 'indexedDB'. Each should give you a number for used space. Could you post those here? Clearing entry (clicking the small 'x' on the right) will free that space.
Unfortunately, afterwards you will have to rebuild the lists from turn 1 for the games you are actually playing. Sorry, hope you don't have too many manual changes in them.

2003 days, 10 hours, 37 minutes ago
Profile Image
maclav
RE: Utility Script: Enemy Ship List PluginWrite Reply
QuotaExceededError is coming from html5 local storage. Basically, the shiplist the plugin is trying to write to disk is to large for your browsers settings.

Now, in a perfect world with profesional code, that exception should be caught and handled so as to not kill the page, etc... but it's not. Your options:

1) fork the script and use indexedDB
2) convince the author to use indexedDB
3) increase your browsere's localstorage settings (which will be hit or miss)
4) change to a browser with a larger localstorage setting

IndexedDB is the "right" solution for storing large amounts of client side data in html5, but support is iffy and it's more complicated to use (transactions, data cursors, etc)...
2003 days, 10 hours, 18 minutes ago
Profile Image
maclav
RE: Utility Script: Enemy Ship List PluginWrite Reply
Perhaps a button somewhere to just delete all "EnemyShipListPlugin.*" from local storage so you don't have to wipe-out all the other data under planets.nu?
2003 days, 10 hours, 13 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Maclav, is indexedDB persistent or does the content get cleared each time you close your browser? There is also an alternative to store things directly on disk, but then you get permission requests and browser differences to deal with again.

I can add two options to the plugin itself:
1) For each game you are looking at, it has to be enabled manually. That way watching 100 finished games doesn't create entries for all of them. It's really only useful for running games, I'd say.
2) A list of games that the plugin processed with options to delete those.

Both options don't solve the issue itself, but mitigate the effects/let you resolve things.
2003 days, 10 hours, 5 minutes ago
Profile Image
maclav
RE: Utility Script: Enemy Ship List PluginWrite Reply
IndexedDB is persistent. How much you have depends on what tampermonkey asked for. Of course, different browsers do it differently, but in theory they should all provide significantly more space.

I think being able to easily clear off old game data from localstorage should be sufficient, you'r just storing up to 500 small objects/game.
2003 days, 9 hours, 57 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Yes, that sounds about right. I have about 15 games indexed and <900KB data.
I'll add a specific 'enable' button to the plugin screen instead of automatically inserting all game/player combos that are viewed. When first opening a game with the plugin only the very last turn is indexed anyway. Now it will be none unless you enable it.
1999 days, 11 hours, 33 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Ok, I just uploaded a new version. It has two additions.

1) The plugin is disabled by default. So when you browser through a lot of finished games, the plugin won't index them (and clog the local storage).

2) A 'storage stats' tab which shows you all indexed game/player combinations on your machine together with their space requirement in local storage. You have the option to delete the data for single games or all games.

There shouldn't be any problems updating from older versions.
1999 days, 11 hours, 24 minutes ago
Profile Image
maclav
RE: Utility Script: Enemy Ship List PluginWrite Reply
Awesome. I had no idea I had that much data saved. :)

I'd love to see game name and race name on the storage stats page. It would also be really cool if you caught the local storage exception and threw up an alert box telling ppl to delete some stuff and then gracefully "unplug" so the turn can still load if you're full.
1999 days, 8 hours, 35 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Maclav I added the popup which will still let you play, but notifies the user of the memory problem.

I might add game, player, and race names soon, but this would only work for coming games as I wouldn't want to do additional API calls to get that information.
1987 days, 11 hours, 7 minutes ago
View figak's profile
figak
RE: Utility Script: Enemy Ship List PluginWrite Reply
An unlucky lizard hit 3 mines in one of my games (186% damage).

I assume that once the ship goes over 100% (or 150% for lizard), the amount of on-board supplies don't matter and the ship is lost - right?

Therefore a minor teak request: An enemy ship destroyed by minefields should be removed from the list. The message tells you the ship ID.
1922 days, 19 hours, 15 minutes ago
View figak's profile
figak
RE: Utility Script: Enemy Ship List PluginWrite Reply
It seems that ally VCRs are not processed by the add-on are they?
1922 days, 13 hours, 42 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
No, the VCRs themselves don't contain the result of the battle just as a value. (Or I just didn't understand it.) The only way to see the outcome is to look at it...
1921 days, 20 hours, 15 minutes ago
View lord helmet's profile
lord helmet
RE: Utility Script: Enemy Ship List PluginWrite Reply
But there is this simulator plugin that moves through all possible constellations of a battle to give probabilities of results. Some tweak to the code and if you feed that with only the specific seed, it should give the result. Still the simulator needs to run in a way, so there's some simulation time.
Can't find the script right now, because userscripts.org is down again.
1921 days, 20 hours, 4 minutes ago
View figak's profile
figak
RE: Utility Script: Enemy Ship List PluginWrite Reply
Sorry, that is more of what I meant.

The script should to remember the weapons of the Loki that just killed my ally's MCBR.

I can live with the fact that the script may not "know" that the ship finished with x torpedos and Y damage (or was destroyed!).

As a cloaker race, it really helps to know the navy's inventory of your enemies.
1900 days, 11 hours, 11 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
http://planets.nu/discussion/utility-script-enemy-ship-list-plugin

New download location: https://monkeyguts.com/code.php?id=185 
1900 days, 6 hours, 29 minutes ago
View tom n's profile
tom n
RE: Utility Script: Enemy Ship List PluginWrite Reply
Thanks for your hard work! Excellent! I deleted old mod and installed new, expecting to have to use it's time machine to renew all data, but was happy to see it saved it.
1874 days, 8 hours, 34 minutes ago
Profile Image
hugh42
RE: Utility Script: Enemy Ship List PluginWrite Reply
For me, this is definitely one of the most valuable plugins. Where can I best post updates to the plugin? This forum is not very good when it comes to formatting code.

I have written some code which displays information (name, hull type, age of information, owner) about enemy ships when hovering with the mouse over the circles. The info is displayed in the topright info-box just like other information is displayed when you move the mouse over some object.
1874 days, 8 hours, 13 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Thank you. :)

If you post it in the forum thread http://planets.nu/discussion/utility-script-enemy-ship-list-plugin then it's actually quite decent to format things. It just won't look as pretty in the activity feed. There was a hack to make it work in both posted somewhere though.
But if you send me the changes or the link to a file as PM, I'll be happy to integrate it.
1863 days, 6 hours, 12 minutes ago
Profile Image
eristoff
RE: Utility Script: Enemy Ship List PluginWrite Reply
Terrific mod! Thank you kedalion! You have saved me loads of future time. And if you integrate hugh42 code my happiness will be complete.

There's one little nuisance: I am playing a somewhat unusual game with ship limit set to 600. I can see that the 100 extra ships are being counted well in the 'Intel Overview' tab, but the other tabs only show info for the first 500 ships.

Leaving aside the fact that a 600 ship game is undoubtedly an aberration, I would very much appreciate to see all the ships info if it is not too hard to implement.


1863 days, 1 hours, 24 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
Thanks for both. :) 

And I'll make sure to change it to actually read the ship limit variable instead of a fixed 500.
1862 days, 14 hours, 1 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
@eristoff: I fixed the ship limit issue right away as it was a minimal fix. The other stuff will have to wait just a bit longer.
1862 days, 5 hours, 16 minutes ago
Profile Image
eristoff
RE: Utility Script: Enemy Ship List PluginWrite Reply
It works perfectly, thanks Kedalion!
1752 days, 22 hours, 25 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
I finally got around to integrate the hover text info from @hugh42. 

I also moved the script to a new location:
https://greasyfork.org/en/scripts/5994-planets-nu-enemy-ship-list-plugin

You'll have to uninstall the old version and install the new one from Greasyfork. None of the previous plugin data should be affected.
1752 days, 20 hours, 47 minutes ago
Profile Image
lordlancelot
RE: Utility Script: Enemy Ship List PluginWrite Reply
Thanks for the update !

P.S.
Thanks for the wiki update too

http://vgaplanets.org/index.php/Planets_Nu_Client_Add-ons

If anyone see or have a script missing and working with latest planets nu client let me know.
1725 days, 7 hours, 52 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
I released a new version with fixes for the new PP build system and small bug fixes.

Thanks @Kwesy for finding the bug and testing the fixes.
1701 days, 13 hours, 21 minutes ago
Profile Image
oho
RE: Utility Script: Enemy Ship List PluginWrite Reply
Hi Kedalion,

I’ve been happily using the script, but since the Christmas is coming up, I’d have a small (?) wish for a new feature: When you detect a new ship with the same ID as an existing ship in the list (meaning that the existing ship has been destroyed), could you mark the existing ship as destroyed and keep it in the records instead of just deleting it? The use case is that whenever you get to build or see new ship IDs, you’d like to use that info to see whether some interesting ships that you knew of have been destroyed. I think Figak also requested something similar in one of the comments above.

I think the functionality could be achieved by adding two new fields - “destroyed” and “turn marked destroyed” (the latter is just useful information) - and changing the code so that whenever you go through the list of existing ships (for updating, etc.), you’d omit any ships marked as destroyed. Similarly, these ships would be omitted on the current ship listing views, but there should be a new tab for destroyed ships (which could be either a complete list or filtered by a single player).

If I understand the current logic of the script correctly, the suggestion above causes ships whose ownership has changed to be marked as destroyed. I think it is still better than just forgetting the previous owner, but maybe the problem could be avoided by checking if a newly detected ships has the same hull type as the existing ship with the same ID and if so, assume that the ship have been captured.

Does this make sense and/or sound doable? I could try forking the script myself, but I’m not too familiar with javascript and I’m sure you’d get it done much faster.. :)
1691 days, 10 hours, 52 minutes ago
Profile Image
kedalion
RE: Utility Script: Enemy Ship List PluginWrite Reply
@Oho: I've been thinking about that for a while and haven't found the right way to deal with it yet. @Figak also asked for a page showing changes from previous turns. My problem is that I don't know how to store the data properly as I don't want to increase the amount of data I want to use in localStorage. An option would be to switch to using a part of the node system, but given the amound of data I am storing, this might be prohibitive. If anybody has a good idea, just let me know.

In the meantime I released the newest version which can deal with the multiple occurences of ships with the new 'sphere' addon on NU. For now I am just limiting the plugin to ships in the main map.  

1690 days, 13 hours, 43 minutes ago
View figak's profile
figak
RE: Utility Script: Enemy Ship List PluginWrite Reply
I haven't looked at how the data is stored, but two simple suggestions come to mind:

1) would be to include the turn when the ship first seen and when it was destroyed.

Then as you visualise each turn the script filters based on those two fields above.

This means two new fields per ship and more ships in history. Of course the ship ID would no longer be the unique identifier of a ship, this may bring some other rework.

2) Another way to skin the cat could be to store a usable delta between turns. That is a summary of what was added, what was deleted, what was changed. Such summary might be nice to see anyway each turn and reading from the stored deltas you could move back and forth in turn numbers by undoing the deltas on a temporal ship list.

The new data set would be storing the deltas.