Customizing the Help Menu
Some other example images:
to big for a post:
http://i52.tinypic.com/fekjea.png
*blink blink*
That's... um...
I'm speechless.
[ ProTip: The banner is a link to art refs!! | The Khellection | The HBAS Repository | Brute Guides (4/16/10) | How To Post An Image - A Quick Guide ]
Biggest Troll on the forums? I'll give you a hint:
edit:
Got it to work. this is Very helpful, very useful. nice work
Customizing the Help Menu
Code:
Code:
Code:
Code:
Code:
Code:
Code:
Here is some example syntax
Code:
Code:
Code:
Code:
Code:
Code:
The help file in CoX is an often underused part of the game, that has some very strong potential as an information resource. Editing the file is easy and straight forward. It uses a subset of standard HTML commands to display the information. It can be changed to provide in-game information, pictures, or even to fire off commands just like macros do. I'll walk you through how to edit the file so you can create your own in-game help menu.
Contents
1. Example Picture
2. Setting up your folder
3. Help File syntax
3.1 Categories
3.2 Items
3.3 ItemText
4. Examples
5. Notes
6. The default Help File.
1) Example Picture
2) Setting up your folder
The only file that you need to create will be located here:
C:\Program Files\City of Heroes\Data\texts\English\Menus\help.txt
*If you are not using an English client, you will need to use ChineseTraditional, French, German, Japanese, Korean, or uk in place of English.
3) Help File syntax
Help.txt is just a normal text file. Any text editor can be used, such as Notepad or Notepad++. It can also support Unicode, as long as it is saved in Unicode format.
The general syntax is:
3.1) Categories
The Categories on the far left can contain multiple Items underneath them. They can also be flagged as Hero, Villain, or Praetorian Only. If you are a Hero, the Villain categories will not show until you switch sides. An example of alignment based categories in the InGame Help menu is "Masterminds". That category will only show in the help menu if you are a Villain.
Let's look at the syntax for categories.
NAME - Whatever text you want to have displayed. This field is limited in length. The extra text will bleed over into the Item window if it exceeds the space provided.
ALIGNMENT - can be All, HeroOnly, VillianOnly, or PraetorianOnly. All shows up for everyone regardless of alignment.
COMMENT - Any comments you want to put in the file. Anything after the //'s will be ignored when displaying in game
{ and } - Used to place all the items under one category.
Examples:
The following show up only if you are on the correct alignment:
3.2) Items
Under each category, you can have multiple Items. There does not appear to be a limit to the number of items, just the size of each one. Each Item can only be about 21,000 characters long. This includes whitespace (ie. spaces, carriage returns, and newlines). Items follow a very similar syntax to categories, and can also be set for alignment.
The only difference in syntax from Categories to Items is the actual word 'Item' or 'Category'
Let's look at the syntax for items.
NAME - Whatever text you want to have displayed. This field is limited in length. The extra text will bleed over into the Item window if it exceeds the space provided.
ALIGNMENT - can be All, HeroOnly, VillianOnly, or PraetorianOnly. All shows up for everyone regardless of alignment.
COMMENT - (optional) Any comments you want to put in the file. Anything after the //'s will be ignored when displaying in game
{ and } - Used to place all the items under one category.
3.3) ItemText
The markup for an Item is similar to the following
Text <&
Stuff for everyone
&>
Notice the <& and the &>. They are used to surround the text of the item. They must be present for it to display correctly. The word Text is used in two different ways. If it is an Item for all alignments, then "Text" means for everyone. If you are specifying alignments then "Text" means Heroes Only. Other options are V_Text for villains and P_Text for Praetorians. Look at this example:
When this item is viewed, you will only see 1 of those options, depending on your alignment. If you do not care to specify alignment, simply use "Text".
As far as the content goes, you can do all sorts of wonderful things. Item text is a simplified HTML document that the client renders for you. It uses only the basic HTML commands. The commands that I know of so far are:
Simple Text with color codes and centering:
Color codes can be either HTML Color names or the Hex equivalent of the color. Hex and color names can be found online by searching for HTML Color codes
Links:
Links in the help file function the same way as if you were to type them into chat. Any slash command can be used here. You must also provide the colors to be used to show the link, as well as when the pointer is hovered over it. Omitting the colors results in invisible links.
The format is
SLASH_COMMAND - Any valid /slash command. You can string multiple ones with $$
LINKTEXT - the text that is displayed.
Some Examples are:
Tables:
Table borders do not seem to work (could just be my resolution/settings), but you can still use them for organizing things into columns. You can also Right,Left,Center align them as well.
Examples are:
Images:
Help also supports images. The image names must be in-game image names. You can also tell it to shrink or expand the height and width through standard HTML. If an image is to big to fit the window, it will simply not show. If an image that is linked can not be found, a small white square will be used instead. You do not need to specify the path to the image, just the filename.
Examples are:
4) Examples
The code used to produce the image in the overview section is here:
5) Notes
If you make changes to help.txt, you must exit the game completely before seeing the changes take effect.
The Help Menu will be the same for all of your characters on all servers.
Comments can be added by using a double forward slash (ie //). Any text following the slashes will be ignored by the client.
Each Item has a max of 21,000 characters. Anything greater and the help menu will display only a few letters in the Item field.
The term "VillianOnly" is correct as the original file used the same spelling
6. The default help file can be found here:
http://www.mediafire.com/?6mrehyg6xvskoc8
In closing, you can get pretty elaborate with this. I am currently upgrading my help file, and it is already upwards of 5 megs, and I sill have a lot more content to add to it. Hopefully the guide was written well enough for people to understand, as this was first I have ever written. Any comments/questions please reply. I will answer as quickly as possible.