Oolite Bulletins

For information and discussion about Oolite.
It is currently Sat Oct 21, 2017 10:59 pm

All times are UTC




Post new topic  Reply to topic  [ 816 posts ]  Go to page Previous 150 51 52 53 54 55 Next
Author Message
 Post subject: Re: Scripting requests
PostPosted: Sun Mar 16, 2014 12:28 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
User avatar

Joined: Fri Nov 11, 2011 6:19 pm
Posts: 4012
Quote:
I'm not sure whether it's me missing something or this particular function not working the way it's supposed to (but I'm guessing it's probably the first one), but I'm still able to dock. I can disallow docking clearance but I can still dock:
The shipSpawned method isn't called for subentities. Set the initial values through the subentity definition in shipdata.plist instead.

_________________
OXPs: [EliteWiki] New Cargoes, [EliteWiki] Skilled NPCs, [EliteWiki] Curse of the Black Sunspot, and more


Top
   
 Post subject: Re: Scripting requests
PostPosted: Mon Mar 17, 2014 2:13 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Apr 29, 2012 2:23 pm
Posts: 883
Location: United Kingdom
Ah...did not see that... :oops: Thanks cim!


Top
   
 Post subject: Re: Scripting requests
PostPosted: Mon Mar 17, 2014 7:41 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
User avatar

Joined: Fri Nov 11, 2011 6:19 pm
Posts: 4012
Quote:
Ah...did not see that...
Well, the bit in the documentation of shipSpawned that said that probably wasn't there the last time you looked. Docks are perhaps the first subentity there's a need to put scripts on, so it's not really come up before.

_________________
OXPs: [EliteWiki] New Cargoes, [EliteWiki] Skilled NPCs, [EliteWiki] Curse of the Black Sunspot, and more


Top
   
 Post subject: Re: Scripting requests
PostPosted: Wed Mar 19, 2014 11:19 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Apr 29, 2012 2:23 pm
Posts: 883
Location: United Kingdom
Okay still having problems. I've set the allow_docking function to false and the disallowed_docking_collides function to true in the subentity definition in shipdata.plist but its still letting me dock. :(

Also if you have to define these in the subentity definition then dos that mean they can't be conditional?


Top
   
 Post subject: Re: Scripting requests
PostPosted: Thu Mar 20, 2014 7:54 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
User avatar

Joined: Fri Nov 11, 2011 6:19 pm
Posts: 4012
Could you trim the shipdata.plist to the smallest length of code + attached scripts you'd expect to work but doesn't and post it - that should be working correctly.
Quote:
Also if you have to define these in the subentity definition then dos that mean they can't be conditional?
The initial values can't be, but the main entity's shipSpawned function can use whatever conditions it likes to immediately change them.

_________________
OXPs: [EliteWiki] New Cargoes, [EliteWiki] Skilled NPCs, [EliteWiki] Curse of the Black Sunspot, and more


Top
   
 Post subject: Re: Scripting requests
PostPosted: Fri Jul 25, 2014 3:57 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Fri May 30, 2014 4:07 pm
Posts: 827
I have a request, specifically for the Neolite Cobra MKII-X

http://wiki.alioth.net/index.php/Cobra_Mk.2_(Oolite)

This is the original version, and the size of it obviously doesn't match up with the fiction (which is described as more like a Cobra MK III with the hull problems fixed, though that still leaves some wiggle room. I reckon they also added in the side lasers and an extra energy bank between 2 and 3 ;) ). This ship, if I'm reading the stats correctly, is smaller than an Adder overall!

But Neolite did his own version for his Companion set

http://wiki.alioth.net/index.php/Neolite_Ships

I was wondering if someone could tell me if he altered the dimensions on his version of the ship, and if so what the dimensions now are in game. If it is about the same size as the original above, could someone possibly make a new model that keeps the design exactly the same, but scales it up so it's on par with the Cobra 1 and 3. If the Neolite version is already boosted in size... woot!

(See, I've got a story I want to write involving this. I'll be removing the ship as a random encounter and only player available.)

If anyone is willing to take this on, can I also trouble them for a custom paint job :D (just want to replace the snake on it with my logo ;) )

_________________
--
Image
Pilot: Mossfoot - Ship ID: Viaticus Rex (Cobra MKII)
Rank: Competent - Status: Clean

http://www.noahchinnbooks.com/


Top
   
 Post subject: Re: Scripting requests
PostPosted: Fri Jul 25, 2014 5:20 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon Apr 06, 2009 12:20 pm
Posts: 6185
Location: Aboard the Pitviper S.E. "Blackwidow"
Quote:
I have a request, specifically for the Neolite Cobra MKII-X
You appear to have misunderstood the nature of this thread.. :wink:

It's intended for OXP writers to ask for new functions to be added to core, so that their OXP can do something clever that the core code doesn't currently permit.

A new thread in the Expansion Packs section would be a better place to post your request. :wink:

