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 !!!
No description
8 Replies
DarthPorisius
DarthPorisius•3w ago
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.
Robb
Robb•6d ago
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
nary_believe
nary_believe•6d ago
Which binaries would one decompile to get started on this? I'm also interested in modding the train system
Robb
Robb•6d ago
not sure, you will have to look around might be able to make a more informed decisions via the headers
nary_believe
nary_believe•6d ago
I'm not sure I understand. What would the headers tell me about the compilation?
Robb
Robb•6d ago
class names to look for
nary_believe
nary_believe•6d ago
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.
Rex
Rex•6d ago
That's the main binary you'd want to decompile, yes
Want results from more Discord servers?
Add your server