Page 1 of 7

[Release] Trophy Collector

Posted: Sun Sep 02, 2012 8:48 pm
by spara
Download from the expansion manager.

OLD POST

Hello.

I'm shaping up an oxp that keeps a list of ship names and quantities of kills. Only ships with a bounty are considered. I call this list the trophy collection. The trophy collection is then viewable as a mission screen. I've been playtesting with it and it certainly brings up the collector in you.

What is an appropriate place to show such a screen in your opinion? Explorers' club is for example in f2-f6 and flight log in f5-f6. Are there other oxps like these? It would be nice if there was an oxp that would house this kind of statistical oxps in one place.

And another thing. I'm going to try to divide a mission screen into two columns to put more data in one screen. Before I start coding a function to do that, I would like to know if that has been done already.

And finally. At first I wanted to a "collect 'em all" type of thing. The idea was that you would know how many different types of for example pirate ships there are overall and you would try to get 'em all. But I could not find a way to calculate the total number of possible shiptypes (including oxp ships) with a certain role. Is there a way to do that?

Re: [WIP] TrophyHunter

Posted: Sun Sep 02, 2012 9:04 pm
by Thargoid
Hypercargo (and Vortex), APRIL and OoCheat also use such screens, as do New Cargoes, Explorer Club and OXPConfig from a very quick recall (there may well be others). It's always fun to find a combination that's not already used ;)

And dividing the mission screen up is a real PITA as it depends on the character widths. I've done it on a couple of OXPs (Vortex and Hypercargo being the main ones) but that was manually. Some way to do it automagically would be interesting if you could think of one...

For the (new) last one, I don't think there is a simple way to read the pool of ships available for a given role.

Re: [WIP] TrophyHunter

Posted: Sun Sep 02, 2012 9:21 pm
by cim
Spara wrote:
But I could not find a way to calculate the total number of possible shiptypes (including oxp ships) with a certain role. Is there a way to do that?
No. Sorry. I'll add it to the list, though.
Thargoid wrote:
Hypercargo (and Vortex), APRIL and OoCheat also use such screens, as do New Cargoes, Explorer Club and OXPConfig from a very quick recall (there may well be others).
It's amazing that there's any combination of F keys left that just brings up the second screen when you press the second one, really.
Thargoid wrote:
And dividing the mission screen up is a real PITA as it depends on the character widths.
defaultFont.measureString() is the way to do it.

Measure your left column string, measure your padding character (probably space), and then add enough spaces to the left column string to pad it out to the right absolute length before appending the right column text to it. It'll even work if someone uses a different font.

The problem is that the space character is relatively wide, so unless your left column data is very regular in size (if it's numbers only you'll get away with it) you won't get the columns lining up exactly.

Re: [WIP] TrophyHunter

Posted: Sun Sep 02, 2012 9:34 pm
by Rese249er
That sounds AWESOME. Is RandomShipNames OXP taken into account?

Re: [WIP] TrophyHunter

Posted: Mon Sep 03, 2012 4:18 am
by Wildeblood
cim wrote:
Thargoid wrote:
Hypercargo (and Vortex), APRIL and OoCheat also use such screens, as do New Cargoes, Explorers' Club and OXPConfig from a very quick recall (there may well be others).
It's amazing that there's any combination of F keys left that just brings up the second screen when you press the second one, really.
Long Range Scanner (F6, F6, F5), Galactic Hyperdrive (F6, F6, F6), Galaxy Info (F6, something, something).

Re: [WIP] TrophyHunter

Posted: Mon Sep 03, 2012 8:30 am
by Zieman
spara wrote:
And finally. At first I wanted to a "collect 'em all" type of thing. The idea was that you would know how many different types of for example pirate ships there are overall and you would try to get 'em all. But I could not find a way to calculate the total number of possible shiptypes (including oxp ships) with a certain role. Is there a way to do that?
To know how many ships of a certain role are in a system at a given time, this might become handy...

Re: [WIP] TrophyHunter

Posted: Mon Sep 03, 2012 11:37 am
by JazHaz
Wildeblood wrote:
Long Range Scanner (F6, F6, F5), Galactic Hyperdrive (F6, F6, F6), Galaxy Info (F6, something, something).
Galaxy Info is F6, F6, F5.

