It is currently 29 Oct 2025, 09:16
   
Text Size

Changing the questData file format

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Changing the questData file format

Postby Fnoed » 15 Jan 2011, 05:50

Can we change the questData file format? Right now it is just a serialized object, this makes making even minor changes hard as it would break users' existing saves. With a more flexible file format, perhaps a SQLite database or even an XML file, it would be possible to modify fields without breaking backwards-compatibility.

How were changing file formats handled before?
Fnoed
 
Posts: 84
Joined: 20 Dec 2010, 01:03
Has thanked: 0 time
Been thanked: 3 times

Re: Changing the questData file format

Postby silly freak » 15 Jan 2011, 09:54

hi! i changed the old serialized deck format to a text based one.

the steps i took were:
- define an interface for reading and writing decks (basically extract all the methods already there
- let the "old" DeckIO implement that interface
- implement the "new" text-based DeckIO
- write a converter which reads all the decks from the old IO and writes them to the new IO
- Let the converter look for the old deck file on forge startup

the files were necessarily in the default package, since changing the FQCN breaks deserialization

now replace "deck" with "quest", have a deep read into the quest data structure right now, and how it's read and written, and then try to define a suitable data format ;)

good luck!
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 6 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 6 guests

Login Form