We have a Steam curator now. You should be following it. https://store.steampowered.com/curator/44994899-RPGHQ/

[BG3] Changing Camp Layouts (Tutorial)

Game development hub. Projects, modding, and resources.
Post Reply
User avatar
TKVNC
Posts: 348
Joined: Feb 25, '24

[BG3] Changing Camp Layouts (Tutorial)

Post by TKVNC »

Something people might be interested in.

While I messing around with mod files, I decided to try and figure out how to retexture Shadowheart's tent, since I didn't like the Purple, and I wanted to make it more obvious she was not a
► Show Spoiler
.

So, since I have approximately 5 IQ and can't figure out basic process such as creating a new material to swap textures, I gave up (well not really, but sort of), and decided to just see if I could swap the tent with something else, and I stumbled upon the answer - yes, yes I can. And now, if you care, because you're a cringelord like me, you can too!

Camp Layouts are defined per-character, not per-zone, so you only need to edit the files for every single camp, which makes it generally a lot easier - placement is relative to their 'zone' in the camp, not to the camp itself.

You need to edit as many files as necessary for each companion - for Shadowheart you edit the _merged.lsf files from:

Mods\GustavDev\Levels\CMP_Shadowheart\Scenery
Mods\GustavDev\Levels\CMP_Shadowheart\Items
Mods\GustavDev\Levels\CMP_Bed_Shadowheart_A\Items

The same is more or less true for other companions, but they have different file structures sometimes, and not all their camp equipment is in the same lsf.

Strictly speaking the following is true for ALL these files - Scenery is ONLY non-interactable objects like tents, tables, carpets, and pillows. Whereas Items is for interactable objects or items such as beds, chairs, incense, rags, and other things you could pick up.

From my experimentation - you cannot put Items entries into the Scenery _merged.lsf or the game will just crash.

With that in mind - how do you replace and edit things? Let's take a look at a section from Shadowheart's Scenery .lsf:

<node id="GameObjects">
<attribute id="Flag" type="int32" value="1" />
<attribute id="LevelName" type="FixedString" value="CMP_Shadowheart" />
<attribute id="MapKey" type="FixedString" value="2084f29e-d47d-4ae1-848f-33920bdaa17b" />
<attribute id="Name" type="LSString" value="CONT_GEN_Vase_Ceramic_Big_C_001" />
<attribute id="TemplateName" type="FixedString" value="e5f9af4e-ffc8-4161-8b31-062ae78e3e30" />
<attribute id="Type" type="FixedString" value="scenery" />
<attribute id="_OriginalFileVersion_" type="int64" value="144115207403209017" />
<children>
<node id="LayerList">
<children>
<node id="Layers">
<children>
<node id="Object">
<attribute id="MapKey" type="FixedString" value="CMP_Shadowheart" />
<children>
<node id="Layer">
<attribute id="Object" type="guid" value="21c2a1f0-1191-229f-63e7-fe50ad74c7fd" />
</node>
</children>
</node>
</children>
</node>
</children>
</node>
<node id="Transform">
<attribute id="Position" type="fvec3" value="1.486659 0.021814348 -1.4890692" />
<attribute id="RotationQuat" type="fvec4" value="0 3.5527137E-15 0 1" />
<attribute id="Scale" type="float" value="0.8" />
</node>
</children>
</node>

The parts in Yellow are the ones that you change, the MapKey seems to be a UUID specific for that item, per camp and should not be duplicated per each entry, so if you want to have 20 Vases, you need 20 different numbers. Is that entirely true? I don't know, I haven't tested it exhaustively, but having duplicates tents to make everything but the last entry invisible. The sections that say 'CMP_Shadowheart' don't seem to do anything specific, but I always change added items to match the file they're now in, so if I was editing Astarion, I'd add 'CMP_Astarion' - or whatever the file entry uses, some are different.

For placement, it should be fairly straightforward - Position is on an X Y Z axis (that is North / South | Up / Down | East / West).

Rotation is based on Quaternions, so unless you're obsessed with Maths, I recommend you just use something like a Quaternion Generator or Visualiser. I'd link but I don't know if I'm allowed, so I won't.

Scale is self-explanatory.

The entry above is a section where I changed her original Black and Gold Shar Vases into Terracotta Earthernware instead.

Now you may be wondering, how did I find the information to change the Vases? Am I a savant? No.

To find information you can replace or add items with you use the Multitool Index Search to look for other Scenery or Items entries, and just steal things. To add new entries, you'd copy the ENTIRE Segment (as above) to replace objects, you changes the parts in Yellow.

As a result... Unless you have a good index of the items, it's a lot of trial and error, but you can sort-of figure it out based on visited areas in game, then looking for their _merged.lsf file, and using some logic.

