Page 1 of 2
Cantr2Projects program
Posted: Sat Jun 21, 2008 4:50 pm
by NiKnight
I want to share a small program which helps to calculate Cantr machine projects.
Screenshot
Download
Requirements
Any OS with installed Java Enviroment in version at least 1.5
License
This program is free for everyone. Use it as you want but the author does not take any responsibility for damages caused by the use of this program.
How to start
To start program simply double click on Cantr2Projects.jar or use command:
How to configureThere is cantr2projects.properties file in program's directory. Modify its contents to customize path to data files or other stuff.
Every machine is described by xml file in data directory. If you want to add new machine or project modify this files or create new ones.
For example project for smelting iron looks like this:
Code: Select all
<project name="Refining iron ore (coal)">
<productName>Iron</productName>
<dailyQuantity>350</dailyQuantity>
<description></description>
<semiProduct name="Iron ore" quantity="700" />
<semiProduct name="Coal" quantity="420" />
<semiProduct name="Limestone" quantity="1400" />
</project>
I think i don't have to add comments as contents of project is simply to understand. But you should write amounts of product and semi products in daily quantities to get overall time (in days) needed to finish the project.
If you find mistakes in xml files or bugs PM me.
I hope this program helps to save some time

Posted: Sat Jun 21, 2008 9:23 pm
by Tangential
AWESOME!
heck yes it'll save time. Now I don't have to do ratio calculations - Sweet!
Works great. Thanks, man.
Posted: Sat Jun 21, 2008 10:56 pm
by trexdino
Wanted to see what somebody else had to say before I downloaded it. Sorry, but little paranoid about downloading stuff.
Posted: Sat Jun 21, 2008 11:08 pm
by Tangential
haha yea.. it's safe. I use ESET NOD32 as my antivirus, so it's completely safe and the program works easily. I totally recommend it. thanks again!
Posted: Sat Jun 21, 2008 11:28 pm
by toon
Do I need to do something else If I am using Vista? Because I can't get it to come up.
Posted: Sat Jun 21, 2008 11:43 pm
by marol
NiKnight, too bad you have decided to do it own your own. You could have asked me to prepare XML file to you. It's probably too late, but here's PHP script that generates all the machines in XML:
http://cantr.net/app/niknight.php
You need to modify your viewer a little bit, so it can read many machines from single XML file.
@toon:
It runs fine on my Vista x64. Are you sure you have Java Runtime Machine installed?
Posted: Sun Jun 22, 2008 1:47 am
by Voltenion
nerds.... xD
Posted: Sun Jun 22, 2008 1:57 am
by Pilot
I've been using this one for months now:
http://www.smrw.lodz.pl/%7Empni/cantr/ 
Posted: Sun Jun 22, 2008 3:09 am
by toon
Still not working for me..
Posted: Sun Jun 22, 2008 7:21 am
by joo
I'd download and use it of two things were changed:
- The program downloads the new XML data every time it is run, to keep up with changing project parameters.
- The numbers are given in fields, so values can be copied and pasted AND changing a field updates all the other fields
If the program author doesn't want to make these changes I'll make my own program that does this and share it.
Note: there would be no need for this if
my suggestion were implemented.
Posted: Sun Jun 22, 2008 8:01 am
by NiKnight
Thank for suggestion
First: where do you want to store updated data? I think it should be on Cantr server (and updated every change made in machine projects). Disadvantage of this solution is additional lags.
Changing representation of data isn't difficult, i can replace slider by spinner if more people want that. As to other fields and updates, it is necessary to change that? I think setting slider at given position is fast enough and btw you can easier optimize project.
Posted: Sun Jun 22, 2008 4:09 pm
by Tangential
Toon, maybe describe your process?
It should be fairly easy if you have the tools, so maybe that's the problem. You need winRAR (or some .rar opening software) to be able to open the downloaded file and unzip it. After you do that, you locate the file, open it, and open the jar executable file. You'll be able to open this if you have Java 1.5+. Then you should be set.
Posted: Mon Jun 23, 2008 9:30 am
by joo
NiKnight wrote:First: where do you want to store updated data? I think it should be on Cantr server (and updated every change made in machine projects). Disadvantage of this solution is additional lags.
The
PHP script that marol gave builds an XML file from the cantr database, so you have your solution right there.
NiKnight wrote:Changing representation of data isn't difficult, i can replace slider by spinner if more people want that. As to other fields and updates, it is necessary to change that? I think setting slider at given position is fast enough and btw you can easier optimize project.
If often find myself having to restrict a project based on what resources I have available, and to have this facility automated would stop people from having to then calculate every other resource in the project to see if they have enough of them.
Do you really think that downloading one XML file once per session outwieghs loading wiki pages and switching between the project, manufacturing and objects pages?
Posted: Mon Jun 23, 2008 9:52 am
by marol
Joo's suggestion has been already accepted, so I guess this program will become less usable soon.
Posted: Sun Jul 06, 2008 8:56 am
by NiKnight
New version is available now.
Data is updated from Cantr server via Marol's script.
Every time program is started it loads data to data directory, so even there is no network connection program will be working.
I suggest to set the cantr2projects.data.update property to no when we are sure that data is up-to-date as all data is downloaded from Cantr server.