Alice Community  

Go Back   Alice Community > Alice 2 > Share Objects

Reply
 
Thread Tools Display Modes
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,187
Join Date: May 2010
Location: e4eaf2
Default 01-22-2012, 03:28 PM

Looks like this is exactly what Alice needs, thank you!

EDIT: I made a simple world to test this tool. It works perfectly as far as I can tell.
Attached Files
File Type: a2w Save test.a2w (198.5 KB, 13 views)


Thank you for taking the time to read this signature. This signature loves you.

Last edited by DensetsuNoKaboom; 01-23-2012 at 04:08 PM.
   
Reply With Quote
Old
Dj Tech42
Senior Member
 
Dj Tech42's Avatar
 
Status: Offline
Posts: 202
Join Date: Feb 2011
Default 01-24-2012, 07:53 PM

I'm getting a KeyError with it...


Error during simulation.


Alice version: 2.2 12/01/2011

Throwable that caused the error:
Traceback (innermost last):
File "edu.cmu.cs.stage3.alice.core.property.ScriptPrope rty[name=script,owner=edu.cmu.cs.stage3.alice.core.res ponse.ScriptResponse[world.saveTool.has_var.__Unnamed2__]]", line 1, in ?
File "<string>", line 42, in has
KeyError: Dj Tech42.License to Fly.__default


Flight Simulator with Dogfight Modes:
http://www.alice.org/community/showthread.php?t=6840
   
Reply With Quote
Helpful
Old
Lirtjasksta
Junior Member
 
Status: Offline
Posts: 1
Join Date: Jan 2012
Location: 264 Wilmar Farm Road
Default Helpful - 01-24-2012, 08:54 PM

Any error for this FileIOTool.. I will try to download this one... thanks


http://mycomputerkingdom.com- My Computer Kingdom
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Default 01-25-2012, 04:25 AM

I know I said I will be gone for a while, but I cant leave without fixing bugs in this .

Dj Tech42, the error your getting is in a validity check I have. For every game there is a default value automatically saved upon every save that must equal "valid", under the name "__default" (please don't use any names with double underscores at the start when saving, they are reserved for use by the internal workings of the tool, I should have said that in the main post, but that is not the problem here anyway).
What I should have noticed in the code is that when that value does not exist there will be an error when the code tries to get it.

I've fixed it by adding my friendly dict class (a class that emulates a python dictionary, but does not throw horrible errors) that I built for Addons.

I've updated the top post with the new version.
I hope no more bugs come up, bye for a while.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
InsertName
Senior Member
 
InsertName's Avatar
 
Status: Offline
Posts: 341
Join Date: Jun 2011
Location: In a house
Default 01-25-2012, 09:11 PM

Now I can finally make long RPGish games.


__№_₤⅞__
Handguns: http://www.alice.org/community/showthread.php?p=45349
MINECRAFT IN ALICE: http://alice.org/community/showthread.php?p=48208
My Stupid Animations: http://alice.org/community/album.php?albumid=119

Last edited by InsertName; 01-25-2012 at 09:13 PM.
   
Reply With Quote
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default 01-27-2012, 07:56 PM

This is actually exactly what I was using the file I/O tool for in the first place. This looks great, thanks Arty!


--------------------------------------------------------------------------------------------------------------------------
I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes

Wondering about my Avatar?
http://en.wikipedia.org/wiki/Tardigrade

Wondering about my username?
http://www.youtube.com/watch?v=jG7vhMMXagQ
   
Reply With Quote
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,187
Join Date: May 2010
Location: e4eaf2
Default 01-28-2012, 07:08 PM

Quote:
Originally Posted by InsertName View Post
Now I can finally make long RPGish games.
I know what I'm gonna do today!


Thank you for taking the time to read this signature. This signature loves you.
   
Reply With Quote
Old
GameKid
Senior Member
 
GameKid's Avatar
 
Status: Offline
Posts: 467
Join Date: May 2011
Location: My magnificent castle
Default 02-11-2012, 03:33 AM

Two questions.
Where are the saved strings and numbers placed when saved, and what does the author string change (Example, how will the result be different if I enter A for the name from the result if I enter B for the name)?


[COLOR=e4eaf2]Your text here[/COLOR]
Come on, you know you want to try it.
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Arrow 02-11-2012, 06:20 AM

Quote:
Originally Posted by GameKid View Post
Two questions.
Where are the saved strings and numbers placed when saved, and what does the author string change (Example, how will the result be different if I enter A for the name from the result if I enter B for the name)?
Two answers.

The save data is stored in one file; location "Alice 2.2\Required\saveToolData" (it has no extension). That file is basically a stringified python structure and therefore loads and saves nicely with python.

The author string and game title string are both in place just to ensure each save variable gets a unique name and people who use the same game title don't overwrite each others saves. I may also give it other uses in the future, but for now its just an easy way to create unique save variable names.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
Dj Tech42
Senior Member
 
Dj Tech42's Avatar
 
Status: Offline
Posts: 202
Join Date: Feb 2011
Default 02-11-2012, 02:10 PM

Quote:
Originally Posted by arty-fishL View Post
Two answers.

The save data is stored in one file; location "Alice 2.2\Required\saveToolData" (it has no extension). That file is basically a stringified python structure and therefore loads and saves nicely with python.

The author string and game title string are both in place just to ensure each save variable gets a unique name and people who use the same game title don't overwrite each others saves. I may also give it other uses in the future, but for now its just an easy way to create unique save variable names.
Can you use the author string to make profiles? (separate variables for every user playing the game)


Flight Simulator with Dogfight Modes:
http://www.alice.org/community/showthread.php?t=6840
   
Reply With Quote
Reply

Tags
file, load, save, variable, write

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.