Page 1 of 1
[0.15] Train Speed Limiter
Posted: Thu Jul 20, 2017 10:47 pm
by d3x0r
Extends JunkTrains, BioIndustries and RailPowerSystem mods to modify train speeds based on track type. Updates some of the properties of locomotives to balance them back to near default speeds.
Train Speed Limiter mod
Github
Could use some feedback on balancing. Unfortunately due to the dynamic nature, default trains had to be slowed down slightly.
Re: [0.15] Train Speed Limiter
Posted: Fri Jul 21, 2017 5:52 am
by Wildejackson
Fantastic, before this there was no need to use the higher tier rails.
Re: [0.15] Train Speed Limiter
Posted: Wed Jul 26, 2017 7:58 am
by ThorsDragon
This is a really cool mod!!
Could you possibly add support for More Locomotives? If you can, that'd be SUPER AWESOME!!
Thanks for the fantastic mod!!
Re: [0.15] Train Speed Limiter
Posted: Wed Jul 26, 2017 9:38 am
by d3x0r
ThorsDragon wrote:This is a really cool mod!!
Could you possibly add support for More Locomotives? If you can, that'd be SUPER AWESOME!!
Thanks for the fantastic mod!!
Which locomotives?
Re: [0.15] Train Speed Limiter
Posted: Wed Jul 26, 2017 10:08 am
by Optera
d3x0r wrote:ThorsDragon wrote:This is a really cool mod!!
Could you possibly add support for More Locomotives? If you can, that'd be SUPER AWESOME!!
Thanks for the fantastic mod!!
Which locomotives?
He might be talking about
my mod adding upgradable locomotives.
I know I'm terrible at naming my mods.
Re: [0.15] Train Speed Limiter
Posted: Wed Jul 26, 2017 10:22 am
by d3x0r
Optera wrote:d3x0r wrote:ThorsDragon wrote:This is a really cool mod!!
Could you possibly add support for More Locomotives? If you can, that'd be SUPER AWESOME!!
Thanks for the fantastic mod!!
Which locomotives?
He might be talking about
my mod adding upgradable locomotives.
I know I'm terrible at naming my mods.
LOL Oh my bad
oh literally; I didn't read the capitalization.
Re: [0.15] Train Speed Limiter
Posted: Wed Jul 26, 2017 10:57 am
by d3x0r
Optera wrote:
He might be talking about
my mod adding upgradable locomotives.
I know I'm terrible at naming my mods.
You conflict with
https://mods.factorio.com/mods/GotLag/N ... ocomotives
Re: [0.15] Train Speed Limiter
Posted: Wed Jul 26, 2017 1:34 pm
by Optera
Using both mods is redundant. We both add very similar Nuclear Locomotives with different recipes and slightly different stats. Though mine explodes on destruction, taking half of your base with it.
Re: [0.15] Train Speed Limiter
Posted: Wed Jul 26, 2017 8:59 pm
by d3x0r
don't know how many other mods use your train names... changing them to be MT- prefixed would avoid conflicts; but you're probably right.
----
I don't have information from the game like 'is this train accelerating or decelerating' especially when there isn't a player in it. So I have to make some guesses; such as comparing the current speed vs the last train speed (I had a bug that was causing me lots of issues by comparing vs the last set speed) To make this work reasonably well, I can only apply track penalties when accelerating, otherwise trains slow to a crawl when approaching train stops because the track is an extra breaking force. If I had a bit of scrap track before normal track ... (s=scrap, S=standard, Z is the stop) say this layout is where the train thinks it should be slowing for approach SSSSsssssSSSSSSSSSSZ ... then after leaving the scrap track, the train doesn't attempt to re accelerate back up to speed after leaving the scrap track; and would also crawl into a station (yes bad design, and purly user error, just an observation)
So anyway; I found this error originally transitioning from concrete rails where the train was able to get up to speed, and then returning to a stretch of standard rails, the first tick the train would be slowing a lot, the next tick, because it was slowing, and I didn't apply the track scalar, it would fully accelerate above what it was originally, and I would apply the track scalar, which would make it seem like it was braking and so it wouldn't apply ... etc, this oscillation allowed the train to way exceed what it should have been on standard track... -0.997, +1.004, -0.997, +1.004, -0.997, +1.004 (where 1.0 is prior speed==current speed) etc... I mention this because in re-scaling conventional trains, with load, on wood, on standard track I'm running into the same situation when the burner runs out of fuel. It stutters 1 tick when there's not enough energy left, which allows it to extra accelerate by internal mechanic... so it gets into a runaway condition where the top with LLCCCC is about 280, when the log changes it goes up to 360+.
I can't write to train max_speed, so I really can't set a low max_speed to cap trains based on their own type, or raise it for concrete rails.
standard trains are kind of highly penalized when carrying a load; and should be rebalanced....
Unmodified W = Wood; S = Solid Fuel, R = Rocket Fuel
-- 219 W-LCCCC 260 S-LCCCC 272 LCC 298.1 R-LCCCC
-- 259.2(MAX) W-LLCCCC , LL CCCC CCCC, LL Anything really.
-- 110(1 lap), 136(2 laps) W-L CCCC CCCC
Newly Modified Stats
-- 267 W-LLCCCC 337 R-LLCCCC
-- 202 W-LLCCCC CCCC
-- 152 W-LCCCC
-- 108 W-LCCCC CCCC
Although newly modified trains accelerate much much faster.... this'll take some time.
Re: [0.15] Train Speed Limiter
Posted: Wed Jul 26, 2017 10:27 pm
by ThorsDragon
Optera wrote:d3x0r wrote:ThorsDragon wrote:This is a really cool mod!!
Could you possibly add support for More Locomotives? If you can, that'd be SUPER AWESOME!!
Thanks for the fantastic mod!!
Which locomotives?
He might be talking about
my mod adding upgradable locomotives.
I know I'm terrible at naming my mods.
Yes I meant this mod: More Locomotives. I'm sorry for not seeing the question and replying to it. Thanks Optera for clarifying!! And thank you d3x0r for getting to this addition so quick!!! I really appreciate it!
Would you be willing to add one more, please?? 0: D [
https://mods.factorio.com/mods/folk/folk-shuttle] Here's the mod link this time. XD
Re: [0.15] Train Speed Limiter
Posted: Wed Jul 26, 2017 10:35 pm
by ThorsDragon
d3x0r wrote:don't know how many other mods use your train names... changing them to be MT- prefixed would avoid conflicts; but you're probably right.
----
I don't have information from the game like 'is this train accelerating or decelerating' especially when there isn't a player in it. So I have to make some guesses; such as comparing the current speed vs the last train speed (I had a bug that was causing me lots of issues by comparing vs the last set speed) To make this work reasonably well, I can only apply track penalties when accelerating, otherwise trains slow to a crawl when approaching train stops because the track is an extra breaking force. If I had a bit of scrap track before normal track ... (s=scrap, S=standard, Z is the stop) say this layout is where the train thinks it should be slowing for approach SSSSsssssSSSSSSSSSSZ ... then after leaving the scrap track, the train doesn't attempt to re accelerate back up to speed after leaving the scrap track; and would also crawl into a station (yes bad design, and purly user error, just an observation)
So anyway; I found this error originally transitioning from concrete rails where the train was able to get up to speed, and then returning to a stretch of standard rails, the first tick the train would be slowing a lot, the next tick, because it was slowing, and I didn't apply the track scalar, it would fully accelerate above what it was originally, and I would apply the track scalar, which would make it seem like it was braking and so it wouldn't apply ... etc, this oscillation allowed the train to way exceed what it should have been on standard track... -0.997, +1.004, -0.997, +1.004, -0.997, +1.004 (where 1.0 is prior speed==current speed) etc... I mention this because in re-scaling conventional trains, with load, on wood, on standard track I'm running into the same situation when the burner runs out of fuel. It stutters 1 tick when there's not enough energy left, which allows it to extra accelerate by internal mechanic... so it gets into a runaway condition where the top with LLCCCC is about 280, when the log changes it goes up to 360+.
I can't write to train max_speed, so I really can't set a low max_speed to cap trains based on their own type, or raise it for concrete rails.
standard trains are kind of highly penalized when carrying a load; and should be rebalanced....
Unmodified W = Wood; S = Solid Fuel, R = Rocket Fuel
-- 219 W-LCCCC 260 S-LCCCC 272 LCC 298.1 R-LCCCC
-- 259.2(MAX) W-LLCCCC , LL CCCC CCCC, LL Anything really.
-- 110(1 lap), 136(2 laps) W-L CCCC CCCC
Newly Modified Stats
-- 267 W-LLCCCC 337 R-LLCCCC
-- 202 W-LLCCCC CCCC
-- 152 W-LCCCC
-- 108 W-LCCCC CCCC
Although newly modified trains accelerate much much faster.... this'll take some time.
I don't fully understand this, but if you're working on making your mod better, than go for it! I love trains, and I really appreciate the work and effort that you've put into this mod already!
Re: [0.15] Train Speed Limiter
Posted: Thu Jul 27, 2017 3:31 am
by d3x0r
I don't see any changes needed for this one... the shuttle is an addon to existing trains and doesn't add a new train type
Re: [0.15] Train Speed Limiter
Posted: Thu Jul 27, 2017 5:05 am
by ThorsDragon
d3x0r wrote:
I don't see any changes needed for this one... the shuttle is an addon to existing trains and doesn't add a new train type
Oh, my apologies- it used to be separate Train. Thank you for looking d3x0r!