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

    Happylosertempo

    See You old Thread with Screenshot S.76
     
  3. Offline

    bergerkiller

    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.
     
  4. Offline

    Happylosertempo

    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
     
  5. Offline

    CommanderGizmo

    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?
     
  6. Offline

    Nadious

    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.
     
  7. Offline

    kinkinhood

    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.
     
  8. Offline

    bergerkiller

    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?

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

    Keetveter

    Where can I find the permissions, since the wiki page about permissions is deleted?

    I have posted this on BukkitDev too.
     
  10. Offline

    bergerkiller

    Keetveter DefaultPermissions.yml in the plugin folder should contain all available permissions combined with a description.
     
  11. Offline

    Keetveter

    Thank you.
     
  12. Offline

    LogistikCZ

    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.
     
  13. Offline

    bergerkiller

    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.
     
  14. Offline

    LogistikCZ

    No i try 1, 2,3,4,5 ...... 30 minecarts. all dont work :(
     
  15. Offline

    Newpoman

    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.

    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...

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

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

    MatthiasGue
     
  17. Offline

    bergerkiller

    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...
     
  18. Offline

    ioxon

    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
     
  19. Offline

    bergerkiller

    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)
     
  20. Offline

    ioxon

    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?
     
  21. Offline

    _frozen

    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
     
  22. Offline

    ioxon

    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 ;)
     
    Sveken likes this.
  23. Offline

    maro48m

    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
     
  24. Offline

    _frozen

    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.
     
  25. Offline

    dibujaron

    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!
     
  26. Offline

    maro48m

    I've tried Your solution today, but it looks like switcher sign is always operational with or without power from redstone, so my trains are going with one route either way.
     
  27. Offline

    bergerkiller

    maro48m _frozen I believe that the detector sign doesn't work with the directional tag, because it doesn't switch tracks. Keeping the bottom three lines empty is sufficient.

    I suspect that you forgot to power the detector sign itself. I am not sure, but it could be it differs from switcher signs, in that it requires a powered sign to make it toggle the lever. Either way, try if this works:

    The switcher would start toggling the rails only if it receives redstone power. (or power is inverted, etc.). The l/r/f/b etc are relative to the sign, so, when you look at the text-side of the sign, it is relative to that.

    dibujaron Did you power the sign and did the sign face into the right direction? I haven't done a check-up on those portals for a while, so it could be a bug in MyWorlds...

    Alternatively, check if the elevator sign works. It works very similarly to portal signs. If that fails too, it must be in the TrainCarts itself.
     
  28. Offline

    maro48m

    [train]
    detector

    works fine (without power applied) - it switches levers
    but i've been doing experiments with switcher signs
    and the do not need redtorches
    even when written:
    [train]
    switcher
     
  29. Offline

    _frozen

    hence my instruction to have the output signal feed its power to the switcher sign to determine the switching criteria was met when needed.

    Example:

    ============================================
    ||
    ============================================
    S~ D~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D
    |__| <--Redstone Line (~ = blank space, ignore those; its needed to keep the two D seperate)

    *I hope this text formatting works*

    Switcher has nothing to do with detecting rail. That we know. Therefore, we feed the signal from detector sign which will detect whether theres trains on the tracks. If the condition is met (on), it feeds a sign to the switcher sign, powering the condition r:true.

    Is this design in error?



    Yes, they do not need POWER if you do not give them any criterias to determine where to switch tracks. But if you do this as a example:
    [Train]
    switcher
    r:empty
    f: passenger

    Then this needs power.
     
  30. Offline

    dibujaron

    bergerkiller:

    My signs are powered and the elevator signs work fine. I build the exact same configuration from the video demo you have. then, when that didn't work, I found another demo on youtube and build that. still didn't work. I'm confused.

    However, at present, I was able to workaround using elevators instead. So no rush on fixing.
     
  31. Offline

    bergerkiller

    dibujaron alright, I'll do some testing on the portals system. Just in case, you did place them under the tracks, facing to the side the train comes from? Did you power them? It does not work like in MyWorlds, where the train would enter the purple portal block and get teleported. It acts as a regular [train] [cart] sign.

    _frozen There are a lot of improvements I had in mind. A few years ago I had this HO-model train driving all around the attic with junctions and such. I did the electronic wiring myself. I know the possibilities of TrainCarts related to all that, but the problem is: How do I make sure that the player can understand all this? Minecraft lacks a simple GUI where I can show wiring plans, otherwise I could easily make complete schemes. For example, allow you to drag the a line from the 'switcher' sign or 'detector' sign to a destroy sign, or even have virtual redstone circuits embedded into this.

    I have no idea what the Minecraft API will deliver, so I'll be waiting for that to continue the real development. I fear that it won't offer my demands and I end up using Spout instead...especially if it would support the API as well through a bridge.

    About the set-up now. :)

    Yeah the design seems in order, though maybe you could have the switcher and detector sign both under the same piece of track. It depends on how this system should work of course, you may need a delay.
     

Share This Page