Page 1 of 2

[Wip] In-system traders 0.3

Posted: Wed Aug 13, 2014 5:04 pm
by spara
As discussed in the DeepSpacePirates thread, I have created a small expansion that adds a few in-system traders that fly randomly from station to station to the game.

* The number of added traders is the number of approved stations in system. Stations that have an allegiance of "galcop", "neutral" or "chaotic" are approved.
* The number is kept constant by launching a new in-system trader when another one docks. In the unfortunate case of premature death, a new in-system trader arrives to the system from witchspace.

This was my first dive into the new priority AI and it rocks 8) .

Download (v0.3) oxz here: https://app.box.com/s/iza96jzorcm671tp3a7c

And as always all comments are much appreciated.

Re: [Wip] In-system traders 0.1

Posted: Wed Aug 13, 2014 5:13 pm
by Cody
Do these in-system traders take in rock hermits too?

Re: [Wip] In-system traders 0.1

Posted: Wed Aug 13, 2014 5:22 pm
by spara
Cody wrote:
Do these in-system traders take in rock hermits too?
Yes they do. At least for now. It needs testing if feels right or wrong. The numbers are quite low so they should not make it too easy. And Deep Space Pirates is much recommended to discourage in-system trader farming.

Re: [Wip] In-system traders 0.1

Posted: Wed Aug 13, 2014 5:34 pm
by Venator Dha
:D That's great. Thanks for doing this.
Downloaded and testing started.

Re: [Wip] In-system traders 0.1

Posted: Wed Aug 13, 2014 5:57 pm
by mossfoot
Presumably this is so we see traders going from planet to planet to those stations as well? :D

Re: [Wip] In-system traders 0.1

Posted: Wed Aug 13, 2014 6:13 pm
by spara
mossfoot wrote:
Presumably this is so we see traders going from planet to planet to those stations as well? :D
No planetary landings at least at this point. That's a possibility for future versions of course.

Re: [Wip] In-system traders 0.1

Posted: Wed Aug 13, 2014 7:11 pm
by mossfoot
Sorry, didn't mean landing on planets, I meant going to stations orbiting other planets.

Re: [Wip] In-system traders 0.1

Posted: Wed Aug 13, 2014 7:51 pm
by spara
mossfoot wrote:
Sorry, didn't mean landing on planets, I meant going to stations orbiting other planets.
You bet they are.

The change to the game is quite subtle so you have to be quite lucky to see one of these on it's way to the farthest station. But you _know_ they are out there. And if someone seems to go to a strange direction after launch, it just might be going to a rock hermit that's been tipped to it in a bar.

If someone wants to see what's really going on, there are some commented out logging lines in both script and AI files. That's how I mainly tested this. I set TAF to 16 and monitored the log.

Re: [Wip] In-system traders 0.2

Posted: Fri Aug 15, 2014 9:00 pm
by spara
A new wip version (0.2) is up. Lots of rewriting and code reorganizing on top of a couple of important changes.

* Oxp is now much more polite when spawning new traders. Ships with custom AIs are either removed or left untouched. If adding ships to station launch queue, ships with custom AIs are left untouched. Elsewhere they are removed right after spawning.
* Probability for an in-system trader to visit a rock hermits (or other similar stations) is greatly lowered. It's still possible, but very rare.

All logging lines are left in for those who want to test this and monitor it's work. See Latest.log.

Re: [Wip] In-system traders 0.2

Posted: Sun Aug 17, 2014 8:48 pm
by Redspear
Another worthy contribution.
Thanks spara :)

Re: [Wip] In-system traders 0.2

Posted: Sun Aug 31, 2014 4:49 pm
by Venator Dha
I've run into a very specific conflict with [EliteWiki] Distant_Suns.

When jumping to "Ara" Oolite (both 1.80 & 1.81) on Mac OS

Code: Select all

Opening log for Oolite development version 1.81-140829 (x86-64 test release) under Mac OS X Version 10.9.4 (Build 13E28) at 2014-08-31 16:23:36 +0000.
Machine type: iMac11,2, 12288 MiB memory, 2 (4 logical) x x86 (Westmere) @ 3200 MHz.
stopped responding at the end of the countdown requiring me to forced quit Oolite.

