Yet another request for someone else to write an oxp. .

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1248
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Yet another request for someone else to write an oxp. .

Post by UK_Eliter »

Dear ComOOnity

How about an oxp, call it 'statistics.oxp', that combines Thargoid's excellent Flight Log with something that shows how much profit or loss you've made (ie. current cash minus previous cash) since your last dock? That would be handy, and could be satisfying.
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

Re: Yet another request for someone else to write an oxp. .

Post by Fatleaf »

Ever tried keeping a pad and pen next to your computer? :wink:
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1248
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: Yet another request for someone else to write an oxp. .

Post by UK_Eliter »

What, with my credits being in the millions, and those credits being displayed without any seperating commas? And when number-crunching is what computers are good at? But, since I am not much good at programming ( :( ), I thought someone else might like to have a go at it. Perhaps. .
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Yet another request for someone else to write an oxp. .

Post by Thargoid »

That could perhaps be rolled up into flight log itself. Although getting two columns of text/figures to display properly on a mission screen isn't easy...
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Yet another request for someone else to write an oxp. .

Post by Switeck »

Could it even include how many kills were gained since last jump?
...since that's the other way the game keeps "score". :lol:
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Yet another request for someone else to write an oxp. .

Post by Thargoid »

Any such information can be included.

The trick is to make it appear on a mission screen without the whole thing decending into a complete and utterly unreadable mess. The current mission screen (or perhaps font) capabilities don't include much by way of lining variable width text into columns. Tab doesn't cut it unfortunately.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Yet another request for someone else to write an oxp. .

Post by Switeck »

Ouch, so there would have to be a check for how many kills and have 3 possibilities -- 1, 2, or 3 spaces. (I doubt anyone will get >999 kills in 1 system.) Then the number of spaces used would depend on that result.

Amount of credits changed would also possibly be negative if you don't take into account cargo bought, so it could vary wildly...possibly even by 5 digits.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Yet another request for someone else to write an oxp. .

Post by Thargoid »

No, because the characters in the font aren't monospace (or don't seem to be) - If you make a mission screen with a line of 10 of a selection of different characters, they'll be of different lengths. Plus of course the font can be changed.

The two-column mission screen that pops up when you buy a Vortex for example took rather a lot of time to set up, and even that has a bit of variation in it depending on the MAC number of the ship.

Also look closely at the cargo bay screens for the ship, note how the columns aren't quite straight in a couple of places... I spent a while trying to improve, but it wasn't having it.

I now sit and wait for someone to correct me, or offer a simple way to do it that I hadn't thought of (aside from bringing my own monospace font to the party).
Last edited by Thargoid on Wed Jan 19, 2011 10:44 pm, edited 1 time in total.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Yet another request for someone else to write an oxp. .

Post by JensAyton »

Oolite’s super-advanced text layout engine supports tab stops, but only left-aligned ones. Still, these should probably be exposed to mission screens.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Yet another request for someone else to write an oxp. .

Post by Switeck »

Looks like a core-side fix is necessary. :(
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Yet another request for someone else to write an oxp. .

Post by Thargoid »

Anyway, I got bored during a telephone conference at work, so I've got a test version of Flight Log on my USB key that also lists the kills and credit difference (profit/loss) for the 10 systems in the log.

I need to give it some testing, then I'll make it available for a wider beta-test before upgrading the full version.
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1248
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: Yet another request for someone else to write an oxp. .

Post by UK_Eliter »

Thargoid: are you as good at fulfilling others' 'RL' wishes you are their Oolite wishes? If so. .
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Yet another request for someone else to write an oxp. .

Post by JensAyton »

The good news is, Oolite doesn’t only support left-aligned tab stops.

The bad news is, the way it’s currently implemented means mixing tab stops with flowed text would require a serious rewrite of the layout system. So, not before MNSR.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Yet another request for someone else to write an oxp. .

Post by Thargoid »

So what can we actually do, in 1.74.2 and in 1.75 as-is?

Just so I know I've not missed something in what can be done with such mission screen layouts.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Yet another request for someone else to write an oxp. .

Post by JensAyton »

Very little.

I’ve been planning to add a method to measure the length of strings (should be easy barring unforeseen complications), which would make it possible to get alignment right to the nearest space, but I can’t really offer more than that right now. (Cabal Common Functions has a method called strToWidth() which nominally does this, but it has several unfixable bugs, which is the motivation for considering a measuring method in the first place.)
Post Reply