Oolite Bulletins

For information and discussion about Oolite.
It is currently Fri Nov 24, 2017 2:57 pm

All times are UTC




Post new topic  Reply to topic  [ 169 posts ]  Go to page Previous 18 9 10 11 12 Next
Author Message
 Post subject: Re: Fuel Station OXP
PostPosted: Tue Feb 05, 2013 8:37 pm 
Offline
Thargoid
Thargoid
User avatar

Joined: Thu Jun 12, 2008 6:55 pm
Posts: 5510
And Fuel Station v1.35 is now uploaded.

Just a small adjustment to restore the proper compatibility with the current version of OXPConfig.

Download from Wiki or Box via the links below as normal.

_________________
My OXPs via Boxspace or from my Wiki pages :D.

Thargoid TV
Dropbox Referral Link


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Mon Sep 09, 2013 5:13 am 
Offline
Competent
Competent

Joined: Mon Sep 02, 2013 3:45 am
Posts: 37
This is a great OXP! It's very convenient. But maybe too convenient... I have a suggestion: right now using a fuel station is basically a no-brainer. It's too inexpensive. A full top-up would be 21 credits, whereas on some stations or planets it costs more. Plus it's more convenient than having to dock. I'd suggest tweaking the price somewhat to a point where it would actually be a decision whether to use one... maybe making it 30 credits/ly instead? 210 for a full top-up. It's really expensive for fuel but it's so convenient... or maybe scale the price depending on a combination of factors like how dangerous the area is, how far away the sun & nearest station is, and what the station price is. Just a thought - I'll raise the set price on my version and see how it plays out.


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Mon Sep 09, 2013 7:21 pm 
Offline
Thargoid
Thargoid
User avatar

Joined: Thu Jun 12, 2008 6:55 pm
Posts: 5510
Firstly thanks :-)

The OXP predates the variable fuel price, so at the time it wasn't an issue. Now though I can add such a tweak to it, I'll add it to the to do list to look at it but it may be a little while.

_________________
My OXPs via Boxspace or from my Wiki pages :D.

Thargoid TV
Dropbox Referral Link


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Tue Sep 10, 2013 1:47 am 
Offline
Competent
Competent

Joined: Mon Sep 02, 2013 3:45 am
Posts: 37
Quote:
Firstly thanks :-)

The OXP predates the variable fuel price, so at the time it wasn't an issue. Now though I can add such a tweak to it, I'll add it to the to do list to look at it but it may be a little while.
I might mess around with it myself. So far I've added a "this.$costPerLY" (constant) variable to the satellite and station js scripts... a question: right now I notice the announcement is hard-coded in the ai plist files ("sendTargetCommsMessage: Greetings Commander [commander_name]. Why not fuel up here for 3 cr / ly?"). What would be the way to go about making that "3" be variable? Or what would be a good place to start reading up on such things?


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Tue Sep 10, 2013 5:53 am 
Offline
Thargoid
Thargoid
User avatar

Joined: Thu Jun 12, 2008 6:55 pm
Posts: 5510
The wiki is the one-stop shop for all that kind of reference information.

