I've been playing MC for a while now, and I've just started to make towns and simple railways to connect between them, but soon after I started making bigger, longer tracks, I found out how tedious and annoying it is attempt to guess at how many rails you'll actually need to finish a line. Well this very lightweight program I made will do all of guesswork for you.
Very easy to use:
Track Distance
1. Press F3 in game to find your X, Y, Z location
2. Copy the whole number from your beginning track location into the "Location 1" field, as well as your ending track location in the "Location 2" field.
3. Press "Calculate"
The program also calculates how much Iron Ingots and Sticks you'll need to create the rails for the Track you need! (It even rounds up to the exact amount you need!)
Powered Rails
1. Click the "Powered Rails" Checkbox
2. Choose a preset distance of each powered rail or insert your own
3. Press "Calculate"
Detector Rails
1. Click the "Detector Rails" Checkbox
2. Insert the amount you need and press "Calculate"
Powered Rails on Hills
1. Click the "Powered Rails" Checkbox
2. Click the "Advanced" button
3. Click the "Powered Rails on Hills" Checkbox
4. Insert your location on the XYZ locations
5. Choose a preset distance of each powered rail or insert your own
6. Click "Add to Calculation"
Boosters
1. Click the "Booster" Checkbox
2. Click on the "Settings" button
3. Enter the Amount of Track needed for a single type of booster, and how many of that type of booster you need (You can have up to 4 different booster types)
4. Click "Add to Calculation" and without closing the window, click "Calculate" on the Main Window.
Note: This program will exactly calculate the distance between two points in a straight (or elevated) line, but may not be so accurate if the track has additional bends or is diagonal. It's recommended that you find the distance from the beginning of a track to just before it curves, and then after the curve to the end of the track for a more accurate calculation.
You can either use the EXE file or Install the Program to your system.
EXE = Simple EXE translation of the Program (written in VB6). Not fully tested yet (but seems like it works)
INSTALL = Installs the program files into your system (which you can uninstall like a normal program)
Versions:
v1.2
-First Step out of Alpha
v1.3
-Added 4 Booster Fields (Allows you to add specific number of extra tracks as well as the quantity of each type of track)
-Added Help Button
-Cleaned up Code
v1.4
-Fixed Calculations
-Dropped out unneeded Y Value
-Repaired Diagonal Calculation (A lot more accurate than previously)
v1.5
-Self updating system! (If you install the program)
-Added an Approx time gathering materials field (For fun and basically because I was bored)
-About Box
-Minecart & Ingots for Minecarts field! Calculates how many minecarts you need for each different type of booster you have!
-Added Little Notepad field for quickly jotting down distance notes
v2
-Deleted Depreciated Booster Calculation
-Added Powered Rail Calculation (With Materials)
-Added Detector Rail Calculation (With Materials)
-Fixed a Typo and Rearranged Entities for Better Organization
v3
-Disabled Keypress of everything except for numerical values and backspace (no more crashes due to letters)
-Enabled Hide/show for Powered Rails
-Enabled Hide/show for Detector Rails
-Enabled Hide/show for Boosters
-Enabled Hide/show for Notepad
-Moved "About, Questions, and Help" into Toolbar
-Created new form for Questions and Help
-Added Booster form and calculation
-Added Calculation for Powered Rails on Hills/Slopes
-Added pictures for "Powered Rails on Hills/Slopes" for better clarification
-Added new font
-Added Donation Button
-Fixed "version errors"
-Exe Version Only
-Fixed GUI, made it easier to use.
v3.1 (1000+ Download Mark)
-Added Better pictures
-Fixed Radio button glitches
-Fixed minor signing errors
-Reduced Filesize by half
v3.1
-Added Update Button
-Added Track Stacks (counts how many stacks needed)
-Removed "approx. time" calculation
-Cleaned up Program
Future Versions:
-(Hopefully I get some feedback besides just downloads? lol)
-Might Convert to Java or C#/C++ (Tried it, did Visual but Java coding is annoying)
-Anything else anybody wants? Gives me something to do at least, lol
Updated to 1.3 which includes
-New Booster Counter System (allows you to specify how many extra tracks per booster you need, and then the quantity of each type of specified booster)
-Added help file (if instructions were unclear)
-Lowered file size to 47kb (.EXE file)
Updated again! (This should be the last one for a bit)
1.4
-Fixed Calculations
-Dropped out unneeded Y Value
-Repaired Diagonal Calculation (A lot more accurate than previously)
Basically Sorted everything else out, and is 100% working.
Yeah, and sorry if this seems like a bump, but meh.
Seems like a useful program! I don;t use minecarts much, but this is a good idea, and I'm sure people will appreciate it!
Thanks! Yeah, My friend and I work on huge railways and railway junctions, and so I made this program to do all of the math instantly for me, instead of doing it all by hand. And I kinda just decided to share it on here, as my own little project, but I'm surprised nobody else has done it before.
1.5 Update
-Self updating system! (If you install the program, it will search for updates automatically)
-Added an Approx time gathering materials field (For fun and basically because I was bored)
-About Box
-Minecart & Ingots for Minecarts field! Calculates how many minecarts you need for each different type of booster you have!
-Added Little Notepad field for quickly jotting down distance notes
Is there any way to run this on mac (Ive tried wine)
The only way as of know (that i know of), is that you just run Bootcamp (or any other virtual windows program), and just run it within that. I've tried to convert the program into a .jar, so all OS's could use it, but I'm not very well acquainted with Java Programming. I'd really appreciate the help of a Java coder to convert this over to a .jar.
You should consider talking to newjorciks about putting this in his MCHelper. He already has a furnace calculator, a railway calculator would just make it that much better.
Perhaps you two could make some awesome Minecraft Super-Reference.
EDIT: Sorry about the unintelligent tome in my voice, I'm too tired to make my post sound official.
Nice work, just a bit of constructive criticism for you:
1) There is no exception handling for invalid data entry such as letters entered into one of the textboxs, here is some basic code to handle that for you to build upon.
(Note that On Error shouldn't really be used, it is a sign of bad code, and should only really be used for quietening unfixed errors during development. Proper exception handling should be used for a full release).
#Calculate function/sub starts up here
On Error Goto InvalidNumber
#Normal code here
Exit Sub
InvalidNumber:
msgbox "Please use only numerical values in the text fields.", 0, "Invalid entry!"
End Sub/Function
2) You should change the tab indices for the textboxs in the Needed Materials frame to be more sequential rather then random.
3) This is just preferential, but would be good practice regardless; the pulldown for the note area is unintuitive, a button to "hide/show" the area by changing the form height would better suit the purpose. The "About" and "Help" command buttons shouldn't really be moved, especially if "Calculate" is left in its original location.
Nice work, just a bit of constructive criticism for you:
1) There is no exception handling for invalid data entry such as letters entered into one of the textboxs, here is some basic code to handle that for you to build upon.
(Note that On Error shouldn't really be used, it is a sign of bad code, and should only really be used for quietening unfixed errors during development. Proper exception handling should be used for a full release).
#Calculate function/sub starts up here
On Error Goto InvalidNumber
#Normal code here
Exit Sub
InvalidNumber:
msgbox "Please use only numerical values in the text fields.", 0, "Invalid entry!"
End Sub/Function
2) You should change the tab indices for the textboxs in the Needed Materials frame to be more sequential rather then random.
3) This is just preferential, but would be good practice regardless; the pulldown for the note area is unintuitive, a button to "hide/show" the area by changing the form height would better suit the purpose. The "About" and "Help" command buttons shouldn't really be moved, especially if "Calculate" is left in its original location.
Thanks, I seriously love criticism. It helps make any project better.
For entering letters into the textbox, I have tried to add a preventative code to reset the value to '0' if any other character besides a numerical value was accidentally put into the form. I haven't actually tested that ,and i assume it just crashes, but I can see how you could accidentally hit a letter key in there. Ill get right to it once I can think up a code for it.
It actually isn't random, it is set up to a left to right system (which I should make more clearly defined). It goes
Normal Rail # --> Iron Ingots --> Sticks -->
Powered Rail# --> Gold Ingots --> Redstone -->
Detector Rail# --> Iron Ingots -- > Redstone --> Stone Pressure plate
I was thinking about adding separator lines to show the distinction, but it looks pretty lame and is very unappealing. On my next update, I was just going to set it up in a new format (But I still want to keep the window size to a minimum)
For the Notepad, I just kinda threw it in honestly, just for quick notes. I'm planning on adding new windows/(hide/show) buttons into the program, but I just don't know how I would fit it all in without cramming everything together. As for the buttons, I left the "about and help" anchored to the corner just to give it decreased attention from the "calculate" button, as well as showing those buttons in a minimized form, as well as a maximized form with the notepad out (which i can easily change if i do that hide/show idea).
Thanks for the criticism, I really appreciate it, It just makes the program better. I'll probably include that hide/show idea up in the next update, seems pretty useful.
v3
-Disabled Keypress of everything except for numerical values and backspace (no more crashes due to letters)
-Enabled Hide/show for Powered Rails
-Enabled Hide/show for Detector Rails
-Enabled Hide/show for Boosters
-Enabled Hide/show for Notepad
-Moved "About, Questions, and Help" into Toolbar
-Created new form for Questions and Help
-Added Booster form and calculation
-Added Calculation for Powered Rails on Hills/Slopes
-Added pictures for "Powered Rails on Hills/Slopes" for better clarification
-Added new font
-Added Donation Button
-Fixed "version errors"
-Exe Version Only
-Fixed GUI, made it easier to use.
I think I could re-write the program in Java for you, if you want. However, I'm kinda new to Java, so I might not be able to do it.
Rollback Post to RevisionRollBack
I'm a decent Java programmer learning Python, and I'm skilled with server administration, WorldEdit, redstone circuitry, etc. Feel free to show me mod ideas, I'm thinking about starting to make mods, and I'd be happy to give insight as to how a mod could be implemented in Minecraft.
So does this program calculate where you should place for example powered rails for most efficiency?
It could, but it currently only calculates materials needed to build a rail from position 1 to position 2 and how long it will take to get there. (I think)
In order to calculate the powered rail spots, you would have to map out the track (possible to do, just a bit tricky).
Rollback Post to RevisionRollBack
I'm a decent Java programmer learning Python, and I'm skilled with server administration, WorldEdit, redstone circuitry, etc. Feel free to show me mod ideas, I'm thinking about starting to make mods, and I'd be happy to give insight as to how a mod could be implemented in Minecraft.
So does this program calculate where you should place for example powered rails for most efficiency?
Yeah It does. You have to click the "powered rails" checkbox on the side, to enable to powered rail field, and you will find a series of radio buttons. The radio button will give you four options.
-No Powered Rails (Default)
-Powered Rail every 32 Rails (Maximum Efficiency with no momentum loss)
-Powered Rail every 64 Rails (Efficient with some momentum loss (around 30% speed reduction until next PR))
-Powered Rail every Predetermined distance (set your own distance between each PR)
This is all calculated off of the the length of your track based off XYZ distance. To Find that, you would stand on the block that would be the beginning of your track, lets say (0,0,0), and you would put that into the location one field on the program. You would also have to stand on the last block where you want the track to end, and find that XYZ location (lets say (123,43,23)). Once you found your coordinates, and inserted any other options you wanted in your track (i.e Powered rails) you would click calculate, and it would find how many tracks you would need, materials to make that track (or just stacks if you're using an inventory editor), as well as how many powered rails for the whole track
TLDR:
Here you would need 147 tracks, and you would have to put 5 powered rails every 32 rails for maximum efficiency. (There is also an option under the advanced setting which allows you to find the optimal, most efficient, blocks to place PR on hills.)
I hope that helps ^^, and sorry for the late reply, long night, lol.
I think I could re-write the program in Java for you, if you want. However, I'm kinda new to Java, so I might not be able to do it.
Do you think you could convert Basic (Vb6/vb.net/Vb2011) to Java? I've tried using Netbeans IDE to recreate the program within java standards, while using a code converter to help change the code over, but every time I try putting in the code and accounting for the variables, it refuses to work. I don't know if this is a problem with the code converter, or if I'm working under the wrong parameters under netbeans, but it's been very frustrating and time consuming (hence why I've haven't came out with many major updates lately), but i'm still not giving up. If you think you could convert those original codes over, just send me a PM and we'll start talking, thanks :tongue.gif:.
------------------------------------------------------------------------------------------
Edit: I've also read up that there is a new maximum distance for PR efficiency, 37 instead of 32, but I've looked through the data sheet of it, and the data doesn't seem to be double checked for accuracy, and his data does show that every 37 blocks, you wouldn't lose speed, but for every 36th, 35th, 33rd block you would lose 1-4% speed, which Imo, doesn't make any sense that something farther would be able to have more momentum than something shorter i.e
PR--------PR loses momentum faster than
PR----------------PR
So I've just kept the program at 32 (which is data proves that it is the most stable value for maximum efficiency, but if others feel that 37 is more efficient, they could always put it into the calculation themselves via the fourth option. (not really much of a difference, especially in the earlier calculation where you would have another left over PR if you did 37 tracks per PR in the earlier calculation, but I guess it could matter if your track is over a couple thousand tracks long.
I should also probably change that second option to "most efficient" option, to clear it up.
Very easy to use:
Track Distance
1. Press F3 in game to find your X, Y, Z location
2. Copy the whole number from your beginning track location into the "Location 1" field, as well as your ending track location in the "Location 2" field.
3. Press "Calculate"
The program also calculates how much Iron Ingots and Sticks you'll need to create the rails for the Track you need! (It even rounds up to the exact amount you need!)
Powered Rails
1. Click the "Powered Rails" Checkbox
2. Choose a preset distance of each powered rail or insert your own
3. Press "Calculate"
Detector Rails
1. Click the "Detector Rails" Checkbox
2. Insert the amount you need and press "Calculate"
Powered Rails on Hills
1. Click the "Powered Rails" Checkbox
2. Click the "Advanced" button
3. Click the "Powered Rails on Hills" Checkbox
4. Insert your location on the XYZ locations
5. Choose a preset distance of each powered rail or insert your own
6. Click "Add to Calculation"
Boosters
1. Click the "Booster" Checkbox
2. Click on the "Settings" button
3. Enter the Amount of Track needed for a single type of booster, and how many of that type of booster you need (You can have up to 4 different booster types)
4. Click "Add to Calculation" and without closing the window, click "Calculate" on the Main Window.
Note: This program will exactly calculate the distance between two points in a straight (or elevated) line, but may not be so accurate if the track has additional bends or is diagonal. It's recommended that you find the distance from the beginning of a track to just before it curves, and then after the curve to the end of the track for a more accurate calculation.
Download
Download (Windows EXE) v3.2
Download (Windows EXE) v3.1
Download (Windows EXE) v3
Download (Windows) v2
Download (Windows) v1.5
Download (Windows) v1.4
Download (Windows) v1.3
Download (Windows) v1.2
You can either use the EXE file or Install the Program to your system.
EXE = Simple EXE translation of the Program (written in VB6). Not fully tested yet (but seems like it works)
INSTALL = Installs the program files into your system (which you can uninstall like a normal program)
Versions:
v1.2
-First Step out of Alpha
v1.3
-Added 4 Booster Fields (Allows you to add specific number of extra tracks as well as the quantity of each type of track)
-Added Help Button
-Cleaned up Code
v1.4
-Fixed Calculations
-Dropped out unneeded Y Value
-Repaired Diagonal Calculation (A lot more accurate than previously)
v1.5
-Self updating system! (If you install the program)
-Added an Approx time gathering materials field (For fun and basically because I was bored)
-About Box
-Minecart & Ingots for Minecarts field! Calculates how many minecarts you need for each different type of booster you have!
-Added Little Notepad field for quickly jotting down distance notes
v2
-Deleted Depreciated Booster Calculation
-Added Powered Rail Calculation (With Materials)
-Added Detector Rail Calculation (With Materials)
-Fixed a Typo and Rearranged Entities for Better Organization
v3
-Disabled Keypress of everything except for numerical values and backspace (no more crashes due to letters)
-Enabled Hide/show for Powered Rails
-Enabled Hide/show for Detector Rails
-Enabled Hide/show for Boosters
-Enabled Hide/show for Notepad
-Moved "About, Questions, and Help" into Toolbar
-Created new form for Questions and Help
-Added Booster form and calculation
-Added Calculation for Powered Rails on Hills/Slopes
-Added pictures for "Powered Rails on Hills/Slopes" for better clarification
-Added new font
-Added Donation Button
-Fixed "version errors"
-Exe Version Only
-Fixed GUI, made it easier to use.
v3.1 (1000+ Download Mark)
-Added Better pictures
-Fixed Radio button glitches
-Fixed minor signing errors
-Reduced Filesize by half
v3.1
-Added Update Button
-Added Track Stacks (counts how many stacks needed)
-Removed "approx. time" calculation
-Cleaned up Program
Future Versions:
-(Hopefully I get some feedback besides just downloads? lol)
-Might Convert to Java or C#/C++ (Tried it, did Visual but Java coding is annoying)
-Anything else anybody wants? Gives me something to do at least, lol
Feel free to submit feedback! Seriously.
-New Booster Counter System (allows you to specify how many extra tracks per booster you need, and then the quantity of each type of specified booster)
-Added help file (if instructions were unclear)
-Lowered file size to 47kb (.EXE file)
Also, 40 downloads with no posts on thread?
1.4
-Fixed Calculations
-Dropped out unneeded Y Value
-Repaired Diagonal Calculation (A lot more accurate than previously)
Basically Sorted everything else out, and is 100% working.
Yeah, and sorry if this seems like a bump, but meh.
Thanks! Yeah, My friend and I work on huge railways and railway junctions, and so I made this program to do all of the math instantly for me, instead of doing it all by hand. And I kinda just decided to share it on here, as my own little project, but I'm surprised nobody else has done it before.
-Self updating system! (If you install the program, it will search for updates automatically)
-Added an Approx time gathering materials field (For fun and basically because I was bored)
-About Box
-Minecart & Ingots for Minecarts field! Calculates how many minecarts you need for each different type of booster you have!
-Added Little Notepad field for quickly jotting down distance notes
Feedback Wanted!
Made for all the Portal 2 fans out there.
The only way as of know (that i know of), is that you just run Bootcamp (or any other virtual windows program), and just run it within that. I've tried to convert the program into a .jar, so all OS's could use it, but I'm not very well acquainted with Java Programming. I'd really appreciate the help of a Java coder to convert this over to a .jar.
Perhaps you two could make some awesome Minecraft Super-Reference.
EDIT: Sorry about the unintelligent tome in my voice, I'm too tired to make my post sound official.
Version 2
-Deleted Depreciated Booster Calculation
-Added Powered Rail Calculation (With Materials Redstone, Gold Ingots and Sticks)
-Added Detector Rail Calculation (With Materials Redstone, Iron Ingots, and Pressure Plates)
-Fixed a Typo and Rearranged Entities for Better Organization
1) There is no exception handling for invalid data entry such as letters entered into one of the textboxs, here is some basic code to handle that for you to build upon.
(Note that On Error shouldn't really be used, it is a sign of bad code, and should only really be used for quietening unfixed errors during development. Proper exception handling should be used for a full release).
2) You should change the tab indices for the textboxs in the Needed Materials frame to be more sequential rather then random.
3) This is just preferential, but would be good practice regardless; the pulldown for the note area is unintuitive, a button to "hide/show" the area by changing the form height would better suit the purpose. The "About" and "Help" command buttons shouldn't really be moved, especially if "Calculate" is left in its original location.
Thanks, I seriously love criticism. It helps make any project better.
For entering letters into the textbox, I have tried to add a preventative code to reset the value to '0' if any other character besides a numerical value was accidentally put into the form. I haven't actually tested that ,and i assume it just crashes, but I can see how you could accidentally hit a letter key in there. Ill get right to it once I can think up a code for it.
It actually isn't random, it is set up to a left to right system (which I should make more clearly defined). It goes
Normal Rail # --> Iron Ingots --> Sticks -->
Powered Rail# --> Gold Ingots --> Redstone -->
Detector Rail# --> Iron Ingots -- > Redstone --> Stone Pressure plate
I was thinking about adding separator lines to show the distinction, but it looks pretty lame and is very unappealing. On my next update, I was just going to set it up in a new format (But I still want to keep the window size to a minimum)
For the Notepad, I just kinda threw it in honestly, just for quick notes. I'm planning on adding new windows/(hide/show) buttons into the program, but I just don't know how I would fit it all in without cramming everything together. As for the buttons, I left the "about and help" anchored to the corner just to give it decreased attention from the "calculate" button, as well as showing those buttons in a minimized form, as well as a maximized form with the notepad out (which i can easily change if i do that hide/show idea).
Thanks for the criticism, I really appreciate it, It just makes the program better. I'll probably include that hide/show idea up in the next update, seems pretty useful.
v3
-Disabled Keypress of everything except for numerical values and backspace (no more crashes due to letters)
-Enabled Hide/show for Powered Rails
-Enabled Hide/show for Detector Rails
-Enabled Hide/show for Boosters
-Enabled Hide/show for Notepad
-Moved "About, Questions, and Help" into Toolbar
-Created new form for Questions and Help
-Added Booster form and calculation
-Added Calculation for Powered Rails on Hills/Slopes
-Added pictures for "Powered Rails on Hills/Slopes" for better clarification
-Added new font
-Added Donation Button
-Fixed "version errors"
-Exe Version Only
-Fixed GUI, made it easier to use.
v3.1 (1000+ Download Mark)
-Added Better pictures
-Fixed Radio button glitches
-Fixed minor signing errors
-Reduced Filesize by half
Just minor tweeks really.
v3.1
-Added Update Button
-Added Track Stacks (counts how many stacks needed)
-Removed "approx. time" calculation
-Cleaned up Program
More tweeks!
It could, but it currently only calculates materials needed to build a rail from position 1 to position 2 and how long it will take to get there. (I think)
In order to calculate the powered rail spots, you would have to map out the track (possible to do, just a bit tricky).
Yeah It does. You have to click the "powered rails" checkbox on the side, to enable to powered rail field, and you will find a series of radio buttons. The radio button will give you four options.
-No Powered Rails (Default)
-Powered Rail every 32 Rails (Maximum Efficiency with no momentum loss)
-Powered Rail every 64 Rails (Efficient with some momentum loss (around 30% speed reduction until next PR))
-Powered Rail every Predetermined distance (set your own distance between each PR)
This is all calculated off of the the length of your track based off XYZ distance. To Find that, you would stand on the block that would be the beginning of your track, lets say (0,0,0), and you would put that into the location one field on the program. You would also have to stand on the last block where you want the track to end, and find that XYZ location (lets say (123,43,23)). Once you found your coordinates, and inserted any other options you wanted in your track (i.e Powered rails) you would click calculate, and it would find how many tracks you would need, materials to make that track (or just stacks if you're using an inventory editor), as well as how many powered rails for the whole track
TLDR:
Here you would need 147 tracks, and you would have to put 5 powered rails every 32 rails for maximum efficiency. (There is also an option under the advanced setting which allows you to find the optimal, most efficient, blocks to place PR on hills.)
I hope that helps ^^, and sorry for the late reply, long night, lol.
Do you think you could convert Basic (Vb6/vb.net/Vb2011) to Java? I've tried using Netbeans IDE to recreate the program within java standards, while using a code converter to help change the code over, but every time I try putting in the code and accounting for the variables, it refuses to work. I don't know if this is a problem with the code converter, or if I'm working under the wrong parameters under netbeans, but it's been very frustrating and time consuming (hence why I've haven't came out with many major updates lately), but i'm still not giving up. If you think you could convert those original codes over, just send me a PM and we'll start talking, thanks :tongue.gif:.
------------------------------------------------------------------------------------------
Edit: I've also read up that there is a new maximum distance for PR efficiency, 37 instead of 32, but I've looked through the data sheet of it, and the data doesn't seem to be double checked for accuracy, and his data does show that every 37 blocks, you wouldn't lose speed, but for every 36th, 35th, 33rd block you would lose 1-4% speed, which Imo, doesn't make any sense that something farther would be able to have more momentum than something shorter i.e
PR--------PR loses momentum faster than
PR----------------PR
So I've just kept the program at 32 (which is data proves that it is the most stable value for maximum efficiency, but if others feel that 37 is more efficient, they could always put it into the calculation themselves via the fourth option. (not really much of a difference, especially in the earlier calculation where you would have another left over PR if you did 37 tracks per PR in the earlier calculation, but I guess it could matter if your track is over a couple thousand tracks long.
I should also probably change that second option to "most efficient" option, to clear it up.
I ask because on the SMP server I play a couple of us make our rail diagonal were possible since minecarts travel faster and the distance is shorter.