Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

The Oolite Extended Project - Fork, no oxp

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

Moderators: winston, another_commander

pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Re: ..

Post by pmw57 »

Lestradae wrote:
Looks to me as if everything is now working except the listing of player stations on the mission screen. (I did not understand what the five "playerStationShow" scripts are actually supposed to do, I have to admit :oops: )
The .plist code was able to add as many missions as it felt like to the manifest page. The .js script is not allowed to do that. It is only allowed to add 1 mission to the page. At maximum, each script file is allowed a maximum of 1 mission.

Limitation #2 is that the manifest page is only capable of showing a maximum of 4 missions, for which you may want to think about how to handle that with the player stations.

The scripts to update the missions are now modified so that they perform their update either on game load, or when about to dock with a station.

Eric has the better idea though, to include the update with the buying process. Then you can keep track of how many stations have been purchased, and not allow someone to purchase more than 3 stations.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: ..

Post by Commander McLane »

pmw57 wrote:
The .plist code was able to add as many missions as it felt like to the manifest page.
No, not really. Have you ever had a look at the manifest page? There is information about your current cargo, passengers, and contracts, and finally the short descriptions of your current mission(s). And all that is on one page with about 20 lines, out of which four are used for the headings, and two as spacings between the different parts. So, in order to place everything actually on the page, you really cannot display more than four or five short descriptions at a time. Let's say the player has Random Hits installed, and is currently doing one other mission. Then already two of them are occupied. Which leaves you with two or three for OSE. At the very max.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

While on the subject of the bought stations, there's 2 things that seem a bit odd to me about the intended behaviour: fixed revenue, and same revenue collected at each each jump, regardless of the time taken for the jump.

What would sound more realistic to me is if the revenue was a bit more random, maybe 20% plus or minus around the projected revenue? And I'd calculate the revenue based on actual game time passed, instead of number of jumps, both very doable using js.

edit:
That's probably why Lestradae asked about extending the mission page to something like the shipyard & player equipment screens, so he could scroll through all the owned stations.

What I'd do to save screen space: any stations owned in another galaxy: 'Your X stations in another galaxy / the other galaxies give you Y credits. (I wouldn't have other galaxies stations influence the player legal standing, the galaxies are supposed to be legally 'watertight' if you know what I mean...) - come to think of it, I wonder if there should be some difficulties transferring money across the galaxies: doable, but curiers employed for the purpose would demand huge cuts, etc...

For stations in this galaxy: you get x credits from your station(s) in Lave, Riedquat, Tionisla...

Hope this helps!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Post by pmw57 »

Kaks wrote:
While on the subject of the bought stations, there's 2 things that seem a bit odd to me about the intended behaviour: fixed revenue, and same revenue collected at each each jump, regardless of the time taken for the jump.

What would sound more realistic to me is if the revenue was a bit more random, maybe 20% plus or minus around the projected revenue? And I'd calculate the revenue based on actual game time passed, instead of number of jumps, both very doable using js.
Here's the code update for variable income, without the time related side of things as of yet.

Code: Select all

				projectedIncome = stationIncome[leftChars[i]];
				baseIncome = projectedIncome * 0.80;
				variableIncome = projectedIncome * 0.40 * random();
				income = baseIncome + variableIncome;
So the person will receive anywhere from 80% to 120% of the stated income for the station.

If Lestradae gives the go-ahead, this would be a very easy improvement to that side of things.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Hi pmw57, Kaks & McLane!

Here is my take on the diverse proposed changes:

* the revenue a bit more random, maybe 20% plus or minus around the projected revenue

-> Definitely go-ahead from me, good idea. I just didn't do this because I didn't know how to do it.

* Limiting the amount of player stations shown on the mission screen and/or the legal consequences/income according to galactic sector they are in

-> I'm not for it. Once, as this would become pretty unwieldy and also not easy to overlook for a player - what do I now get from which station?, and why, etc. I don't want it to become as complicated as in, say, the X series. Second, due to strategic buying reasons players will not easily own more then two to three stations. I don't want to nanny this. If someone does nevertheless, they shall by all means do so. And let's stay realistic: the F5-F5 screen is going to go multi-page in the not-so-far future, or am I mistaken? :wink: * now flees barrage of thrown objects including KillIt missiles from Kaks *

* calculate the revenue based on actual game time passed, instead of number of jumps, both very doable using js

-> If this is easily doable, I'm all for it. Again, did the "per witchjump" thing because I didn't know how else to do it. I would replace the "per WJ" with a "per week", if that's doable.

pmw57, could you/would you implement the changes I agreed to into the next script version?

This discussion is very inspirative, methinks. I will probably make the player stations make available as a standalone oxp, too, after all wrinkles were ironed out. So any ideas that are doable (and pmw57 is ready to help implement) can easily make their way in.

Cheers guys 8)

L
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Re: ..

Post by pmw57 »

Lestradae wrote:
Again, did the "per witchjump" thing because I didn't know how else to do it. I would replace the "per WJ" with a "per week", if that's doable.
How is the time side of things managed in Oolite? Is it accessible via scripting? Will I have to set up a timer with which to regularly poll the game time/date?
Lestradae wrote:
pmw57, could you/would you implement the changes I agreed to into the next script version?
Okay, let's to it now.

As usual (due to an earlier comment) make sure the scripts are included the scripts in world-scripts.plist
Lestradae wrote:
This discussion is very inspirative, methinks. I will probably make the player stations make available as a standalone oxp, too, after all wrinkles were ironed out. So any ideas that are doable (and pmw57 is ready to help implement) can easily make their way in.
Yes, that's a good idea. ... ping ... pong ... playerStations.js created.

