Modmakers Guide
to Worldmap v6 Compatibility (by Erebusant)
The following instruction will assist Modmakers in
their efforts to produce and release mods that are compatible with Worldmap
v6.4 and upward, whether it be a modification for Tutu or a modification for
use with BGT or BP or to be used with the Mega-Modification.
The Worldmap functions by processing 3 primary files.
These files are located in the BGII – SoA\Worldmap directory and are named (1)
map_mods_areas.tbl, (2) map_mods_links.tbl, and
(3) map_mods_trans.tra respectively. There should be
no circumstances when in the normal course of installing a BGII game with
modifications that the player/end user should need to even open this directory.
The 3 files themselves are editable using any text editor, such as “notepad” or
“WordPad”.
The following code should be used within the body of
the .tp2 of the mod you are working on:
ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.are~
THEN BEGIN
ACTION_IF FILE_EXISTS ~Worldmap/map_mods_areas.tbl~ THEN BEGIN
COPY ~Worldmap/map_mods_areas.tbl~ ~Worldmap~
APPEND_FILE ~name_of_mod_folder/Worldmap/tutu_areas.tbl~
COPY ~Worldmap/map_mods_links.tbl~
~Worldmap~
APPEND_FILE ~name_of_mod_folder/Worldmap/tutu_links.tbl~
COPY ~Worldmap/map_mods_trans.tra~
~Worldmap~
APPEND_FILE_EVALUATE
~name_of_mod_folder/Worldmap/%LANGUAGE%/worldmap.tra~
END
ELSE BEGIN
MKDIR ~Worldmap~
COPY ~name_of_mod_folder/Worldmap/tutu_areas.tbl~
~Worldmap/map_mods_areas.tbl~
COPY ~name_of_mod_folder/Worldmap/tutu_links.tbl~
~Worldmap/map_mods_links.tbl~
COPY ~name_of_mod_folder/Worldmap/%LANGUAGE%/worldmap.tra~
~Worldmap/map_mods_trans.tra~
END
ELSE BEGIN
ACTION_IF FILE_EXISTS ~Worldmap/map_mods_areas.tbl~ THEN BEGIN
COPY ~Worldmap/map_mods_areas.tbl~
~Worldmap~
APPEND_FILE ~name_of_mod_folder/Worldmap/areas.tbl~
COPY ~Worldmap/map_mods_links.tbl~
~Worldmap~
APPEND_FILE ~name_of_mod_folder/Worldmap/links.tbl~
COPY ~Worldmap/map_mods_trans.tra~
~Worldmap~
APPEND_FILE_EVALUATE
~name_of_mod_folder/Worldmap/%LANGUAGE%/worldmap.tra~
END
ELSE BEGIN
MKDIR ~Worldmap~
COPY ~name_of_mod_folder/Worldmap/areas.tbl~
~Worldmap/map_mods_areas.tbl~
COPY ~name_of_mod_folder/Worldmap/links.tbl~
~Worldmap/map_mods_links.tbl~
COPY ~name_of_mod_folder/Worldmap/%LANGUAGE%/worldmap.tra~
~Worldmap/map_mods_trans.tra~
END
END
1.
Place ALL of the code above in your .tp2, however
only the portion in red will actually be used to
append your BGII-SoA\Worldmap files for Tutu
mods, and the portion in blue will be used to
append your BGII-SoA\Worldmap files for all other mods.
2.
For ALL mods you will need a Worldmap folder with
a Language (or multiple languages) sub-folder. (MyMod\Worldmap\%Language%).
3.
The format for the 3 respective files is as
follows:
a. areas.tbl is laid out this way (using
Region of Terror as an example)
//ROT
New Areas Table
SHORT_NAME CONTENT
LONG_NAME FLAGS BAM_ANIM
X_POS Y_POS
NAME TOOLTIP LOAD_IM
RR3100 RR3100 RR3100 0
19 2900
2300 @ROT_785001 N N //Arlax
(Separate
all in-line columns in the header row and the contents rows with spaces not tabs)
b. links.tbl
is laid out this way (using Region of Terror as an example)
//ROT Area Links
Table
SRC_AREA SRC_NWSE
TARGET_ARE ENTRY_NAME TRV_TIME
DEF_ENTRY ENC1 ENC2
ENC3 ENC4 ENC5
ENC_PROB
AR1100 N
RR3450 ExitSE 3
1 N N N N N 0
(Separate
all in-line columns in the header row and the contents rows with spaces not tabs)
c. worldmap.tra is laid out this way (using
Region of Terror as an example)
@ROT_785001
= "Arlax"
@ROT_785002
= "Monzuma's###Cave"
@ROT_785003
= "Westchar"
@ROT_785004
= "Olmar's###Castle"
@ROT_785005
= "Talavan's###Castle"
@ROT_785006
= "Maribur"
@ROT_785007
= "Mysterious###Cave"
@ROT_785008
= "
@ROT_785009
= "The###Arena"
@ROT_785010
= "Farms"
@ROT_785011
= "Gaidan's###Castle"
@ROT_785012
= "Cave"
@ROT_785013
= "Razor's###Hideout"
@ROT_785014
= "Slave###Route"
(All
text for area names begins with “and if multiple words are used in the name the
words are separated with (3) ###’s and then the area name ends with “)
4.
For a Tutu
mod the 3 files need to be named (1) tutu_areas.tbl,
(2) tutu_links.tbl, and (3) worldmap.tra.
The tutu_areas.tbl & tutu_links.tbl will both be placed in the MyMod\Worldmap
folder. The worldmap.tra file will be placed in
the MyMod\Worldmap\%Language% folder.
5.
For any other mod
the 3 files need to be named (1) areas.tbl, (2)
links.tbl, and (3) worldmap.tra.
The areas.tbl & links.tbl
will both be placed in the MyMod\Worldmap
folder. The worldmap.tra file will be placed in
the MyMod\Worldmap\%Language% folder.
6.
If you are creating a mod that may be
installed in either Tutu or a BGT/Mega-Mod environment you will need to create both
sets of files. The code above in your
tp2 will select the proper set of files to append the BGII-SoA\Worldmap files
with so the Worldmap v6.4 tp2 can process the map properly.
7.
If you want to change existing links
content create the links_patch.tbl file in MyMod\Worldmap folder and
use following format:
links_patch.tbl
is laid this way (using Check the Bodies
as an example)
//CtB Existing Links
Patching Table
//1st line contains original contents - to serach for
//next line contains new contents - to replace
with
SRC_AREA SRC_NWSE TARGET_ARE
ENTRY_NAME TRV_TIME DEF_ENTRY
ENC1 ENC2 ENC3
ENC4 ENC5 ENC_PROB
NN
AR0400 N AR0800 EXITS 0
1 AR0045 N
N
N
N
100 1
AR0400 N AR0800 EXITS 0
1 AR3526 N
N
N
N
100 1
AR0400 E AR0800 EXITS 0
4 AR0045 N
N
N
N
100 2
AR0400 E AR0800 EXITS 0
4 AR3526 N
N
N
N
100 2
AR0400
AR0400