-
Notifications
You must be signed in to change notification settings - Fork 50
gameobj data.xml workflow
These steps are for Ubuntu, but other than the xmllint step should work the same on any unix-like system. Most of this stuff could work on Windows too except xmllint which is not easy to install.
git clone https://github.com/elanthia-online/scripts.git
cd scripts
bundle install
sudo apt-get install libxml2-utils # for xmllint
bin/migrate && rspec
If rspec runs and the tests pass, you are ready to make your change.
This is the starting point for the data that makes it into gameobj-data.xml. Each of these YAML files corresponds to a type, and we treat each list of types similarly to a database table. These files are not meant to be edited directly. They reflect the snapshot in time when the data migrated from Tillmen to shared ownership in this project.
Starting from the table data loaded from the YAML files, each migration in this directory is run in numerical order to modify the tables. In order to make it easy to understand how things have changed over time, we generally create a new migration for any change. To create a new migration, look for the next unused numbers and create a file with a name that briefly describes your changes:
> ls type_data/migrations/
...
37_den_of_rot.rb
> touch type_data/migrations/38_the_eyrie.rb
In that file, migrate
the tables you want to changes to insert
entries by :name
, :noun
, or :exclude
. There is no way to change an existing entry, but you can delete
it and create a new one.
These are the tests to make sure GameObj recognizes everything we expect it to correctly. They are mostly organized by type or event. If you create a migration and add new entries to gameobj-data.xml, please add or update the tests. This ensures that your changes work as expected and will continue to work as other people make changes. It is very easy to miss a case or miss an exclusion, so the tests are very helpful for finding edge cases that are hard to think of beforehand.