Page 1 of 1
Influence a train's speed ingame.
Posted: Mon Aug 03, 2015 12:18 pm
by Xyfi
I've been working with
hitzu on the
Concreted-rail mod, which is just a "Non-game changing mod". He asked me wether it would be able to influence a trains speed based on the type of rail it's driving on, sadluy after some research I had to tell him no.
But it would be great to influence a trains speed at runtime, instead of just the data.lua, and mayne also get the current rail the locomotive/wago is riding on (not a must have, since you can figure it out pretty easily yourself, but it would definitely make things easier). I hope you'll look into this, I was pretty surprised it wasn't in the modding interface already
.
Re: Influence a train's speed ingame.
Posted: Mon Aug 03, 2015 6:09 pm
by orzelek
Wouldn't it work to add friction modifier to rails?
Would work nicely with potential fuel acceleration modifier that was requested in different thread.
Re: Influence a train's speed ingame.
Posted: Tue Aug 04, 2015 11:45 am
by Xyfi
orzelek wrote:Wouldn't it work to add friction modifier to rails?
Would work nicely with potential fuel acceleration modifier that was requested in different thread.
No. If you try to access any of these modifiers:
- effectivity_modifier
- consumption_modifier
- friction_modifier
You get the following error: Callable only on car entity type.
Although adding a friction odifier to rails would be great, or is this what you meant?
Re: Influence a train's speed ingame.
Posted: Tue Aug 04, 2015 4:36 pm
by orzelek
Xyfi wrote:orzelek wrote:Wouldn't it work to add friction modifier to rails?
Would work nicely with potential fuel acceleration modifier that was requested in different thread.
No. If you try to access any of these modifiers:
- effectivity_modifier
- consumption_modifier
- friction_modifier
You get the following error: Callable only on car entity type.
Although adding a friction modifier to rails would be great, or is this what you meant?
Thats exactly what I meant - to add those modifiers to rails. System is already there since stone and concrete roads use them already.
And vehicles have the required parameters - they are simply limited to cars now.
And idea of better fuel to allow for better acceleration and/or higher tops speed would be useful for trains probably - would allow longer trains without loss of speed.