Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Feb 2015
M
stranger
OP Offline
stranger
M
Joined: Feb 2015
I thought I'd submit this to the community for informational purposes, and to get any corrections if I've got something wrong.

FILENAME

ItemCombos.txt

located in:

\Data\Public\Main\Stats

COMMAND

use [object,category] <USING> on [object,category] <USED> with transform code <TRANSFORM> parameters <param1>, <param2>, <param3>, <param4>, <param5>, <param6>, <param7>, <param8>

DEFINITIONS - [object,category]

You can use objects or entire categories of objects on each other. Categories contain an entire group of objects. This allows you to enumerate interactions more efficiently. Instead of listing every single possible interaction between one type of dagger and another object, all you need to do is make a use command for category Dagger.

<USING> - the thing you are using <USED> on
<USED> - the thing you are using on <USING>

ROFL! I think that clarifies things rather nicely, amirite? Heh. It may help to think of them as Item1 and Item2.

This probably deserves a little elaboration, and it's probably subjective (i.e., I may see it differently than you do). When I drop some iron ore on an oven, this is how the interaction is defined in the game:

use category Oven on object LOOT_Ore_A_Iron_A with transform code Transform2 parameters LOOT_OreBar_A_Iron_A,0,0,0,0,0,1,1 requires Blacksmithing 1 autolevel 0

So I can use ANY type of Oven on LOOT_Ore_A_Iron_A and turn it into LOOT_OreBar_A_Iron_A. Transform2 turns Item2 (<USED>) into a new item (<param1>).

But the way I think of it is this. In the game I'm actually dragging LOOT_Ore_A_Iron_A onto the Oven and letting it go. I use the ore (<USED>) on the Oven (<USING>) and not the other way around. Could we define it that way in the file? Sure...

use object LOOT_Ore_A_Iron_A on category Oven with transform code Transform1 parameters LOOT_OreBar_A_Iron_A,0,0,0,0,0,1,1 requires Blacksmithing 1 autolevel 0

That way you'd be <USING> the ore on the oven (<USED>). So yeah...I'm just being anal! LOL!

Anyway, just think of it as Item1 and Item2 for <USING> and <USED>.

DEFINITIONS - transform code

The transform code determines the outcome of the interactions between <USING> and <USED>. Remember you always use <USING> on <USED>.

DoNothing - does nothing! Not used in the entire file.
Boost2 - boosts <USED> with <param4>
BoostBoth - boosts <USING> with <param4> and <USED> with <param5>
Destroy1Boost2 - disappears (destroys) <USING> and boosts <USED> with <param4>
Destroy1Boost2CreateNew - disappears <USING>, boosts <USED> with <param4> and creates a new object with <param3>
Destroy1Transform2 - disappears <USING> and turns <USED> into <param1>
Destroy2Transform1 - turns <USING> into <param1> and disappears <USED>
Transform1 - turns <USING> into <param1>
Transform1CreateNew - turns <USING> into <param1> and creates a new object with <param2>
Transform2 - turns <USED> into <param1>
Destroy1Transform2Boost2 - disappears <USING>, turns <USED> into <param1> and boosts it with <param4>
Transform2Boost2 - turns <USING> into <param1> and boosts it with <param4>
TransformBoth - turns <USED> into <param1> and <USING> into <param2>
TransformBothBoost1 - turns <USED> into <param1> and boosts it with <param4>, and turns <USING> into <param2>
TranformBothBoostBoth - turns <USED> into <param1> and boosts it with <param4>, and turns <USING> into <param2> and boosts it with <param5>
TransformBothCreateNew - turns <USED> into <param1>, turns <USING> into <param2>, and creates a new object with <param3>
TransformBothCreateAndBoostNew - turns <USED> into <param1>, turns <USING> into <param2>, and creates a new object with <param3> and boosts it with <param4>
DestroyBoth - disappears both <USING> and <USED>
Destroy1 - disappears <USING>
Destroy2 - disappears <USED>
Transform1Boost1 - turns <USING> into <param1> and boosts it with <param4>

DEFINITIONS - parameters

Remember 1st item = <USING>, 2nd item = <USED>, and any 3rd item would be one getting created.

<param1> - used for Transforms (e.g., Transform1, Transform2, TransformBoth for 1st item)
<param2> - used for CreateNew and TransformBoth (for 2nd item)
<param3> - used for CreateNew and TransformBothCreate
<param4> - used for Boost1, Boost2, BoostBoth (for 1st item), and CreateAndBoostNew (for 3rd or created item)
<param5> - used for BoostBoth (2nd item)
<param6> - no clue
<param7> - quantity of item being transformed (e.g., when applying a knife to a branch you get 3 arrowshafts)
<param8> - quantity of item being created, if any...I think...typically 1 regardless if something is being created

DEFINITIONS - other

Multiple Interactions

When there are multiple possible interactions for the same item combinations the game seems to choose one RANDOMLY. Consider the following interactions between the Elemental Forge and any Sword:

use object Quest_HIB_ElementalForge on category Sword with transform code Boost2 parameters 0,0,0,Weapon_Large_FireDamage_ModSword,0,0,1,1 requires Blacksmithing 8 autolevel 0
use object Quest_HIB_ElementalForge on category Sword with transform code Boost2 parameters 0,0,0,Weapon_Large_EarthDamage_ModSword,0,0,1,1 requires Blacksmithing 8 autolevel 0
use object Quest_HIB_ElementalForge on category Sword with transform code Boost2 parameters 0,0,0,Weapon_Large_AirDamage_ModSword,0,0,1,1 requires Blacksmithing 8 autolevel 0
use object Quest_HIB_ElementalForge on category Sword with transform code Boost2 parameters 0,0,0,Weapon_Large_WaterDamage_ModSword,0,0,1,1 requires Blacksmithing 8 autolevel 0
use object Quest_HIB_ElementalForge on category Sword with transform code Destroy2 parameters 0,0,0,0,0,0,1,1 requires Blacksmithing 8 autolevel 0

It appears to have a 80% chance of applying one type of elemental damage (20% chance each of Fire, Earth, Air, or Water), and a 20% chance of actually destroying the Sword.

//////////////////////////////////////////

So yeah, if I've got anything wrong PLEASE let me know.

Also I've successfully managed to create some new transforms following the language of the originals, but of no particular use. Just seeing if it could be done.

Take care!

EDIT: Fixed one of the Transforms missing a description and added Multiple Interactions.

Last edited by Morcrist; 26/02/15 06:09 PM.
Joined: Jun 2014
I
apprentice
Offline
apprentice
I
Joined: Jun 2014
There are a few bugs here.

1: although there is a 'boost2twice' transform you can use or modify into 'destroy1boost2twice' it doesn't apply 2 boosts contrary to expectations. It merges them.

This becomes a unsolvable (?) problem once you need to modify different instances of the same parameter, for instance "Damage Type" "Piercing" and "Damage Type" "Crushing" in two supposedly different boosts. You can't apply both at the same time!

Another problem is that the item boost instances in armor.txt (or weapon.txt or whatever new file you have), used in deltamodifier.txt, can't 'subtract' percentages unless you do something very silly. Take the signed 32 bits max value, subtract whatever percentage you need to make the result + 100 = wanted percentage and add a boost like that. Like so:

new entry "_Piercing_Minus_50"
type "Weapon"
using "_BOOSTS_Weapon"
data "Damage Type" "Piercing"
data "DamageFromBase" "2147483597"

Last edited by i30817; 03/12/21 08:48 AM.

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5