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

    bergerkiller

    @robxu9 that is also on my TODO list: perform block physics when toggling levers. Right now you can only toggle redstone by leading it directly to the lever. (it's rather annoying in most cases)
     
  3. Offline

    robxu9

    Hmm... Wouldn't it be better served if the train station sign itself sent a redstone current? Or is this simply not possible at the moment?

    EDIT: Seems like the station bug and stuff isn't fixed. I'm reverting to BETA 3, the last one I have before this started occuring :c
     
  4. Offline

    MechanID

    @bergerkiller i have issues in 1.6 BETA v6.
    1. with property signs - i try this properties: playerexit, maxspeed, rename - dont works, did something changed ?
    2. command problem - when i try to set for example playerexit - /train playerexit deny i have "unknown command" message, but "/train rename" works fine
    3. i am op and have train.* perms but if another player create train i cant see or change it properties because i not own this train.
    4. after server restart name triggers like %triggerN% dont works with trains that was loaded, but new train names displayed correct. works fine in 1.6 BETA v7

    PS. will test 1.6 BETA v7 asap and write here.
    PPS can we have more info how to use new features like region detector signs ?
     
  5. Offline

    bergerkiller

    @robxu9 So it still launches in the wrong direction or stops too soon/reverses instantly?
     
  6. Offline

    MechanID

    test results for 1.6 BETA v7
    ptoblems:
    1. with property signs - i try this properties: playerexit, maxspeed, rename - dont works
    2. trains loaded after server start lost owners.
     
  7. Offline

    hiro24

    Got a question regarding tag and destination signs. I've made a railway spread across multiple chunks w/ multiple destinations, and train depots w/ signs to set the destinations. However, I've noticed the tag signs don't seem to be working right. (They did once, but not since). My set up is like this:

    # #
    # #
    ##### <-- 3 tag signs
    # #
    ##### <--- 3 tag signs
    # #
    # #

    This is an example of one of my T intersections. Beyond the intersections, under the tracks, I place destination signs. My understanding was that the tag signs would switch the tracks to take me to where the destination signs were. However, they don't seem to switch when they arrive at the tag switched rails. Here's a picture to better show my setup in case this is confusing: http://i44.photobucket.com/albums/f45/nodaitsu25/2012-01-09_115235.png

    In the picture you can see me 6 tag signs, a destination sign on the left, one beyond the T intersection in the middle, and SEVERAL destination signs, one after the other, on the right side. Could anybody help me figure out what's going on here?

    Is the problem maybe that some of the destination signs aren't in loaded chunks when I start the trip? If so, would changing "KeepChunksLoaded" to true in the default config fix the problem?

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

    bergerkiller

    @hiro24 The destination chunk does not have to be loaded in order for trains to reach them, but setting keepChunksLoaded to true will keep nearby chunks loaded so trains don't unload (stop) mid-way.

    If in doubt, you can use /train reroute to make the plugin re-map all destination routes, which could fix this issue.
     
  9. Offline

    hiro24

    I'm re-fitting all my tunnels to be single rail, instead of 2 rails. In testing so far it seems to work better. I guess w/ collisions turned off I won't have to worry about ppl bumping into each other, at least I hope so. Now I just need to use one tag sign instead of 4 - 6, which I think was the problem.. maybe it was getting confused.. I dunno.
     
  10. Offline

    Killburner

    I've run into a few issues while testing:
    • Property signs with destinations seem to be ignored. The slow property works as expected (the only other property I've tested). Until I get this working I'm manually setting destinations or using the sign-select method.
    • Spawned carts aren't owned (?), which limits the use of destinations signs (right-click selection).
    • When I use destroyall after testing spawners, many more carts than were spawned show destroyed. Just an observation thus far, as I haven't observed any ill effects.
    I also wanted to take an opportunity to thank you for the hard work you put into your plugins. I've really enjoyed testing Train Carts as I slowly migrate off of MinecartMania, and NoLagg has become an essential plugin to my servers. Keep up the great work!
     
  11. Offline

    Don Redhorse

    well there will be a special feature out soon which will allow for occupied rail / track checking so you could check if the track is occupied and hold the minecart for a bit... so you can do something like this:

    ----------======x==------------x----------=====--- where x is a minecart... the left x will wait for the right x to free the track if the right x is moving to the left..
     
  12. Offline

    MacGyver420

    property on the first line, not properties
     
  13. Offline

    robxu9

    TBH all these problems seem to stem from the station not centering. I reupgraded to BETA v7 and tested closer; and I noticed that the majority of these problems are because the trains don't center on the station sign.

    EDIT: New issue also: Trains can't turn curves again. :|
     
  14. Offline

    hiro24

    Still having trouble.. I think the problem is this.... (2d from side)

    #############
    SSSSSS T SSS

    # = rails, S = destination signs, T = tag switch sign.. this is coming up to a T intersection. Say I choose a destination that is like.. the 3rd S. I think having all those destination signs in line is confusing it. the tag never switches the track.

    The thing is.. this is an 11 stop continental railway I'm working on, so I put multiple destination signs at each intersection to make sure you know how to get anywhere from anywhere. But it doesn't seem to be working right. Anybody have any suggestions or ideas?
     
  15. Offline

    bergerkiller

    @robxu9 Can't turn? Um that must have to do with cart direction updating, something is going wrong there...
     
  16. Offline

    MechanID

    Code:
      [train]
    property
    maxspeed
       0.1
    then i have message "This sign can set properties on the train above"
    Please someone tell is this correct ?
     
  17. Offline

    Killburner

    Looks correct to me, although I haven't tested maxspeed (yet).
     
  18. Offline

    MechanID

    Please tell me what properties you have successeful used ?
     
  19. Offline

    Killburner

    Come to think of it, I've only used slow/slowdown, to avoid having to use boosters. I'm still trying to get destination to work.
     
  20. Offline

    bergerkiller

    I'll have a quick glimpse at all features (especially the property signs), it is possible that some features got removed during the transition from one method to multiple classes...

    Also, for some properties, you need to use:
    If it involves a cart property. I am not sure if I added train properties for all cart-related properties yet...

    EDIT

    Yup...
    [train] properties:
    collision, collide, link, linking, slow, slowdown, default, setdefault, pushmobs/players/misc, pushing, speedlimit, maxspeed.
    [cart] properties:
    addtag, remtag, settag, destination, mobenter, mobsenter, playerenter, playerexit

    I still need to add the cart properties under the train properties...
     
  21. Offline

    Sg1team

    Is there a way to read out the tags a train actually has and transfer this into a redstone signal (similar to station signs that switch a nearby lever when a train is detected)? Or is there a way to influence the autorouting feature, for example by adding checkpoints/preferred routes besides the actual destination?
    My problem with trains always choosing the shortest route is that it can happen that trains are facing towards each other and crashing. With the possibility to read out the tags a train has or setting checkpoints this problem could be minimized.
    Another solution for this problem could be if trains could be tought from which direction a peace of track can only be driven through.
    Besides, good job with this plugin (and your other ones, too)!
     
  22. Offline

    bergerkiller

    @Sg1team never thought of it really, but yes, you can use unpowered switcher signs to toggle levers. (levers attached to the block the sign is attached to as well). Using this redstone signal you can toggle a track, overriding the track switcher idea. Alternatively, you can use the train detector signs (start and end) to check if a piece of track is occupied.

    To make a detector region, place two signs facing towards each other, connected by tracks above. (this is very important)
    Code:
    [train]
    detector
    neededtag1
    orneededtag2
    Use [cart] if it involves certain carts on the tracks, but [train] would be best. The same tag names apply as for the switcher/tag signs.
     
  23. Offline

    MechanID

    @bergerkiller is there way to set maximum limit to maxspeed property to prevent players abusing it ? or better just remove this permission from dumb players ?
     
  24. Offline

    hiro24

    Ok, I think I've figured out my problem.. if a destination sign is behind another destination sign, the tag switcher doesn't seem to be able to see it, and the track never gets switched. I noticed it started switching right when I moved the location my train was going to to the front of my row of destination signs. Is this the way it's supposed to work? If so, is there a better way of handling routing of trains at intersections when a left turn or a right turn decision needs to be made based on multiple possible destinations? (Keep in mind the ultimate destination would probably be MANY chunks away and not loaded when the train starts)
     
    • Deathknight08978 hours ago
      This is the short version
      Hey im still having problems I think you need to come in my server and see what is happening as i am now just baffled if you pm me i would be willing to give you the ip ps when is this plugin getting fixed as it is very vital to my server
      Last edited 8 hours ago by Deathknight0897
    • [​IMG]
      Deathknight08978 hours ago

      Hi i have posted on you other thread multiple problems are still occurring got the plugin generally working still very broken however trains launch correctly from station so long as know one is in it and as soon as somebody gets in the train becomes jammed in the station meaning i can transport nothing when is the plugin getting fixed due to this is used for transportation purposes and is very critical to my server
      I would be willing to give you my server ip to allow you to see first hand plus i need to show you the config's again as flags has gone back to the cut down version as well as a couple of other issues best shown first hand please pm me


      Re posted here as i know you like it here as you visit it more i need to know when this plugin is updated it crashed my server tonight the server initially crashed so emergency stopped it ie no save as it wouldn't respond reloaded it and what was 1 train with about 13 carts turned into 7080 carts which as you can imagine crashed the server monumentally i have temporarily removed your plugin due to its dangerous nature in its current phase ie i had to go into mc edit and remove all entity's

      Edit:
      PLEASE FIX THIS PLUGIN ITS THE ONLY ONE LIKE IT AND ITS BRILLIANT EXCEPT WHEN IT CRASHES AND STATIONS DON'T LAUNCH THE TRAINS CAUSE SOMEBODY IS IN IT OTHER THAN THAT BRILLIANT OH AND THE CONFIG FILE WIPING ALL THE TIME AND A COUPLE OF OTHER STRANGE BUGS


      PLEASE PM ME FOR MORE INFO on bukkit dev as i use that more
     
  25. Offline

    moose517

    my server has been busy implementing a train destination system using a pretty complex redstone wiring system, it was to the point we were having to run one rail to each destination which was getting very tedious. Tomorrow i plan to give your plugin a go and see if it can't help us eliminate i would guess 75% of our track that just parallels itself. There is one thing i see missing that i would love to see added if i haven't just overlooked it. a detector sign that if a cart is present between a pair of signs will like throw a switch to route oncoming traffic aside to be held till it passes.
     
  26. Offline

    wiigor

    Thanks for your response.

    I was using version 1.54. We also had a bug were a player was not able to leave the traincart by rightclicking, teleporting or even not by reconnecting. (it happened to me two times in 1 day. And I heard it happened to other players as well.) My nephew has a server and he has the same problem as well. (the player not being able to leave the traincart)
     
  27. Offline

    Sg1team

    This sounds exactly what I was looking for, thanks ;-)
    Are detector regions working if there are no players online and chunks get loaded by trains only? And how long can those regions become?

    EDIT: I tested the detector signs, but with my setup they don't work. I made some screenshots to show you my understanding of how they have to be placed (I couldn't find them in the wiki). What am i doing wrong? I would expect the lever to switch if a train passes the area between the signs that contains the tag "1", but it doesn't.
     
  28. Offline

    bergerkiller

    @Sg1team the two sign text-sides need to face towards each other, you got them facing outwards instead. They don't need power either (I removed it for detector signs for simplicity)
    The lever is 100% correct.
     
  29. Offline

    Sg1team

    I tried both settings but the lever doesn't move. The train has got the tag "1" set by typing "/train settag 1". Even if i write "*" on both signs the lever doesn't move.
     
  30. Offline

    bergerkiller

    @Sg1team note that it only updates the detector signs when the train enters (spawns or moves) onto the detector region, setting the tag of the train won't update the regions.

    Would love it if I can detect it though, but it requires a lot of coding to do so...
     

Share This Page