Here are all of the updated scripts for OSE
http://www.box.net/shared/dodzb27djm
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

clock.seconds gives you the game time in seconds from the oolite epoch. But see
http://wiki.alioth.net/index.php/Oolite ... nce:_Clock for more info!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

@pwm57: http://wiki.alioth.net/index.php/Oolite ... nce:_Clock

It is really everything there, in the Wiki. I really can't understand why anybody who is scripting for OXPs could not have the category page http://wiki.alioth.net/index.php/Catego ... _scripting opened in his browser all the time.

Tipp for people without a 24/7 internet access (like me): I have local copies of everything on the http://wiki.alioth.net/index.php/Catego ... _scripting page on my computer, and I see to it that I re-downlod them regularly, in order to keep them up to date.
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Post by pmw57 »

Commander McLane wrote:
@pwm57: http://wiki.alioth.net/index.php/Oolite ... nce:_Clock

It is really everything there, in the Wiki.
Curses, I was looking at the timer area, and of course blind-bat over here didn't spot the single scripting entry at the bottom left of the list that was the clock page.

Someone get that man a drink!
Commander McLane wrote:
I really can't understand why anybody who scripts OXP could not have the category page http://wiki.alioth.net/index.php/Catego ... _scripting opened in his browser all the time.
I am guilty of having upwards of 10 scripting pages open at the same time. I may need to find Tree Style Tabs for Chrome.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: ..

Post by Screet »

pmw57 wrote:
How is the time side of things managed in Oolite? Is it accessible via scripting? Will I have to set up a timer with which to regularly poll the game time/date?
The only real time advancement happens when jumping, thus I would only run that after a witchspace jumps time increase. I'd really prefer the use of time that passed as otherwise a player could make 0ly jumps just to earn money...

I guess you're looking for this info:
http://wiki.alioth.net/index.php/Oolite ... nce:_Clock

I also very much like the suggestion that the mission string simply lists the names of the planet (in the current galaxy) where the player does own a station, and the total of stations in other galaxies. That's much shorter and should be enough of info.

Maybe if the player jumps into a system where he owns a station (there's already a check for the stations, it could do that, too), the script could tell the player that he's owning a station of type ... in this system ;)

Concerning the income only being generated when the player is in that galaxy...no...I don't like that idea. Otherwise the player would have to withdraw all his money from a bank and store it in his ships safe before doing an intergalactic jump. Looks like the banks did find a way to handle such accounts anyway, so why restrict it?

Screet
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: ..

Post by Kaks »

Screet wrote:
so why restrict it?
Extending the analogy with the banking system, I don't get charged to withdraw money in my home country, but I do get charged extra if I withrdraw my money abroad. It would just feel more real to me that the money I didn't take with me gets an intergalactic handling fee. Charging a fee at the moment the extra wealth is created seemed to me the simplest way to handle it.

Anyway, it might sould plausible to some people, and not so plausible to others! :P
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: ..

Post by Eric Walch »

pmw57 wrote:
The .plist code was able to add as many missions as it felt like to the manifest page. The .js script is not allowed to do that. It is only allowed to add 1 mission to the page. At maximum, each script file is allowed a maximum of 1 mission.
To be more precise:
The file script.plist contains a directory of scripts while the file world-scripts.plist only contains an array of script names.

In both cases you can have only one description per script, only with legacy scripts you had to put all scripts into a single file with name script.plist. With current Oolite you can also add plist scripts to the world-scripts.plist.

There is even a specific loading order:

First worldScripts.plist. When that file does not exists it tries to load script.js. And when that does not exist it loads script.plist.

This search order is very convenient for creating an oxp that contains js scripts but still can be used with older oolite versions that never try to load js scripts because old oolite never knew such scripts existed.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Re: ..

Post by Lestradae »

Screet wrote:
I also very much like the suggestion that the mission string simply lists the names of the planet (in the current galaxy) where the player does own a station, and the total of stations in other galaxies. That's much shorter and should be enough of info.
Hm, I thought about all the arguments on the table so far and my current thoughts are as follows:

1) The infos I really want to see on the missions screen are:

* Systems you own stations in, at least of the actual, current galactic sector you're in
* How many credits these individual stations in the current galactic sector generate - each station individually
* At least how many stations you own of which type that are in other galactic sectors than your current one and how many credits you get from them, at least the sum total

2) Any changes go as far maximum as pmw57 is willing to invest his valuable work in, as I am simply not able to do things that complex (for me!) in java script.

Opinions on this?

L
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Re: ..

Post by pmw57 »

Kaks wrote:
It would just feel more real to me that the money I didn't take with me gets an intergalactic handling fee. Charging a fee at the moment the extra wealth is created seemed to me the simplest way to handle it.

Anyway, it might sould plausible to some people, and not so plausible to others! :P
You sir will shortly receive a handling charge. The handling fee will be be based on the number galaxies the courier need to travel to get to your galaxy.

If you are in galaxy 3 and the courier was sent from galaxy 5, there can be a base charge of 5%, with an additional 3% per galaxy.

8000
- 400 (5%)
- 240 * 6 (3%)
= 6160Cr
How does that work for you?
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Re: ..

Post by Lestradae »

pmw57 wrote:
If you are in galaxy 3 and the courier was sent from galaxy 5, there can be a base charge of 5%, with an additional 3% per galaxy.
Is this doable for you?

A credits transfer charge across galactic sectors I could live with - if the span of "loss" is in the range of 3-5% per sector inbetween, that is - that would be up to a loss of 21-35% if you are in galaxy 8 and your stations are in galaxy 1, combined with the 80-120% income range it would mean an 45-120% span, according to where you are.

I would actually like that - always presumed it's doable and you, pmw57, are ready to implement it.
Post Reply