I'm just not sure that restocking the market on launch is the right way . Maybe some well thought in-system cargo contracts?
I also like the idea, this will make the systems feel "more alive". But I agree with spara, restocking upon launch feels a little artificial to me. Would "real-time" restocking be possible instead? So when other ships dock or launch, the supplies would sometimes change (might also drop since the other ships might also buy something), perhaps even taking the type of ship into consideration... (fighters rarely buy, traders often buy and sell, shuttles buy stuff that no trader would by because they sell it on the planet)... but I admit, this sounds complicated...
Or simulate "real-time-trading" by adding and removing some goods in irregular intervals...?
忍 knowing that enough is enough, you'll always have enough.
The concerns over possible abuse (though really, if someone wants to abuse Oolite, they will)
are addressed in the 1.05 update. OP will be edited to reflect these changes soon.
There is a cost to constantly re-docking : You will get the attention of pirates!
Your well meaning friends at the station will poke their noses in your business, just until you "Get out a bit more".
No, I'm not a Trumble... that's a speciest and offensive remark!
~munch~
What?.... I'm hungry.
Version 1.10 Has bee released with some important changes (original post on this thread edited to reflect this)
in short:
1. You will now only get a new "menu" of sale items if it has been over an hour (game time) since you last got a fresh "menu" from a particular mainStation.
2. Pirate ambushes have been fixed.
3. Witty chatter has been moved to .plist
No, I'm not a Trumble... that's a speciest and offensive remark!
~munch~
What?.... I'm hungry.
Version 1.10 Has bee released with some important changes (original post on this thread edited to reflect this)
in short:
1. You will now only get a new "menu" of sale items if it has been over an hour (game time) since you last got a fresh "menu" from a particular mainStation.
2. Pirate ambushes have been fixed.
3. Witty chatter has been moved to .plist
Awesome!
Downloading it as we speak. I really like the idea that you could get pirate attention, although my exploit statements itch in me. Can and will this somehow be exploited?
Because this is the internet and I feel the need to correct anything that can be perceived as denying facts, I would like to point out that you do not, in fact, spend 20 minutes on docking, only if you auto-dock. So redocking manually will take me less than 8 seconds since I will only need to launch, decrease speed to 0, turn around and fly the other way back into the station.
So: good that you decided to make the change in 1.11, I find it much more realistic. Although maybe an hour is a bit much? I dunno but maybe 10 minutes should be more than enough?
Version 1.10 Has bee released with some important changes (original post on this thread edited to reflect this)
in short:
1. You will now only get a new "menu" of sale items if it has been over an hour (game time) since you last got a fresh "menu" from a particular mainStation.
2. Pirate ambushes have been fixed.
3. Witty chatter has been moved to .plist
Awesome!
Downloading it as we speak. I really like the idea that you could get pirate attention, although my exploit statements itch in me. Can and will this somehow be exploited?
Because this is the internet and I feel the need to correct anything that can be perceived as denying facts, I would like to point out that you do not, in fact, spend 20 minutes on docking, only if you auto-dock. So redocking manually will take me less than 8 seconds since I will only need to launch, decrease speed to 0, turn around and fly the other way back into the station.
So: good that you decided to make the change in 1.11, I find it much more realistic. Although maybe an hour is a bit much? I dunno but maybe 10 minutes should be more than enough?
Not denying facts, just made what may be a false assumption that the 10min time jump that happens on launch also happened on docking, assuming there are other stations and trade oxps installed there should be plenty to do in that (game time ) hour and again, that's an hour game time (clock on the hud), not real time
No, I'm not a Trumble... that's a speciest and offensive remark!
~munch~
What?.... I'm hungry.
Version 1.10 Has bee released with some important changes (original post on this thread edited to reflect this)
in short:
1. You will now only get a new "menu" of sale items if it has been over an hour (game time) since you last got a fresh "menu" from a particular mainStation.
2. Pirate ambushes have been fixed.
3. Witty chatter has been moved to .plist
Awesome!
Downloading it as we speak. I really like the idea that you could get pirate attention, although my exploit statements itch in me. Can and will this somehow be exploited?
Because this is the internet and I feel the need to correct anything that can be perceived as denying facts, I would like to point out that you do not, in fact, spend 20 minutes on docking, only if you auto-dock. So redocking manually will take me less than 8 seconds since I will only need to launch, decrease speed to 0, turn around and fly the other way back into the station.
So: good that you decided to make the change in 1.11, I find it much more realistic. Although maybe an hour is a bit much? I dunno but maybe 10 minutes should be more than enough?
Not denying facts, just made what may be a false assumption that the 10min time jump that happens on launch also happened on docking, assuming there are other stations and trade oxps installed there should be plenty to do in that (game time ) hour and again, that's an hour game time (clock on the hud), not real time
Heh, then here's another horrible exploit I just thought of (although now we're getting into really exploiting game rules): sell all pylons and re-equip a couple of missiles. The game clock should be adjusted at least a couple of hours for this installation to your ship, and you can safely launch and manually re-dock to fill up your cargo hold once again.
I do admit that this really borders on cheating but the exploit is there. Thus I would still argue that you should make the counter count actual playing time rather than game-time and set the timer for 5 minutes until new stock is available, provided such a global variable exists that is.
Updated with some suggestions from spara in mind, see OP for details!
General summary:
Items now change periodically while in system and not docked.
Frequency depends upon how busy the system is, trader count.
(so eh... defending traders from pirates... good thing)
Only one class (randomly chosen) of commodity is cycled at a time!
No, I'm not a Trumble... that's a speciest and offensive remark!
~munch~
What?.... I'm hungry.
Updated with some suggestions from spara in mind, see OP for details!
General summary:
Items now change periodically while in system and not docked.
Frequency depends upon how busy the system is, trader count.
(so eh... defending traders from pirates... good thing)
Only one class (randomly chosen) of commodity is cycled at a time!
You're fast . Have to check it, when I got some spare time. Glad it's a weekend.
//Change the timer.interval, based on system activity, TY Spara!
if (system.countShipsWithPrimaryRole("trader") !== 0)
{
// 1/traders * (30 + [0 - 30]) mins till next price and restock check
this.timer.interval = Math.round((1 / system.countShipsWithPrimaryRole("trader")) * (1800 + (Math.random() * 1800)));
}
Either I am overlooking something, or calling a slow function like system.countShipsWithPrimaryRole twice in succession is wrongness.
//Change the timer.interval, based on system activity, TY Spara!
var traders = system.countShipsWithPrimaryRole("trader");
if (traders > 0)
{
// 1/traders * (30 + [0 - 30]) mins till next price and restock check
this.timer.interval = Math.round((1 / traders) * (1800 + (Math.random() * 1800)));
}
Sorry Dr.Tripsa . If I had realized, that you'll take those code snippets straight into your code, I would have been more pedantic.
As a rule of thumb, if there's more than one call to a function in your script, it pays off to make just one call and use a variable later on. And to my present understanding, in JS, local variables are the fastests ones.
Sorry Dr.Tripsa . If I had realized, that you'll take those code snippets straight into your code, I would have been more pedantic.
As a rule of thumb, if there's more than one call to a function in your script, it pays off to make just one call and use a variable later on. And to my present understanding, in JS, local variables are the fastests ones.
No problem Spara, It was late and I was interested in getting it done just to see it working.
As you can see it wasn't a direct 'copy' as I used it to redefine the timer.interval rather than set a whole new timer, which probably would have been even less efficient.
and by my estimation, Spara, there are plenty of pedantic personalities here already
No, I'm not a Trumble... that's a speciest and offensive remark!
~munch~
What?.... I'm hungry.