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

Search found 389 matches

by pmw57
Mon Nov 02, 2009 11:34 pm
Forum: Expansion Pack
Topic: The Oolite Extended Project - Fork, no oxp
Replies: 941
Views: 199994

Re: .

Lestradae wrote:
OK, then I will provide the playerStations.js and the OSE-populator.js currently residing on my harddrive:
Thanks, but that is the playerStations.js that I provided before.

Is the next earlier revision of it from the 0.70 release? If so I'll supply the modifications from that instead.
by pmw57
Mon Nov 02, 2009 10:17 pm
Forum: Expansion Pack
Topic: Random Hits OXP
Replies: 1047
Views: 398352

There's just one problem with pmw57's approach: expandDescription collapses an array of alternative strings into just one string. Using the example above, only one of all possible 'mclane-attacked' strings is ever stored inside the this.descriptions object. Using my approach all the mclane-attacked...
by pmw57
Mon Nov 02, 2009 7:54 pm
Forum: Expansion Pack
Topic: Random Hits OXP
Replies: 1047
Views: 398352

So, how do I convert the arrays in descriptions.plist into an JS-array? I haven't yet managed to address the array-entries in descriptions.plist one by one. If I try something like personalities-mclane-attacked[n] , I don't get the n'th entry in the personalities-mclane-attacked array, but the n'th...
by pmw57
Mon Nov 02, 2009 7:44 pm
Forum: Expansion Pack
Topic: The Oolite Extended Project - Fork, no oxp
Replies: 941
Views: 199994

Re: .

<rubs sleep from eyes> 1) The six scripts in the folder now do everything nescessary for the player stations, including placing them in systems if owned, yes? I'll have a look around this evening and see what else there is to be found in the property lists. 2) I can take out all planetinfo.plist ent...
by pmw57
Mon Nov 02, 2009 1:34 pm
Forum: Expansion Pack
Topic: The Oolite Extended Project - Fork, no oxp
Replies: 941
Views: 199994

Re: ...

Thanks, pmw57, for looking into it :D The player stations script is now updated. playerStations.7z The last several hours of entertainment has been spent troubleshooting a shipWillExitStation event, to much hair pulling. Anyway, playerStations.js has been updated so that its events will run both wh...
by pmw57
Sun Nov 01, 2009 10:26 am
Forum: Expansion Pack
Topic: The Oolite Extended Project - Fork, no oxp
Replies: 941
Views: 199994

Re: ..

The playerstations still have a part in planetinfo.plist that might get java-scripted instead Would it be possible to java script this instead, and would you do it if the answer was yes? I'll see what I can do. Second thing is, I did randomise the "fluctuating market" for the playerstatio...
by pmw57
Sun Nov 01, 2009 7:39 am
Forum: Expansion Pack
Topic: The Oolite Extended Project - Fork, no oxp
Replies: 941
Views: 199994

Also whilst some people may like the Oobay stations and all the "unusual" player ships and things like that, I can't say personally that I do. I just want a nice mix of ships to look at, but relatively few are of interest to actually fly. Removing oobay is as simple as commenting out a si...
by pmw57
Sun Nov 01, 2009 7:28 am
Forum: Expansion Pack
Topic: Random Hits OXP
Replies: 1047
Views: 398352

Er, what exactly is this intended to achieve? JavaScript’s Math.random() is not affected by Oolite’s random seed resets. Math.random() doesn’t seem to be an especially good PRNG (although better than either of Oolite’s), but “stirring” it like this shouldn’t give you an appreciably “more random” re...
by pmw57
Sun Nov 01, 2009 6:17 am
Forum: Expansion Pack
Topic: Random Hits OXP
Replies: 1047
Views: 398352

Instead of bickering, here is a better way to seed a random number based on the time. [code]this.ReserveDutySystemDetermination = function() { var sec = clock.minutesComponent * 60 + clock.secondsComponent, dummy; for (var i = 0 ; i < sec ; i++) { dummy = Math.random(); } this.ReserveDutySystemDete...
by pmw57
Thu Oct 29, 2009 10:23 pm
Forum: Expansion Pack
Topic: Random Hits OXP
Replies: 1047
Views: 398352

Kaks wrote:
One situation I can think of is if an AI.plist needs to access a string. In that case, we definitely want to keep the original string inside descriptions.plist... :)
Okay, so for now I will cache the desired descriptions when the script loads, to help avoid any cross-use issues.
by pmw57
Thu Oct 29, 2009 10:10 pm
Forum: Expansion Pack
Topic: Random Hits OXP
Replies: 1047
Views: 398352

pmw57, I would seriously consider internalising those descriptions.plist arrays as js arrays and pick a random adjective/name from those. Whenever any description from descriptions.plist is accessed, oolite has to go through a dictionary (obj-c speak for associative array) made up of the sum of all...
by pmw57
Thu Oct 29, 2009 10:10 am
Forum: Expansion Pack
Topic: Random Hits OXP
Replies: 1047
Views: 398352

I have begin translating the event-based property list script into an event-driven javascript script. I have translated the first third of the code (3000 lines), with a reduction down to 16% of the original size. I was going to provide a first-look at the code, but box.net isn't wanting to load for ...
by pmw57
Wed Oct 28, 2009 9:05 am
Forum: Outworld
Topic: NO subject! HAHA, you'll have to read it to find out!
Replies: 1494
Views: 209022

Get'cher trumble provisions!
by pmw57
Wed Oct 28, 2009 12:07 am
Forum: Outworld
Topic: NO subject! HAHA, you'll have to read it to find out!
Replies: 1494
Views: 209022

Ammo for trumbles
by pmw57
Tue Oct 27, 2009 11:44 pm
Forum: Outworld
Topic: NO subject! HAHA, you'll have to read it to find out!
Replies: 1494
Views: 209022

Trumbles for sale
(hot deal today)