|
Post by alderaine on Jul 15, 2008 8:39:05 GMT
As I say, getting items.xml out is not as important as understanding the existing AON XML! The sooner people can start using the existing XML in their readers, the better. items.xml should be a black box. It contains all the information about items, referenced by a unique identifier for each unique item. On that basis, whenever an item is encountered in the books, all you really need is the unique reference. Knowing the reference is not necessary for drawing up all of the other XML in the books.
|
|
|
Post by jsager on Jul 15, 2008 16:42:58 GMT
I respectfully disagree. With that said, I will be happy to share the work that I've done on parsing the individual files up to this point and put on hold what I've done thus far.
However, before I do so, please let me explain carefully why the items xml is a necessary predicate of any redesign of the existing Aon book XML...
There are sections in the books that reference items in many ways.
Aside from the simple reference of "here's an item, pick it up" (which would rely on having specific item ids in place in a completed items file), we have the following types of situations:
Choices that are dependent on the existence of an item. You can't write the book XML without the items XML being done first, because to fully code the reference, the id of the item in question must be known.
Situations that force the discard of a class of item, for example "If you are wearing a Chainmail Waistcoat", not "this particular chainmail waistcoat with id 428383". So, we have to hammer out the way that items are subcategorized. If we don't, we cannot correctly design the XML that will need to be embedded for such events to happen.
I cannot understate the importance of this subcategory thing. Oede herb comes to mind; it is found in multiple places and used across multiple books. Paido at one point might well depend on you having something in the "Potion of Laumspur" subcategory.
We need XML describing "stores" where you can purchase items for a set amount of gold.
Many points in the books represent multiple quantities of items, such as "two meals". This must be coded properly into the event xml to reference the underlying items correctly. 2 meals isn't a backpack item, there are two individual underlying meals.
Having said all that, if there is some question as to how to parse and read the existing XML, well I've written a little code to that end and will be happy to share it with the community.
|
|
|
Post by jsager on Jul 15, 2008 17:04:37 GMT
I'll post some sample code in a new thread later today or tonight. I was hoping to get it done in the next few minutes but have gotten caught up in work stuff.
I had code already written for my own experimentation, but I need to clean it up... people would be confused by my method names like "foo" and "bar" unless they were practiced programmers.
|
|
|
Post by jsager on Jul 15, 2008 22:03:44 GMT
ok alderaine, it's up.
I've posted my work in the general new software section under "A Sample Lonewolf Reader".
I'll field the questions in that thread.
|
|
|
Post by alderaine on Jul 16, 2008 8:49:04 GMT
As long as the general information is there, we can agree to differ. I deliberately broke the project into separate sub-projects, all of which are independant. Because of the nature of XML, you shouldn't even need to know what format the item reference is in in order to write the book XML - they are completely independant. You can trust the black box that is items.xml to give you all the information you ever want to know about the item that is static. Anything that changes either requires multiple items, or book XML - I don't mind which at this stage. Thanks for the code sample - looking forward to the algorithm of how it works
|
|
|
Post by alderaine on Jul 16, 2008 9:07:27 GMT
To answer some specific questions: Aside from the simple reference of "here's an item, pick it up" (which would rely on having specific item ids in place in a completed items file), we have the following types of situations: For writing the documentation on how the book XML will look, you don't need specific item numbers - just the format of how items will be represented. We are not writing the actual XML at this stage, just the rules (although you are welcome to, and probably need to, write some draft book xml to do this) Situations that force the discard of a class of item, for example "If you are wearing a Chainmail Waistcoat", not "this particular chainmail waistcoat with id 428383". So, we have to hammer out the way that items are subcategorized. If we don't, we cannot correctly design the XML that will need to be embedded for such events to happen. Already taken care of (although you are welcome to reinvent the wheel) - if you look backwards through the original threads, you will see that something like "Type=" is included - this could be used without an item number to reflect items of a general type. We need XML describing "stores" where you can purchase items for a set amount of gold. That goes in the book xml, since prices vary from place to place. It would be something like: <Store> <Item Ref=nnnnnn Price=5> <Item Ref=nnnnnn Price=6> </Store> (Excuse my bad XML - that's why I'm not drafting the XML rules Another tricky one is where you have to pick 2 items - I was picturing something like: <Select Items> <Quantity=2> <Item Ref=nnnnnn> <Item Ref=nnnnnn> <Item Ref=nnnnnn> <Item Ref=nnnnnn> </Select Items> And also where you have to exchange: <Exchange> <Type=Weapon> <Item Ref=nnnnnn> --- this is the item you would get </Exchange> And to pick up, say, multiple meals: <Item Ref=000001 Quantity=2> In this case, items.xml would state that Item Ref 000001 is a meal. As I've mentioned before, we might like to inlcude the item name & type in the book XML, but this is not essential for our purposes.
|
|
|
Post by alderaine on Jul 16, 2008 9:20:06 GMT
Another issue is where items morph item types between books. A number of items change from backback items to special items, or vice-versa - similarly for weapons. The only easy method I can think of is to have two items listed with different references. In the XML for the equipment section of the book where the items change types, you could have something like:
<Exchange Forced> <From Item Ref=111111> <To Item Ref=222222> </Exchange>
As you say, the items XML will need a major category (food, money, backpack, special, weapon) and a minor category (sword, laumspur, chainmail, etc) - I would say the minor categories need to have the potential of being multiple per item.
|
|
|
Post by outspaced on Jul 16, 2008 10:34:27 GMT
We need XML describing "stores" where you can purchase items for a set amount of gold. That goes in the book xml, since prices vary from place to place. It would be something like: <Store> <Item Ref=nnnnnn Price=5> <Item Ref=nnnnnn Price=6> </Store> (Excuse my bad XML - that's why I'm not drafting the XML rules Also required in the Store schema needs to include: Price=x* Currency=XX Accepts: GC, Ren, Lune [Implicit: Store therefore does not accept Ain, Noble, Kika] In the Kai books (1-5), the Accepts will just need to be set to GC, but in later books, GC, Kika, Lune, and Ren can all be carried in the Belt Pouch, so some decisions will need to be made as to the likelihood of the store accepting a particular currency. Sometimes the book will explicitly state this. On at least one occasion in the later books, the exchange rate is temporarily altered due to the high gold content of the Gold Crowns you are carrying! *Software Readers might also want to be able to display this using all currencies carried by the player that the storekeeper will accept.
|
|
|
Post by alderaine on Jul 16, 2008 10:51:12 GMT
Wow I knew there were different currencies, but I thought there was a straight conversion between them - my failing memory! If the accepted currencies are in AON footnotes, we can certainly include them - otherwise, the XML should probably err on the side of caution. Presumably the readers will need to allow the player to choose which they pay with, and show the cost in each currency?
|
|
|
Post by outspaced on Jul 16, 2008 14:01:28 GMT
For the most part, it would be a case of saying "Kika cannot be used here", since it is the currency of the Darklands, and countries allied to it. Occasionally, the text will specifically say something like, "Lune may not be used in lieu of payment here" or similar, which is why the Currency Accepted tag is necessary. It is also necessary in other non-store transactions, since sometimes there are stipulations as to what currency it is permissible to use.
It might be nice for a Software Reader to give the option of exchanging currency in the Belt Pouch for Gold Crowns "between" adventures. (1GC = 1 Noble = 1 Ain = 4 Lune = 10 Ren = 10 Kika)
|
|
|
Post by alderaine on Jul 16, 2008 14:06:36 GMT
If the books allowed that, it would definitely be essential I had a quick skim, but could not find any books with alternate currencies - can you let us know a couple of examples please? Maybe with a couple of example page references? Many thanks
|
|
|
Post by outspaced on Jul 16, 2008 14:45:18 GMT
OK, here goes! Kika (10 Kika = 1GC): Books 10, 12 (especially see 61, 221, and 314), 14, and 15 Lune (4 Lune = 1GC): Books 8, 9, 10, 13, 18, and 23 Nobles (1 Noble = 1GC): Book 22 (and Grey Star Book 1) Ren (10 Ren = 1GC): Books 23, 27, and 28 Torq (4 Torq = 1GC): Book 23 Just FYI, the following is a quote from Book 23 Section 166: Also, I found the odd exchange rate section: Book 23 Section 37:
|
|
|
Post by alderaine on Jul 16, 2008 14:56:26 GMT
Ahhh I see the problem - the action chart for the books does not seem to have space for the alternate currencies. I'm sure I remember the original action charts having this space (I can check tonight if I remember) - is this one for the errata?
|
|
|
Post by outspaced on Jul 16, 2008 15:13:16 GMT
No, the Action Charts have only ever had a section for the Belt Pouch; all alternate currencies are kept there.
|
|
|
Post by jsager on Jul 16, 2008 15:19:33 GMT
I may not have made this clear... I've actually done a bunch of work on the items xml already and it should serve as the basis for this discussion. I will load up the files and post it today.
Thank you for all that research, we will definitely need to
|
|