The use of a mission variable would allow the passing of the price to the message in the AI, or the message could be moved into the script (but there are reasons for using the AI - via script you don't get the indicator on the scanner lollipop as to who is transmitting).

I should have some time later this week to look at this, it's a good idea. By all means have a look and see how to do it for personal use and education though if you want to learn a bit more about scripting etc and how OXPs hang together for this kind of thing though if you want.

_________________
My OXPs via Boxspace or from my Wiki pages :D.

Thargoid TV
Dropbox Referral Link


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Tue Sep 10, 2013 5:58 am 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Thu Dec 14, 2006 9:08 am
Posts: 9520
Location: a Hacker Outpost in a moderately remote area
Quote:
Or what would be a good place to start reading up on such things?
For AI scripting: http://wiki.alioth.net/index.php/OXP_howto_AI

For all things scripting in general: http://wiki.alioth.net/index.php/Catego ... _scripting

For the JS-scripting engine: http://wiki.alioth.net/index.php/Catego ... _Reference

For your specific problem you'd want to move the message from the AI into the station's ship script, which is vastly more flexible, and allows you to make all sorts of calculations before you actually display the number. So you'd replace the sendTargetCommsMessage: with sendScriptMessage:, and handle the rest in the script.
Quote:
(but there are reasons for using the AI - via script you don't get the indicator on the scanner lollipop as to who is transmitting)
Not true. You do get the indicator. For instance, all messages in personalities are sent by script, and they all produce the sending indicator. The command is this.ship.commsMessage().

_________________
The Story — The Career — The OXPs


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Tue Sep 10, 2013 3:12 pm 
Offline
Competent
Competent

Joined: Mon Sep 02, 2013 3:45 am
Posts: 37
Quote:
I should have some time later this week to look at this, it's a good idea. By all means have a look and see how to do it for personal use and education though if you want to learn a bit more about scripting etc and how OXPs hang together for this kind of thing though if you want.[/color]
Yeah I've got to start somewhere, and the best way to learn is by messing around with existing projects =). I also had an idea to make it look more like a gas station, so you can see the LYs and credits filling up like a counter - maybe can make it update 10 times/second or so showing how many LY & credits have been transferred so far.

Plus I can share my changes with you if they work and you're interested and it'd be easier for you to integrate them than to do them yourself - I figure it's more beneficial for me to be providing changes instead of just suggesting them! Though of course I understand if you want to be the total owner of all the code in your own OXP.


Last edited by laxori666 on Tue Sep 10, 2013 3:34 pm, edited 1 time in total.

Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Tue Sep 10, 2013 3:13 pm 
Offline
Competent
Competent

Joined: Mon Sep 02, 2013 3:45 am
Posts: 37
Thanks for the links Commander! I'll try to make it work the way you suggested later tonight.


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Tue Sep 10, 2013 5:06 pm 
Offline
Thargoid
Thargoid
User avatar

Joined: Thu Jun 12, 2008 6:55 pm
Posts: 5510
Hmm, it didn't used to work (hence the message in the AI), so if that has been fixed then that's good to know.

As for the other bits - I like the idea of the changes for the fuel pricing, but not the "counter" (not very practical, and indeed if used then it will remove any and all other messages which appear during the refuel) and also not the redesign.

I have had an idea on the back-burner though to add banners to them and possibly colour tinting to make them towards being "branded" as per the ones in YAH.

So for the OXP I'll implement the fuel price modification (that's quite a simple tweak) and leave the rest for the moment I think until I have a bit more time.

_________________
My OXPs via Boxspace or from my Wiki pages :D.

Thargoid TV
Dropbox Referral Link


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Wed Sep 11, 2013 11:01 am 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Thu Dec 14, 2006 9:08 am
Posts: 9520
Location: a Hacker Outpost in a moderately remote area
Quote:
Hmm, it didn't used to work (hence the message in the AI), so if that has been fixed then that's good to know.
As far as I remember there are several ways of making ships send messages in JS, and not all of them produce the indicator. (Or perhaps I'm mixing that up with player ship's commsMessage and consoleMessage. Anyway, the lollipops do broadcast, and I think they did in 1.74 as well.)

_________________
The Story — The Career — The OXPs


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Wed Sep 11, 2013 6:28 pm 
Offline
Thargoid
Thargoid
User avatar

Joined: Thu Jun 12, 2008 6:55 pm
Posts: 5510
No, you're right, ship.commsMessage("Whatever") now fully works and does give the lollipop broadcasting indication. Originally it didn't (then the OXP was written), but it's now corrected so I'm going to adjust things to use it in script instead (and to vary the message a bit too).

Should make life easier anyway.

_________________
My OXPs via Boxspace or from my Wiki pages :D.

Thargoid TV
Dropbox Referral Link


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Wed Sep 25, 2013 7:54 pm 
Offline
Thargoid
Thargoid
User avatar

Joined: Thu Jun 12, 2008 6:55 pm
Posts: 5510
OK, slightly belatedly, I've just updated this OXP to v1.36. Changes include:

  • Proper reflection of variable fuel prices.
  • Script streamlining.
  • Adding stations where appropriate to the system on first launch, not just after witchspace jump.
  • Variable (but repeatable) coloration between systems - for future inclusion of specific fuel suppliers.
Download via the links below from box.com as normal.[/color]

_________________
My OXPs via Boxspace or from my Wiki pages :D.

Thargoid TV
Dropbox Referral Link


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Thu Dec 12, 2013 2:18 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Tue Nov 09, 2010 1:44 pm
Posts: 1396
Cool! Does "reflection of variable fuel prices" mean that it's no longer the best choice?


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Thu Dec 12, 2013 6:24 pm 
Offline
Thargoid
Thargoid
User avatar

Joined: Thu Jun 12, 2008 6:55 pm
Posts: 5510
Basically yes. It will now be properly based on the main station fuel price (with the variable pricing therein), and will be a percentage above that also depending on a few other factors.

In essence it will be what it was originally (before the variable pricing was introduced) - a more convenient place to quickly get fuel for those who are system-hopping (or otherwise reluctant to trek all the way to the main station or similar and dock there for it).

_________________
My OXPs via Boxspace or from my Wiki pages :D.

Thargoid TV
Dropbox Referral Link


Top
   
 Post subject: Re: Fuel Station OXP
PostPosted: Mon Jul 31, 2017 3:16 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 419
Hi all, with Thargoid's permission I have released version 2.1 of this OXP, which includes new textures and a slightly improved model. Available via the extension manager.

Image


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 169 posts ]  Go to page Previous 18 9 10 11 12 Next

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 16 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:
Powered by phpBB® Forum Software © phpBB Limited