Page 1 of 1
Curved Rail Mod in Version 15
Posted: Mon Sep 11, 2017 8:56 pm
by Pippaf1
How to make the curved rail mod work in version 15? As this mod makes any form of complex junction easer to make.
Re: Curved Rail Mod in Version 15
Posted: Mon Sep 11, 2017 9:11 pm
by darkfrei
Pippaf1 wrote:How to make the curved rail mod work in version 15? As this mod makes any form of complex junction easer to make.
You can place curved rails in Map Editor, I think that all you need is make recipe for it.
Always add links to mods:
daniel34/CurvedRail [0.13]
thislooksfun/CurvedRail-tlf [0.14]
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 3:35 pm
by Pippaf1
Sorry but I fail to see how this helps.
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 3:57 pm
by impetus maximus
what is the purpose of a curved rail mod?
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 5:30 pm
by darkfrei
Code: Select all
data:extend({
{
type = "item",
name = "curved-rail",
icon = "__base__/graphics/icons/curved-rail.png",
flags = {"goes-to-quickbar"},
subgroup = "transport",
order = "a[train-system]-b[curved-rail]",
place_result = "curved-rail",
stack_size = 50,
},
{
type = "recipe",
name = "curved-rail",
enabled = false,
ingredients = {{"rail", 4}},
result = "curved-rail",
}
})
table.insert(
data.raw["technology"]["railway"]["effects"],
{ type = "unlock-recipe", recipe = "curved-rail" }
)
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 6:04 pm
by Pippaf1
darkfrei. Thank you for the help. But I am not a coder and this might be a daft question, but which file does this code need to be copyed to?
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 6:10 pm
by darkfrei
Pippaf1 wrote:darkfrei. Thank you for the help. But I am not a coder and this might be a daft question, but which file does this code need to be copyed to?
mods/MyFirstMod_0.0.1/
data.lua
The second file must be
mods/MyFirstMod_0.0.1/
info.json
with text:
Code: Select all
{
"name": "MyFirstMod",
"version": "0.0.1",
"title": "It's the name of my first mod",
"author": "ItsMyName",
"description": "The mod adds old good curved rails, nothing else",
"dependencies": ["base"],
"factorio_version": "0.15"
}

With program "Notepad++" is much better.
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 7:19 pm
by Pippaf1
darkfrei. Tryed the code and got the folowwing error mesage:
Failed to load mods:___CurvedRail__?data.lua:2unexpected Symbol near char(160)
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 7:49 pm
by darkfrei
Pippaf1 wrote:darkfrei. Tryed the code and got the folowwing error mesage:
Failed to load mods:___CurvedRail__?data.lua:2unexpected Symbol near char(160)
Please add your data.lua
But here is an error:
___CurvedRail__
must be
__CurvedRail__
two "_" by the name of mod, not more, not less.
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 8:03 pm
by Pippaf1
darkfrei. Please see below copy of the data.lua as requested. As to the other error, if it is what I thik it is, it is a transcribing error on my part.
Code: Select all
data:extend({
{
type = "item",
name = "curved-rail",
icon = "__base__/graphics/icons/curved-rail.png",
flags = {"goes-to-quickbar"},
subgroup = "transport",
order = "a[train-system]-b[curved-rail]",
place_result = "curved-rail",
stack_size = 50,
},
{
type = "recipe",
name = "curved-rail",
enabled = false,
ingredients = {{"rail", 4}},
result = "curved-rail",
}
})
table.insert(
data.raw["technology"]["railway"]["effects"],
{ type = "unlock-recipe", recipe = "curved-rail" }
)
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 8:09 pm
by darkfrei
Pippaf1 wrote:darkfrei. Please see below copy of the data.lua as requested. As to the other error, if it is what I thik it is, it is a transcribing error on my part.
Please check that you use encoding without BOM

- 2017-09-12 22_09_04.png (5.42 KiB) Viewed 4913 times
It works perfect

- 2017-09-12 22_10_56.png (52.05 KiB) Viewed 4913 times
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 8:25 pm
by Pippaf1
darkfrei. I have no idea what that is never mind wherer to find out.
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 8:46 pm
by darkfrei
Pippaf1 wrote:darkfrei. I have no idea what that is never mind wherer to find out.
Did you install Notepad++?
https://notepad-plus-plus.org/
The error message writes which line has the error symbol, just find and check it.

- 2017-09-12 22_45_57.png (15.27 KiB) Viewed 4908 times
data.lua:2 is second line, here is all ok.
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 9:36 pm
by Pippaf1
darkfrei. I have installed Notepad++ but the encodeing selection does not give me encode in UTF-8 without BOM. The only choises it gives me are UTF-8 or UTF-8-BOM.
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 9:52 pm
by Pippaf1
Addendum. All seems to work now; well at least factorio now accepts the mod, no error reports, so will have to see how it goes in the game. darkfrei thank you very much for all your help It has been most appreciated.
Re: Curved Rail Mod in Version 15
Posted: Tue Sep 12, 2017 9:53 pm
by eradicator
Have you tried making a blueprint of a single curved rail? You'd need two of them tho becaues blueprints can only rotate 4-ways and not 8 as the original curved rail.