Page 4 of 7

Re: [Release] Trophy Collector 1.6

Posted: Fri Dec 14, 2012 7:11 pm
by spara
Diziet Sma wrote:
spara wrote:
Keep on hunting. :twisted:
Here's one for you then.. :mrgreen:

I had a single "Unidentified Commander" entry that puzzled me, until it suddenly jumped up by another 4 after one "incident". It turns out that the revenge attackers in Random Hits aren't being correctly identified.
Good for you to bring that up. It's happens because RandomHits sets the name property to "Unidentified Commander." I'll see what can be done about it.

Re: [Release] Trophy Collector 1.6

Posted: Fri Dec 14, 2012 7:14 pm
by spara
Tricky wrote:
In this.createColumns 1 column layout won't tuncate unless the following is changed...

Code: Select all

        for (i = 0; i < lines ; i++) {
                //Two column layout
                if (start+i+lines < this.trophyArray.length) {
                        nameWidth = defaultFont.measureString(this.trophyArray[start+i][0]);
                        countWidth = defaultFont.measureString("("+this.trophyArray[start+i][1]+")");
                        entryWidth = nameWidth + spaceWidth + countWidth;
to

Code: Select all

        for (i = 0; i < lines ; i++) {
                nameWidth = defaultFont.measureString(this.trophyArray[start+i][0]);
                countWidth = defaultFont.measureString("("+this.trophyArray[start+i][1]+")");
                entryWidth = nameWidth + spaceWidth + countWidth;
                //Two column layout
                if (start+i+lines < this.trophyArray.length) {
entryWidth will always be less than 32 in the original for the 1 column layout section.
You are correct. I overlooked that one, I only checked for 2 column truncate. Thanks, will fix it for next version.

Re: [Release] Trophy Collector 1.7

Posted: Sat Dec 15, 2012 10:35 pm
by spara
New version (1.7) is up.

Bug fixes:

* Fixed a bug I managed to create to the previous version. :roll:
* Implemented Tricky's fix to truncating one paragraph layout.
* shipdata-overdrives.plist overriding ship namings from randomhits.

About RandomHits:

Problems with RandomHits come from (probably old) entries in shipdata.plist. Majority of the ships are named "Unidentified Commander." Most of them are renamed and display_named in the scripts, but obviously not all, thus the occational name "Unidentified Commander." This is also the reason for names like "Big Boss" etc.

I have written and included a shipdata-overdrives.plist that renames the ships appropriately to their true ship types and display_name them to "Unidentified Commander." This will hopefully remedy those "Unidentified Commanders" seen in trophy collections.

I would also like to remove those "Big Boss" etc. namings from the scripts (and I mean namings, not display_namings). As far as I see it they are not used anywhere. That requires editing RH scripts. Just comment out lines like

Code: Select all

this.ship.name = "Big Boss Fighter";
from this.shipSpawned functions.

Please correct me if this somehow breaks RandomHits.

Re: [Release] Trophy Collector 1.8

Posted: Sun Dec 16, 2012 5:24 pm
by spara
Starting to feel like a spammer :(. One more version (1.8 ), then I'll let it be for a while. I have added true ship types to those Bounty Hunters from Anarchies, so that they are collected by their ship type.

Re: [Release] Trophy Collector 1.8

Posted: Mon Dec 17, 2012 3:52 am
by Diziet Sma
Well done! I bet that took some effort.. 8)

Re: [Release] Trophy Collector 1.9

Posted: Sat Jan 12, 2013 10:31 am
by spara
New version (1.9 for Oolite 1.77) is up.

* When docked, collection moved to the new interfaces screen (F4).
* Kills of ships from RandomHits and Anarchies are now collected by their true shiptypes. No more BigBosses, Random Hits Marks etc.

Oolite 1.77 makes it possible to identify ships by their dataKey. If there are some funnily named oxp ships gathered by Trophy Collector that you think should be identified properly, let me know and I'll add 'em to the oxp.

Re: [Release] Trophy Collector 1.9

Posted: Sat Jan 19, 2013 8:00 am
by Walbrigg
I really like this, but I wanted to see the bounty collected as well as the number of kills.

I've built that into the script - I had to reorganize the text formatting code because it got too complicated. I've uploaded my version of the Config/script.js (not the whole oxp): https://www.box.com/s/0hczlqhz5b6poicjnlap

I haven't worked on these before, so my js might not be idiomatic oolite, but it seems to work as far as I can tell. If you change to this script from the original, obviously it doesn't know what bounties were on the kills you already have, so the bounty starts at zero.

Re: [Release] Trophy Collector 1.9

Posted: Sat Jan 19, 2013 8:09 am
by JazHaz
Walbrigg wrote:
I really like this, but I wanted to see the bounty collected as well as the number of kills.

I've built that into the script - I had to reorganize the text formatting code because it got too complicated. I've uploaded my version of the Config/script.js (not the whole oxp): https://www.box.com/s/0hczlqhz5b6poicjnlap
Cool idea. Hopefully it'll get incorporated into the official OXP(?).

Re: [Release] Trophy Collector 1.9

Posted: Sat Jan 19, 2013 8:24 am
by Walbrigg
We'll see what the author thinks. I formatted it as:

Python (x3) 19Cr

i.e. killed 3 pythons and got 19 credits bounty in total for them. But the representation is easily changed. Is there a code point for the fancy "credit" symbol?

Re: [Release] Trophy Collector 1.9

Posted: Sat Jan 19, 2013 9:45 am
by cim
Walbrigg wrote:
Is there a code point for the fancy "credit" symbol?
Yes. ₢ (make sure your files are saved as Unicode). The Euro symbol € can also be used.

Re: [Release] Trophy Collector 1.9

Posted: Sat Jan 19, 2013 9:58 am
by spara
Walbrigg wrote:
We'll see what the author thinks. I formatted it as:

Python (x3) 19Cr

i.e. killed 3 pythons and got 19 credits bounty in total for them. But the representation is easily changed. Is there a code point for the fancy "credit" symbol?
Looks like a neat idea :D. Especially for those bounty hunter oriented players. I'll check it out and see if it's addable as a toggleable feature (through variable), as some might prefer the original layout.

Re: [Release] Trophy Collector 1.9

Posted: Sat Jan 19, 2013 10:53 am
by Walbrigg
It would be a one-line change to use the original format conditionally, but I don't know how you would set the toggle.

Re: [Release] Trophy Collector 1.9

Posted: Sat Jan 19, 2013 11:23 am
by Diziet Sma
spara wrote:
I'll check it out and see if it's addable as a toggleable feature (through variable), as some might prefer the original layout.
Make it OXPConfig-settable, perhaps? It would still need to track the bounty totals though, even when switched off, so that if the player later enabled it, the figures would be up to date.

Re: [Release] Trophy Collector 1.9

Posted: Sat Jan 19, 2013 3:19 pm
by Walbrigg
I've added code to the script to add an option to toggle the view between original and new.
That version is at https://www.box.com/s/0hczlqhz5b6poicjnlap . However, that eats a line of the screen, and really the background needs to be adjusted to make the box smaller. (I don't do graphics).

Personally, I don't think it's worth it: better to get one format right (which may not quite be what I currently have) than to offer the user endless trivial options. The version without the toggle is https://www.box.com/s/i0gd9827lko0mfrq1vhd .

Re: [Release] Trophy Collector 1.9

Posted: Sat Jan 19, 2013 4:07 pm
by spara
Walbrigg wrote:
I've added code to the script to add an option to toggle the view between original and new.
That version is at https://www.box.com/s/0hczlqhz5b6poicjnlap . However, that eats a line of the screen, and really the background needs to be adjusted to make the box smaller. (I don't do graphics).

Personally, I don't think it's worth it: better to get one format right (which may not quite be what I currently have) than to offer the user endless trivial options. The version without the toggle is https://www.box.com/s/i0gd9827lko0mfrq1vhd .
I think you have misunderstood me a bit. I meant that there could a variable that could be set in the script manually, if someone prefers the old layout. No need to do it in game, or maybe through oxpconfig.

I have been experimenting and modified the script to do the same sort of thing and done some testing. I'm not sure about it. I would like to keep the number of characters per entry at minimum and at the same time keep it readable. I also prefer the 2 column layout. Your line is good one, but I would ponder other possibilities, before making decisions. I'm also pondering if it makes this oxp too much "bounty hunter" oriented. In my opinion the present feel of it is more generic, it serves pirates as well as bug hunters as well as bounty hunters etc.

I have also found a genuine bug that needs to be fixed (involving identifying RandomHits ships).

Those who are using this oxp, now is a good time to make suggestions and throw in opinions about this change. There will be a new version coming out at least with the bug fix and possibly with this modification.

A) Is it a worthy addition or does it tilt the emphasis too much to the bounty hunting?
B) Should it be configurable through a variable or oxpconfig?