Warp Trading

Do you need help playing, have ideas for the game or just want to talk about what's going on in the game? This is the place.

Post Reply
Zeratul
Posts: 3
Joined: Mon Aug 21, 2017 19:36 UTC

Warp Trading

Post by Zeratul » Mon Aug 21, 2017 19:52 UTC

I remember in the older versions there was a way to set a link up between 2 sectors, possibly only for controlled sectors for trade. You were able to warp to 1 sector, instantly trade, warp back and trade consistently. I remember there was also the option to set where you could repeatedly do this trade setup, such as 1 sector Goods, 1 sector Ore, and just rapidly warp between them and trade in 1 go. I also remember this was a function for quickly distributing Colonists from a Special port to planets.
Is this a function that I was exploiting in the past that was not permitted, something that will be added later that's not current, or just one of those things that's eluding me to use?

Nevermind it was eluding me, it was the Trade Route option in bottom left corner of screen.
Last edited by Zeratul on Mon Aug 21, 2017 19:57 UTC, edited 1 time in total.

Zeratul
Posts: 3
Joined: Mon Aug 21, 2017 19:36 UTC

Re: Warp Trading

Post by Zeratul » Mon Aug 21, 2017 19:54 UTC

I would also like to ask the question about the Fuel Scoop for energy when Warping from sector to sector. Is there a specific tile distance required to get the maximum Energy per travel? I have been testing this and have spent at least 1000 turns trying to find that specific sweet spot between sectors to setup a quick trade route for an Ore and Goods Port while Warping and scooping Energy for maximized profit from trading.

User avatar
TheMightyDude
Site Admin
Posts: 311
Joined: Thu Apr 17, 2014 09:15 UTC

Re: Warp Trading

Post by TheMightyDude » Mon Aug 21, 2017 22:54 UTC

Ok, just dug up some code from rsmove.php which says the following for the fuelscoop

Code: Select all

$deg = pi () / 180;

$sa1 = $start['angle1'] * $deg;
$sa2 = $start['angle2'] * $deg;
$fa1 = $finish['angle1'] * $deg;
$fa2 = $finish['angle2'] * $deg;
$x = ($start['distance'] * sin ($sa1) * cos ($sa2)) - ($finish['distance'] * sin ($fa1) * cos ($fa2));
$y = ($start['distance'] * sin ($sa1) * sin ($sa2)) - ($finish['distance'] * sin ($fa1) * sin ($fa2));
$z = ($start['distance'] * cos ($sa1)) - ($finish['distance'] * cos ($fa1));
$distance = round (sqrt (pow ($x, 2) + pow ($y, 2) + pow ($z, 2)));

$energyscooped = $distance * 100;

$free_power = NUM_ENERGY ($playerinfo['power']) - $playerinfo['ship_energy'];

And if $energyscooped is larger than $free_power cap $energyscooped to $free_power

Hope that helps :P
TheMightyDude::Blacknova Development.
Development Blog YouTube Dev Channel Twitter Twitch

Zeratul
Posts: 3
Joined: Mon Aug 21, 2017 19:36 UTC

Re: Warp Trading

Post by Zeratul » Tue Aug 22, 2017 16:46 UTC

ok TheMightyDude im not too great at reading code, could you put that in a bit more basic terms for me please? =)

User avatar
TheMightyDude
Site Admin
Posts: 311
Joined: Thu Apr 17, 2014 09:15 UTC

Re: Warp Trading

Post by TheMightyDude » Tue Aug 22, 2017 18:15 UTC

Zeratul wrote:ok TheMightyDude im not too great at reading code, could you put that in a bit more basic terms for me please? =)
LOL, it basically gets the distance between to locations i.e. the current sector and the destination sector and multiplies that by 100.
If that return value is greater than what you ship can store it will cap it to the max your ship can handle.

Sorry if that is confusing, I am not really good at explaining things LOL.
TheMightyDude::Blacknova Development.
Development Blog YouTube Dev Channel Twitter Twitch

thekabal
Posts: 100
Joined: Sat Apr 19, 2014 22:32 UTC

Re: Warp Trading

Post by thekabal » Wed Aug 23, 2017 01:58 UTC

Zeratul wrote:ok TheMightyDude im not too great at reading code, could you put that in a bit more basic terms for me please? =)
Any sector is stored with an X,Y,Z coordinate. It's important to realize that it's a full cube space - not simple tiles.

With those coordinates, it does essentially this: https://www.calculatorsoup.com/calculat ... points.php

(Distance between two cartesian points in a 3d/cube space).

And finally, as TMD said, it multiplies it by 100 and if its larger than the max, it reduces it to the max.

Also? I hate geometry with a fiery passion.

Post Reply