Fixing Train behavior ?
Good evening, and sorry for my bad english, i try my best 😉
I hope this is the correct place to ask this, if not, i am realy sorry for this.
I've been wanting to fix a small issue for a long time, and I've finally decided to take the plunge.
I read a lot of things, but there are still a few questions I can't find the answers to.
I'd like to solve a problem that a lot of people are talking about regarding train behavior: "why are they not looking for an alternative path if the first path have a red light signal".
I'm quite familiar with coding C++ VS.net, pathfinding , I'd like to create something that would allow trains to recalculate their path via alternative routes, taking status changes of traffic lights into account.
Unfortunately, I haven't found a way of interacting with trains or their methods of finding the shortest route.
If anyone has an idea or a direction in which to look, a documentation a should read, I'd be very grateful.
I already installed all the software needed unreal editor etc, i am ready to code 😉
Thanks for your help !!!
8 Replies
I am going to guess, but if you want to find distances in paths, you might want to look at the
UFGTrainPlatformConnection
for the connections. It is only a thought, and maybe pull the vectors for the ends and calculate the distance.
Look at FRM's trains stats area as I use those connects to see if there is a train platform or not.
https://github.com/porisius/FicsitRemoteMonitoring/blob/dev/Source/FicsitRemoteMonitoring/Private/FRM_Trains.cpp#L278-L279
Again, I am not sure, but this is the best this non-dev has to possibly help.modifying train logic would need a lot of hooks, looking at decompiler output, and/or custom trains to override their normal function implementations. don't think anyone else has stepped up to the task yet, good luck if you decide to go this route
Which binaries would one decompile to get started on this? I'm also interested in modding the train system
not sure, you will have to look around
might be able to make a more informed decisions via the headers
I'm not sure I understand. What would the headers tell me about the compilation?
class names to look for
Oh, which functions I'm looking for in the decompiled results?
Gotcha
Thanks!
I found the
AFGBuildableRailroadStation
functions in Binaries\Win64\FactoryGameSteam-FactoryGame-Win64-Shipping.dll
if anyone else is interested.That's the main binary you'd want to decompile, yes