Adds more craftable objects and potions to the witch's cauldron.
Powerful good witches can craft Genie Lamps, while powerful bad warlocks can craft Voodoo Dolls (Mr Mickles).
Includes Midge the Tree's 'Custom Potions Made Better'. I normally shy away from incorporating other people's mods 'in-toto', but there really is no way to make these two stand-alone.
Other objects can be added with a modicum of difficulty via BCONs and BHAVs.
Also fixes a few bugs in the cauldron code kindly left in by Maxis ... Eye of Newt, Wing of Bat, Bug of Code, We need that!
Speed Multipliers
Edit BCON 0x100A 'Tuning - Speed Multipliers' to change how quickly a witch can make item types. Note that these values are 'times 100', so normal speed is 100, half speed is 50 and thrice speed is 300.
Adding Another Object
To add another craftable object proceed as follows
- Locate the new object to add and note its GUID
- Increment BCON 0x1008:0x00 (Num Objects)
- Add TWO new values to end of BCON 0x1008 as GUID(hi) and GUID(lo)
- Add THREE new values to end of BCON 0x1007 as Min Alignment, Max Alignment and Min Skill
- Add THREE new strings to end of STR# 0x012E as "Make Object.../Xyz", "Make Many Objects.../Xyz" and "Resume Making Xyz"
For the object being added, identify the highest BHAV local instance used, as we need to add TWO new BHAVs to the object.
Add BHAV "CT - Get Progress Increment Range" to the object (use an available local instance). Param 0 gives the NID of the witch crafting the object. Return TWO values in temps, Temp0 is the min crafting increment this time around the loop, while Temp1 is the max crafting increment. The default values are 1 and 8. By using the witch's NID to obtain their skill level it is possible to make more powerful witches craft objects faster than weaker ones.
Add BHAV "CT - Get Skill Bonus" to the object (use an available local instance). Param 0 is the witch's alignment (see below). Return ONE value in Temp0 as the witch's skill increase this time around the loop. The default value is 1.
- Param 0 == 0, witch alignment is 900 to 1000
- Param 0 == 2, witch alignment is 500 to 899
- Param 0 == 4, witch alignment is 200 to 499
- Param 0 == 6, witch alignment is -199 to 199
- Param 0 == 8, witch alignment is -499 to -200
- Param 0 == 10, witch alignment is -899 to -500
- Param 0 == 12, witch alignment is -1000 to -900
By dividing Param 0 by two it can be used as an index into a BCON to get different skill gains depending on the alignment of the witch.
One or both of the BHAVs can be omitted, in which case the default values are used.
Adding Another Potion
To add another craftable potion proceed as follows
- Locate the new potion to add and note its GUID
- Increment BCON 0x1006:0 (Num Potions)
- Add TWO new values to end of BCON 0x1006 as GUID(hi) and GUID(lo)
- Add THREE new values to end of BCON 0x1005 as Min Alignment, Max Alignment and Min Skill
- (The tricky bit ...) Insert THREE new strings into STR# 0x012E before "--- END OF POTIONS ---" as "Make Potion.../Lmno", "Make Many Potions.../Lmno" and "Resume Potion Lmno". Do NOT remove the three lines "--- END OF POTIONS ---", "---" and "--- START OF OBJECTS ---". The easiest way to add the three new potion entries is to click the "Export Lang" button, edit the saved language file and then click the "Import Lang" button to read the edited file.
Worked Example - Adding An Object
Worked example of adding the "Resurrect-O-Nomitron" as a craftable object for high level neutral wizards.
Start SimPe (I'm using QA 0.73.44)
Open the objects.package file for the EP/SP you are using.
Select Object Data (OBJD) resources, sort by Name and find the 'Career - Resurrectonomitron' object.
Note its GUID - 0xAE8D50B2.
Note its group - 0x7F126582.
Click on "All Res" to select all resources, then click on the Group column to sort by group.
Select any BHAV in the same group.
Select Behaviour Function (BHAV) and then click the Group column to re-sort.
Scan all the BHAVs in the group to find the one with the highest instance, which I make 0x1040 (not shown in the screen-shot, I had to scroll up/down to find it!)
Close the objects.package file WITHOUT SAVING.
Open the WH_MoreWitchCraftables.package file.
Select the BCON 0x1008 "Tuning - Object GUIDs".
Change the value of the first entry "Num Objects" from 2 to 3.
Click on the TRCN button.
Click the Add Label button, and enter "Resurrect-O-Nomitron (hi)" as the Label.
Click the Add Label button, and enter "Resurrect-O-Nomitron (lo)" as the Label.
Click the Commit File button.
Click the BCON button.
Click the "Add Value" button, and enter 0xAE8D (the hi part of the GUID noted above) as the Hex value.
Click the "Add Value" button, and enter 0x50B2 (the lo part of the GUID noted above) as the Hex value.
Click the Commit File button.
Select the BCON 0x1007 "Tuning - Object Skill/Alignment Reqs".
Click on the TRCN button.
Click the Add Label button, and enter "Resurrect-O-Nomitron Min Alignment" as the Label.
Click the Add Label button, and enter "Resurrect-O-Nomitron Max Alignment" as the Label.
Click the Add Label button, and enter "Resurrect-O-Nomitron Min Skill" as the Label.
Click the Commit File button.
Click the BCON button.
Click the "Add Value" button, and enter -200 as the Dec value, this will deny the object to wizards who are too bad.
Click the "Add Value" button, and enter 200 as the Dec value, this will deny the object to wizards who are too good.
Click the "Add Value" button, and enter 800 as the Dec value, this will deny the object to wizards who are not skillful enough.
Click the Commit File button.
Note, the "Resurrect-O-Nomitron Min Alignment" in the screen shot is incorrectly showing the value as 0x0000, it should be 0xFF38.
Select the STR# 0x012E "MakeActionString prim string set".
Click the Add button, and enter "Make Object.../Resurrect-O-Nomitron" as the String.
Click the Add button, and enter "Make Many Objects.../Resurrect-O-Nomitron" as the String.
Click the Add button, and enter "Resume Making Resurrect-O-Nomitron" as the String.
Click the Commit File button.
The next parts are optional but recommended.
Select one of the "CT - Get Progress Increment Range" BHAVs, right click on it, and select Clone.
Click on the clone BHAV (it will be showing in italics) and click on the Resource tab.
Change the Group to 0x7F126582 (noted above) and the Instance to something higher than the value noted above, I'm using 0x1050 as it leaves gaps in case there's a mod out there that adds other BHAVs to the object.
Click on the Plugin View tab.
The cloned code returns two ranges - 1-3 if the wizard is less than 950 skill level and 4-6 otherwise. We'll keep this to be consistent with the Genie Lamp and Voodoo Doll.
Select one of the "CT - Get Skill Bonus" BHAVs, right click on it, and select Clone.
Click on the clone BHAV (it will be showing in italics) and click on the Resource tab.
Change the Group to 0x7F126582 (noted above) and the Instance to something higher than the value noted above, I'm using 0x1051.
Click on the Plugin View tab.
As we want only neutral wizards - alignment in the range -199 to 199 - to gain skill from creating this object, we need to check Param 0 for having the value 6 (refer the table above).
So change the code as shown.
Click the Commit button.
Save all your changes.
Test in game with various alignment and levels of witches and wizards. Only a high-level, neutral wizard should be able to craft the object.
This mod changes and adds many BHAV, BCON and STR# resources in the "Witch - Cauldron" object (group 0x7FB62949) and changes one BHAV in the Witch Globals (group 0x7FB22737).
This mod adds two BHAVs to the "Voodoo Doll" object (group 0x7F8D114F) and the "Sculpture - Genie Lamp" object (group 0x7F9E72DE).
Known to conflict with Midge the Tree's 'Custom Potions Made Better', but, as it includes all the functionality from that mod, it is no longer needed.
Known to conflict with MATY's 'Creature Fixes', but, as it includes all the functionality from that mod, must load AFTER it.
Known to conflict with Cyjon's 'CJ-FasterReagents', but, as it includes all the functionality from that mod, it is no longer needed.
Known to conflict with Lord Darcy's 'Pie Menu Text Strings Fix', (STR# 0x012E in group 0x7FB62949), either have my mod load after their's (which will delete their changes), or append the extra strings from my mod (entries 0x0045 onwards) onto their's.
- Phantomknight @MTS for the idea.
- Midge the Tree.
- The developers of SimPE.