Traffic Redistributer OXZ

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Traffic Redistributer OXZ

Post by Redspear »

Once again pondering the inner workings of oolite, I have been experimenting with a way to reduce mass-lock duration that would have minimal side-effects on gameplay.

Station bound traders are often headed in the same direction as the player and as such can contribute to some of the most time consuming and tedious mass-locks in the game. The basic idea here is to alter the probabilities of the various ships appearing to favour the slower ships without excluding any of the faster ones. Slower traders take less time (and/or fuel) to overtake and therefore result in more tolerable mass-locks.

After considering ship role weighting here, here and here, I came up with couple of slightly controversial ways to skew the figures to suit my purpose.

Firstly, here's a chart to explain the situation as it currently is in the default game:

Image

The green box highlights that there is already a discrepancy between player speed in a cobra mkIII (0.35) and non-player speed (0.3).
The yellow, orange and red boxes highlight the difficulty that many slower ships than the mkIII can have in escaping mass-locks.


For a prototype oxp I have applied 3 different strategies to 'improve' the situation as I see it:

  • Alter the weighting to favour the slower ships without removing any from their current roles
  • Reduce the non-player Moray's speed to it's elite value (0.25) in a similar manner to the non-player mkIII in the default game
  • Include the Transporter in each of the three main trader roles (trader, courier, smuggler)

Although such changes will not remove the most annoying mass-locks altogether they can significantly reduce their occurrance. Like so:

Image

Before I argue the case for some of the changes I'd like to draw attention to a few things on this second table.

  • Total Role Weighting for each role has remained unchanged (6.5, 3.1 and 4.45)
  • The chance of each ship appearing as a trader in relation to the default game is recorded in the last column
  • The Transporter has been added to each group but never as one of the 3 most common ships
  • There is a 'saving' of 0.06* to non-player trader speeds - greater than the 0.05 created by the speed boost granted to the player mk III in an effort to solve the same problem
  • Some of the slower ships now actually have a chance to overtake most masslocks (e.g. Adder)
  • By removing the Transporter and restoring the Moray's speed, a saving of around 0.04 can be achieved depending exactly on how one might choose to rebalance the weightings

A little about the three methods employed:

Role Weighting Adjustments
Central to the whole idea. I've tried to maintain similar proportions for each ship across the roles. Personally I think that some of the more dramatic changes actually make sense; for example, the Asp makes an excellent courier but just because it is one of the best suited doesn't mean it should be the most common - I've recduced it's probability and increased that of the Adder imagining more novice couriers than expert, wealthy ones.

Reduction to the Moray's Speed
This reduction returns the Moray to the speed value it had in elite, in common with all of the other non-player traders. This is no more than has been done with the mk III so I don't see it as particualrly controversial. It also allows me to imagine the Fer de Lance as the luxury passenger courier and the Moray as a more common budget vessel, whilst still getting a speed saving from the change.

The Transporter as a Trader
The big advantage here is that the transporter is very slow, even slower than the Anaconda and so it can really help to lower the average speeds. The obvious question mark over it's suitability however would be the lack of a hyperdrive. Such a disadvantage needn't be crippling however as some ships now advertise their heading or even have wormhole analysers. As a potential cheap option the Transporter has good cargo capacity for its size and despite being slow is otherwise capable.

From the Elite manual and repeated on the oolite wiki:
The Lakon Spaceways MC15 QuikTransport Shuttle is the most commonly encountered intermediate range shuttle, with a range of 0.1LY and a full HiGrav Loading facility. It can carry up to 100 passengers, and has a cargo capacity of 10 tonnes undefined bulk. Can land on asteroids, space stations, and can skim atmosphere, and touch down on land surfaces and all liquid surfaces except acid.
The only time it's really encountered however is as a miner or as a shuttle. I don't think I've ever seen one headed towards the station (other than from the planet) yet shouldn't miners be doing that sometimes for better profits than from a hermit?

