
A New Map area
#21
Posted 12 July 2006 - 03:23 PM
http://teambg.clandlan.net/
Open your area with this. One of the menu options is "Worldmap" Click on "Add Area to Worldmap". This will open a new window that displays the map. You can then drag your new area (it will default to the icon of the Promenade) to the location you want it at. From there, edit the icon's info: Entrances, Links and hours to other nearby locations, etc.). Like at some of the other areas to get an idea on how this is done.
DLTCEP allows you to look at the BAM file which houses all of the map icons (MAPICONS.BAM). You will need BAMWorkshop or some other tool to edit the individual frames of the BAM. At this point, you are past my skill set. I still have to create some map icons myself.
Tired of Bhaal? Try some classics mods instead:
Classic Adventures
Official Classic Adventures Website
#22
Posted 12 July 2006 - 03:40 PM
Much appreciated,
Sticz
#23
-Guest-
Posted 14 July 2006 - 06:54 PM
I need something in WeiDu that I can pick appart and see how it fits together.
Sticz

#24
Posted 16 July 2006 - 11:24 AM
Sorry for the delay; I'm currently working stupid times i.e. around 90 hours a week and finding very little time to mod. This is the commented code I have but I'm not that sure it's going to be of much use to you. Part of the problem is that I don't fully understand the quadrant method of dividing the worldmap and so which default areas fall into which quadrant.
//--------------------------------------------------- //Worldmap //--------------------------------------------------- // Append mastarea.2da with the new area APPEND ~MASTAREA.2da~ ~YSAR01 value~ COPY_EXISTING ~worldmap.wmp~ ~override~ // Read offsets and stuff. READ_LONG 0x30 "area_num" READ_LONG 0x34 "area_off" READ_LONG 0x38 "link_off" READ_LONG 0x3c "link_num" READ_LONG 0xc "map_off" SET "entry" = ("%map_off%" + 0xb8) SET "outer_check" = 0 SET "inner_check" = 0 SET "num_ent" = 0 // New offsets WRITE_LONG 0x30 ("%area_num%" + 1) WRITE_LONG 0x38 ("%link_off%" + 0xf0) WRITE_LONG 0x3c ("%link_num%" + 4) // Add area to worldmap INSERT_BYTES ("%area_off%" + (0xf0 * "%area_num%")) 0xf0 WRITE_ASCII ("%area_off%" + (0xf0 * "%area_num%")) ~YSAR01~ // AR-name WRITE_ASCII ("%area_off%" + 0x08 + (0xf0 * "%area_num%")) ~YSAR01~ // AR-name WRITE_ASCII ("%area_off%" + 0x10 + (0xf0 * "%area_num%")) ~YSAR01~ // AR-name WRITE_LONG ("%area_off%" + 0x34 + (0xf0 * "%area_num%")) 13 // Map icon from mapicons.bam WRITE_LONG ("%area_off%" + 0x38 + (0xf0 * "%area_num%")) 560 // X coordinate on the worldmap WRITE_LONG ("%area_off%" + 0x3C + (0xf0 * "%area_num%")) 600 // Y coordinate on the worldmap SAY ("%area_off%" + 0x40 + (0xf0 * "%area_num%")) ~Porthpentyrch~ // Name of the new area SAY ("%area_off%" + 0x44 + (0xf0 * "%area_num%")) #-1 // Description (taken from the name above) // Now, we add four area links, all from the eastern map quadrant WRITE_SHORT ("%area_off%" + 0x50 + (0xf0 * "%area_num%")) ("%link_num%" + 4) // First N link WRITE_SHORT ("%area_off%" + 0x58 + (0xf0 * "%area_num%")) ("%link_num%" + 4) // First W link WRITE_SHORT ("%area_off%" + 0x60 + (0xf0 * "%area_num%")) ("%link_num%" + 4) // First S link WRITE_SHORT ("%area_off%" + 0x68 + (0xf0 * "%area_num%")) ("%link_num%") // First E link WRITE_SHORT ("%area_off%" + 0x6c + (0xf0 * "%area_num%")) 4 // Number of links from E // Add links from Umar Hills to the new area // We'll start by fixing the offsets WHILE ("%outer_check%" = 0) BEGIN READ_ASCII ("%entry%" + 0x8) "area" (2) READ_ASCII ("%entry%" + 0x8) "spec_area" (6) WHILE (("%spec_area%" STRING_COMPARE_CASE "AR1100" = 0) AND ("%inner_check%" = 0)) BEGIN READ_SHORT ("%entry%" + 0x50) "nlink" READ_SHORT ("%entry%" + 0x50 + 0x4) "#nlink" WRITE_SHORT ("%entry%" + 0x50 + 0x4) ("%#nlink%" + 1) READ_SHORT ("%entry%" + 0x50 + 0x8) "wlink" WRITE_SHORT ("%entry%" + 0x50 + 0x8) ("%wlink%" + 3) READ_SHORT ("%entry%" + 0x50 + 0x8) "wlink" READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x4) "#wlink" WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x4) ("%#wlink%" + 1) READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8) "slink" WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x8) ("%slink%" + 2) READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8) "slink" READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x4) "#slink" WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x4) ("%#slink%" + 1) READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8) "elink" WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8) ("%elink%" + 1) READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8) "elink" READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8 + 0x4) "#elink" WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8 + 0x4) ("%#elink%" + 1) SET "inner_check" = 1 END //Search for default and G3 (Gibberlings 3) area names PATCH_IF (("%area%" STRING_COMPARE_CASE "AR" = 0) OR ("%area%" STRING_COMPARE_CASE "G3" = 0)) BEGIN SET "num_ent" = ("%num_ent%" + 1) END ELSE PATCH_IF (("%area%" STRING_COMPARE_CASE "AR" != 0) AND ("%area%" STRING_COMPARE_CASE "G3" != 0)) BEGIN SET "outer_check" = 1 END SET "entry" = ("%entry%" + 0xf0) END // Re-read offsets READ_LONG 0x30 "area_num" READ_LONG 0x38 "link_off" // Add link 1 to YSAR01 INSERT_BYTES ("%link_off%" - 0x01 + (0xd8 * "%nlink%")) 0xd8 WRITE_LONG ("%link_off%" + (0xd8 * "%nlink%")) ("%area_num%" - 1) // Add the last entry WRITE_ASCII ("%link_off%" + 0x04 + (0xd8 * "%nlink%")) ~Exitne~ // Entrance WRITE_LONG ("%link_off%" + 0x28 + (0xd8 * "%nlink%")) 4 // Unknown // If you want to add random encounters, travelling time, do so here // Add link 2 to YSAR01 INSERT_BYTES ("%link_off%" - 0x01 + (0xd8 * "%wlink%")) 0xd8 WRITE_LONG ("%link_off%" + (0xd8 * "%wlink%")) ("%area_num%" - 1) // Add the last entry WRITE_ASCII ("%link_off%" + 0x04 + (0xd8 * "%wlink%")) ~Exitne~ // Entrance WRITE_LONG ("%link_off%" + 0x28 + (0xd8 * "%wlink%")) 4 // Unknown // If you want to add random encounters, travelling time, do so here // Add link 3 to YSAR01 INSERT_BYTES ("%link_off%" - 0x01 + (0xd8 * "%slink%")) 0xd8 WRITE_LONG ("%link_off%" + (0xd8 * "%slink%")) ("%area_num%" - 1) // Add the last entry WRITE_ASCII ("%link_off%" + 0x04 + (0xd8 * "%slink%")) ~Exite~ // Entrance WRITE_LONG ("%link_off%" + 0x28 + (0xd8 * "%slink%")) 4 // Unknown // If you want to add random encounters, travelling time, do so here // Add link 4 to YSAR01 INSERT_BYTES ("%link_off%" - 0x01 + (0xd8 * "%elink%")) 0xd8 WRITE_LONG ("%link_off%" + (0xd8 * "%elink%")) ("%area_num%" - 1) // Add the last entry WRITE_ASCII ("%link_off%" + 0x04 + (0xd8 * "%elink%")) ~Exitne~ // Entrance WRITE_LONG ("%link_off%" + 0x28 + (0xd8 * "%elink%")) 4 // Unknown // If you want to add random encounters, travelling time, do so here // Check which link is largest PATCH_IF (("%nlink%" > "%wlink%") AND ("%nlink%" > "%slink%") AND ("%nlink%" > "%elink%")) BEGIN SET "link" = "%nlink%" END PATCH_IF (("%wlink%" > "%nlink%") AND ("%wlink%" > "%slink%") AND ("%wlink%" > "%elink%")) BEGIN SET "link" = "%wlink%" END PATCH_IF (("%slink%" > "%wlink%") AND ("%slink%" > "%nlink%") AND ("%slink%" > "%elink%")) BEGIN SET "link" = "%slink%" END PATCH_IF (("%elink%" > "%wlink%") AND ("%elink%" > "%slink%") AND ("%elink%" > "%nlink%")) BEGIN SET "link" = "%elink%" END // Correct ALL other links after elink // New variables SET "entry" = ("%map_off%" + 0xb8) SET "outer_c" = 0 // Let's WHILE a bit and search for area-links WHILE ("%outer_c%" = 0) BEGIN READ_ASCII ("%entry%" + 0x8) "area" (2) PATCH_IF (("%area%" STRING_COMPARE_CASE "AR" = 0) OR ("%area%" STRING_COMPARE_CASE "G3" = 0)) BEGIN READ_SHORT ("%entry%" + 0x50) "nlink" READ_SHORT ("%entry%" + 0x50 + 0x8) "wlink" READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8) "slink" READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8) "elink" // And if they are larger, let's patch 'em PATCH_IF ("%nlink%" > "%link%") BEGIN WRITE_SHORT ("%entry%" + 0x50) ("%nlink%" + 4) END PATCH_IF ("%wlink%" > "%link%") BEGIN WRITE_SHORT ("%entry%" + 0x50 + 0x8) ("%wlink%" + 4) END PATCH_IF ("%slink%" > "%link%") BEGIN WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x8) ("%slink%" + 4) END PATCH_IF ("%elink%" > "%link%") BEGIN WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8) ("%elink%" + 4) END END ELSE PATCH_IF (("%area%" STRING_COMPARE_CASE "AR" != 0) AND ("%area%" STRING_COMPARE_CASE "G3" != 0)) BEGIN SET "outer_c" = 1 END SET "entry" = ("%entry%" + 0xf0) END // Now, we add four area links, all from the east map quadrant WRITE_SHORT ("%area_off%" + 0x50 + (0xf0 * "%area_num%")) ("%link_num%" + 4) // First N link WRITE_SHORT ("%area_off%" + 0x58 + (0xf0 * "%area_num%")) ("%link_num%" + 4) // First W link WRITE_SHORT ("%area_off%" + 0x60 + (0xf0 * "%area_num%")) ("%link_num%" + 4) // First S link WRITE_SHORT ("%area_off%" + 0x68 + (0xf0 * "%area_num%")) ("%link_num%") // First E link WRITE_SHORT ("%area_off%" + 0x6c + (0xf0 * "%area_num%")) 4 // Number of links from E // Add links from Umar Hills to the new area // We'll start by fixing the offsets WHILE ("%outer_check%" = 0) BEGIN READ_ASCII ("%entry%" + 0x8) "area" (2) READ_ASCII ("%entry%" + 0x8) "spec_area" (6) WHILE (("%spec_area%" STRING_COMPARE_CASE "AR2000" = 0) AND ("%inner_check%" = 0)) BEGIN READ_SHORT ("%entry%" + 0x50) "nlink" READ_SHORT ("%entry%" + 0x50 + 0x4) "#nlink" WRITE_SHORT ("%entry%" + 0x50 + 0x4) ("%#nlink%" + 1) READ_SHORT ("%entry%" + 0x50 + 0x8) "wlink" WRITE_SHORT ("%entry%" + 0x50 + 0x8) ("%wlink%" + 3) READ_SHORT ("%entry%" + 0x50 + 0x8) "wlink" READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x4) "#wlink" WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x4) ("%#wlink%" + 1) READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8) "slink" WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x8) ("%slink%" + 2) READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8) "slink" READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x4) "#slink" WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x4) ("%#slink%" + 1) READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8) "elink" WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8) ("%elink%" + 1) READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8) "elink" READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8 + 0x4) "#elink" WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8 + 0x4) ("%#elink%" + 1) SET "inner_check" = 1 END PATCH_IF (("%area%" STRING_COMPARE_CASE "AR" = 0) OR ("%area%" STRING_COMPARE_CASE "G3" = 0)) BEGIN SET "num_ent" = ("%num_ent%" + 1) END ELSE PATCH_IF (("%area%" STRING_COMPARE_CASE "AR" != 0) AND ("%area%" STRING_COMPARE_CASE "G3" != 0)) BEGIN SET "outer_check" = 1 END SET "entry" = ("%entry%" + 0xf0) END // Re-read offsets READ_LONG 0x30 "area_num" READ_LONG 0x38 "link_off" // Add link to YSAR01 INSERT_BYTES ("%link_off%" - 0x01 + (0xd8 * "%nlink%")) 0xd8 WRITE_LONG ("%link_off%" + (0xd8 * "%nlink%")) ("%area_num%" - 1) // Add the last entry WRITE_ASCII ("%link_off%" + 0x04 + (0xd8 * "%nlink%")) ~Exitne~ // Entrance WRITE_LONG ("%link_off%" + 0x28 + (0xd8 * "%nlink%")) 4 // Unknown // If you want to add random encounters, travelling time, do so here // Add link to YSAR01 INSERT_BYTES ("%link_off%" - 0x01 + (0xd8 * "%wlink%")) 0xd8 WRITE_LONG ("%link_off%" + (0xd8 * "%wlink%")) ("%area_num%" - 1) // Add the last entry WRITE_ASCII ("%link_off%" + 0x04 + (0xd8 * "%wlink%")) ~Exitne~ // Entrance WRITE_LONG ("%link_off%" + 0x28 + (0xd8 * "%wlink%")) 4 // Unknown // If you want to add random encounters, travelling time, do so here // Add link to YSAR01 INSERT_BYTES ("%link_off%" - 0x01 + (0xd8 * "%slink%")) 0xd8 WRITE_LONG ("%link_off%" + (0xd8 * "%slink%")) ("%area_num%" - 1) // Add the last entry WRITE_ASCII ("%link_off%" + 0x04 + (0xd8 * "%slink%")) ~Exite~ // Entrance WRITE_LONG ("%link_off%" + 0x28 + (0xd8 * "%slink%")) 4 // Unknown // If you want to add random encounters, travelling time, do so here // Add link to YSAR01 INSERT_BYTES ("%link_off%" - 0x01 + (0xd8 * "%elink%")) 0xd8 WRITE_LONG ("%link_off%" + (0xd8 * "%elink%")) ("%area_num%" - 1) // Add the last entry WRITE_ASCII ("%link_off%" + 0x04 + (0xd8 * "%elink%")) ~Exitne~ // Entrance WRITE_LONG ("%link_off%" + 0x28 + (0xd8 * "%elink%")) 4 // Unknown // If you want to add random encounters, travelling time, do so here // Check which link is largest PATCH_IF (("%nlink%" > "%wlink%") AND ("%nlink%" > "%slink%") AND ("%nlink%" > "%elink%")) BEGIN SET "link" = "%nlink%" END PATCH_IF (("%wlink%" > "%nlink%") AND ("%wlink%" > "%slink%") AND ("%wlink%" > "%elink%")) BEGIN SET "link" = "%wlink%" END PATCH_IF (("%slink%" > "%wlink%") AND ("%slink%" > "%nlink%") AND ("%slink%" > "%elink%")) BEGIN SET "link" = "%slink%" END PATCH_IF (("%elink%" > "%wlink%") AND ("%elink%" > "%slink%") AND ("%elink%" > "%nlink%")) BEGIN SET "link" = "%elink%" END // Correct ALL other links after elink // New variables SET "entry" = ("%map_off%" + 0xb8) SET "outer_c" = 0 // Let's WHILE a bit and search for area-links WHILE ("%outer_c%" = 0) BEGIN READ_ASCII ("%entry%" + 0x8) "area" (2) PATCH_IF (("%area%" STRING_COMPARE_CASE "AR" = 0) OR ("%area%" STRING_COMPARE_CASE "G3" = 0)) BEGIN READ_SHORT ("%entry%" + 0x50) "nlink" READ_SHORT ("%entry%" + 0x50 + 0x8) "wlink" READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8) "slink" READ_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8) "elink" // And if they are larger, let's patch 'em PATCH_IF ("%nlink%" > "%link%") BEGIN WRITE_SHORT ("%entry%" + 0x50) ("%nlink%" + 4) END PATCH_IF ("%wlink%" > "%link%") BEGIN WRITE_SHORT ("%entry%" + 0x50 + 0x8) ("%wlink%" + 4) END PATCH_IF ("%slink%" > "%link%") BEGIN WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x8) ("%slink%" + 4) END PATCH_IF ("%elink%" > "%link%") BEGIN WRITE_SHORT ("%entry%" + 0x50 + 0x8 + 0x8 + 0x8) ("%elink%" + 4) END END ELSE PATCH_IF (("%area%" STRING_COMPARE_CASE "AR" != 0) AND ("%area%" STRING_COMPARE_CASE "G3" != 0)) BEGIN SET "outer_c" = 1 END SET "entry" = ("%entry%" + 0xf0) END // Add four new links from the new area // Re-read offsets READ_LONG 0x38 "link_off" READ_LONG 0x3c "link_num" // New offset WRITE_LONG 0x3c ("%link_num%" + 4) // Add link to City Gates INSERT_BYTES ("%link_off%" - 0x01 + (0xd8 * "%link_num%")) 0xd8 WRITE_LONG ("%link_off%" + (0xd8 * "%link_num%")) 11 // City Gates WRITE_ASCII ("%link_off%" + 0x04 + (0xd8 * "%link_num%")) ~ExitNE~ // Entrance WRITE_LONG ("%link_off%" + 0x28 + (0xd8 * "%link_num%")) 4 // Unknown // If you want to add random encounters, travelling time, do so here // Add link to Umar Hills INSERT_BYTES ("%link_off%" - 0x01 + (0xd8 * "%link_num%")) 0xd8 WRITE_LONG ("%link_off%" + (0xd8 * "%link_num%")) 7 // Umar Hills WRITE_ASCII ("%link_off%" + 0x04 + (0xd8 * "%link_num%")) ~ExitNW~ // Entrance WRITE_LONG ("%link_off%" + 0x28 + (0xd8 * "%link_num%")) 4 // Unknown // If you want to add random encounters, travelling time, do so here // Add link to Trademeet INSERT_BYTES ("%link_off%" - 0x01 + (0xd8 * "%link_num%")) 0xd8 WRITE_LONG ("%link_off%" + (0xd8 * "%link_num%")) 14 // Trademeet WRITE_ASCII ("%link_off%" + 0x04 + (0xd8 * "%link_num%")) ~ExitNW~ // Entrance WRITE_LONG ("%link_off%" + 0x28 + (0xd8 * "%link_num%")) 4 // Unknown // If you want to add random encounters, travelling time, do so here // Add link to de'Arnise Hold INSERT_BYTES ("%link_off%" - 0x01 + (0xd8 * "%link_num%")) 0xd8 WRITE_LONG ("%link_off%" + (0xd8 * "%link_num%")) 9 // de'Arnise WRITE_ASCII ("%link_off%" + 0x04 + (0xd8 * "%link_num%")) ~ExitSE~ // Entrance WRITE_LONG ("%link_off%" + 0x28 + (0xd8 * "%link_num%")) 4 // Unknown // If you want to add random encounters, travelling time, do so here BUT_ONLY_IF_IT_CHANGES
-Y-
'Go for the optics, Chiktikka. GO FOR THE OPTICS!!' - Tali vas Neema
DLTCEP Tutorials Update Page
DLTCEP Tutorials Main Page
Yovaneth's AI Scripts for BG1, BG2-SoA and IWD1
Fishing for Trouble - a quest mod for Shadows of Amn
#25
Posted 16 July 2006 - 05:44 PM
Tired of Bhaal? Try some classics mods instead:
Classic Adventures
Official Classic Adventures Website
#26
Posted 16 July 2006 - 07:52 PM
With the posts on this, I hope to copy a few examples and cross reference for an idea as to what I am doing...
We will see!

Sticz