Hello,
I'm trying to create my first mod. This is a mod on the railroad tracks, I want to create a new type of rail: switches.
It is already possible to do in the game but there is a space between the rails is 4 spaces. I wish to do without space.
What we have in game :
What i want to create :
I encounter an error when launching the game with the mod, I have the error:
"Error while loading prototype "switch-leftrail": "switch" isinvalid rail bendind type"
I found nothing on the "bending type" on the forum and on the net, I know that the error is there, but I confess I do not know what to do.
What do you need to help me?
RailRoad
RailRoad
The more things change, the more they stay the same --
Re: RailRoad
The bending type must be either "straight" or "turn" (meaning it's a straight piece of track or that it has turn(s) in it), honestly the noticeable difference in the lua prototype is that the "turn" bending type allows for a secondary collision box....Plysken wrote:I found nothing on the "bending type"
I had to look at the game's C++ code to find if there were any other types (and I only barely know C++), so...if you need more help than that here I may not be able to help you further...(you'd probably need to pm one of the devs to get further information and perhaps in the end make an interface request), but I hope that helps a bit
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
Re: RailRoad
Im not sure, but what if you just make smaller version of curved-rail?
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Re: RailRoad
I experimented with this a bit today, but have had no luck. It appears that the collision box has no correlation to the position of the track:
As you can see above, the collision box for the curved end was changed (this is secondary_collision_box) to 0.1,0.1,0.1,0.1, but the aspects of the track movement did not change. The train continued to be able to traverse the track. The collision box only applies to what can be clicked on the track.
As you can see above, the collision box for the curved end was changed (this is secondary_collision_box) to 0.1,0.1,0.1,0.1, but the aspects of the track movement did not change. The train continued to be able to traverse the track. The collision box only applies to what can be clicked on the track.
-
- Manual Inserter
- Posts: 4
- Joined: Thu May 26, 2016 9:15 am
- Contact:
Re: RailRoad
Hey Plysken!
I've actually had exactly the same idea you did and I've been working on it for a few days. I just found this thread now and I was wondering if any progress has been made?
If someone else has a better overview of the code could you please tell me where to find the file that specifies rail track behaviour?
Thanks
I've actually had exactly the same idea you did and I've been working on it for a few days. I just found this thread now and I was wondering if any progress has been made?
If someone else has a better overview of the code could you please tell me where to find the file that specifies rail track behaviour?
Thanks
Re: RailRoad
Rail track behavior isn't defined in the Lua entity definition. The Lua entity definition just gives the bounding boxes/health/mining result/pictures.
The current rail system doesn't support what this thread was trying to do - you won't get it working through a mod.
The current rail system doesn't support what this thread was trying to do - you won't get it working through a mod.
If you want to get ahold of me I'm almost always on Discord.
-
- Manual Inserter
- Posts: 4
- Joined: Thu May 26, 2016 9:15 am
- Contact:
Re: RailRoad
Too bad.
But thank you, you saved me a lot of time trying!
But thank you, you saved me a lot of time trying!