_________________
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


Top
   
 Post subject: Re: Scripting requests
PostPosted: Fri Jul 25, 2014 5:24 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Fri May 30, 2014 4:07 pm
Posts: 827
:oops:

Erm... ooops

_________________
--
Image
Pilot: Mossfoot - Ship ID: Viaticus Rex (Cobra MKII)
Rank: Competent - Status: Clean

http://www.noahchinnbooks.com/


Top
   
PostPosted: Thu Jul 31, 2014 3:07 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sat Jun 11, 2011 6:07 am
Posts: 2161
Location: Western Australia
I've a request: being able to over-ride the value of "short-range-chart-title" in descriptions.plist from SystemInfo for individual systems. So we could create a planetinfo.plist that e.g. titled the screen "The Pulsar Worlds" whenever the player was in the top right of chart 1, or "Beyond the Great Rift" in the bottom left of chart 7.

Also, with the zoomable chart (brilliant!) only "long-range-chart-title-d" is currently being used. Were you planning to re-instate "short-range-chart-title" when the chart is zoomed in, or is changing the screen title while it is being viewed an unwanted complication?


Top
   
PostPosted: Thu Jul 31, 2014 9:27 am 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Tue Nov 09, 2010 1:44 pm
Posts: 1393
Quote:
I've a request: being able to over-ride the value of "short-range-chart-title" in descriptions.plist from SystemInfo for individual systems. So we could create a planetinfo.plist that e.g. titled the screen "The Pulsar Worlds" whenever the player was in the top right of chart 1, or "Beyond the Great Rift" in the bottom left of chart 7.

Also, with the zoomable chart (brilliant!) only "long-range-chart-title-d" is currently being used. Were you planning to re-instate "short-range-chart-title" when the chart is zoomed in, or is changing the screen title while it is being viewed an unwanted complication?
Seconding those two!


Top
   
 Post subject: Re: Scripting requests
PostPosted: Mon Sep 29, 2014 8:00 pm 
Offline
Competent
Competent
User avatar

Joined: Sat Aug 16, 2014 12:06 pm
Posts: 53
This is a repeat of my comment in the Expansion Pack topic: I cannot find any way of detecting when the game is paused. I want to silence my custom engine sound on pausing (usually means wife talking, doesn't go well with loud engine roar!)

Can I request the following please?

Game State handler addition, something such as:

this.playerWillPauseGame = function(){}

and

this.playerHasResumedGame = function(){}


Top
   
 Post subject: Re: Scripting requests
PostPosted: Mon Sep 29, 2014 10:30 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2408
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
I think the whole scripting engine is stopped during pause so your theoretical js code will not run.

But there is a manual solution: press F2 when you are in pause, then select Game Options, Sound Volume and hold down the left arrow until Mute.

_________________
OXPs by Norby


Top
   
 Post subject: Re: Scripting requests
PostPosted: Mon Sep 29, 2014 10:44 pm 
Offline
Competent
Competent
User avatar

Joined: Sat Aug 16, 2014 12:06 pm
Posts: 53
I thought the js event handlers are called by the Oolite core? If so surely Oolite can detect "p" pressed, call the pause event handler then pause the game after the handler returns.


Top
   
 Post subject: Re: Scripting requests
PostPosted: Tue Sep 30, 2014 6:19 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
User avatar

Joined: Fri Nov 11, 2011 6:19 pm
Posts: 4012
Quote:
I think the whole scripting engine is stopped during pause so your theoretical js code will not run.
Frame callbacks are suspended (so you can't just detect pause by checking for delta=0 in one) and timers run on game time rather than real time so won't fire either, but the scripting engine does still operate. A few handlers in it might even still be called while paused - coordinatesForEscortPosition, perhaps - though I've not checked.

(All pausing the game does is set the "simulation step" to 0 - pretty much everything still runs, including screen updates, or you wouldn't be able to do anything while paused other than kill the game to your desktop)

It should be straightforward to add the requested handlers and I'll add it to the list for 1.82

_________________
OXPs: [EliteWiki] New Cargoes, [EliteWiki] Skilled NPCs, [EliteWiki] Curse of the Black Sunspot, and more


Top
   
 Post subject: Re: Scripting requests
PostPosted: Tue Sep 30, 2014 5:22 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
User avatar

Joined: Fri Nov 11, 2011 6:19 pm
Posts: 4012
Added and will be in the nightly builds.

Incidentally, one other bit of JS functionality that can still be used while paused is the JS console - pause the game, run a series of commands to set up a situation, then resume. Much easier than trying to do it while the simulation is running and half way through your new NPC's default AI causes it to jump out of the system.

_________________
OXPs: [EliteWiki] New Cargoes, [EliteWiki] Skilled NPCs, [EliteWiki] Curse of the Black Sunspot, and more


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 816 posts ]  Go to page Previous 150 51 52 53 54 55 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited