The Oolite Extended Project - Fork, no oxp

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

Moderators: winston, another_commander

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:
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.
If the money is sent via courier, he has to buy a galactic hyperdrive at a cost of 5000₢ per galactic jump. The fees he is charging you for his services will hardly be below that. (But of course he may also have other deliveries, so you may pay only part of his costs...)
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 »

pmw57 wrote:
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?
Always happy to lose money! :P
Still, the way Elite & Oolite handle galactic travel, the galactic hyperdrive works only 1 way: you can go to galaxy 6 from galaxy 5, but not back to galaxy 4! (I know, crazy!)

When you're in galaxy 8, a galactic jump takes you back to galaxy 1.
Of course - in js - the galaxy numbers are from 0 to 7, but the same principle applies.

edit: and I'd expect the courier to carry as much as possible during each jump, so you'll get charged just part of the cost for 1 galactic hyperdrive.
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

Re: ..

Post by pmw57 »

Lestradae wrote:
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?
Oh of course! It's just numbers :D

Of course, going by that, computers aren't hard to use because they are just one's and zero's! :shock:
Lestradae wrote:
I would actually like that - always presumed it's doable and you, pmw57, are ready to implement it.
Here's the part that does the work. The variables are intended to make the code as readable as possible.

Code: Select all

this.playerStationIncome = function (type, galaxy) {
	var stationIncome = {
		'A': 4000, 'B': 8000, 'C': 12000, 'D': 21000, 'E': 20000, 'F': 36000,
		'G': 40000, 'H': 75000, 'I': 100000, 'J': 130000, 'K': 250000, 'L': 500000
	},
		projectedIncome = stationIncome[type],
		baseIncome = projectedIncome * 0.80,
		variableIncome = projectedIncome * 0.40 * Math.random(),
		stationIncome = baseIncome + variableIncome;
	
	// adjust for courier travel from station galaxy to your galaxy
	if (galaxyNumber !== galaxy) {
		stationIncome *= 0.95;
	}
	while (galaxyNumber !== galaxy) {
		stationIncome *= 0.97;
		galaxy = (galaxy + 1) % 8;
	}
	return stationIncome;
};
As always, here is the most recent update to the OSE scripts.
http://www.box.net/shared/dodzb27djm
Last edited by pmw57 on Mon Oct 05, 2009 1:29 pm, edited 2 times in total.
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 »

And it already incorporates the one way travel rule! Neat! :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
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 »

Very cool, downloading now :D

PS: pmw57, can you please explain to me what the playerStationShow scripts actually do (precisely)? :oops:

Because I simply don't get that from looking through the script!
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:
And it already incorporates the one way travel rule! Neat! :)
Here's the weekly pay check!

Code: Select all

this.shipExitedWitchspace = function () {
	var totalWeeks = Math.floor(clock.days / 7),
		dayPaid = missionVariables.playerStationDayPaid || 0,
		weeksPaid = Math.floor(dayPaid / 7),
		weeksToPay = totalWeeks - weeksPaid;
	if (dayPaid === 0) {
		weeksToPay = 1;
	};
	while (weeksToPay > 0 && weeksToPay--) {
		this.playerStationIncomeAndBounty();
	}
	missionVariables.playerStationDayPaid = clock.days;
};
http://www.box.net/shared/dodzb27djm
Last edited by pmw57 on Mon Oct 05, 2009 12:27 pm, edited 1 time in total.
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 »

Code: Select all

missionVariables.playerStationDayDayPaid = clock.days; 
playerStationDayDayPaid ?
Apart from that, keep up the good work! :D
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

Re: ...

Post by pmw57 »

Lestradae wrote:
pmw57, can you please explain to me what the playerStationShow scripts actually do (precisely)? :oops:

Because I simply don't get that from looking through the script!
With those Lestradae, I will attempt to take over the world! :twisted:

The way the Oolite works, one script file is allowed to have only one mission associated with it in the mission description manifest.

I don't think that you would like being limited to only one mission description for your player stations.

So, instead of using 1 script to place the mission descriptions, we now have 5 (count them! five!) scripts, that each do the same job. One mission per script.

Each script looks for active player stations.
When the 1st script finds the first player station, it adds a mission description for that station.
When the 2st script finds the second player station, it adds a mission description for that station.

Lather, rinse, repeat.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
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:

