• Welcome to SC4 Devotion Forum Archives.
 

News:

The SC4 Devotion Forums are no longer active, but remain online in an archived, read-only "museum" state.  It is not possible for regular members to post or use the private messaging system, and no technical support will be provided for any issues pertaining to the forums in their current state.  Attachments (those that still work) are accessible without login.

The LEX has been replaced with SC4Evermore (SC4E), and SC4E maintains an active Discord server.  For traditional forums, we recommend Simtropolis.

Main Menu

Two questions about 'new_properties.xml'

Started by Doodleroo, June 02, 2013, 11:37:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Doodleroo

Hello,

I have two questions about 'new_properties.xml':

1) What are the terms of use? Is this file intended for exclusive use with PIM-X or am I free to use it in connection with tools I develop myself? Note, these are private mini-tools, likely never to be released and even if they are released I will of course link to the original file here.
2) Is there a corresponding DTD file available somewhere?

Thanks in advance!

Doodleroo

Update: Since there has been no response, I went ahead and created a DTD myself.

While doing so I realized a couple of issues with the current 'new_properties.xml' version which cause problems if you want to process the file with standard XML tools; therefore I went ahead and applied a couple of changes:

  • the 'PROPERTIES' and 'PROPERTY' tags were used in two distinct contexts (to define exemplar properties and to define rules for categories); in order to resolve this ambiguity I introduced two new tags ('REQUIRED_PROPERTIES' and 'REQUIRED_PROPERTY') for use in the category case
  • the identifiers used are all hex numbers, this is not DOM compliant (DOM expects identifiers to start with a character); I solved this by prefixing all identifiers (and references to identifiers) with 'id_'
  • the identifiers were also being referenced using mixed case, which again is not DOM compliant; I solved this by converting all identifiers to lower case
  • additionally all empty tags will now close with '/>' instead of using an end tag
  • and while I was at it, I fixed a couple of spelling errors my spell checker found in the file :)
  • and of course I added a reference to the DTD

Now, I do not know if anybody else has any interest in this, but nonetheless I'll attach the DTD as well as the modified 'new_properties.xml' in a zip file.
Link: new_properties with DTD.zip

One issue remains on which I would appreciate input:
There are some ID conflicts concerning categories, the following categories share the same ID:

  • 'all others' and 'stage 7' share id 0xc96d2137
  • 'zot' and 'small landing strip' share id 0x0c8fbd21
  • 'stoplight' and 'airport - size 1' share id 0x0c8fbd31
  • 'flora prop' and 'medium landing strip' share id 0x0c8fbd22
  • 'tree prop' and 'large landing strip' share id 0x0c8fbd23
  • 'crime' and 'no wealth' share id 0x1c8fbd65

What would be the suggested resolution to this conflict? Assign some new IDs randomly? Or is there a specific method being used to determine these ids?

Thanks in advance!