Modify

Ticket #111 (closed bug: fixed)

Opened 10 years ago

Last modified 10 years ago

FIFE map editor clobbers PARPG specific attributes on win32

Reported by: or1andov Owned by: orlandov
Priority: critical Milestone: Techdemo 1
Component: scripts Version: trunk
Keywords: Cc:
Blocked By: Blocking:
Department:

Description

When saving a PARPG map the FIFE editor truncates any attributes it doesn't know about.

We need to investigate how to get the editor to propagate these values across loads and saves so that we can finally use the FIFE editor without manual editing of the map files.

Some ideas:

  • import path hacking (sys.path) to load our own loaders/savers
  • a PARPG plugin?
  • some mix of these two

Attachments

Change History

comment:1 Changed 10 years ago by barra_parpg

A first still rather hacky solution can be found here: http://github.com/orlandov/parpg-game/tree/editor

For details see: http://forums.parpg.net/index.php?topic=469.0

comment:2 Changed 10 years ago by orlandov

  • Owner changed from parpg to orlandov

comment:3 Changed 10 years ago by orlandov

i have a WIP branch for this work at http://github.com/orlandov/parpg-game/tree/editor

comment:4 Changed 10 years ago by orlandov

  • Status changed from new to closed
  • Resolution set to fixed

(In [309]) Ticket #111: Patch by or1andov,

  • Create a wrapper around the FIFE editor that will allow us to load and save PARPG maps
  • Attributes for instances with id's on a map should pass through on save
  • Port savers to use the etree XML api instead of SAX closes #111

comment:5 Changed 10 years ago by barra_parpg

  • Status changed from closed to reopened
  • Resolution fixed deleted

This problem is only fixed on *NIX systems. For some odd reason, the custom attributes are not saved correctly on win32. Therefore I reopened the ticket.

To reproduce:

  1. Start parpg_editor.py
  2. Load PARPG's map.xml
  3. Resave map without applying any changes to the map
  4. Run run.py. Python will complain: "AttributeError?: 'NoneType?' object has no attribute 'behaviour'", indicating that the behaviour attribute had been mangled when the map was saved.

It looks like the PYTHONPATH workaround that is used in parpg_editor.py to use custom loaders and savers does not work as intended under win32. Further investigation needed.

comment:6 Changed 10 years ago by barra_parpg

  • Summary changed from FIFE map editor clobbers PARPG specific attributes to FIFE map editor clobbers PARPG specific attributes on win32

comment:7 Changed 10 years ago by Kaydeth_parpg

(In [330]) Ticket #111. Patch by Kaydeth. The path seperator ":" is only valid on Linux. For windows you need ";". Python provides os.pathsep as an os independent way of using the path seperator. refs #111

comment:8 Changed 10 years ago by Kaydeth_parpg

  • Status changed from reopened to closed
  • Resolution set to fixed

(In [330]) Ticket #111. Patch by Kaydeth. The path seperator ":" is only valid on Linux. For windows you need ";". Python provides os.pathsep as an os independent way of using the path seperator. closes #111

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.