WeiDU Help With: How to alter items from an existing container and add an item to a creature?
WithinAmnesia
Member Posts: 961
Hello I am trying to change the container items within the chest in AR5405.ARE to be as this:
What command does one write in the .tp2 file to instigate this change to Container1 in AR5405.ARE (Mulahey's Lair)?
Also how does one add "OLRING06" to Mulahey ("MULAHE.CRE") without breaking him for other mods?
COPY_EXISTING ~MULAHE.CRE~ ~override~
ADD_CRE_ITEM ~OLRING06~ #0 #0 #0 ~NONE~ ~RRING~ ?
Source: https://www.weidu.org/~thebigg/README-WeiDU.html#sec34
This is for an Original Baldur's Gate Module 'Xan's New Groove':
I am none too good with operating WeiDU :-P. Any help would be great to get this to launch soon. @Arunsun
What command does one write in the .tp2 file to instigate this change to Container1 in AR5405.ARE (Mulahey's Lair)?
Also how does one add "OLRING06" to Mulahey ("MULAHE.CRE") without breaking him for other mods?
COPY_EXISTING ~MULAHE.CRE~ ~override~
ADD_CRE_ITEM ~OLRING06~ #0 #0 #0 ~NONE~ ~RRING~ ?
Source: https://www.weidu.org/~thebigg/README-WeiDU.html#sec34
This is for an Original Baldur's Gate Module 'Xan's New Groove':
I am none too good with operating WeiDU :-P. Any help would be great to get this to launch soon. @Arunsun
0
Comments
To alter containers content, it is better to use homemade functions.
From Unfinished Business
I am at a loss as to what this means and how '%WSewers%.ARE' even works, I thought Area files had to be Something like '5405.ARE' to work. In the meantime I will try and get Mulahey that ring of Accurate Striking +1 for that task seems more straight forward.
Also I forgot to mention earlier that all of Xan's items have proper item descriptions (if a bit lengthy; how Within Amnesia makes an item:-P): Moonblade +3, Buckler +2 'Buckler of Unexpected Might', Elven Chain Mail +1 'Mail of the Evereskan Tomb Guardian', Band of Protection +1 ' Band of the Missing Page'.
Also I threw in some extra general items that I have already completed just for extra quality of value: Ring of Accurate Striking +1, Potion of Additional Healing and Potion of Remarkable Healing at the last second.
For example, in BG1, the variable declaration for the West Sewers area is:
OUTER_SPRINT "WSewers" "AR0224"
While for Tutu, it is:
OUTER_SPRINT "WSewers" "FW0224"
And for BGT:
OUTER_SPRINT "WSewers" "AR7324"
The rest of it is some advanced WeiDU hacking, but not too difficult to understand once you understand the .ARE file structure. Basically, it is looping over the containers in the ARE file, looking for "Container 1" (it is also checking the container location since another mod, Fields of the Dead, is known to alter the container name). When finds Container 1, it replaces the item MISC80 with MISC79.
@CamDawg's method is definitely simpler, but you will still need to use variables for the script filenames if you want compatibility across BG1, Tutu, BGT, BGEE, and EET.
If there are many same items populated in several containers, it is a little bit complicated and must be written by hand (that's what I called a "homemade function").
@CamDawg Okay if I put the following in the .tp2 file for Xan's New Groove the extra content for the chest in Mulahey's Lair should work?
Plan A: Okay so to make the default chest in AR5405.ARE become this (plus an extra new healing potion and some random treasure preserved from Classic Baldur's Gate) for what items it contains:
I would have to remove all of the default items found in the base game and then add of the above items in descending order like this?
Plan B: Push for the highest success rate and simplify the moving parts and just remove the basic Moonblade +3 (SW1H13) and add the remastered Moonblade +3 (OLSW1H13) and all of the extra items for Xan?
Will these work? (P.S. It wants something more before [parse error at the start] so I am not exactly sure what the complete text will look like that works in the .tp2 file. I am not sure what to look for what makes a success verses a failure in this line of work; I am just roughly stumbling in the dark searching for a way forward).
I am without experience in doing this operation so I am putting my thoughts in the open to be filtered, processed and reiterated and hopefully rebuilt into something that works.
If I can get an example of what should be in the .tp2 file to be as useful to as many people as possible for this project I will gladly use it; again I am a bit in the dark and looking for brilliance.
P.S. How does "MYAREA" work? As in what is required to implement the system for a successful install of the module for as many different set ups as possible? It is not that I disagree on what path to choose, I simply do not currently have a path and I am looking for a lead to solve this puzzle.
Using MYAREA in a script will get converted to the proper area variable by the engine, in this specific case, to AR5405. It's a good shorthand for scripts like this that may end up in multiple, differently-named areas (which is every area for mods that cover any combo of BGT-Tutu-BGEE; BG doesn't support MYAREA).
I think otherwise the script you posted should work. Same it as a baf file, and then use
EXTEND_BOTTOM ~ar5405.bcs~ ~mymod/myfile.baf~
in the tp2. With the caveat that you'll eventually want to use the libraries that @AstroBryGuy has mentioned, in which case you'll end up replacing the 'ar5405' with the right variable for the area.
* Technically, TriggerOverride lets you futz around this limitation but the broader point stands.
1.) Save the following as a .baf file named OL5405.baf (OL being my registered moniker / prefix):
Step 2.) In the XansNewGroove file add the OL5405.baf file and in .tp2 file write the following line:
EXTEND_BOTTOM ~AR5405.bcs~ ~XansNewGroove/OL5405.baf~
Step 3.) ???
Profit?
P.S. I hope that people will enjoy this module and I wish to be cooperative and helpful (as I can) with the community if there is a desire to find a way to make this as compatible as possible.
*One hour later* I did some tests and iterations and I got the first feature complete version to work, a bit weird how there is a WeiDU translation option 'artifact' left over from my other larger scale module Baldur's Gate Arms and Armour Emporium but it works on with Baldur's Gate: Siege of Dragonspear! Here it is on an early release! please do tell if you find a bud / error?:-)
The idea is that this WeiDU package will destroy item SW1H12.ITM from container 5 in AR2618.ARE (Hull's Chest Candlekeep Barracks) and create item OLSW1H12.ITM (Hulls' Long Sword [but masterwork]) and also create item Goodberry x3 in container 5 of AR2618.ARE.
I am spent after trying all that I know and coming up short with a destroyed SW1H12 (Hull's Long Sword) yet no OLSW1H12.ITM (Hulls' Long Sword [but masterwork]) and also create item Goodberry x3 in container 5 of AR2618.ARE. Can anyone help fix this mystery?
The whole reason I am doing this is to give Abdel (default CHARNAME) an interesting start to go with his +2 weapon proficiency with the Long Sword and to scratch this niggling desire to do something with Hull's Long Sword to make it more special. Two bird's with one stone. Roxanne helped myself with getting Hull to accept OLSW1H12 instead of the original SW1H12 although I was stuck here but you solved the problem :-D!
I am still wondering how to add a player dialog option after SetGlobal("HelpHull","GLOBAL",1) in Hull.DLG [after quest hand in] that requires the speaker with 10 intellect and 14 charisma to purchase Hull's Long Sword (OLSW1H12) for 315 Gold (the base value price) for their upcoming journey with Gorion. Hull would part ways with his family heirloom saying Gorion is his friend and the sword would be put to good use in your travels; he preferred training with halberds and quarterstaves anyway. I have the working mini-module if it helps :-S. Also I added a change to the Ghost Knights in Firewine Ruins to expand them into a hard optional encounter (that needs its loot more dispersed with more new encounters; eh bit by bit:-P).