The Daily Click ::. Forums ::. Klik Coding Help ::. Data storage
 

Post Reply  Post Oekaki 
 

Posted By Message

Zi-Xiao



Registered
  29/07/2002
Points
  537

VIP Member
24th November, 2003 at 13:44:04 -

When using an ini file to store data, what can i do to load and modifying it (without changing the contents of the ini file), but only save to the ini file when the player actually chooses to save?
And now do i keep track of key events in an RPG or adventure type game, like wether or not a chest has been opened or a gate has been unlocked?

 
n/a

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
24th November, 2003 at 15:27:29 -

you could create a temp INI file which you modify as the game runs, then when "save" is clicked you copy the contents of the temp one into the actual one.

Image Edited by the Author.

 
www.thenatflap.co.uk

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
24th November, 2003 at 16:40:47 -

as for keeping track of many chests and stuff, you'll have to call each chest something unique (like chest1, chest2 etc.), then in the ini file, have it so if a chest's value = 0, then it's closed. If it equals 1, then it's open.

Then when a player opens a chest, set its value to 1 in the ini file, and reward the player with the contents of the chest. This way, he can only open the chest once... (provided you check if the chest is opened or closed when it's loaded)

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
24th November, 2003 at 18:23:53 -

ive realised i need a temporaray ini for my inventory when making an rpg

if the party has bought 20 potions it will be saved to the temp ini
and when the game is saved it will be saved to both the temp and proper ini

 
.

Zi-Xiao



Registered
  29/07/2002
Points
  537

VIP Member
25th November, 2003 at 14:33:29 -

So about this whole tempary ini file thing: whenever i load a frame like the stauts screen or a battle screen or something, then that means i have to load the temp ini file all over again?!?! Wont that be really slow if i have lots of data to keep track of? I mean, i'll probably have like 50 treasure chest objects in all, and 14 stats for my character (theres only one playable character). Or is this the way that everyone does it?
And another thing, whats a good way to keep track of modifications of your characters stats due to armor, weapons, accessories etc...?

 
n/a

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
25th November, 2003 at 15:05:05 -

it won't slow it down.

 
www.thenatflap.co.uk

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
26th November, 2003 at 07:23:08 -

the best way is probably the same as the inventory.
saving to a temp ini

rpgs are more complicated than people first realise.

 
.

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
26th November, 2003 at 08:16:52 -

64 bits of data is hardly a lot. that's only about 200 bytes at max

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G
   

Post Reply



 



Advertisement

Worth A Click