Jump to content

How to add "search map" exit to existing area


Recommended Posts

Hi,

I would like to create my first small mod for BGT so I'm sorry for being such newbe. I want to add missing search map for traveling to the south from Nashkel Mines. Natively BGT AR4400 does not have south travel exit (cursor is blocked rather than travel wheel). Can I patch the original location programatically to add such travel point or need I to edit original location's files? 

I have already added worldmap links so I can travel between these two areas if they are visited before.

I found that there is WeiDU fj_are_structure macro to add travel region, however it looks like enabling direct travel to new location instead of opening the worldmap to choose the area. I don't know if this macro handles opening the worldmap at all.

Let me know if there are mods which extend Nashkel Mines with south area exit, I could check them before install and not adding the same exit twice.

 

Thanks for help,

Robert

Edited by Roberciiik
Link to comment

Just to expand on Jastey's comment: whether you get the 'blocked' icon or the travel-trigger icon is determined by the search map - AR4400SR.BMP in this case. (It's the same file that determines which areas are impassible, and which areas make which footstep sounds.) Edges of the map that you can travel off are colored in a pale blue - you'll see it if you open these files in near Infinity or in an editor.

Normally I am super-keen on compatibility, but in this case, editing the search map of an existing area is so rarely done that you could cautiously risk just editing AR4400SR.BMP and distributing the edited version. Export it from Near Infinity and use an editor. It's best to use as low-tech an editor as you can - MS Paint is good, iirc - because the Infinity Engine makes certain assumptions about how search maps are encoded that can get scrambled by sophisticated programs like Photoshop.

 

Link to comment
8 minutes ago, DavidW said:

editing the search map of an existing area is so rarely done

That is true in the most parts, but for the BG1 Docks there is /will be two mods that do that, hence Weigo's function. But yes, until another mod makes changes to AR4400SR.BMP you could probably just overwrite the existing one with a version that contains the new worldmap exit.

Link to comment

WeiDU provides a compare feature which can be used to autogenerate WeiDU code from the differences between two (binary) files. When you've made your local changes to the search map, simply compare it with the original search map:

weidu.exe --cmp-from original.bmp --cmp-to modified.bmp >diff.tpa

This call writes the code into the file diff.tpa which looks something like this:

COPY ~original.bmp~ ~modified.bmp~
// patches to turn [original.bmp] into [modified.bmp]
	WRITE_BYTE 0x1e5 85 // 0x55 == U
	WRITE_BYTE 0x1f9 85 // 0x55 == U
	WRITE_BYTE 0x1fa 85 // 0x55 == U
	WRITE_BYTE 0x20d 85 // 0x55 == U
	WRITE_BYTE 0x20e 85 // 0x55 == U
	WRITE_BYTE 0x221 85 // 0x55 == U
	WRITE_BYTE 0x222 85 // 0x55 == U
	WRITE_BYTE 0x235 85 // 0x55 == U
	WRITE_BYTE 0x236 85 // 0x55 == U

You probably want to change the COPY line to reference the correct search bitmap from the game, e.g. COPY_EXISTING ~AR1234SR.BMP~ ~override~ .

I'm using this method in one of my own mods to update area bitmaps in a non-destructive way.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...