Alice Community  

Go Back   Alice Community > Alice 2 > Share Objects

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Save Tool
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
Lightbulb Save Tool - 01-21-2012, 11:59 PM

Arty-fishL's Save Tool

Description


This is basically File I/O Tool - version 2.
For the old tool click here.

This is a save tool based upon my previous File I/O Tool.
It is much simpler and easier to use.
It is capable of saving and loading world variables.

Instructions


Import the object into the world you want to use it in.
Don't rename it and don't delete any of its variables, methods or events.

Set saveTool's variable - game_title - to the name of your game.
Set saveTool's variable - author - to your name.

Compatability


So far this only works with world level variables of string or number type.

This can be used simultaneously with the File I/O Tool.

Please use this for game saves from now on.

Updates

2012

22 Jan - 1.0 - Original version
25 Jan - 1.1 - Fixed bug with validity check
06 Aug - 1.2 - Added internal functionality for ArtyOnline Tool compatibility
2013
07 Mar - 1.3 - Added support for the Alicedoc mod

Further Help

Read below only if you require help:

VARIABLES:
- game_title
Set by you.
The name of the game/world
.

- author
Set by you.
Your name/nickname/username
.

- has_var_output
Do not change.
The result of a has_var check - true if variable is saved, false if it is not in the save data.


- @alicedoclocalvars
Do not change.
An internal data variable for the Alicedoc mod.


METHODS:
- save_var
Adds a world variable and its value to the save data.
Parameters:
var
- the name of the world level variable (without world. at the start), ie. myvar
name - the identifier to use in the save file, it is the name used when loading.

- load_var
Gets a value from the save data and sets a world level variable as it.

Parameters:
name - the identifier used in the save file
var - the name of the world level variable (without world. at the start), ie. myvar.

- has_var
Checks if a variable is in the save data and then
sets saveTool's has_var_output variable to true or false if it exists or not.

Parameters:
name - the identifier used in the save file.

Support me by using this DOWNLOAD link (AdF.ly)
Attached Files
File Type: a2c SaveTool.a2c (35.6 KB, 34 views)

Last edited by arty-fishL; 04-06-2013 at 07:33 PM. Reason: Update v1.2 - internal updates
   
Reply With Quote
 

Tags
file, load, save, variable, write


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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.