Locomotive Chunk Loading
dymondy2k opened this issue ยท 27 comments
I have built a fairly large rail system and I am really hoping to automate some of it. However it doesn't seem like enabling Chunk Loading on the locomotives is working. I hit it with the wand 'See Chunk Loading Started' down in the left corner but if I leave the vicinity of where the locomotive is, it stops. Once I move back into the area where loading around me starts, the locomotive continues on. Am I misunderstanding how this works? I assumed it was similar to running a Railcraft locomotive with the admin anchor cart attached, that it always loads the world around it so it can move through minecraft world without my intervention?
the chunk loading is done via chicken chunks, doesn't work without it.
Then again im not fully sure it works WITH it either. haha.
ChinkenChunks is generally considered to be a bad idea as last I heard it has world corruption issues. Maybe we can use something else? We need railcraft anyway, somehow use that?
@bhechinger you don't need railcraft to play with Traincraft. We just add support for it.
@NitroxydeX: Oh, maybe I misunderstood that then. For some reason I thought RC was required.
@EternalBlueFlame: Does this mean we can't change how it works or just that we shouldn't expect it to work as is?
If you are going with something 'Railcraft' a traincraft compatible Admin Anchor cart would be splendid.. Maybe a Caboose and/or Tender?
Anyways thanx for always getting back to me so soon!
Ah, got it. Groovy. Now to magic up some free time to work on this all. :)
Any opinions on whether or not the chunk loader should have a "cost" associated with running it? Kinda like the MFR World Anchor eats pearls, for example. Or should we just do it chickenchunk style, it's on, it's free, done.
It should be free, since MC is kinda (not really) emulating real life, and you can send a train anywhere. It still takes up fuel anyhow.
I can live with that. My only concern was the potential for abuse. Park a non-moving anchor car and there you go, free world anchor. We can always reconsider that in the future.
One other thing as you guys are a bit more familiar with the mechanics of all this. Is a one chunk load distance good or should we do 3x3 to allow for the transition from chunk to chunk?
something like one to the front 3 chunks behind the train otherwise carts will detach. you could make the chunkloader only runable when the train is fueled and powered
Got it. Will start looking into this. Also like the idea of the train needing to be fueled and powered. That gets me the protection from abuse I was worried about.
@bhechinger it means that it is like it was since a long time. this is only a port. If you have a better solution go and make a pull request.
@detjensrobert nope. easier is just to ask if the train is powered ^^
Personally as for cost, I think it should depend on how demanding it is on the system, I know BC and MFR chunkloading is hefty, so that merits a cost to lower usage on servers, but RC and chicken chunks have pretty light power use so i wouldn't consider that to need a price.
Simply put I think the price should be relative to how much you wanna deter users from using it due to performance.
And now that you mention it, i think you can actually link RC carts to other rollingstock, which would be one way to get chunkloading to one extent or another. Or at least that used to be a thing.
As for checking if its moving or powered or whatever, movement may be better because a train can still move even if it's not powered.
Getting the movement would be checking if the X and/or Z velocities are not 0.
Or getting if it's powered is just checking if the amount of fuel is more than 1.
Both checks are easy and neither give much of an overhead.
From my perspective it wasn't so much a cost due to server performance but rather game progression. Chunk loading is a game changer when you're talking about massive quarry/automated facilities. It just feels like it should be something someone should need to work at. To run an MFR World Anchor you need to go farm pearls, which takes effort. Until a bit later in the game when you can make a grinder, then the cost doesn't matter to you so much.
I like the idea of people having to work towards things, not just have things spoon-fed to them. Making it only work if the train is fueled is probably a good in between solution. I think. :)
It would be really nice if the trains would unload when they aren't in use, however, I'm not sure how easy that would be. Clarify a few things here: How would this proposed code determine whether or not a train is powered? It might be better if the train is not powered and not moving. How is "Not moving" checked? You might need to build a little leeway into that.
@MggMuggins Not Moving is checking if the trains x and/or z velocity/motion are 0. Unfueled trains will be stopped immediately. The code can just check if "isLocoTurnedOn" equals true. Then it knows if its turned on for Diesel and Electric. Steam Locomotives are always turned on if they are fueled.
Are they stopped when they are turned off though? I don't feel like that is a thing. I just feel like the definition of the movement variables is buggy. Maybe it's the code that makes those variables happen, rather than the variables themselves.
@MggMuggins Clarify a few things here: How would this proposed code determine whether or not a train is powered? It might be better if the train is not powered and not moving. How is "Not moving" checked? You might need to build a little leeway into that.
I literally answered this 2 posts up.
As for checking if its moving or powered or whatever, movement may be better because a train can still move even if it's not powered. Getting the movement would be checking if the X and/or Z velocities are not 0. Or getting if it's powered is just checking if the amount of fuel is more than 1. Both checks are easy and neither give much of an overhead.
although nitro proposes an interesting idea, because steam trains dont have an on/off state, so we would likely have to check both isLocoTurnedOn and if the fuel is >1
and to turn off an electric or diesel train it does have to be stopped, the GUI will prevent the user from turning off the train when going at higher speeds, or at least it does for me...
For using a RC cart to chunk load
RC carts can attach to TC rollingstock as in 1.6.4 but the TC track does not work with RC carts so RC carts are 'dragged' behind the rolling stock and you would have to use only RC track. I had this issue in 1.6.4.
Tested this in rev3
It hasn't been fixed. At least from what I can tell.
I've tried combinations of different trains, tried chunkloading with admin anchors as well as the inbuilt chunkloading option for traincraft and still nothing. The train still stops at the same point un-attended.
Yeah, it works in 009 for some cases, but not all, there are some more changes in 010 to hopefully fix the ones it still doesn't work for.
If that won't fix it though, it's likely just a problem with the forge setup, because now it's basically the same as railcraft with little optimization.
Although if you tried to use RC admin anchors and it still didn't work, I think it's pretty safe to say it's not the mods, because those keep a 5x5 chunk radius triple loaded.....