Chapter 2 Task list
My Resource Manager is finished and available for Download:
View Known Items and what it takes to make them:
Test Combinations based on known outcomes:
View and add new Failures:
Requires .NET 4.0 and will write two small xml files to MyDocuments:
Application Download: http://www.mediafire.com/?xyk39ob8475reab
Source Code: http://www.mediafire.com/?4k111dv8mi4364v
View Known Items and what it takes to make them:
Test Combinations based on known outcomes:
View and add new Failures:
Requires .NET 4.0 and will write two small xml files to MyDocuments:
Application Download: http://www.mediafire.com/?xyk39ob8475reab
Source Code: http://www.mediafire.com/?4k111dv8mi4364v
Last edited by Zero_GT on Sat Feb 11, 2012 11:31 pm, edited 2 times in total.
Cool, well I can figure out how to write the code on my end. I would just need someone to host the two xml files that are currently created with my application in My Documents. I would probably also need ftp credentials? or something in order to connect to the server. Then I can update the code to download from the server and update the local file.
Considering that the file can be downloaded minutes before it is updated, it's easy to get conflicts if you do it that way. Maybe it's better to have some online service that you can call add?item1=twigs&item2=iron&result=sword upon, and some request to get the complete current file. How about that?
if you can get me an example file in the format you're using it, Z, I'll write the little script
if you can get me an example file in the format you're using it, Z, I'll write the little script
Ok, there we go. Three parts:
http://tu.sjorsgielen.nl/ <-- displays table in simple HTML
http://tu.sjorsgielen.nl/resources.xml <-- XML file
http://tu.sjorsgielen.nl/add.pl?result= ... item2=NAME
When calling the add.pl script, it will instantly add the items and result to the XML file, and the result will be displayed immediately on the front page. The code is very simple, don't expect anything smart; i.e. there are no checks if an item already exists, currently, so rows can be added to the xml twice. If you are using a different XML format currently, please let me know, I'll alter the scripts
The add.pl script responds in text/plain, and has only three responses:
* 0 Resource added
* 1 No result given
* 2 No ingredients given
It supports 3 ingredients max at the moment, but it'd be easy to add more. Also, please check for an error condition by checking if the number at the beginning isn't 0; I'll make sure the number stays 0 for any "OK" condition, and maybe add more numbers such as "Item already exists". Btw, for a fail, you can choose to leave result empty, or add in some meta value like "(failed)".
Sources are on the page too -- feel free to propose any changes to them
http://tu.sjorsgielen.nl/ <-- displays table in simple HTML
http://tu.sjorsgielen.nl/resources.xml <-- XML file
http://tu.sjorsgielen.nl/add.pl?result= ... item2=NAME
When calling the add.pl script, it will instantly add the items and result to the XML file, and the result will be displayed immediately on the front page. The code is very simple, don't expect anything smart; i.e. there are no checks if an item already exists, currently, so rows can be added to the xml twice. If you are using a different XML format currently, please let me know, I'll alter the scripts
The add.pl script responds in text/plain, and has only three responses:
* 0 Resource added
* 1 No result given
* 2 No ingredients given
It supports 3 ingredients max at the moment, but it'd be easy to add more. Also, please check for an error condition by checking if the number at the beginning isn't 0; I'll make sure the number stays 0 for any "OK" condition, and maybe add more numbers such as "Item already exists". Btw, for a fail, you can choose to leave result empty, or add in some meta value like "(failed)".
Sources are on the page too -- feel free to propose any changes to them
Maybe it would be a cool idea too to have an additional feature -- reserving a specific combination? Then, the application could have some "propose" button that retrieves the first combo whose outcome is unknown, and that is not reserved yet. If the user accepts it, it is reserved for him, and he can start trying. Then later, he can fill in the result. It'd allow us to work on all options more systematically
Duplications is easily fixed without an sql database (I just need to add some code to check duplicates, can always do this later too). Conflicts is not an issue: the application locks the .xml file while writing, so there will not be any data loss if two users update the file simultaneously (one will wait for the other) :)zaroba wrote:duplications and conflicts is an issue.
maybe move it to an sql database?
might be getting a bit too complex though. no telling how long we will be in the chapter.
would suck to spend hours or days making an elaborate program only to leave the chapter the next day and have little use for it
Thanks dazjorz. I will try to do some testing, but most of my free time this weekend is up for now. I also agree with Zaroba that I don't want to get this too complicated as I already have ~10 hours in the project and my download count only shows 1 download right now. There are two xml files each with a different format as multiple types exist:
Xml File 1 :
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfFailedCombination xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<FailedCombination>
<AttemptedItems>
<Item xsi:type="SimpleItem">
<Name>Water</Name>
</Item>
<Item xsi:type="ComplexItem">
<Name>Twig Hat</Name>
<RequiredItems>
<Item xsi:type="SimpleItem">
<Name>Twigs</Name>
</Item>
<Item xsi:type="SimpleItem">
<Name>Twigs</Name>
</Item>
</RequiredItems>
</Item>
</AttemptedItems>
</FailedCombination>
</ArrayOfFailedCombination>
Xml File 2:
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Item xsi:type="SimpleItem">
<Name>Water</Name>
</Item>
<Item xsi:type="ComplexItem">
<Name>Black Sludge</Name>
<RequiredItems>
<Item xsi:type="ComplexItem">
<Name>Fire</Name>
<RequiredItems>
<Item xsi:type="SimpleItem">
<Name>Black Rocks</Name>
</Item>
<Item xsi:type="SimpleItem">
<Name>Black Rocks</Name>
</Item>
<Item xsi:type="SimpleItem">
<Name>Twigs</Name>
</Item>
</RequiredItems>
</Item>
<Item xsi:type="SimpleItem">
<Name>Black Rocks</Name>
</Item>
</RequiredItems>
</Item>
</ArrayOfItem>
Xml File 1 :
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfFailedCombination xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<FailedCombination>
<AttemptedItems>
<Item xsi:type="SimpleItem">
<Name>Water</Name>
</Item>
<Item xsi:type="ComplexItem">
<Name>Twig Hat</Name>
<RequiredItems>
<Item xsi:type="SimpleItem">
<Name>Twigs</Name>
</Item>
<Item xsi:type="SimpleItem">
<Name>Twigs</Name>
</Item>
</RequiredItems>
</Item>
</AttemptedItems>
</FailedCombination>
</ArrayOfFailedCombination>
Xml File 2:
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Item xsi:type="SimpleItem">
<Name>Water</Name>
</Item>
<Item xsi:type="ComplexItem">
<Name>Black Sludge</Name>
<RequiredItems>
<Item xsi:type="ComplexItem">
<Name>Fire</Name>
<RequiredItems>
<Item xsi:type="SimpleItem">
<Name>Black Rocks</Name>
</Item>
<Item xsi:type="SimpleItem">
<Name>Black Rocks</Name>
</Item>
<Item xsi:type="SimpleItem">
<Name>Twigs</Name>
</Item>
</RequiredItems>
</Item>
<Item xsi:type="SimpleItem">
<Name>Black Rocks</Name>
</Item>
</RequiredItems>
</Item>
</ArrayOfItem>
-
- Posts: 107
- Joined: Sat Dec 02, 2006 10:47 pm
- Location: The Northern State of the Continental US
Hmm, interesting schema. Ok, I'll change the scripts to write something like that tomorrow. On your end it's probably best of you download the xml files during startup, and when someone fills in a combination, send a request. Then you can choose to either re-download the files, or update them yourself too.
And probably a refresh button is a good idea too, in case people want to stay updated without restarting the application
And probably a refresh button is a good idea too, in case people want to stay updated without restarting the application
Aai have no idea what you're tokking about sjors.
clementvw@hotmail.com = send me mail en aai send joe de XLS,
en joe doe ermee what joe wil
clementvw@hotmail.com = send me mail en aai send joe de XLS,
en joe doe ermee what joe wil