Move some editor-only properties out of scenario.xml into an editor.xml file #728

Closed
opened 2025-05-07 16:01:31 +00:00 by NQNStudios · 1 comment
NQNStudios commented 2025-05-07 16:01:31 +00:00 (Migrated from github.com)

We've got an <editor> element in scenario.xml which mostly contains things that do belong in version control, and/or might eventually be useful to have other parts of the code know about (like if we wanted to enhance the ingame/pcedit debug SDF editor to show the names of flags you could edit):

    <editor>
        <default-ground>2</default-ground>
        <last-out-section x="0" y="2" />
        <last-town>9</last-town>
        <graphics>
            <pic index="0">terrain-anim</pic>
            <pic index="4">terrain</pic>
            <pic index="5">terrain</pic>
            <pic index="6">terrain</pic>
            <pic index="7">terrain</pic>
            <pic index="8">monster-small</pic>
            <pic index="12">monster-small</pic>
            <pic index="16">monster-small</pic>
        </graphics>
        <storage>
            <on-terrain>2</on-terrain>
            <is-property>false</is-property>
        </storage>
        <storage>
            <on-terrain>201</on-terrain>
            <is-property>true</is-property>
            <item chance="10">4</item>
            <item chance="10">5</item>
            <item chance="10">6</item>
            <item chance="10">7</item>
            <item chance="10">17</item>
            <item chance="12">31</item>
            <item chance="4">37</item>
            <item chance="8">13</item>
            <item chance="8">14</item>
            <item chance="10">16</item>
        </storage>
        <sdf row="349" col="0">sweetgrove rat silo</sdf>
    </editor>

Two things near the top of the file don't belong in version control and whenever I fix a core scenario they are modified: last-out-section and last-town.

I would like to split these two off into a new xml file, editor.xml, which can be added to the gitignore.

While I'm at it, I would like to add more state to that file:

  • What mode I was editing in, so when I load a scenario it goes back to that mode conveniently (ie show terrain if I was editing terrain).
  • The view center (for the current town and outdoors separately). When you switch modes right now, it resets the center to the map center, which is frequently quite annoying.
  • Scrollbar positions?
  • Maybe others, but those are the main ones I can think of.
We've got an `<editor>` element in `scenario.xml` which mostly contains things that *do* belong in version control, and/or might eventually be useful to have other parts of the code know about (like if we wanted to enhance the ingame/pcedit debug SDF editor to show the names of flags you could edit): ``` <editor> <default-ground>2</default-ground> <last-out-section x="0" y="2" /> <last-town>9</last-town> <graphics> <pic index="0">terrain-anim</pic> <pic index="4">terrain</pic> <pic index="5">terrain</pic> <pic index="6">terrain</pic> <pic index="7">terrain</pic> <pic index="8">monster-small</pic> <pic index="12">monster-small</pic> <pic index="16">monster-small</pic> </graphics> <storage> <on-terrain>2</on-terrain> <is-property>false</is-property> </storage> <storage> <on-terrain>201</on-terrain> <is-property>true</is-property> <item chance="10">4</item> <item chance="10">5</item> <item chance="10">6</item> <item chance="10">7</item> <item chance="10">17</item> <item chance="12">31</item> <item chance="4">37</item> <item chance="8">13</item> <item chance="8">14</item> <item chance="10">16</item> </storage> <sdf row="349" col="0">sweetgrove rat silo</sdf> </editor> ``` Two things near the top of the file don't belong in version control and whenever I fix a core scenario they are modified: `last-out-section and last-town`. I would like to split these two off into a new xml file, `editor.xml`, which can be added to the gitignore. While I'm at it, I would like to add more state to that file: - What mode I was editing in, so when I load a scenario it goes back to that mode conveniently (ie show terrain if I was editing terrain). - The view center (for the current town and outdoors separately). When you switch modes right now, it resets the center to the map center, which is frequently quite annoying. - Scrollbar positions? - Maybe others, but those are the main ones I can think of.
NQNStudios commented 2025-05-08 02:01:38 +00:00 (Migrated from github.com)

The first part of this is done. Still need to add the new state to it.

The first part of this is done. Still need to add the new state to it.
Sign in to join this conversation.
No description provided.