Modify

Ticket #125 (closed bug: wontfix)

Opened 9 years ago

Last modified 9 years ago

Map Editor should preserve XML comments

Reported by: kaydeth_parpg Owned by: parpg
Priority: major Milestone: Techdemo 1
Component: scripts Version: trunk
Keywords: Cc:
Blocked By: Blocking:
Department:

Description

Currently the map editor will not save comments in a map file. If you load a map file that contains comments and then save it you will lose all comments that were present.

This might require a patch to the FIFE editor code.

Attachments

Change History

comment:1 Changed 9 years ago by beliar

I can't think of an easy way to do this. The only way i can think of to load and save a map while preserving the comments would be to keep the xml file in memory and edit it on the fly while editing the map. Not sure if a simple patch would be enough to do that.

comment:2 Changed 9 years ago by orlandov

Replying to kaydeth_parpg:

Currently the map editor will not save comments in a map file. If you load a map file that contains comments and then save it you will lose all comments that were present.

This might require a patch to the FIFE editor code.

The editor saves out the imports, layers, instances, and cameras, in that order, so any comments you added would lose context within the file wouldn't make sense once the map was significantly modified.

However; the idea of comments is very useful for annotating maps. What if instead of having an XML comment in the code, we could create an annotation Element that could be edited from within the PARPG editor.

Something like

    <Layer>
        <Note x="4" y="2" z="0">This zone is for quest Foobarbaz</Note>
        <Instance />
        <Instance />
        <Instance />
        ...
    </Layer>

This way you could create or remove notes about parts of a map for other map editors. I know it's not exactly what you were looking for since XML comments will still be stripped, thus making hand editing a tiny bit more annoying, but I can't see non-trivial way of implementing a fix to this.

What do you guys think?

comment:3 Changed 9 years ago by eliedebrauwer

The reason to create an editor for some file format is to create an easily accessible abstraction from the underlying file. This means that there would be no reason at all to manually touch the file, which also means comments are unnecessary (since you will only access through an application that doesn't care about comments). So personally I think that we don't need comments, or the level editor needs to be improved.

On the other hand, I do like orlandov's idea to have the possibility to add some top level metadata about a mapfile (as long as we don't drown the file in these comments)

comment:4 Changed 9 years ago by b0rland_parpg

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

The task seems to require way too much effort and hardly give any benefit. Manual editing of the map file should be avoided when map editor is in place. So closing it for now unless some really serious need for this arises.

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.