Discovery Gaming Community
Infocard Guidelines - Printable Version

+- Discovery Gaming Community (https://discoverygc.com/forums)
+-- Forum: Discovery Development (https://discoverygc.com/forums/forumdisplay.php?fid=7)
+--- Forum: Discovery Developers Forum (https://discoverygc.com/forums/forumdisplay.php?fid=183)
+---- Forum: Discovery Unofficial Development (https://discoverygc.com/forums/forumdisplay.php?fid=389)
+----- Forum: Discovery Mod Content Submissions (https://discoverygc.com/forums/forumdisplay.php?fid=33)
+----- Thread: Infocard Guidelines (/showthread.php?tid=36130)



Infocard Guidelines - Igiss - 03-07-2010

Infocard Guidelines
How to add and edit infocards - guide for those who submit them.

1. Infocards Templates archive should be your reference: http://discoveryfl.com/files/infocards.zip

But the zipped document only contains infocards related to system editing. What to do if other infocards are needed?

Open an infocard of the same type in FLED-IDs. Copy it to text file. Edit necessary values, names and descriptions, and you get your own text infocard.

2. Line breaks

Your infocard must not contain any actual line breaks in it. So, if you copy it to Notepad with disabled Word Wrap, an infocard must consist of a single line.

To create an empty line used to separate paragraphs of text in long descriptions, add this code to your infocard:
</TEXT><PARA/><TEXT> </TEXT><PARA/><TEXT>
Note that space in "<TEXT> </TEXT>" must be present, but no spaces should be present before or after this code.

Split long descriptions into paragraphs. Freelancer displays text in small areas that cannot be resized. Size of those areas should be your reference: paragraphs that don't fit are harder to read. This is particularly true about ship and equipment descriptions.

3. Spaces

Excess spaces in the infocard text areas will distort its outlook in-game (creating indent). Excess spaces in XML code will result in incorrect formatting. Rule is simple: it's a very bad idea to leave any excess spaces.

Frequent reason for spaces appearing (from Mjolnir's infocards) is using Word for infocard edits. I advise to use Notepad++ instead.

If you edit infocards in Word, make sure to delete all spaces that it adds automatically between text and code, and between quote symbols and code (things like " Warrior IV " ).

Note that after you save an infocard in FLED-IDs, two spaces will be added automatically to its end. When you copy the infocard, these spaces must be removed. Check for spaces in the end before saving infocard in FLED-IDs. They must not be present before saving, and will be added automatically after saving.

4. Using infocard numbers

It's better to avoid using any previously occupied infocard numbers. If you need to use such number (for infocard edit, to replace deleted object etc), rules are the following:

If a number contained ids_name, it can be used only for another ids_name.
If a number contained ids_info, it can be used only for another ids_info.

If you added ids_name to a number that already contained ids_info (and vice versa), leave this number alone and don't use this number anywhere. Instead, use next numbers and add ids_name and ids_info correctly one more time. If ids_info on the wronly used number was very long, you can prune it and leave only first word without code - to reduce dll size.

Only exception from this rule are news. News titles and texts are added both to ids_name and ids_info with the same number, and texts in both must match exactly. So, if you fill a number incorrectly, you may use it for a news item later.

NEVER DELETE WHOLE INFOCARD AND SAVE AN EMPTY ONE!

If you need to replace infocard completely, you must replace it, and hit Save only AFTER you enter replacing infocard. If you save an empty infocard, it will become unusable forever and will cause FLED-IDs to display errors. In this case, I suggest to restore dll file from latest backup, if possible.

5. Apostrophe, quotes, ampersand

Straight apostrophe - ' - should be used everywhere in Freelancer. There was a case when apostrophe was included into lots of infocards, possibly due to using MS Word to edit them.

Straight quote - " - should be used in infocards. Complex quotes that MS Word inserts automatically are not acceptable.

Using following symbols: ; is not acceptable.

Ampersand - & - should be replaced with &amp; in descriptions (ids_info). It's not yet confirmed if the same should be done for names.

6. NPC Names

One of the major problems with FL infocards are the NPC names. FLDev processes them correctly, however, none of the text editors I know of, except for Notepad from Windows XP (Vista and 7 doesn't work) display UNIX line breaks differently from normal Windows line breaks and process them.

This is how UNIX line breaks between NPC name parts must look like in XP Notepad:

[Image: npclinebreaks.gif]

This is how UNIX line breaks look in Notepad++ if you select "Show All Characters" option in View->Show Symbol menu:

[Image: npclinebreaks2.gif]

However, Notepad++ is not reliable in working with those infocards, e.g. if you try to copy-paste infocards prepared in Notepad into Notepad++ document, the line breaks may be lost.

Therefore, for all NPC names a separate infocard file must be prepared. It may be named "npcs.txt" and placed next to the conventional "infocards.txt" file. It should be checked with MS Notepad of compatible version, or with Notepad++ (although saving it in Notepad++ may not work).

Please take this into account when preparing your infocard files.


Infocard Guidelines - Igiss - 03-07-2010

Thanks to Death's Overture, here's a brief tutorial on fixing NPC line breaks in Notepad++.

So, the steps are:

Initially you have a file with normal line breaks. Upper part of the image shows how they look without "Show All Characters" option in View->Show Symbol menu. Lower image show how they look with "Show All Characters" enabled.

Now place /n where UNIX line breaks should go - between the parts of the NPC names, as shown on the image.

[Image: infocards-breaks-1.png]

Now, go to the file (or select part of the file) where you need to fix the infocards. Use Ctrl-H to bring up the replacement window. Switch to Extended mode. Place
/n
in "Find what", and place
\n
in "Replace with".

[Image: infocards-breaks-2.png]

Now press "Relace all", and you should have correct line breaks.

Now the text should look like following:

[Image: infocards-breaks-3.png]

In normal view, nothing changed. In "Show All Symbols" you see that line breaks are now different.

You should still submit a separate .txt file with NPC names to avoid possible complications.