and importing is working with the new dialog
so it turns out that python's pickle can't pickle objects of class consistences if those classes aren't defined in the top level of a module.
this is a problem when you take into account the the structure of the RGSS1 RPG module what with it having things like Event::Page::Condition
and Troop::Page::Condition. makes sense really, I couldn't find a way to determine the path of these type of classes reliably either. I ended up giving the classes I needed to serialize a __class_path__ string attribute to do it for me so I got clever. I defined all the classes at the top level of the module, sure. I even renamed Event::Page and the like to EventPage
but then in order to make sure that there was still a structure like the one found in the RPG module I did this
class RPG(object):
__class_path__ = "RPG"
Actor = Actor
Animation = Animation
Animation.Frame = Frame
Animation.Timing = Timing
Armor = Armor
AudioFile = AudioFile
Weapon = Weapon
Troop = Troop
Troop.Member = Member
Troop.Page = TroopPage
Troop.Page.Condition = TroopCondition
Tileset = Tileset
System = System
System.TestBattler = TestBattler
System.Words = Words
State = State
Skill = Skill
MoveRoute = MoveRoute
MoveCommand = MoveCommand
MapInfo = MapInfo
Map = Map
Item = Item
EventCommand = EventCommand
Event = Event
Event.Page = EventPage
Event.Page.Graphic = EventGraphic
Event.Page.Condition = EventCondition
Enemy = Enemy
Enemy.Action = Action
CommonEvent = CommonEvent
Class = Class
Class.Learning = Learning
I emulated the structure by linking the classes in such a way that the path
RPG.Event.Page.Graphic existed but it was really referring to a class called EventGraphic in the top of the module. I think it's genius.