Some of the original weighting appears to base probability on suitability of ship. Instead, I have justified my changes with a greater emphasis on availability of ship. Besides, if an Anaconda can be a courier (see first table) then I don't see why a Transporter can't be a trader.

Likely coming soon but presented early for constructive critcism...

* whilst it's true that I forgot to account for the three roles having different weightings when calculating this figure, the savings are highest where they are most needed (i.e. an impressive 0.081 vs couriers) with all the data available above, so I don't feel that the figure is sufficiently misleading to justify making another table :wink:
Last edited by Redspear on Sat Mar 18, 2017 6:41 pm, edited 1 time in total.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4612
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Traffic Redistributer

Post by phkb »

Redspear, this looks amazing! Very well thought out. I don't know if I have any comments to add to any aspect at this point, but I did just want to say, well done on working the problem through so thoroughly.
Astrobe
---- E L I T E ----
---- E L I T E ----
Posts: 609
Joined: Sun Jul 21, 2013 12:26 pm

Re: Traffic Redistributer

Post by Astrobe »

My only comment would be: don't over-do it.

I think masslocks are part of the game too. True, being masslocked every 30 seconds is annoying, but being able to zoom from WP to station without encountering any ship is disappointing in its own way too. Plus, reducing masslock time has a subtle and indirect impact on your credits/hour rate.

Another thing to note is that some OXPs try to deal with this problem, like Variable Masslock (masslock manipulation via script is being added to the core), Surjectors or Synchronized Torus drives. I find those OXPs valuable because they game play (to various degrees) to the masslock effect.

So I'm thinking that by adjusting the role weights in combination to another "masslock reduction" OXP... We might be able to un-cripple NPC ships, which is very noticeable when you encounter the same NPC ship as you.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Traffic Redistributer

Post by Redspear »

Thanks phkb, I appreciate it :-)

Astrobe makes some good points.

Firstly, there are no less masslocks than before, only the average speed of the masslocking vehicles has changed. So masslock is identical in terms of both operation and frequency.

Overdoing it is of course a risk.
Earlier tests with a saving of 0.05 weren't making as big a difference as I was expecting and one of the reasons for that is that not all inbound traffic consists of traders. If you've tried my tweak to Norby's variable masslock then you'll be able to see how often this is the case. There's police of course but other roles are occasionally station bound too.

Re time : credits ratio there is undeniably a shift to the right with this oxp. It could be argued that the ratio of fun : credits however has shifted to the left; game time being most valuable when it's actually fun. Time spent not having fun should be reduced, if a player enjoys the more time consuming masslocks then this oxp probably isn't for them.

For players in a slower ship there can be a slight disadvantage to masslocking vehicles being slower if they are already ahead of you (take a little longer to clear the scanner if you are to go around but take less time to overtake once you've done so). Note however that the adder can now usually overtake traders (even couriers), addressing an issue that's been raised before about the game being much less playable in a slower ship than the mk III.

The prospective oxp also presents a possible method for restoring the mkIII to its original elite speed without spending more time in masslock (with a little tweaking), so it can be a way to balance other changes if they were so desired.

BTW the correct, proportional time saving for the modifications presented above is I believe actually 0.056 so 0.06 wasn't too far away.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Traffic Redistributer

Post by cim »

Redspear wrote: Wed Mar 08, 2017 11:46 pm
Include the Transporter in each of the three main trader roles (trader, courier, smuggler)
You might see some odd behaviour from this as both the standard AIs for those roles and the standard populator use of those roles assumes that the ship can make independent hyperjumps.

Most obvious issue I think will be Transporters launching from the station, then turning around and docking again. Transporter Couriers generated mid-route (on the witchpoint-star lane) are also likely to immediately divert to the nearest station as they are unable to jump to the next system.

It wouldn't be too tricky to add extra priorities to the AI to say that if they don't have a hyperdrive and are in a conventional system and that system is not their destination, they should hang around the main station and look for a suitable wormhole.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Traffic Redistributer

Post by Redspear »

I thought it all seemed suspiciously easy :-)
cim wrote:
Most obvious issue I think will be Transporters launching from the station, then turning around and docking again. Transporter Couriers generated mid-route (on the witchpoint-star lane) are also likely to immediately divert to the nearest station as they are unable to jump to the next system.
Thanks cim.

