-
Notifications
You must be signed in to change notification settings - Fork 7
GameData Editor General
GameData Editor is a tool to use when you want to make modifications to SpellForce gameplay - whether it's Fireball damage, Shadowblade weapon effects, Ogre level or anything number- or text-related. Game directory doesn't have to be specified in order to use this tool.
Here's a short description of the GameData Editor interface.
- Opened GameData file
- Menu bar
- Selected category
- Modification panel
- Elements contained within selected category
- Search utility
- Editor Status
- Backtracking panel (unused here)
- Selected element inspector
- Selected element description and additional information
Menu bar contains the following menus: File, Edit and Special.
Select and open GameData file to edit. If there's another GameData file already opened and it was modified, you will be prompted to save the file before it's closed. Loaded game data is stored in-memory, so there's no risk of accidentally overwriting the GameData.cff file.
Saves opened GameData file to the location provided by the user.
Closes currently opened GameData file. You will be prompted to save the currently opened GameData file if you modified it prior.
Closes GameData Editor. You will be prompted to save the currently opened map before this happens.
Undoes a change you made to the currently selected category. Undo history persists even if you change between categories.
Redoes a change you've previously undone. Note that you can't redo a change you've undone if you make another change after that.
This special tool allows you to find all places where selected gamedata element is referenced.
You can select any of the references to instantly edit the referencing element.
This tool allows you to calculate some of the more complicated properties from the game - for example, hit chance of unit 1 against unit 2. More calculators to come.
GameData.cff contains data which is divided into 49 categories. Selecting a category loads in all elements which belong to that category.
Operations described below must be used with special care - it might be that element you remove is used somewhere else, upon which there's a high chance that the game will crash when you try to run it.
Inserts a new element under the selected element. It will be an empty (all data set to 0 or empty text) element, or it will be cloned from a previously copied element (see below). If no element is selected, no element will be inserted.
Removes selected element from the category.
Copies selected element and stores it internally. While an element is stored, the Insert button has a yellow color. Switching between categories clears stored element.
Clears stored element (if it exists).
Each category contains a number of elements. Select an element to inspect its content.
Search Panel makes finding specific elements much easier. It has following options:
Enter what you search for here, and specify type of searched data:
- Number - Value must be an integer, otherwise it will be set to 0 before search occurs.
- String - any text you search for (lowercase or uppercase, it doesn't matter). Note that if "Search by column" is not selected, element names will also be searched through, which makes finding elements by name easy.
- Bitfield - some of the values contained within elements are tagged as "flags". This means that the value is a sequence of bits, where each bit has different meaning. For example, if element X contains flag value 5, its bitfield is 00000101 - its first and third bit is set to 1 (counting from right to left). Therefore, if you search for 4, which is 00000100 (third bit set), the element X will meet the search criteria.
Every element of a category has the same data layout - it's divided into columns. If you check "Search by column", you will be able to only look through one column at a time. To choose which column to look through, simply select it below the "Search by column" checkbox.
Clears previous search results, conducts a new search with parameters provided previously, and displays the results in the elements list.
Does not clear previous search results - instead, it only searches through the results, using new parameters provided by the user, and displays the matching results.
Clears search results and returns to default category elements display, listing all elements cantained in the category as if it was just selected.
Editor status simply displays whether there's an operation currently running.
You may have noticed that some of the element data are displayed in a field with orange background. Such fields are gamedata link fields. Whenever you see a gamedata link field, you can right-click it, and the editor will display content of the element the field links to.
On the left side of the backtrack panel you see the name of the element the gamedata field linked to. On the right side the "Back" button appears. Clicking the button will return to editing the element the gamedata link field linked from.
The main part of the GameData Editor is this inspector. It allows you to view and edit data contained in the selected element. The data types range from numerical, to text, to bitfields. Some text fields are limited in length, so keep that in mind.
Certain categories contain "bridges" - buttons which allow you to create elements of different categories, that are related to currently selected element, and go to those elements directly. These help adding complex elements, such as items or units. Bridges are highlighted with yellow color if you can create a new element, or usual orange if the element already exists.
Some of the information contained in the game data isn't provided explicitly - for example, how much XP you can gain from killing same unit over and over (yes, there is a limit). This panel infers such information from available data and is generally a useful thing to have.
When you open a map with Map Editor while GameData Editor is open, they will attempt to synchronize. Successful attempt will load in GameData.cff currently in data folder of your SpellForce directory, disable ability to load or close another GameData.cff and temporarily disable Redo/Undo functions. Closing the map will desynchronize Map Editor from GameData Editor, enabling the features above.
Written with StackEdit.