As far as I can determine, there is currently no way to specify unlimited availability for new and/or changed items using the ADD_STORE_ITEM action. It seems that the current behavior will always zero the four bytes at offset 0x24 in the item definition, regardless of the existing value (for changed items). I would like to see this action get the ability to specify infinite supplies. This could take the form of a new flag (e.g., LIMITED/UNLIMITED, but this would require four versions of each flag instead of the current two) or could simply be added as a new field after the amount with either value 0 (or ASCII ~LIMITED~) or 1 (or ASCII ~UNLIMITED~), since it's the last entry in the definition (and immediately following the amount available). The default here would be 0 (to retain compatibility with older Tp2s, since that's the current behavior). This would just make the ADD_STORE_ITEM a tiny bit more useful.
I also wanted to ask if it would be possible to change the current behavior of the VIEW command on Mac OS X systems (where open -a /Applications/TextEdit.app FILE is explicitly used) so that it just passes the command open FILE. On Mac OS X, open is very good when determining which applications to use for opening files (first checking type/creator metadata, then system defaults by extension and finally any available application). This would allow Tp2s distributed with type/creator metadata for the files to be preferred over the generic default, and would accomodate users who have changed their defaults (while still maintaining some measure of compatibility with other platforms- the only reason to use VIEW instead of open). This would also give more flexibility to the VIEW command (e.g., you can pass a Mac OS X URL file to have the default web browser automatically launch and load the specified URL, or play a movie or open a PDF (and other wicked, useless things)).

ADD_STORE_ITEM
Started by
-Guest-
, Mar 28 2004 07:58 PM
3 replies to this topic
#1
-Guest-
Posted 28 March 2004 - 07:58 PM
#2
Posted 29 March 2004 - 10:05 AM
Could you not just put an obscenely high number in, which would be effecitvely limitless? 65535 sets of arrows or something, for example.

"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods
< jcompton > Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"
< jcompton > Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"
#3
Posted 29 March 2004 - 10:18 PM
Try setting the quantity to -1 .
#4
-Guest-
Posted 29 March 2004 - 11:05 PM
The game shows the number of items available. Putting in such a high number would look odd. Also, the buy price goes down based on the quantity of the item the store already has, and there are provisions to only buy a certain number of the same item (although I'm not sure if this was ever implemented).Could you not just put an obscenely high number in, which would be effecitvely limitless? 65535 sets of arrows or something, for example. :)
This isn't a large issue as you can go back and WRITE_LONG 0x01, but I just think this would make the action more complete (since it already accomodates all but this one value).