Hypercargo has two combinations, in-flight and docked. In-flight is F5, F5, F5, F8; and docked is F5, F5, F8.

I have a electronic post-it note with the key combinations on it for those OXPs I use, so I can call it up whilst playing. Edit: It's the built-in Sticky Notes program in Windows 7.

Re: [WIP] TrophyHunter

Posted: Mon Sep 03, 2012 3:11 pm
by spara
cim wrote:
Spara wrote:
But I could not find a way to calculate the total number of possible shiptypes (including oxp ships) with a certain role. Is there a way to do that?
No. Sorry. I'll add it to the list, though.
Good to know.
cim wrote:
defaultFont.measureString() is the way to do it.

Measure your left column string, measure your padding character (probably space), and then add enough spaces to the left column string to pad it out to the right absolute length before appending the right column text to it. It'll even work if someone uses a different font.
Thanks, got it. Implemented and seems to be working as expected. I managed to squeeze 46 entries to one page :).
Rese249er wrote:
That sounds AWESOME. Is RandomShipNames OXP taken into account?
Thanks. Only ship types (boa, python etc.) are logged, so random ship names are not logged.
JazHaz wrote:
Wildeblood wrote:
Long Range Scanner (F6, F6, F5), Galactic Hyperdrive (F6, F6, F6), Galaxy Info (F6, something, something).
Galaxy Info is F6, F6, F5.

Hypercargo has two combinations, in-flight and docked. In-flight is F5, F5, F5, F8; and docked is F5, F5, F8.
This is sort of funny. Maybe a list of "taken" combinations would be in order. I'll squeeze my oxp somewhere.

The oxp seems to be working ok. I'll be playtesting a bit more and post the result later this week.

Re: [WIP] TrophyHunter

Posted: Mon Sep 03, 2012 6:56 pm
by Rese249er
spara wrote:
Thanks. Only ship types (boa, python etc.) are logged, so random ship names are not logged.
Ah well. Sic Vita Est.

Re: [WIP] TrophyHunter

Posted: Wed Sep 05, 2012 8:37 pm
by spara
After a few days of playtesting, I have packaged the oxp and added the link to the first post. If the oxp is not reported to be faulty, I will change the status from WIP to Release.

I put the missionsceen to manifest-F7. If that's conflicting or a bad place for any reason, please let me know.

Re: [WIP] TrophyHunter

Posted: Thu Sep 06, 2012 4:31 pm
by Wildeblood
Doesn't count Thargoids?

Re: [WIP] TrophyHunter

Posted: Thu Sep 06, 2012 6:54 pm
by spara
Wildeblood wrote:
Doesn't count Thargoids?
Thank you. Nice spotting. It seems that thargoid robot fighters are neither derelict or piloted. I changed the logic to bounty and !rock. Now you get a trophy from everything but rocks as long as it has bounty. You should alse get a trophy from pirate-cove, thought I have not tested that.

First post is updated with a new version.

Re: [Release] Trophy Collector

Posted: Tue Sep 18, 2012 11:23 am
by spara
Finally it is a release time. A lot has changed since the [wip] version. Release version is not compatible with the [wip] version. I have quite a few oxps installed and haven't noticed any conflicts.

In short:

*This oxp gives you a kill list or kill log.
*Every kill counts, except for escape pods (that would be too cruel :D ). Killss are logged by ship name.
*Two different modes, "in-flight" and "main station docked". "In-flight" tracks kills between main stations and "main station docked" shows all kills.
*"In-flight" is ordered chronologically, "main station docked" alphabetically.
*Two-column, multipage layout. Press space for next page (except in-flight). One page holds ~38 entries.

Hope you find this oxp entertaining.

Go hunt some Trophies, Commander.

Re: [Release] Trophy Collector

Posted: Sat Sep 29, 2012 10:08 am
by Cpt
Great OXP it is nice to be able to see that I have managed to kill things like frigates and leviathan platform and have it in writing counting the kills!

Re: [Release] Trophy Collector

Posted: Sat Sep 29, 2012 11:51 am
by Zireael
Downloaded, will play as soon as my Oolite starts working.