Changeset 724


Ignore:
Timestamp:
02/12/11 00:32:33 (8 years ago)
Author:
technomage
Message:

Patch by Technomage

  • Added the scripts/serializers.py module, which defines several classes used to wrap and serialize arbitrary Python objects in various forms. Currently, only XML serialization is supported via the XmlSerializer? class. Classes to be serialized must register themselves with the global SerializableRegistry? first, which constructs a suitable wrapper used to serialize and deserialize class instances;
  • Corrected some errors in the character_scripts/secondary_stats.xml and character_scripts/primary_stats.xml with missing child tags and incorrect tag names. They should now be loaded without error via the XmlSerializer? class;
Location:
branches/active/character_customization/game
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/active/character_customization/game/character_scripts/primary_stats.xml

    r722 r724  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<list> 
    3   <PrimaryStatistic> 
     3  <PrimaryCharacterStatistic> 
    44    <short_name>ST</short_name> 
    55    <long_name>strength</long_name> 
     
    1010      taken into account. 
    1111    </description> 
    12   </PrimaryStatistic> 
    13   <PrimaryStatistic> 
     12  </PrimaryCharacterStatistic> 
     13  <PrimaryCharacterStatistic> 
    1414    <short_name>FT</short_name> 
    1515    <long_name>fitness</long_name> 
     
    2121      size also plays a role in how much "damage" you can absorb. 
    2222    </description> 
    23   </PrimaryStatistic> 
    24   <PrimaryStatistic> 
     23  </PrimaryCharacterStatistic> 
     24  <PrimaryCharacterStatistic> 
    2525    <short_name>CO</short_name> 
    2626    <long_name>coordination</long_name> 
     
    3030      strength. 
    3131    </description> 
    32   </PrimaryStatistic> 
    33   <PrimaryStatistic> 
     32  </PrimaryCharacterStatistic> 
     33  <PrimaryCharacterStatistic> 
    3434    <short_name>RX</short_name> 
    3535    <long_name>reflexes</long_name> 
     
    3838      physical skills and tasks where speed is of the essence. 
    3939    </description> 
    40   </PrimaryStatistic> 
    41   <PrimaryStatistic> 
     40  </PrimaryCharacterStatistic> 
     41  <PrimaryCharacterStatistic> 
    4242    <short_name>PE</short_name> 
    4343    <long_name>perception</long_name> 
     
    4848      intelligence", as compared to Reason. 
    4949    </description> 
    50   </PrimaryStatistic> 
    51   <PrimaryStatistic> 
     50  </PrimaryCharacterStatistic> 
     51  <PrimaryCharacterStatistic> 
    5252    <short_name>RE</short_name> 
    5353    <long_name>reason</long_name> 
     
    5858      gadgets. 
    5959    </description> 
    60   </PrimaryStatistic> 
    61   <PrimaryStatistic> 
     60  </PrimaryCharacterStatistic> 
     61  <PrimaryCharacterStatistic> 
    6262    <short_name>CH</short_name> 
    6363    <long_name>charisma</long_name> 
     
    6868      but can substitute in some instances. 
    6969    </description> 
    70   </PrimaryStatistic> 
    71   <PrimaryStatistic> 
     70  </PrimaryCharacterStatistic> 
     71  <PrimaryCharacterStatistic> 
    7272    <short_name>WL</short_name> 
    7373    <long_name>willpower</long_name> 
     
    7979      breaking point and past it. 
    8080    </description> 
    81   </PrimaryStatistic> 
     81  </PrimaryCharacterStatistic> 
    8282</list> 
  • branches/active/character_customization/game/character_scripts/secondary_stats.xml

    r722 r724  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<list> 
    3   <SecondaryStatistic> 
     3  <SecondaryCharacterStatistic> 
    44    <name>carrying capacity</name> 
    55    <description> 
     
    1515      <fitness type="float">0.30</fitness> 
    1616    </stat_modifiers> 
    17   </SecondaryStatistic> 
    18   <SecondaryStatistic> 
     17  </SecondaryCharacterStatistic> 
     18  <SecondaryCharacterStatistic> 
    1919    <name>melee damage</name> 
    2020    <description> 
     
    2323    <unit>hp</unit> 
    2424    <mean type="float">10.0</mean> 
     25    <sd>4.0</sd> 
    2526    <stat_modifiers> 
    2627      <strength type="float">0.70</strength> 
    2728      <coordination type="float">0.30</coordination> 
    2829    </stat_modifiers> 
    29   </SecondaryStatistic> 
    30   <SecondaryStatistic> 
     30  </SecondaryCharacterStatistic> 
     31  <SecondaryCharacterStatistic> 
    3132    <name>sprint speed</name> 
    3233    <description> 
     
    4142      <strength type="float">0.30</strength> 
    4243    </stat_modifiers> 
    43   </SecondaryStatistic> 
    44   <SecondaryStatistic name="run speed" unit="m/s" mean="5.0" sd="0.5" 
     44  </SecondaryCharacterStatistic> 
     45  <SecondaryCharacterStatistic name="run speed" unit="m/s" mean="5.0" sd="0.5" 
    4546                      minimum="0.0"> 
    4647    <name>run speed</name> 
     
    5556      <fitness type="float">1.00</fitness> 
    5657    </stat_modifiers> 
    57   </SecondaryStatistic> 
    58   <SecondaryStatistic> 
     58  </SecondaryCharacterStatistic> 
     59  <SecondaryCharacterStatistic> 
    5960    <name>aim</name> 
    6061    <description> 
     
    7273      <perception type="float">0.30</perception> 
    7374    </stat_modifiers> 
    74   </SecondaryStatistic> 
     75  </SecondaryCharacterStatistic> 
    7576</list> 
Note: See TracChangeset for help on using the changeset viewer.