Page 2 of 5

Re: [Release] In System Trader OXP 1.0!

Posted: Sun Feb 24, 2013 12:49 am
by GGShinobi
spara wrote:
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... :roll:

Or simulate "real-time-trading" by adding and removing some goods in irregular intervals...? :?: :)

Re: [Release] In System Trader OXP 1.0!

Posted: Sun Feb 24, 2013 1:22 am
by Dr.Tripsa
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".

Re: [Release] In System Trader OXP 1.0!

Posted: Sun Feb 24, 2013 10:26 pm
by Dr.Tripsa
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

Re: [Release] In System Trader OXP 1.0!

Posted: Mon Feb 25, 2013 1:54 am
by JeX
Dr.Tripsa wrote:
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? :x

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?

Re: [Release] In System Trader OXP 1.0!

Posted: Mon Feb 25, 2013 2:02 am
by Dr.Tripsa
JeX wrote:
Dr.Tripsa wrote:
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? :x

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 :)

Re: [Release] In System Trader OXP 1.0!

Posted: Tue Feb 26, 2013 3:09 am
by JeX
Dr.Tripsa wrote:
JeX wrote:
Dr.Tripsa wrote:
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? :x

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. :)

Re: [Release] In System Trader OXP 1.11!

Posted: Tue Feb 26, 2013 3:28 am
by Dr.Tripsa
really at that point, if someone is desperate enough to abuse it, they will... My balance is built in for 'fair use' players LOL

Re: [Release] In System Trader OXP 1.20!

Posted: Fri Mar 01, 2013 8:59 pm
by Dr.Tripsa
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!

Re: [Release] In System Trader OXP 1.20!

Posted: Fri Mar 01, 2013 9:27 pm
by spara
Dr.Tripsa wrote:
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 :D. Have to check it, when I got some spare time. Glad it's a weekend.

Re: [Release] In System Trader OXP 1.20!

Posted: Sat Mar 02, 2013 3:54 am
by Wildeblood
Dr.Tripsa wrote:
Items now change periodically while in system and not docked.
Frequency depends upon how busy the system is, trader count.

Code: Select all

		 //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.

Code: Select all

		 //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)));
             }

Re: [Release] In System Trader OXP 1.20!

Posted: Sat Mar 02, 2013 4:15 am
by Dr.Tripsa
No I didn't catch the double call there, thank you for your help.

Will release a fix (though I doubt it caused anyone any real issues) shortly.

Re: [Release] In System Trader OXP 1.21!

Posted: Sat Mar 02, 2013 5:03 am
by Dr.Tripsa
1.22 released, if you got 1.21 REPLACE IT!

it was broken.

Re: [Release] In System Trader OXP 1.22!

Posted: Sat Mar 02, 2013 10:44 am
by spara
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.

Re: [Release] In System Trader OXP 1.22!

Posted: Sat Mar 02, 2013 3:53 pm
by Dr.Tripsa
spara wrote:
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 ;)

Re: [Release] In System Trader OXP 1.22!

Posted: Sat Mar 02, 2013 4:23 pm
by Smivs
Dr.Tripsa wrote:
...there are plenty of pedantic personalities here...
Not so much pedantic, but we can seem overly concerned with minute details or formalisms. :D