Jump to content

Seeking modder advice: how to transform "background furniture" into storage containers?


Lochlann

Recommended Posts

Hi all, I've got what I hope won't be a terribly complex question. I am something of a packrat, and I'm fastidious as all hell when it comes to indexing and organizing and whatnot, and although I love the plethora of storage containers featured in the existing strongholds, I always wind up being...dissatisfied...with the variety and location of said containers. Like, "man, it'd be nice if that bookcase in the master bedroom could hold things...", or "if only there were two extra weapon display cases in the de'Arnise Keep armory...", etc. My question is, how large would the learning curve be, for someone who has never done any BG modding at all (except for item tweaking and creation), on taking a pre-existing map and changing static background items into functional containers?

 

I realize the question may sound terribly naive. If so, well, it's an accurate reflection of my modding background. :p I am familiar with the concept of modding, having done some of it with the Elder Scrolls games, and I am generally literate--if not facile--with programming. Note that I'm not actually looking for a tutorial right here and now; if someone could just point me to a simple how-to or whatever that might outline this, I'd be grateful. Or if it is actually quite a bit messier than I'm imagining, it'd be nice to know that up front, heh. (What I'm imagining is that a new container file would need to be created, and that the area image file would need to be edited so that the appropriate pixels now link to the new container.)

 

Despite the allure of the de'Arnise Keep, I'm beginning to feel in my current playthrough that the "Guarded Compound" building in the Temple District (AR0907) is the perfect candidate for a personalized, fine-tuned, home-away-from-home for my character. (Which in turn is a home-away-from-home-away-from-home for me, as I'm in the Peace Corps at the moment, using BG2 as a bit of back-home nostalgia.) He'd like to renovate, invite his good NPC buddies over to chill when they're not adventuring, and turn it into a private headquarters for his little posse, heh. The compound just has that certain...je ne sais quoi missing from the otherwise ideal Keep. :down:

 

Anyway, I've droned on long enough. Many thanks for any advice or links to appropriate tutorials! I'll be offline for a few days, but I'll be checking back soon.

Link to comment

Adding containers to an existing area is what is called WeiDU ninjaing. If you have knowledge of computer programming it helps. I don't find a(n English) tutorial right now but the code is here: http://www.rosenranken.org/index.php?topic=6290.0 (I posted this - don't think I totally understood it, though, the code is from somewhere else, I think from Creepin but I don't find a tutorial. I only see one for adding triggers, which is quite similar in principle: Adding a trigger to an existing map via WeiDU.)

 

Drawback is that it's only working fo areas the player hasn't visited yet in the game.

Link to comment

This is easy enough thanks to a macro by Nythrun but you need a basic knowledge of WeiDU and DLTCEP. The former to package a mod .tp2 file that does this and the latter only to pick out your container vertices precisely.

 

Example syntax would be:

INCLUDE ~mymod/lib/fj_add_are_struct.tpa~ //Includes the area function code

COPY_EXISTING ar0907.are override //Guarded compound
 LPF fj_add_are_structure //Short for LAUNCH_PATCH_FUNCTION
INT_VAR
fj_type = 2 //chest (or any other type - see below)
fj_loc_x = ?? //enter the X coordinate here
fj_loc_y = ?? //enter the Y coordinate here
fj_box_left = ?? //upper left X coordinate
fj_box_top = ?? //upper left Y coordinate
fj_box_right = ?? //lower right X coordinate
fj_box_bottom = ?? //lower right Y coordinate
//Fill in ?x and ?y below with the coordinates of each vertex in the container polygon (draw it in DLTCEP for easier reference). Use as many vertices as you want/need.
fj_vertex_0 = ?x + (?y << 16)
fj_vertex_1 = ?x + (?y << 16)
fj_vertex_2 = ?x + (?y << 16)
fj_vertex_3 = ?x + (?y << 16)
STR_VAR
fj_structure_type = container
fj_name = ~Container 1~
 END
BUT_ONLY

Looks more complex than it is if you haven't done much WeiDU modding :p. There are working examples of this in the Aurora mod (around line 3120 of its .tp2 file).

 

See here for how to pick out coordinates in DLTCEP (only use the Containers tab instead of Actors).

 

See the IESDP for container types.

 

See this for general WeiDU and mod syntax.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...