The first of those behaviours isn't good but the second one needn't be much of a problem - given that it would almost certainly be the slowest thing on the lane.

Two 'quick' fixes off the top of my head:

"Transpoter-trader" shipdata.plist with custom AI (need to understand AI a little better first). New trader roles solely applied to this variant of the transporter.

Give the transporter a hyperdrive. Less satisfactory but if I gave it a fuel of only 4 or 5 light years then would it choose target systems accordingly?

Of course the transporter isn't necessary in order to achieve this level of speed saving but is is helpful in keeping some variety amongst the traders.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Traffic Redistributer

Post by cim »

Redspear wrote: Thu Mar 09, 2017 7:31 pm
Give the transporter a hyperdrive. Less satisfactory but if I gave it a fuel of only 4 or 5 light years then would it choose target systems accordingly?
Target systems are chosen by the populator, not the ship AI. If you give it insufficent fuel to make the jump, then it will:
1) if it has fuel scoops and enough heat insulation (with its ultra-slow speed, only the couriers will, I think), head for the star, scoop, then jump.
2) otherwise, head for the nearest station to dock and buy more fuel

The generalisable way to do this is to modify templateWitchspaceJumpOutbound so that it has a branch for no-hyperdrive ships to search for wormholes to its destination system; if it doesn't find any, it should go to the nearest friendly station and hang around there until it sees one. templateWitchspaceJumpAnywhere has some code to do that's pretty similar to what you'd need - though the condition/configuration pair would need to use a different (and new) function which only looked for and targeted wormholes to the right destination.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Traffic Redistributer

Post by Redspear »

cim wrote:
The generalisable way to do this is to modify templateWitchspaceJumpOutbound so that it has a branch for no-hyperdrive ships to search for wormholes to its destination system; if it doesn't find any, it should go to the nearest friendly station and hang around there until it sees one. templateWitchspaceJumpAnywhere has some code to do that's pretty similar to what you'd need - though the condition/configuration pair would need to use a different (and new) function which only looked for and targeted wormholes to the right destination.
I found them referenced in PriorityAI Documentation but as for modifying them I can't see how to 'crack them open' in order to poke around inside.
I'm very new to AI so hopefully my understanding will improve at some stage :P

Fudge options:

Either prevent the trader version of the transporter from launching at stations or change it's AI to that of a shuttle upon launch. This should mean no redocking issues and also balance the transporters generated on the lane who cannot leave the system (and also not be obvious unless you actively studied the system traffic). If however, it is only couriers that are generated on the lane then this won't work very well...

or...

Knock a few tonnes off the cargo capacity of the trader version and give it a hyperdrive. Very easy to do and AI problems should be resolved. 'Normal' transporter behaviour and capability would still be observable from the shuttles and miners.

I'm warming to the idea of the second one as it is both easy to do (even for me) and doesn't seem to be an outlandish possibility in the oolite universe.

Thanks cim. Hopefully I'll be able to act on your advice in the future.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6874
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: Traffic Redistributer

Post by Disembodied »

Do planets count as "stations"? For certain types of ships, at least - e.g. shuttles, transporters (and Adders and maybe Morays, too)?
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Traffic Redistributer

Post by Redspear »

Not for the AI I don't think (?)
If I'm reading it right, the populator will launch ships from the station according to role, so if I give the transporter the role of a trader then it will be spawned from the station and (often) attempt to hyperspace elsewhere. Manipulation should be possible by script however.

Just realised that in the standard game the transporter is about the same size as a worm. Not a problem in the rescaled version where it's about 3 times as big but slapping a hyperdrive on something the size of a worm is probably pushing it. Transporter MkII? I'm getting desperate :lol:
jackiebean
Dangerous
Dangerous
Posts: 112
Joined: Wed Jan 18, 2017 2:01 pm

