Chapter 2 Task list

Forum Archive - from http://theuniversal.net
User avatar
Zero_GT
Posts: 60
Joined: Wed Nov 07, 2007 2:32 am
Location: In Space

Post by Zero_GT »

My Resource Manager is finished and available for Download:

View Known Items and what it takes to make them:
Image

Test Combinations based on known outcomes:
Image

View and add new Failures:
Image

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.
User avatar
Mishka
Posts: 1894
Joined: Fri Dec 29, 2006 6:19 pm
Location: Treasure Planet. Pirate Headquarters.

Post by Mishka »

Good stuff, thanks Z.
dazjorz
Posts: 105
Joined: Sun Jan 25, 2004 4:38 pm
Location: Netherlands
Contact:

Post by dazjorz »

What about syncing this to some online service, so everybody sees the same data and can update it live? I can write the server end of this, if you write your end of the code. ;-)

(Btw, you have a typo at the top, it says "resouce" on the images)
User avatar
Zero_GT
Posts: 60
Joined: Wed Nov 07, 2007 2:32 am
Location: In Space

Post by Zero_GT »

Figures it would be the Title that I misspell after I am looking through all the other details :oops:

A Sync would be great. I'm not sure what all would be involved, but there are really just two xml files that my application need.

(Spelling Error Fixed)
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

if it can be set up so people could click a button to download the xml from a website, and when they add stuff, update the xml on said website, i could probably easily set up something on tuwr.net for it to use
User avatar
Zero_GT
Posts: 60
Joined: Wed Nov 07, 2007 2:32 am
Location: In Space

Post by Zero_GT »

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.
dazjorz
Posts: 105
Joined: Sun Jan 25, 2004 4:38 pm
Location: Netherlands
Contact:

Post by dazjorz »

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 :)
dazjorz
Posts: 105
Joined: Sun Jan 25, 2004 4:38 pm
Location: Netherlands
Contact:

Post by dazjorz »

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 :-)
dazjorz
Posts: 105
Joined: Sun Jan 25, 2004 4:38 pm
Location: Netherlands
Contact:

Post by dazjorz »

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 :)
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

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
dazjorz
Posts: 105
Joined: Sun Jan 25, 2004 4:38 pm
Location: Netherlands
Contact:

Post by dazjorz »

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
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) :)
User avatar
Zero_GT
Posts: 60
Joined: Wed Nov 07, 2007 2:32 am
Location: In Space

Post by Zero_GT »

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>
puggy
Posts: 92
Joined: Fri Apr 16, 2004 2:10 pm

Post by puggy »

mud + any rock = fail
mud + fire + any rock = fail
onionguy92
Posts: 107
Joined: Sat Dec 02, 2006 10:47 pm
Location: The Northern State of the Continental US

Post by onionguy92 »

mud + ash + black rock = fail
User avatar
Crapski
Posts: 81
Joined: Sun Jun 26, 2005 11:48 pm
Location: Freddy Krueger's nightmares

Post by Crapski »

i use this:

Image
Last edited by Crapski on Tue Feb 14, 2012 10:27 pm, edited 4 times in total.
dazjorz
Posts: 105
Joined: Sun Jan 25, 2004 4:38 pm
Location: Netherlands
Contact:

Post by dazjorz »

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 :)
User avatar
Crapski
Posts: 81
Joined: Sun Jun 26, 2005 11:48 pm
Location: Freddy Krueger's nightmares

Post by Crapski »

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 ;-)
dazjorz
Posts: 105
Joined: Sun Jan 25, 2004 4:38 pm
Location: Netherlands
Contact:

Post by dazjorz »

I was talking to Zero, but once the application is done maybe we can fill in the complete XLS file so we are all synchronised again :P
User avatar
Jemrada
World Owner
World Owner
Posts: 632
Joined: Tue Aug 10, 2004 3:47 pm
Location: uhhh!
Contact:

Post by Jemrada »

Whew, information overload.... :roll: :shock:
Locked