Code: Select all

missionVariables.playerStationDayDayPaid = clock.days; 
playerStationDayDayPaid ?
Apart from that, keep up the good work! :D
Yep, already updated, complete with no javascript errors! Go check it out.
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
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:
With those Lestradae, I will attempt to take over the world! :twisted:
Wrhahahaaa! Another apprentice, ready to learn the ways of the farce! :twisted:

Welcome :lol:

Hm, concerning the way the .js does make problems with the setting of the info in the mission screen, perhaps I will use a rest of .plist for that, looks like this:

Code: Select all

<key>Stations_owned_show_AAA</key>
        <array>
        <dict>

        <key>conditions</key>
        <array>
              <string>mission_playerstation_AAA equal 1</string>
        </array>

        <key>do</key>
        <array>
              <string>setMissionDescription: Station_AAA_owned</string>
        </array>

        </dict>
        <dict>

        <key>conditions</key>
        <array>
              <string>mission_playerstation_AAA undefined</string>
        </array>

        <key>do</key>
        <array>
              <string>clearMissionDescription</string>
        </array>

        </dict>
        </array>
I think this is not a big problem, it will not drive down the speed so bad that it is noticable, and it writes into the missions screen exactly what I want it to, with no limitations.

For everything else, I will use the scripts you produced, pmw57, and change the "per witchjump" information to "per week" :D

:idea:

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:
Hm, concerning the way the .js does make problems with the setting of the info in the mission screen, perhaps I will use a rest of .plist for that.
<snip code>
I think this is not a big problem, it will not drive down the speed so bad that it is noticable, and it writes into the missions screen exactly what I want it to, with no limitations.

When I receive my weekly courier package, especially from Galaxy 8 (500,000 clams!) I will be capable of buying up vast numbers of stations.

Additionally, I'm not happy with the stations taking over the mission area, because I sometimes have taxi missions and ups missions going at the same time.

What is the difficulty with placing the player stations in with the equipment. They are after all, big ticket items that you buy and sell anyway.
Lestradae wrote:
For everything else, I will use the scripts you produced, pmw57, and change the "per witchjump" information to "per week" :D
You're very welcome. I'm glad that this testing of the waters has proven to be so fruitful. I may check the depth next time round a bit more carefully, but otherwise this has gone swimmingly.
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

Re: ...

Post by Kaks »

Lestradae wrote:
I think this is not a big problem, it will not drive down the speed so bad that it is noticable, and it writes into the missions screen exactly what I want it to, with no limitations.
If you say so. All .plist scripts are run in their entirety every 10 seconds or so, and that series of tests seems very slow to me. Especially if you multiply it for all the buyable stations you have.

Still, it's your OXP. As long as you're happy with the slow down, then no problem! :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
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:
What is the difficulty with placing the player stations in with the equipment. They are after all, big ticket items that you buy and sell anyway.
If the player switches ships, the equipment either is gone or there has to be special code being added to transfer it. Furthermore, I would guess that the stations could be damaged when the ship is hit with shields down ;)

Maybe we should have something else...like the player would need to visit some place where he then does get a detailed list of his stations...and only a short summary in the f5 screen.

I've currently have 6 mission texts shown without OSE - and I had even more in the past. It seems like most OXPs just trigger at about the same time, thus causing multiple missions to be running...

Screet
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 »

Kaks wrote:
Lestradae wrote:
I think this is not a big problem, it will not drive down the speed so bad that it is noticable, and it writes into the missions screen exactly what I want it to, with no limitations.
If you say so. All .plist scripts are run in their entirety every 10 seconds or so, and that series of tests seems very slow to me. Especially if you multiply it for all the buyable stations you have.

Still, it's your OXP. As long as you're happy with the slow down, then no problem! :)
Would it not work if L would change the handling from buying the stations to create a mission string at that point and then never again change it until the station is sold again? Or would that also cause multiple calculations?

However, I'd still prefer the JS version to use it's current ability to make an overview like x rock hermits (system 1, system 2), y fuel stations (system 3, system 4) or something like that.

Would be soooo nice if keys could be assigned for oxp's. In that case, this could even be more detailed by showing it's own screen after pressing the according key...

Screet
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post by Diziet Sma »

There's always F9 and F10.. if you can convince the devs.. :?:
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Post Reply