New Utility project in the works... YAModXMLEditor!

Here is a picture of the features I just added:

attachment.php


And all of these seem to work so far! The clipboard is also context sensitive so you can't paste content where it doesn't belong.

I also finally made use of the toolbar. You can view what is on the clipboard AND you can search your xml for terms using the toolbar. The clipboard text turns green if its ok to paste above, below, or replacing the current node...

attachment.php


Or red if it isn't!
attachment.php


Also notice that you Insert and paste options are gone, both in the context menu and in the edit strip at the right.
 

Attachments

  • rightclick.png
    rightclick.png
    12.6 KB · Views: 443
  • toolbar.png
    toolbar.png
    27.5 KB · Views: 453
  • red-clipboard.png
    red-clipboard.png
    52.9 KB · Views: 460
I have made a new thread in the Utilities sub-forum for the alpha release. You may download and install it from here. Please make note of the obligatory "at your own risk" warnings.

This thread will still be used as a sounding board where the other threads (there is a documentation thread link in the alpha thread) will be used for suggestions and documentation directly related to the release
 
NOTE: This post is a reply to a message sent to me by Sephi. I could not include an attachment in the private message so I am posting it here. If anyone else wants to help with this feel free. But it might be beneficial to communicate which files you are going to work on so that people do not overlap their work and reinvent the wheel someone else has already invented so to speak.

Special thanks to Sephi for his willingness to help with this. I can now focus on bugs and more immediate concerns if he wants to do this favor.

primem0ver said:
you could actually do me a BIG favor if you are a quick learner of how to encode files (using a proprietary format). I want the editor to do a better job at recognizing tags that are meant to be info types. I am attaching the file you can work on/add too. It is relatively easy to do once you understand the syntax. Here is an explanation of how you can help me work on it:

As you edit/browse through the different tags in a file, make note of (or immediately add) any non-bold items that are meant to have an info type as their value. Here the syntax and how to add a reference in the attached file.

Sections in the file
Does not include the opening or the comments sections.

  • ClassDefs: This section is for aliases that are used globally (except for text aliases). This includes prefixes, suffixes, or full-word aliases.
  • Civ4GameText: This section is used for aliases specific to the TEXT class and files and includes additional markup syntax.
  • ShortNames:This section is currently not being used. It reserved for when I find short names or nicknames that do not follow the traditional naming convention of simply removing the prefix or suffix. For example: the short name of a UnitInfo is Unit. When/If I or you find tags that are different then what should be expected you can enter them here using the following format: ShortName=LongName (no spaces).
  • Sections for specific files: All remaining sections are used for tags that should only marked up within a specific file. When it is possible that the tag is not globally used in the same manner, it should be entered into a section named after the schema and class name for the file.


Important Syntax Rules
  • NEVER use spaces around an equal sign. For example always use "Alias=ShortName" rather than "Alias = ShortName"
  • Never use prefixes or suffixes in a section for a specific file. These should only be used in the ClassDefs section.
  • Prefixes are words that commonly go before the short name in the tag such as the "Prereq" in "PrereqTech" and "PrereqBonus"
  • Suffixes are the same as Prefixes except they follow the ShortName.
  • DO NOT use the "class" key word for anything you add. This is a special key word used only in specific circumstances.
  • Instead, use the format "Alias=ShortName" where the alias is the full tag name that is used and the ShortName is the short name of the info type it refers to.
  • For example: FreeBonus=Bonus. "FreeBonus" is the tag that is found in the xml markup and "Bonus" is the shortened name of the Info class it refers too.


How to add a new section for a new file

Section names always have brackets around them. When you start doing aliases in a new file, put a blank line between the last section and the new one. The section name should be in the following format: [SchemaFileName::ClassName]

To make sure you have the right section name you can open the xml file in notepad. (I am using the CIV4BuildingInfos.xml file for my example).

The opening node (and only root node besides comments and the xml declaration) always looks something like this:

<Civ4BuildingInfos xmlns="x-schema:CIV4BuildingsSchema.xml">

The name of the schema is right there: "CIV4BuildingsSchema.xml". That will be the schema name. The class name is the name of the node that is repeated over and over for each info defined. For the BuildingInfos file the class name is "BuildingInfo"

So the section name in the alias file would be (and is): [CIV4BuildingsSchema.xml::BuildingInfo]

Just resubmit as a text file since inf files are not permitted for upload. I will rename it.

EDIT: By the way, you can add text aliases too to the Civ4GameText: section. Follow the same syntax as for individual sections. The additional markup is so that a filter can be used when populating a text combobox control since there are over 7000 text definitions in warlords alone. A filter should ONLY be added if all text infos for a particular alias are meant to have a specific word in their name such as "PEDIA"for civilopedia entries.

The format is as follows:
Alias=TEXT,FILTER

Again no spaces. The ",FILTER" is optional. TEXT must be capitalized, and the filter should be too since all text info references use capital letters.
 

Attachments

Back
Top Bottom