Inactive [MECH] TrainCarts v1.71.2 - Link minecarts of different types together to form trains [2222]

Discussion in 'Inactive/Unsupported Plugins' started by bergerkiller, Aug 3, 2011.

  1. Offline

    bergerkiller

    [​IMG]

    After a request from Marius A. Winsjansen I started to work on linked Minecarts. On the first day I already managed to make multiple carts move with the same speed, but a long list of bugs was to be expected. After fixing lots of bugs, adding lots of (complicated) Minecart handling functions and after hours of testing on my local server, this plugin is finally ready for a stable release! :D

    Also, special thanks go to @Shamebot for helping me out several times. :)

    Description:
    For a lot of information about TrainCarts see the WIKI page!

    Configuration and permissions

    All configuration nodes can be found in config.yml and contains a description with it. Permissions can be found in PermissionDefaults.yml, combined with a description.

    Media:

    Early development video (Photobucket)

    Video displaying version 0.6 of this plugin (YouTube)

    Video displaying version 1.0 of this plugin (YouTube)

    Video displaying version 1.1 of this plugin (YouTube)

    Video displaying version 1.2 of this plugin (holy...)


    A tutorial video in German explaining various sign-circuitry of TrainCarts


    PhotoBucket Sign system tutorial videos (also linked in the WIKI pages)
    Train spawner / Stations / Stations2 / Arrival signs / Train teleportation / Track switcher based on tags / Destinations / Blocker
    Video of how the switcher, station and destination signs work together

    Side information:

    It works best on straight lines with not too much elevation changes followed up by sharp corners. As long the cart gap can be adjusted, everything goes fine. It had some collision issues in the past, but I fixed all of that by manipulating the actual Minecraft server native code. I added links in the source where this was appropriate. Sharp 'U'-turns cause individual carts to lose perceptive of their direction. Keep at least one piece of track in between corner sections! Trains are stored on-disk when reloading and stopping the server, so expect trains to be there when you return.

    Important when updating: do one reload to save all trains, then replace traincarts.jar, and then do another reload. This next reload will probably cause a noClassDefFound exception (since the old jar got replaced), this is why a pre-reload is required. Replacing the jar without reloading is a very bad idea: it will cause a lot of runtime exceptions. Best is of course to stop the server and start again, but this is not always possible.

    This plugin is made compatible with Minecart Mania. If you notice a certain feature of Minecart Mania is not compatible with TrainCarts, notify me and I'll fix it. :)


    Known bugs:
    - None.

    TODO:
    - Train-sign message handling using SignLink (low priority)
    - Minecart use permissions (for individual carts?) such as Storage Minecarts

    Commenting

    If you encountered a bug, post exactly what you had done and in what order. Even a slight wobble can help fixing bugs. When posting (long) errors I recommend you to post everything, don't cut it off. I work with native methods, so in my case these lines are important. For comments on the media content see YouTube, it also contains a description with the music name when music is used.

    Bug reporting (extend)

    1. Post the Craftbukkit version you are using (the first info message in the console)
    2. Post the log from where the first plugin gets enabled to the 'done'.
    3. Post possible errors in this log too (don't cut them short)
    4. No error? Still post the log. Also explain how I can reproduce it, you can use screenshots
    5. Before reporting, remove ALL plugins other than TrainCarts and try again. If it works then, find out what plugin is interfering and post that here. I can add support.
    6. ALWAYS use the latest recommended Craftbukkit build with this, or my methods may just fail because of renamed functions.

    Important links:

    Request thread
    TrainCarts on BukkitDev for download and more
    TrainCarts source and more on GitHub
    TrainCartsBlocks add-on source and more on GitHub
    SignLink Bukkit page (required to use Arrival signs)
    MyWorlds Bukkit page (required to use Portal train teleportation)

    notice: try to keep SignLink/MyWorlds up-to-date to prevent compatibility issues.

    Installation for those that don't know how

    1. Download and install the latest craftbukkit version
    2. Download the latest TrainCarts version
    3. ^ Save the archive (zip file) to your computer
    4. ^ Open the archive you just downloaded
    5. In the folder your server sits in, create the plugins folder if it doesn't exist
    6. Open the plugins folder
    7. Move the TrainCarts.jar file found in the archive into the plugins folder
    8. Run your craftbukkit server and look in the console/log for possible errors, and/or if the plugin is enabled.

    Changelog

    Show your appreciation for my plugins by donating
    [​IMG]
     
  2. Offline

    _frozen

    So if I only want an button-type signal without a lever, how would I make a sign trigger a button-signal without the use of a lever? This will blow open ideas on my train system.
     
  3. Offline

    bergerkiller

    _frozen I guess you will need to make a redstone circuit for that. (AND-gate)
     
  4. Offline

    Nick2253

    Actually, I've already done this with my system. I don't remember what mod we have on the server, but it's one of those IC chip type modes. I use it to have a timer running with a certain countdown. When a train is detected, it resets the countdown. If the countdown completes before a train passes, it activates the train spawner sign. After activating the spawner sign, it starts another countdown (along with resetting the first one). If a train is detected before the second countdown completes, then it destroys the train (that way my trains aren't too crowded, and I don't have to worry about getting these super long trains. Though I do have parts in my track to take care of those super long trains that might form.
     
  5. Offline

    andrewpo

    Using bukkit 1.1-R3, traincarts 1.6 beta22 (also had same issue with beta 16):

    When my train comes to a tag switcher, the entire server starts to crash and everyone is kicked with 'Read Timed Out'
    Any idea what could be done to fix this?

    ++ Since I updated from b16 to b22, destroy/eject signs don't work when you have
    Code:
     [sign]
    [solid block]
    [redstone torch]
    in a vertical column

    Also I really like how the new wiki section is coming along =) It's already given me some new information.

    -Andy
     
  6. Offline

    bergerkiller

    andrewpo I decided to stop reading the solid block being powered. The attached levers were confusing the switcher/station signs too much, causing undesired results. You have to power the sign itself or use ! before train/cart to not power at all.
     
  7. Offline

    andrewpo

    Thanks =) Since I've been such a pain asking you so many questions, I'll make you a promotional traincarts video when I've got the network on The Shire completed.
     
  8. Offline

    bergerkiller

    andrewpo Thanks, I'll have to make a separate video section then :)

    If you can, try to make a tutorial video for one of the sign types or general features in TrainCarts, then I can properly link to your video in the WIKI.
     
  9. Offline

    andrewpo

    I just cried when I noticed how many of my stations use powering blocks under destination setters to get them to work

    If you go to play.shirecraft.us and type /warp plaza, read the notice board by the warp and read the sign on the yellow wool to the Plaza station you'll see what I mean :p
     
  10. Offline

    bergerkiller

    andrewpo why do you think I added the '!' token? hehe xD
     
  11. Offline

    andrewpo

  12. Offline

    kinkinhood

    I'll have to come back onto your shire Andrew and see how it's all turning out for you. I'll also need to invite you onto my server again so you can see a new station design I did that is a little bit more of a compact design/a little more pleasing on the eyes.
    (I've come to determine I care far too much about aesthetics).

    bergerkiller you're doing some awesome work and I am so happy that you're keeping up with it and always tinkering to find ways to make it even better!
     
  13. Offline

    andrewpo

    I'm on the shire now, kinkinhood, if you're interested. I'll show you what I've managed to get working.
     
  14. Offline

    kinkinhood

    I is at work ;)
     
  15. Offline

    bergerkiller

    kinkinhood thanks :)

    Anyway, I am currently hammering at the unloaded/loaded train restore issues. First step is to optimize it for a bit; it is currently checking all unloaded trains in the world when a chunk loads...

    EDIT

    It took me a while, but it's now fixed. Had to throw the entire group manager around to map the trains on the chunks, and it now properly restores trains. Added a warning message if it fails to find a minecart in an unloaded group that is to be loaded again.
     
  16. Offline

    Nick2253

    I hope you don't mind, but I've been trawling through the new Minecraft Wiki page, and making some updates. I also created a new sign template which you can use to easily make and edit signs (so you don't need so many screenshots). The syntax is {{sign|First Line|Second Line|Third Line|Forth Line}}

    EDIT: You can see it in action at http://www.minecraftwiki.net/wiki/Bukkit/TrainCarts/Signs/Station
     
    bergerkiller and Don Redhorse like this.
  17. Offline

    bergerkiller

    Nick2253 aah nice! I knew something like that had to exist, but I am not so tech-savvy with the WIKI as others are. :)

    Just wondering...is there some way to show 3D block structures using a template? It would make it easier for me to show the set-up without all the screenshot, and others can rotate it around to look at the signs.
     
  18. Offline

    Nick2253

    Unfortunately, there's no easy way to do that at the moment. The only way I can think of is to make something with Flash or Unity, but that's not very "template-able" if that makes sense. You'd basically have to make a 3D model of what you wanted people to see, and then create (or use) a 3D model viewer with the model embedded into it.

    The redstone community is also struggling with this at the moment, but I think that you might be able to employ a simple work around. I'm assuming that placement rules are uniform among the different signs. If that's the case, then you can take advantage of that modularity, and have a separate article on sign placement (sort of like the subsection you have now), and in that case it might be worth it to create one or more 3D models and embed them. Then all the other articles can simply refer back to that page.
     
  19. Offline

    bergerkiller

    Mhh yeah...ooor...a new project to work on? I've made 3D viewers before (even cross-eyed and anaglyph, even one that can render multiple models randomly with diversity and scale)

    What would you recommend for a template-like 3D viewer? I've seen some viewers that render 3D molecules, but I believe that is fake 3D...

    I could use LWJGL, but it requires an off-site storage for the library, which can be inconvenient. I don't know flash yet, and if it can render 3D properly, I might even use it for yet another new coding language I can learn :)
     
  20. Offline

    Nick2253

    I have no idea. I'm not much of a programmer in that sense, though I work in Wiki markup and other web-languages extensively.

    Slightly off topic, but I have some questions about the item transfer signs. How does the sign "know" which chest/furnace/whatever to put items in/take items from? I'm sure I could figure it out by playing with it, but I won't be in a position to play Minecraft for a couple days (I'm traveling), and I want to scheme in the mean time.
     
  21. Offline

    xcanner

  22. Offline

    bergerkiller

    xcanner yup, see the configuration: maxminecartstacksize or similar.

    EDIT

    Ah I see, let me fix it real quick. :)
    (forgot to subtract the item when placing, my bad)

    Nick2253 By default, it uses a 2-block radius (5x5) around the track piece. You can set this radius up to 5 on the sign itself. (1 is minimum)
    It uses a sort of 'tunnel' vision; it only takes the slices left and right of the track. Imagine you are in the cart, now imagine a 5x5 plate with you as the middle. It is a bit complicated to tell like this, I'll upload an image describing it tomorrow. (on the WIKI)
     
  23. Offline

    blubberdiblub

    bergerkiller - Unfortunately the cart physics are a bit strange. They don't reverse their direction when traveling up a slope, but come to a complete halt instead. That breaks our rollercoaster: [​IMG]
     
  24. Offline

    bergerkiller

    @blibberdiblub ugh that bug again, I've had it several times as well. Something with the train not recognizing the sudden reverse...
     
  25. Offline

    _frozen

    I m not sure how to report this, but I think there s a bug involving empty trains running. Once in a while they ll stop at the station and not go. But when I clear all the trains and ride the train, it treats the stations normally. Is this an documented bug?

    ALSO: Destinations are not holding on; I think I m on a older beta build. Upgrading.

    EDIT: B22, same issues. destination signs is not working, apparently-- the switchers are not working.
     
  26. Offline

    bergerkiller

    _frozen does a /train reroute fix it?
    Also:
    - item dupe fixed
    - weird sloped issue fixed (why did I even have motion checks at slopes? ...)
    - train storage performance is better and no longer causes glitched carts
    I'll look at the path finding once more.

    EDIT

    Don't forget to properly power the switcher signs! You no longer power the BLOCK it is on, but the sign itself!

    Also, see the new beta 23 version. It fixes the above three noted issues.

    Nick2253 had some extra time; here a quick snapshot of the radiuses vs the blocks that are checked.
    View attachment 8466

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 14, 2016
  27. Offline

    _frozen

    ANOTHER update? jesus, when will you ever rest... wait, dont.

    I rerouted, it didnt work. Upon checking, there was an older name for the destination (used to be port, now its bainbridge) and apparently the system did not update the new names. A server restart fixed it all.

    Going to update the plugin again. Joy.
     
  28. Offline

    kinkinhood

    so switcher signs need to be powered?(I know tag signs do not)
     
  29. Offline

    Nick2253

    Ok, so basically the sign applies to a specific piece of track, and then it explores the 5x5 slice that is perpendicular to the track to find the chests/furnaces/dispensers. Is that right?

    Also, what happens if there are chests on both sides of the track? Which chest gets filled? Or will one get filled first, and then once it's full, it fills the next chest?

    Lastly (and I'm sure you're sick of me by now, lol), what happens when all the containers in that 5x5 grid are full? Does the train just ignore the sign?
     
  30. Offline

    _frozen

    No, theyre not required to be powered (verified on my systems)

    EDIT: Another issue. I have a setdefault of "Lightrail" that passes along the "keepchunksloaded:true" to the train. Everything else applies-- except that (train info says its false), causing issues with the station when the timed carts goes off-chunk-loaded. Can you check on that?
     
  31. Offline

    bergerkiller

    Nick2253 yup, and the order is still a bit random right now. I still need to add some sort of sorting in there to transfer items to/from outwards. (closest to the track first). And when all of them are full (or empty), the train will simply ignore the sign yes. The amount to transfer per train is a maximum; so if it ends up with less items, it will transfer that anyway.

    _frozen kinkinhood Um switcher signs only need to be powered if you use it for the switching based on properties on the train. For example, to switch the rails above when the train has tag 'a'. I could remove the power requirement from it, but that may cause some annoying track switching when you use the switcher for the lever only.

    - unpowered: Toggles based on path finding and toggles the lever based on properties
    - powered: adds the ability to toggle the tracks based on properties
     

Share This Page