Jump to content

various questions for advanced usage


jetwitaussi

Recommended Posts

Hi,

I made my first Wherigo with success, it was easy and worked without any issue. Now I'm trying to do some more complex system and I have several questions I couldn't find any answer despite crawling ... the whole internet :p

 

I would like to save a data (a boolean, a number, whatever but a simple data) when the user succeed to reach a certain point in the game. easy task. but what I want is to be able to test this data at start of a session and get the value, so once the value is set to true I want to know it on every other session so I know at start the user, on this device, has already done a part of the game in another session. Is that possible in any way?

 

For media, in Urwigo we have type "text", I didn't succeed to do anything with it, but as lua io library is not available, I hope to be able to read a text media and even modify it, is it possible?

As the cartridge is able to write logs in a well known named log file, is there a way to read this file by the lua code?

 

On the cartridge object there is variable LastPlayedDate, is this variable updated? if yes, when? and saved accross all session?

 

Is there a complete doc of the Env variable?

 

Is there a way to build including a lua module, like curl or socket? :) 

 

Thanks for your help !

 

 

Link to comment

When you define a variable in, say, Urwigo, that variable's value is retained if the user exits and restarts the cartridge, so long as either you manually trigger the save event or the user selects to save the cartridge when exiting.  Either way, the user has to consent to restoring the game upon restarting the cartridge.  There's a cartridge event that happens upon restore.  You can test for a variable's value there.  All zones will be restored to the state they were in when the cartridge was saved.  (Manipulations and state in author script are another matter.)

 

To my knowledge, you can't modify text media.  Or, at least, I haven't heard of anyone doing this.

 

I have not heard of anyone using the LastPlayedDate variable, and I cannot guarantee all player apps set this variable.  They might, but I don't know.  If you do an experiment, let everyone know your findings.

 

For documentation on the Env variable:

 

Quote

Env

 

I created a small play-anywhere cartridge which displays the keyword/value pairs of the Env table.

Keyword Emulator Colorado / Oregon Pocket PC OpenWIG
Platform Win32 Vendor 1 ARM9 PocketPC 2003 MIDP-2.0/CLDC-1.1
CartFolder <current GWC directory> <0/1>:/Wherigo <current GWC directory> c:/what/is/it/to/you
SyncFolder <current GWC directory> <0/1>:/Wherigo/Saves <current GWC directory> c:/what/is/it/to/you
PathSep \ / \ /
DeviceID Desktop <device serial #> <very long serial #> <value of java microedition.platform property on the device>
Version 2.11 2.11 2.11 2.11-compatible
CartFilename <gwc-filename>.gwc <gwc-filename>.gwc <gwc-filename>.gwc <gwc-filename>.gwc
LogFolder <windows directory> / nil value <0/1>:/Wherigo/Logs \My Documents\ c:/what/is/it/to/you
Downloaded <secs since 1970-01-01> <secs since 1989-12-31> <secs since 1970-01-01> 0
Device <built-for device> <built-for device> <built-for device> <built-for device>

There's some interesting stuff in there. For a start, there seem to be plenty of better ways to detect the emulator than checking is the player's altitude is zero. For example:

if Env.Platform == "Win32"

or

if Env.DeviceID == "Desktop"

or of course something more complicated that is harder to patch with a binary editor. (My own builder, currently in alpha testing, will allow you to specify that strings are obfuscated in the final cartridge and converted back to the real values at runtime, which will make all sorts of cheating harder.)

If someone who has a Pocket PC would like to run this and either update the tables or send the results to me for interpretation (I'm particularly interested in the timestamp), please let me know (nick dot brown at free dot fr).

 

Link to comment

Because the player decides whether or not to restore the cartridge's state upon launching the cartridge, there isn't a way to pass information from one playthrough to another.  Even if you provide a way within your cartridge to start a new game (which would effectively pass information from one playthrough to another), the player still has to elect to restore state.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...