Object XML Generator

From Post-Apocalyptic RPG wiki

Jump to: navigation, search

Wip code proposal.png This article features a work in progress code proposal.

A work in progress code proposal is incomplete, but is being actively worked on. The proposal may be in various stages of development, from a somewhat organized idea dump to a fully-formed proposal that just needs a quick spell check.


Contents

Description

Provide a simple script and GUI to generate FIFE XML definitions for animated and static objects.

Rationale

Artists make assests. That's what they do. Sometimes they aren't the most technically minded people. After these artists render these assets, a bit more work needs to be done to get these assests usable to the game engine. That's where this script comes in. This script will automatically generate FIFE definitions for the assets these artists make. This means less work for programmers/level designers and artists, and overall time saved.

Pros/Cons

Pros:

  • Level designers/programmers/artists spend less time making objects ready for use.
  • Reduces human errors in the XML

Cons:

  • Cannot accurately place x_offset's and y_offset's, something someone will have to manually tweak.

Implementation

The oXmlG (ObjectXmlGenerator) depends on xml.etree.ElementTree and xml.dom.minidom to generate XML and write it to file respectively. It would be used like this:

parpg.utilities.objectxmlgenerator as oxmlg
oxmlg.AutoStaticXML('<parpg>/objects/scenery/shopping_trolley')
oxmlg.AutoAnimationXML('<parpg>/agents/player')

For a static object, the path can be anything. It will recursively go through the directories making definitions for every .png file it finds. For an animated object/agent, the path must be the topmost directory containing the agents actions, elsewise generation will complete, but be very, very wrong. An additional class containing methods to generate just certain actions or for just one static image is being considered, further input is required. This module will be used in a small GUI tool that has a generate button and a path selector, as well as a potential Blender addon.

Personal tools