Impossible Creatures

Impossible Creatures

评价数不足
IC ModText Builder: User Guide
由 the2ndSign 制作
Generate and edit your mod's text all in one place with the IC ModText Builder. No broken .DLL files. No lengthy setup. Just select your locale folder and get to work.
   
奖励
收藏
已收藏
取消收藏
Basic Usage
Welcome to the IC ModText Builder, a simple and powerful option for editing your mod's text. If Resource Hacker has broken your mod and Visual Studio seems too unwieldy, this tool is for you. Or if you'd just prefer a more streamlined workflow, then the tool is for you too.

Grab it here:
GitHub[github.com]
ModDB

(Note: Running ModTextBuilder.exe will likely trigger Windows Defender SmartScreen. To proceed to the tool, you can click on "More info" and "Run anyway". If you'd like to avoid this warning, you can create an exception in Windows Defender.)

Unfortunately, at the time of writing, the tool only fully supports English language files. Multi-language support is under investigation. Modders utilizing multiple localizations can still use my Visual Studio guide.

Now let's go over the basic functionality:



LOCALE Path: This should point to your mod's locale folder, where the file ModText.dll is stored.
BACKUP Path: This can be a folder of your choosing. When you build your .DLL file, a backup of the old one will be saved here.
RC File: The resource file that contains your mod's text. Manual path selection is available, but in most cases you should let the tool set this for you. See below.

Generate .RC File: Clicking this will automatically create a .RC resource from your existing ModText file inside the LOCALE Path. This is the file you will edit to modify your mod's text. It is possible to obtain a .RC file from other sources, but for the highest degree of compatibility with the tool and with IC, you should use this feature to generate your file. Clicking this will also automatically set the RC File path to the location of the generated file. You should only need to do this step once per project. You must set the LOCALE Path before this button becomes available.

Open .RC File: Opens the selected .RC file using your system's default program. This button becomes available after you have selected a valid .RC file.
Build .DLL: Click this to compile your .RC resource into a new ModText.dll file to be read by IC. All three paths must be set before you can build.

The white box at the bottom of the window will display any errors or general messages.

That's pretty much the long and short of it. If you'd like a rundown of IC text editing and working with .RC files, you can go ahead and continue to the next section. But if you've already got it down, then happy modding!
Working with .RC Files
As mentioned in the previous section, you will be editing your mod's text through a .RC resource file. These files are the most basic building blocks for resource-only .DLL files such as IC's ModText.dll. You can use any basic text editor to open them, but my personal recommendation is to use Notepad++[notepad-plus-plus.org]
A more powerful option is Visual Studio Code[code.visualstudio.com]

When you open your newly-generated .RC file, you should see something like this:



These are all the text lines, called strings in programming, used by your mod. All that's needed to add a new line is to type a new number inside one of the stringtables, followed by a space and then the text you'd like to add in quotes. For example, if I wanted to add a new line to the albatross at the top, I'd enter something like this below string 34004:

34005, "The Albatross is a big mean bird that will bite off your toes."

If you'd like to add a new stringtable (useful for organization, but has no effect in-game), you can copy the format used by the file:

STRINGTABLE BEGIN 34005, "The Albatross is a big nice bird that will bestow upon you additional toes." END

If you'd like to add double quotes (") to your string, you need to escape them by wrapping the quoted text with an additional set of quotes. You may be used to using backslash (\) as the escape character, but duplicating quotes is more compatible in this case.

Quote example:

1000, "This is an "incorrect" quote (brain = smooth)." 1001, "This is a ""correct"" quote (brain = many folds)."

If you'd like to insert a line break between two pieces of text, you can type \n between them.

My mod is the best mod ever forever.\nSuck ittttt.

...becomes...

My mod is the best mod ever forever. Suck ittttt.

Additionally, IC's default fonts have low support for special characters such as em dashes (—) and letters containing diacriticals (á, ō, etc.), so you should try to avoid them.

You can also add comments to the file by typing // before a line of text. To write a longer comment, you can wrap the text in /* and */ symbols.

// This is a short comment
/* Oh my goooood, this is such a looooong comment. When is she gonna stop typing? Zzzzzzzzzzzzzzzzzzz */

Once you're done editing, just save your changes and return to the tool, then click on Build .DLL. If you see Build successful! in the message box, then you're good to go! You should see your edits reflected in-game.

Good luck and have fun. :)
Credits
Created with:
Python[www.python.org]
PyQt[riverbankcomputing.com]
Qt Designer[build-system.fman.io]
MinGW-w64[www.mingw-w64.org]


1 条留言
Batman Lalo Salamanca 8 月 14 日 下午 1:36 
Its crazy how much easier this is to do compared to the other method , Great guide !