Re: Traffic Redistributer

Post by jackiebean »

That could be on my radar. I was looking over the FFE shiplist the other night and there are a lot of those ships that i would be interested in making new models for. I think i remember seeing an OOlite spider or panther somewhere, but cant remember off hand, but if those deserve a re-do, i might be willing to take it on with a few other transporters.

I just worked on two of the bulk haulers last night and still have to work on the Lynx. Transporter MkII would be fun too.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Traffic Redistributer

Post by Redspear »

I'd love to see what you would make of a Transporter Mk II concept but as I'm supposed to be playing with core shipset probabilities then it should likely be very Griff-like if it even exists at all.

One easy way way to do it is to make a transporter twice as big with model_rescale_factor, give it a hyperdrive and perhaps an extra energy bank and name it as the mkII. I'm not sure that I'm happy with the idea though - seems like a fix for a fix...

Meanwhile with further tweakings I'm getting speed savings of 0.069 (or 69 as a shipdata.plist value) without changing role weightings massively from those posted above.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Traffic Redistributer

Post by Redspear »

Redspear wrote: Fri Mar 10, 2017 10:10 am
Just realised that in the standard game the transporter is about the same size as a worm. Not a problem in the rescaled version where it's about 3 times as big but slapping a hyperdrive on something the size of a worm is probably pushing it.
And yet I somehow managed to forget that in the standard game scale is 'curious' to say the least...

Temporary solution: give it a hyperdive with 7LY fuel until I have both the time and inclination to work out the AI solution suggested by cim.

Thanks to everyone for the feedback and ideas.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Traffic Redistributer

Post by Redspear »

The transporter role weights weren't contributing properly to the calculations so here's another attempt.

Default Role Weighting

Image

Pale yellow boxes highlight the main players in each role category, the rest is as before.

Now with the transporter included and role weight adjustments:

Revised Role Weighting

Image

The red and orange boxes have gone from around the python and adder (indicating improved speeds) and the cobra now overtakes couriers (the fastest group) quicker than it did traders (the slowest) in the default game.

Whilst role weights have been shrunk significantly in some cases don't forget that many of these ships can appear on lane in other roles; sometimes ion a manner which can make them difficult to distinguish from the roles above.

Another possibilty is to actually reduce speeds across an entire role.
For example, suppose the traders were slower on account of greater cargo mass:

Alternate Role Weighting

Image

I like this idea but it's probably better implemented in another oxp (equipment by ship class perhaps).

Speed savings are a little better and would be better still if traders are more common than couriers and smugglers (the ratios are unknown to me and are assumed to be equal for purposes of calculation). In any case, the lowest speed saving (0.057) is still superior to the player mk III's speed boost (0.05). Although it may not apply against all ships (trader roles only) the speed saving is not specific to the mk III and acts in cooperation with said boost rather than in its place.

OXZ to follow in the next few days.
Astrobe
---- E L I T E ----
---- E L I T E ----
Posts: 609
Joined: Sun Jul 21, 2013 12:26 pm

Re: Traffic Redistributer

Post by Astrobe »

Redspear wrote: Fri Mar 10, 2017 10:10 am
Just realised that in the standard game the transporter is about the same size as a worm. Not a problem in the rescaled version where it's about 3 times as big but slapping a hyperdrive on something the size of a worm is probably pushing it. Transporter MkII? I'm getting desperate :lol:
It's also about the size of an Adder, which does have a hyperdrive, so how big is a hyperdrive anyway? The Wiki describes the Transporter as being able to carry 100 passengers and 10/12TC (versus 2 for the Adder)... In something that's half the size of a Sidewinder. "Livestock" would be more accurate than "Passenger" in this case.

So let's pretend one removes a few seats to fit a hyperdrive and be done with it.
Post Reply