adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Saving/Loading todos


From: Chris Frey
Subject: Re: [Adonthell-devel] Saving/Loading todos
Date: Tue, 12 Jun 2012 05:18:53 -0400
User-agent: Mutt/1.4.2.2i

Hi Kai, All,

I need some help understanding the python::pass_instance() mechanisms.

When I try to add specie as a new savegame object, it gets stuck at this
point, and SWIG complains that it doesn't know what rpg::specie* is,
or, if I don't add a GET_TYPE_NAME() macro, it doesn't know what a
python::script* is.

This is because the base class, rpg::group(), is trying to instantiate
things with Python.

When it fails during runtime, SWIG shows a list of the types it knows,
and things like rpg::character are not listed.

I'm confused. :-)

Thanks,
- Chris



On Mon, Jun 11, 2012 at 01:27:38PM +0200, Kai Sterker wrote:
> Hey Chris, All,
> 
> find the updated worldtest in the saving_loading branch:
> 
>   
> https://github.com/ksterker/adonthell/commit/3170086e7c3eba087f8ff5605051fb060dc8acc7
> 
> I hope the comments added make it clear enough what to do in each
> case, but if not we can discuss the details here.
> 
> 
> A few general hints will certainly help, however:
> 
> * The initial game data is kept in the toplevel data directory (i.e.
> adonthell/test/data/) and can be recognized by the .data extension.
> It's probably in zipped binary format.
> * The script adonthell/test/convert_data.py can be used to convert
> back and forth between binary and XML data. Useful if you need to edit
> stuff in the data files directly.
> * The script adonthell/test/filereport.py lists the contents of data
> files (both binary and XML) in case you only want to look at them.
> * Usually when I had to update contents of any data file I would
> implement saving first and leave loading compatible with the old
> format. Then add code to worldtest to correctly setup all the data,
> then save it. Afterwards, update loading for the new data format and
> remove hard coded initialization from worldtest again. (For minor
> changes, editing the XML data is probably quicker, though).
> 
> 
> Kai
> 
> _______________________________________________
> Adonthell-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/adonthell-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]