Here's one though:
FUR_GEN_Bedroom_Bed_Wood_Single_D_000 (this is a single bed with a matress and pillow, with a white or off-white blanket over the top of it all. Very nice. It's from Items (not Scenery) and it appears in several different _merged.lsf files, so you can take it's string from any of them.

I will say, however, as I have yet to crack the .PAK Davincii Code, these edits are done with loose files - I would assume (probably wrongly) that you could pack this up into a .PAK and it would work much the same way, but I haven't yet tried it. I will do so soon, and feed back with results. For now, however, any edits you do make should be added loose to the games folders in this fashion:

Steam/Steamapps/Common/Baldurs Gate 3/Data/Mods/GustavDev/Levels/CMP_Shadowheart (or whichever one you are editing)/Scenery (or Items)

Here's an image of the edits (I did quite a few). I will say however, I'd probably change it differently if I knew how to change textures, I mean, I want to make the tent white or off-white anyway, but for now, the red is slightly less in your face than the purple. But maybe I'll change it. Really, I think it was a proof of concept, more than anything.

Image
User avatar
TKVNC
Posts: 348
Joined: Feb 25, '24

Post by TKVNC »

Oh, I don't know if I made it clear in the original post:

All edits you make to these files apply to every single camp. Cliffside, Basement, Cave, Town, Swamp etc. etc.

So no matter which camp you visit, if you've edited the files, it will have changed.
User avatar
Envergence
Posts: 117
Joined: Dec 8, '23

Post by Envergence »

This is good information, and I can't wait to see it expanded upon.

I'd love for them to eventually be edited with all the improbable decorations removed. Furniture? Potted plants? Practice dummies? A whole-ass grindstone? Everyone should just have a tent, bedroll, pack, mess kit, and some small, miscellaneous adventuring items (i.e. whetstone, herbalism kit, journaling set, deck of cards, etc.). I could suspend disbelief that Gale has a bag of holding with all of his favorite decorations within, but not really anyone else. What was the thought process behind the decorations, and why did absolutely no one at Larian think, "Wait, how and why would they be lugging all these objects around with them? Where did they get these things before/after getting abducted?" Then again, there's a lot they didn't stop to think about. Immersion has always been one of Larian's many weak points.

Even just making the models invisible might be a decent way to make the camp setup more immersive without creating errors inherent in removing objects altogether (I assume; I am just a novice).
User avatar
TKVNC
Posts: 348
Joined: Feb 25, '24

Post by TKVNC »

Envergence wrote: March 15th, 2024, 22:22
This is good information, and I can't wait to see it expanded upon.

I'd love for them to eventually be edited with all the improbable decorations removed. Furniture? Potted plants? Practice dummies? A whole-ass grindstone? Everyone should just have a tent, bedroll, pack, mess kit, and some small, miscellaneous adventuring items (i.e. whetstone, herbalism kit, journaling set, deck of cards, etc.). I could suspend disbelief that Gale has a bag of holding with all of his favorite decorations within, but not really anyone else. What was the thought process behind the decorations, and why did absolutely no one at Larian think, "Wait, how and why would they be lugging all these objects around with them? Where did they get these things before/after getting abducted?" Then again, there's a lot they didn't stop to think about. Immersion has always been one of Larian's many weak points.

Even just making the models invisible might be a decent way to make the camp setup more immersive without creating errors inherent in removing objects altogether (I assume; I am just a novice).
You can simply delete all the entries you don't want. I guess I wasn't clear enough on that point.

Here's a picture where I deleted the tent while I was testing.

Image
User avatar
Envergence
Posts: 117
Joined: Dec 8, '23

Post by Envergence »

Oh, I see. It's good we can do that! My only concern was potential issues arising from deleting the entries, but if you haven't noticed any, then I suppose it can be used the way I'd hoped. :smile:
User avatar
TKVNC
Posts: 348
Joined: Feb 25, '24

Post by TKVNC »

Envergence wrote: March 15th, 2024, 22:59
Oh, I see. It's good we can do that! My only concern was potential issues arising from deleting the entries, but if you haven't noticed any, then I suppose it can be used the way I'd hoped. :smile:
I can't say I have tested it exhaustively, but I've not seen any issues so far by editing the camp/files this way, they might appear later, I'll let you know if anything pops up - but I would probably just conclude that it comes with the territory.

Even games with comprehensive modding tools have errors or bugs, and Baldur's Gate 3 has nothing comprehensive, or official - yet. Let's hope Larian has some magic up their sleeves, anything that makes modding easier is good news to me.
User avatar
Oldtimer
Posts: 65
Joined: Jan 15, '24

Post by Oldtimer »

This is great information, and I totally agree with @Envergence here regarding all the clutter in camps (which incidentally is like problem #463 I have with BG3). That said, if someone could make a compilation mod where the camps are scaled down to basically a tent and a bedroll, it would be great - me, I'm unfortunately too busy with life.
Post Reply