By removing and adding OXP & OXZs I discovered there was some conflict with Distant_Suns. Now as I've been running both OXPs since In-system traders came out without a problem, this seemed specific to Ara. Looking at the planet info.plist in Distant_Suns, Ara's sun is moved a long way away. So by reducing sun_distance_modifier everything works well again.

Changed

Code: Select all

"0 245" = { // name = "Ara";
        corona_flare = "0.800"; corona_hues = "0.20"; corona_shimmer = "0.38"; sun_color = "cyanColor";
        sun_distance_modifier = "175"; sun_name = "Wyndham 1970"; // sun_radius = "";
        };
to

Code: Select all

"0 245" = { // name = "Ara";
        corona_flare = "0.800"; corona_hues = "0.20"; corona_shimmer = "0.38"; sun_color = "cyanColor";
        sun_distance_modifier = "149"; sun_name = "Wyndham 1970"; // sun_radius = "";
        };
149 is the largest working value.

I have visited other systems with sun_distance_modifier larger than 149 without problem (I'm speculating -wildly perhaps :D that it's the resultant overall distance that's causing the problem)

I would guess there are more of these specific system conflicts out there to be found.

Re: [Wip] In-system traders 0.2

Posted: Sun Aug 31, 2014 5:32 pm
by Wildeblood
Venator Dha wrote:

Code: Select all

"0 245" = { // name = "Ara";
        corona_flare = "0.800"; corona_hues = "0.20"; corona_shimmer = "0.38"; sun_color = "cyanColor";
        sun_distance_modifier = "175"; sun_name = "Wyndham 1970"; // sun_radius = "";
        };
to

Code: Select all

"0 245" = { // name = "Ara";
        corona_flare = "0.800"; corona_hues = "0.20"; corona_shimmer = "0.38"; sun_color = "cyanColor";
        sun_distance_modifier = "149"; sun_name = "Wyndham 1970"; // sun_radius = "";
        };
149 is the largest working value.

I have visited other systems with sun_distance_modifier larger than 149 without problem (I'm speculating -wildly perhaps :D that it's the resultant overall distance that's causing the problem)

I would guess there are more of these specific system conflicts out there to be found.
Yes, the Wyndham Catalogue of Super-Luminous Stars includes only the very brightest stars, and Ara is an "impossible planet" because such stars should vaporize everything within several light years.

Your speculation is likely correct as the sun-planet distance is the planetary radius multiplied by the sun distance modifier, and most of the variation comes from the planetary radius. So the same sun distance modifier can produce very different actual sun-planet distances. IIRC, the extremes of sun distance modifier set by Distant Suns are 14 and 190.

Re: [Wip] In-system traders 0.2

Posted: Sun Aug 31, 2014 5:45 pm
by Venator Dha
Wildeblood wrote:
Yes, the Wyndham Catalogue of Super-Luminous Stars includes only the very brightest stars, and Ara is an "impossible planet" because such stars should vaporize everything within several light years.
Better get more sunblock then :lol:
Wildeblood wrote:
Your speculation is likely correct as the sun-planet distance is the planetary radius multiplied by the sun distance modifier, and most of the variation comes from the planetary radius. So the same sun distance modifier can produce very different actual sun-planet distances. IIRC, the extremes of sun distance modifier set by Distant Suns are 14 and 190.
That's good to know, Thanks.

Re: [Wip] In-system traders 0.3

Posted: Sun Aug 31, 2014 5:49 pm
by spara
Got it and fixed it, looks like a core bug. A new version uploaded. Big thanks for the report, it would have taken ages for me to spot that.

Re: [Wip] In-system traders 0.3

Posted: Sun Aug 31, 2014 5:58 pm
by Venator Dha
spara wrote:
Got it and fixed it, looks like a core bug. A new version uploaded.
Great will get it now. And it works fine :)
spara wrote:
Big thanks for the report, it would have taken ages for me to spot that.
No problem, That's what us players are for, to catch these rare occurrences :D