RailPowerSystem

by Hermios

Connect rails to electric and signals circuits, and use electric trains

Content
2 months ago
0.14 - 1.1
836
Transportation

i Electric-only high speed train

5 years ago

Add a train that runs only on electric power, but as a result has much higher speed and acceleration? you could also increase the power draw if that's possible, to account for the higher specs.

You can look at the "Electric Trains" mod that I've been using for some time, these ones use stations and internal storage, but have quite a speed advantage over regular locos, and are also much lighter. Due to said advantages it's left me stuck not using your hybrid loco as it's simply inferior...

5 years ago

Well, the answer is no... But with some explanations :)
I am not interested in balance, or upgrade existing items with more of this or less of that. I am only interested in creating new concepts, new features or new items.
However, my mod lets people add their own trains and rails (Or I believe it does..., if not, I can fix it!!!), so you or someone else can create your mod with a new entity and make it work through this one.
Of course, if you don't know how to do it, feel free to ask, I'll be happy to help you

5 years ago

Hello!
I tried to find in the code where and how to change the speed of the trains, but honestly I did not understand. I must say that I do not know a single programming language, and the textbook on Lua came to me 3-4 days ago. I understand that it is worth adding 2 train and in fact it will increase efficiency. But I am very curious how to change the speed. This is not for publication, but for personal use. Rather to satisfy curiosity. I will not take your time. You just poke my finger in the function in the code that is responsible for speed.

5 years ago

No worries
So, first of all, you want to set the maximum speed, i.e. a "constant" value. This is done in the prototype: you need to create a new entity, and a new item for this entity. To do so, you need to clone an existing train. Don't hesitate to look into existing mods (Mine, or others). If you take mine, be aware that there are libraries required. You can find them in the directory "libs" (If you are not sure, just copy the directory "libs", maybe the file "datalibs.lua" shall be enough. Don't forget to refer it in your file data.lua).
Then, you will see that the original entity has an attribute speed (or max speed). Just change it, and here you go!
For more information, check the wiki and other forum on how to create a mod (I cannot explain you all of this here!).
Frankly speaking, it is not very hard, and you don't need to know how to program to do so, so don't worry!
Niko

5 years ago

I think I understood that a new object is being created here, the parameters of which are copied from the vanilla train, then a new object is given a name and the necessary parameters are set below.
createData ("locomotive", "locomotive", hybridTrain,
icon
max_speed =
max_power =
braking_force, etc.)
I used to copy everything that I saw entirely, to discover something new is very interesting. Thank!
I think I know how to make a new train.

New response