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

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    [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]

    This post has been edited 184 times. It was last edited by bergerkiller Oct 16, 2012.
  2.  
  3. Offline

    MatthiasGue

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    SimpleCart says:


  4. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Nadious the problem is that 2-or-more cart sized trains have something called 'torque'. SimpleCarts will halt the front cart completely but then leave it alone, while all other carts still have enough momentum to move the front cart forward. This is inevitable and can only be fixed at SimpleCarts' side, either by continuously stopping the cart until it no longer moves, or by hooking into TrainCarts, obtain the entire group the cart is in and stop all of them.
  5. Offline

    Kunzi

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hey bergkiller, in version 1.67 and 1.68 I have a problem with arrival signs. I had correct trigger signs in previous versions, but they don't display anything anymore. Sing Link reports that the signs are linked. Doyou have an Idea why they don't work?

    This post has been edited 1 time. It was last edited by Kunzi Jun 11, 2012.
  6. Offline

    Happylosertempo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    what with my problem !! :'(
  7. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Happylosertempo Weelll I would first have to know what you used on your sign, a screenshot would be most useful.
    It should be this to sort carts with passengers:
    To sort trains:
    Or you can use empty as a keyword.
  8. Offline

    Happylosertempo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    See You old Thread with Screenshot S.76
  9. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Happylosertempo just in case:
    • You powered the sign, or used !train or !cart on the first line?
    • The train can 'see' the front of the sign upon entering it?
    For the second dot, if you want to make it trigger from two directions (left and right, possibly), you can set it on the first line too:
    I'll check if the ! is broken or not, you never know.

    EDIT

    It did work. I am not entirely sure what your set-up is, but on a T-split, this makes empty trains go into the 'bottom of the T' direction:
    Try using l/r/f/b: in front of the statement to force a certain direction. It is possible that it failed to do the standard l/r one.

    This post has been edited 2 times. It was last edited by bergerkiller Jun 11, 2012.
  10. Offline

    Happylosertempo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    YES

    Try using l/r/f/b: in front of the statement to force a certain direction. It is possible that it failed to do the standard l/r one. (other variant without success)
    problem-even the 30's there are train stations,all after the same model
    1.xx - 1.65 everything ok all stations
  11. Offline

    CommanderGizmo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @bergerkiller: Don't know if this helps, but in your absence I made some small source code changes to resolve some bugs. The main one that I can't live without is inverting the else if statements on lines 50-55 in SignActionDeposit.java. This corrects the assumption by the plugin that logs are primarily a fuel source rather than a smeltable resource.

    Would you prefer me to consolidate all recent bug reports into tickets at bukkit dev? Or perhaps list them all in one post here for review?
  12. Offline

    Nadious

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks. I noticed in his plugin thread that he said he would like to eventually make it compatible with Train Carts. I only hope that happens because both of them working together would be EPIC.
  13. Offline

    kinkinhood

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hey Berger, I seem to be having issues with pathfinding and switcher signs, mostly signs at x crossways sometimes don't seem to work or work sporatically.
  14. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @CommanderGizmo if you know how to use GitHub, you could submit a PR of course. But a ticket is fine too.

    @kinkinhood And /train reroute does not fix it? If not, can you send a screenshot of the set-up or the ip so I can join myself?

    Just passed my finals, school is over and I now have 7-8 weeks of free time to do whatever I want. YES!
  15. Offline

    Keetveter

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Where can I find the permissions, since the wiki page about permissions is deleted?

    I have posted this on BukkitDev too.
  16. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Keetveter DefaultPermissions.yml in the plugin folder should contain all available permissions combined with a description.
  17. Offline

    Keetveter

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thank you.
  18. Offline

    LogistikCZ

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hello i need help i build a 6 Minecarts(train) and start it minecarts go go go and after 5s stoped and stay. And never go. And doing it on other lines going everywhere while and then stops and never eat more I do not know what to do. I tried to give all powered rails or rails but just not working. Here is video: Please HELP ME! :( PS: sorry for my bad english iam czech.
  19. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @LogistikCZ Does it work with a single minecart, or 2 minecarts? It looks to me like the train doesn't like going uphill for some reason, so I'll take a look at this locally.
  20. Offline

    LogistikCZ

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    No i try 1, 2,3,4,5 ...... 30 minecarts. all dont work :(
  21. Offline

    Newpoman

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hello Bergerkiller,
    I was wondering how to get triancarts to break blocks. I see it in the config and set the trains to break blocks but can't seem to figure out how it works. If you could fill me in on how it works. Thanks.
  22. Offline

    Newpoman

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Never mind... I was being stupid. Was trying block ID 338 for sugar_cane but its really 83. So I got it to work. Thanks again for the amazing plugin...
  23. Offline

    MatthiasGue

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Good evening,

    @bergerkiller
    did you read my "wait"-suggestion?
    If not, it's no problem:)

    MatthiasGue
  24. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @LogistikCZ there has to be an unpowered booster track or something, else I can't explain the train stopping really.

    @MatthiasGue I read it, don't worry :)
    Wait signs require an actual region of tracks to detect and that makes it fairly complicated. I am thinking of adding this 'range' setting, which will make the sign detect all tracks in all directions till that range. This way I could force trains to get through such a region safely. Buut it has it's complications...
  25. Offline

    ioxon

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @bergerkiller I can't be the only running this scenario so I'll ask this in hopes you or someone can help me to get this working as I want...

    First, I did a thorough search on these forums and couldn't find anything (maybe there's a keyword I didn't think of?)

    Simply put, I have 2 stations that are quite a few chunks apart from each other. I have standard rail with powered every 27. My sign config has a 6 cart train being sent off after 30 seconds of being parked at the station. This creates a continuous cycle where the train essentially runs on a schedule. I have trigger signs that help me show players how much time left until the next arrival at each station.

    This works beautifully when I have a player at one station (which keeps that chunk loaded of course) and I'm at the other. As soon as one is left alone and I'm moving around the map to other locations entirely (far away from either station even), things stop working.

    Here are examples of what is happening:

    1) I'll teleport to one station to see if the train is still running, wait for at least double the amount of time it takes for a round trip normally, and end up teleporting to the other station to find the train suddenly coming to a stop. It will then continue from that station as long as I'm standing there waiting for it to actually leave the station.
    2) Same scenario as number 1 but instead having to manually travel along the track to find the train somewhere in the middle suddenly running again.
    3) I've even found errors on the server when I've had to "stop" the server (yes, the right way). The error is usually something like a train has gone missing or something along those lines. This particular example is one where I imagine the plugin can't find a train because the chunk it got stopped in (waiting for someone to load the chunk) was unloaded.

    In all 3 examples, my only conclusion can be that the keepChunksLoaded and keepChunksLoadedOnlyWhenMoving settings (I've tried both separately, together, and all off). I've also tried those 3 keepChunksLoaded... configurations while also running the chunkenforcer plugin. Even though the chunkenforcer plugin reports that it's keeping all the chunks along the track loaded, same problem occurs.

    It would be awesome if someone could help me figure out what I'm doing wrong.

    Thanks!
    Oliver
  26. Offline

    bergerkiller

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @ioxon: Are you using any plugins that could force-unload chunks to 'gain a performance improvement by unloading rogue chunks'? Such a plugin could definitely interfere. Other than that, the train should keep all chunks loaded when 'keepChunksLoaded' is true. (if 'only when moving' is off, all that changes is that standing-still trains don't keep chunks loaded. For moving trains this makes no difference)
  27. Offline

    ioxon

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @bergerkiller, the only plugin I'm using that does anything with chunks is the one I mentioned - chunkenforcer. I have checked all along the track to make sure but it reports that all chunks along the way are permanently loaded (this is me actually walking along the track, stopping, and doing a "/chunkenforcer info" command every 3 to 5 seconds).

    I have had both "keepChunksLoaded" and "keepChunksLoadedOnlyWhenMoving" enabled with the chunkenforcer plugin running and without. Does anyone else have a setup like mine that is running successfully? If so, could you provide me with your config and train settings info?

    I have this feeling that there is something about the trains themselves that aren't being recognized as trains once they leave a station so the "keepChunksLoaded" settings aren't working because of that or something?
  28. Offline

    _frozen

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    bergerkiller: a suggestion, it s not mandatory or anything, but it would be come in useful for people as I hope you will see. I personally use a clunky soultion (a custom timer plugin by someone to automate the spawn, and underneath that, a cart idling on a detector plate to keep the chunk loaded. The detector rail feeds back into a spawn sign to ensure there will always be a cart there).
    • on the Spawn signs, add an timer on the unused 4th line to enable automated spawns. (Hook it up to the bukkit scheduler for success!) If line remains empty or 0 there is no timed spawn. Set it up so it parses the number in ticks and/or minutes (3m) If you do decide to do this, please make this type of sign keep chunk loaded.
    • Another Suggestion: /train count gives you the total of trains available (not carts).
    Hope you made some progress with the Wait sign. Someday I ll be able to invite you to check out the entirely automated metro system on my server :D

    This post has been edited 1 time. It was last edited by _frozen Jun 22, 2012.
  29. Offline

    ioxon

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @bergerkiller: Well, it's working now. Absolutely frustrating that I don't know exactly what I did but went back to a setup I already had tried a few times before. I set keepChunksLoaded and keepChunksLoadedOnlyWhenMoving both to true, removed the "chunkenforcer" plugin from the equation, removed all trains again (using both command and physically destroying the carts), placed 1 new cart at one station, and let her rip. I've since added 2 more trains like it and now have 6 cart trains running to and from multiple locations without issue.

    I'll remove that ticket I created on bukkitdev ;)

    This post has been edited 2 times. It was last edited by ioxon Jun 22, 2012.
    Sveken likes this.
  30. Offline

    maro48m

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hi,

    is there some examples available how to use detector signs?
    I'm trying to force trains to switch tracks if track is used - but after numerous tries i'm close to give up:(

    Regards,
    Marek
  31. Offline

    _frozen

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Maro48m

    have two detector signs facing each other, from Point A to Point B. Have Point B be 2-3 tiles away from the switch. On that block with the sign, attach a lever. Lay redstone from the lever to the switch sign.

    The switcher sign should be a) facing the incoming train and b) have the following:

    [train]
    switcher
    r:true (r being "right turn". You can also use: l:true if you want to force left turns)

    This sign will act as a dummy switch with no power. When the power is applied, it turns "smarts" and does the conditions and applies it.

    This post has been edited 2 times. It was last edited by _frozen Jun 23, 2012.
  32. Offline

    dibujaron

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hey I posted this on bukkitdev as well, thought i'd do it here also. my portal signs aren't working. I have myworlds, and it tells me i've got them set up and linked. I used the same names and setup as the video. duplicated the setup perfectly. but the train just rolls off the end :( please help!

Share This Page