A full manual/document will take some time to create but here are some quick how tos:
Introduction to the "Selection" or "Edit" Strip
This is a little gadget to give you a picture interface to editing. Each icon is a button. Here is an explanation of each button:
1. The first is the "edit" button. It currently doesn't really do anything for container nodes (since containers don't have actual values, they only have nodes inside them). In a future release, clicking this on a container will simply expand the container if it isn't already expanded.
2. Second is the "copy" button. This will copy the current node onto the clipboard and works on both container and value nodes.
3. The third is the "paste" button. This might be better described as "Replace" since it will replace the value (for value nodes) or the entire container (for container nodes). This button will only appear on container nodes if the node is an exact type match as what is on the clipboard. (i.e. the XML tags have the same name). For value nodes, this is also the default behavior but you can allow copying over any value nodes of the same type (such as integer, boolean etc...) by unchecking the tag match option in the value context menu (right click a value... see below on how to do this).
4. The fourth button is the "insert above" button. This only appears on expandable (container) nodes. It may also appear on value nodes that are repeatable (rare) but the functionality for this is not programmed yet.
5. Finally, the fifth button is the "insert below" button. This is essentially the same as the "insert above" button.
How to edit a basic value:
To open an edit control for the currently selected node, simply click the first icon on the strip to the right of the selected node or double click the/a node.
An edit control appropriate for the type of data being edited will open.
- For integer values you can only enter numbers and the negative sign.
- For float values (i.e. decimal values), you can use the same keys as with the integer value plus the period (decimal). If you have already put a decimal in the number, it will not allow you to add a second decimal. You will have to remove the first decimal before putting it somewhere else
- For boolean (true/false) values, you will be given a drop-down only combo box that allows you to select true or false. The actual XML will read 1 and 0 respectively.
- For text values you will be given a text box where any characters are accepted. Hitting enter/return however will end your edit and replace the value. . This will behave differently for large text boxes when I add them later on.
- For recognized info-values (These are what I call "type-cast" values and show up as bold text in the editor), a drop-down only combo box will give you a list of all info types that are acceptable for the node you have selected. Currently you must unload and reload the mod if you add infos of the correct type before they will show up in this list. I hope to fix that in the future. If you are editing a node that is recognized as a TEXT info type, it will actually allow you to put in your own value. For this, the text entering feature of the combo box will be enabled since simply entering text here will still work.
How to search for text
You can use the toolbar at the top to search for text. I don't think the top nodes (the xml-declaration nodes, the opening comments, and the single root document node) are being searched right now. I hope to fix this bug in a later release. All other nodes below the top layer however will be searched, whether they are opened for viewing or not.
To search, simply enter the text you are looking for.
NOTE: Using tag markup will not give you any results since the search feature looks at the text value of the node and markup is not part of the display. So if you are looking for a specific tag look for "bRivalTerritory" instead of "<bRivalTerritory>". You may perform both case sensitive and case insensitive searches. Although I recently discovered programming backward searches are possible, they are currently not supported.
The search results will HIGHLIGHT THE ENTIRE NODE CONTAINING THE TEXT and not just the text you are searching for. (Doing this will not be possible unless I create my own complicated node control that is going to take more time than it is worth right now).
How to copy, edit, paste, insert, values and nodes
There are two ways to do each of these. You may either right click the desired node and pick the desired operation or you may use the edit strip. The two white sheets is the copy button The clipboard is paste (over). The up arrow is insert up; and the down arrow is insert below. For "container" you can only paste or insert from the clipboard when the selected node is an exact type match of the node you have selected. For value nodes, the default behavior is the same. However, you can copy and paste values over any node of the same value type if you uncheck the tag match option.
For example. If you want to set all integer tags to 5, you would do the following:
1. Change one of them to 5 as shown (double click or click the edit icon on the strip)
2. Right click and uncheck "Restrict Pasting to matching tags"
3. Notice than when you do this, the clipboard viewer switches from "Item on clipboard:" to "Value on Clipboard:"
4. Copy over the desired values by clicking the clipboard (3rd) icon or by right clicking and clicking on copy over. Here is the end result:
NOTE: There is currently a bug that may allow you to retain the clipboard items between files. Although selecting a different type of info will NOT allow you to paste, selecting a node in a different version of the same file might allow this. It will probably crash the program if tried. (Not than anyone would want to do that...)
More to come.