Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: May 2017
A
Azhaius Offline OP
stranger
OP Offline
stranger
A
Joined: May 2017
So I want to make a "Hero's Feast" food item that gives a strong boost with a long duration, with a tradeoff of being difficult to craft.

So far I have the following edits:

Quote
Potion.txt

Quote
new entry "CON_Food_Pie_Cyseal_Hero"
type "Potion"
using "_ComboFood"
data "Act part" "15"
data "UseAPCost" "10"
data "StackId" "Willpower"
data "Weight" "200"
data "Value" "8.5"
data "Strength" "2"
data "Dexterity" "2"
data "Constitution" "2"
data "Willpower" "2"
data "VitalityPercentage" "15"
data "Flags" "FearImmunity;PoisonImmunity"
data "Duration" "12"


ItemCombos.txt

Quote
use object LOOT_Gems_Diamond on object CON_Food_Pie_Cyseal_A
with transform code Destroy2Transform1
parameters CON_Food_Pie_Cyseal_Hero,0,0,0,0,0,1,1
requires Crafting 0 autolevel 0 autoValue 0

use object LOOT_Gems_Diamond_B on object CON_Food_Pie_Cyseal_A
with transform code Destroy2Transform1
parameters CON_Food_Pie_Cyseal_Hero,0,0,0,0,0,1,1
requires Crafting 0 autolevel 0 autoValue 0


So two main questions:

1) What are the numbers after the transform parameters for?
2) With the stats and recipe implemented, how would I go about actually making the item itself?

Last edited by vometia; 16/05/17 04:34 AM. Reason: formatting
Joined: Jun 2015
F
enthusiast
Offline
enthusiast
F
Joined: Jun 2015
1) look at the top of the file where the actual transform codes are, the numbers are parameters for the transform 'functions', in your case 'Destroy2Transform1'. I haven't figured out nor did I bother to find out how the parameters are numbered, but in the case of your recipe it means that you create exactly one Hero Pie from the specified ingredients, that is the ,1,1 at the end, where one of the '1' parameters might be unused.


2)
A) you need to link your stat to a root template to make an object from it. Look up Data\Public\Stats\Generated\Links\Potion.txt for examples how to do that.
The cryptic looking entries there after the stats are UUIDs of root templates. You can create your own link file, e.g. MyPotions.txt, with a single line for your new potion or you add a line to an existing link file. Just make sure the game picks it up, i.e. it must be in the directory Stats\Generated\Links under your mod directory. You can also copy the line of an existing potion or food entry and only exchange the first field which is always the stat.
For example
Code
object itemstat "CON_Potion_Fire_Res_Medium_A","4d1b8510-ff14-4cb5-9ac4-c4fccd969c34","",0,0,"VariousPotion",1,1,4,0,-1,25

in Potion.txt links the stat for a medium fire res potion to a root template with a red icon (and the look of a red potion).
Make sure to set the entry "VariousPotion" in this example to an empty string, i.e. "", because that's the treasure group which determines where the item could drop or which vendor could have it.
Leaving this field empty makes sure, the item will never show up in chests/barrels/... or in a vendor window. In this case, the only chance your item will ever appear in the game is through scripting or crafting.

You cannot take any root template you like, you need to choose one that is freely movable (means you can put it into your inventory) and has a 'Consume' use action. I don't remember exactly if the following is true but I believe the standard potion and food root templates have a generic 'Consume' action which uses the stat linked to the object. So the easiest thing is to use one of the existing food or potion root templates in the link if creating your own root template looks too complicated.


B) (kind of optional) you need a name for you new object. The game will look if it can find a 'Translated String Key' for the string 'CON_Food_Pie_Cyseal_Hero' and display that as the headline of your new potion's tooltip. If such a translation does not exist, the headline of the tooltip will be empty. To create the translation, create your own translation file with the game editor's 'Translated String Keys' editor, this editor will place the created file into a correct directory. There is a chance that a name appears in the headline, if the used root template has a name in its name field. But that will most likely not be the name you want.
So unless you create your own root template, you need to make a string translation as said above or live with an empty tooltip headline.



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