Page 1 of 1

Artillery wagon max speed

Posted: Sun Aug 26, 2018 1:44 pm
by jokru
Currently the artillery wagons max speed seems to be 372,6 km/h (that with nuclear fuel), if I have a modded train that could go up to 756 km/h and attach a single artillery wagon the speed drops to 372,6 km/h.
Vanilla wagons also have this "limitation"
This may be an issue of balance, but I only use it for clearing up forests etc. (no enemies).

So could it be possible to make an artilley wagon with no (or a significantly higher) speed limit?
Maybe a mod that edits the vanilla one? Or maybe one that adds another one, just with a higher speed limit?

Re: Artillery wagon max speed

Posted: Tue Aug 28, 2018 8:38 am
by bobingabout
Yeah, you could modify the max speed on the cargo, fluid or artillery wagon just the same way you edit it on the locomotive.
My mod adds 4 new locomotives, and 4 of each type of wagon to match (but only 2 new artillery wagons)

Re: Artillery wagon max speed

Posted: Fri Aug 31, 2018 6:07 pm
by jokru
bobingabout wrote:Yeah, you could modify the max speed on the cargo, fluid or artillery wagon just the same way you edit it on the locomotive.
My mod adds 4 new locomotives, and 4 of each type of wagon to match (but only 2 new artillery wagons)
Okay well uhhhh how would I go about modifying it? I can't just edit the base game files right? So I need a mod of sorts...? I'ven't the slightest clue about lua (yet anyway)

Re: Artillery wagon max speed

Posted: Mon Sep 03, 2018 9:11 am
by bobingabout
You'd need to make a mod.

a mod needs 2 things. Firstly though, you need to make a folder in your mod directory with the following format. name_#.#.#
name would be the name of your mod, capitals and spaces etc are important to note ,because the code is case sensative.
#.#.# would be 3 numbers seperated by dots as your mod's version number. 0.16.0 is what I'd use for a mod for 0.16, but other people like to start at 0.1.0 or even 0.0.1.

Then you need an info.json file... for your first time, I'd recommend you just copy one from someone elses mod, then modify it to fit your needs.
pay close attention to make sure the name and version number match what you used in your file name.
Then you'll need at least one of the data.lua files, for your case I would recommend data-updates.lua. (The 3rd 1 is data-final-fixes.lua) Just create a blank text file and rename it to data-updates.lua. Make sure you can edit file extensions on your system though, because data-updates.lua.txt isn't going to work.

then open the file in your favourite text editor (I use Microsoft wordpad, because I'm hardcore) and enter... assuming I have all the names right.

Code: Select all

data.raw["cargo-wagon"]["cargo-wagon"].max_speed = 4
data.raw["fluid-wagon"]["fluid-wagon"].max_speed = 4
data.raw["artillery-wagon"]["artillery-wagon"].max_speed = 4
congratulations, you've made your first mod.

note: I THINK (can't see here) that the default locomotive speed is 1.5 and wagon speed is 2, so setting it to 4 doubles the speed limit. if you want more you can always just enter higher numbers.

Re: Artillery wagon max speed

Posted: Wed Sep 19, 2018 3:38 pm
by jokru
bobingabout wrote: Mon Sep 03, 2018 9:11 am You'd need to make a mod.

a mod needs 2 things. Firstly though, you need to make a folder in your mod directory with the following format. name_#.#.#
name would be the name of your mod, capitals and spaces etc are important to note ,because the code is case sensative.
#.#.# would be 3 numbers seperated by dots as your mod's version number. 0.16.0 is what I'd use for a mod for 0.16, but other people like to start at 0.1.0 or even 0.0.1.

Then you need an info.json file... for your first time, I'd recommend you just copy one from someone elses mod, then modify it to fit your needs.
pay close attention to make sure the name and version number match what you used in your file name.
Then you'll need at least one of the data.lua files, for your case I would recommend data-updates.lua. (The 3rd 1 is data-final-fixes.lua) Just create a blank text file and rename it to data-updates.lua. Make sure you can edit file extensions on your system though, because data-updates.lua.txt isn't going to work.

then open the file in your favourite text editor (I use Microsoft wordpad, because I'm hardcore) and enter... assuming I have all the names right.

Code: Select all

data.raw["cargo-wagon"]["cargo-wagon"].max_speed = 4
data.raw["fluid-wagon"]["fluid-wagon"].max_speed = 4
data.raw["artillery-wagon"]["artillery-wagon"].max_speed = 4
congratulations, you've made your first mod.

note: I THINK (can't see here) that the default locomotive speed is 1.5 and wagon speed is 2, so setting it to 4 doubles the speed limit. if you want more you can always just enter higher numbers.
Thank you a ton! How complicated would optional dependencies be? I don't know if I'll ever publish this, but if I do that would be useful.

Re: Artillery wagon max speed

Posted: Wed Sep 19, 2018 5:15 pm
by bobingabout
jokru wrote: Wed Sep 19, 2018 3:38 pmHow complicated would optional dependencies be?
Here is an extract from an info.json file of mine

Code: Select all

  "dependencies": ["base >= 0.16.0", "boblibrary >= 0.16.0", "? bobplates >= 0.16.0"]
The ? on the front of bobplates means it's optional. It's that simple.

optional dependencies basically mean that the listed mod loads before yours.