Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: May 2013
addict
OP Offline
addict
Joined: May 2013
Greetings modding community. I come asking for help in making a small mod with the new EE editor. Most solutions that applied to the original no longer work, as far as I can tell.

My goal is to create a custom equip-able item and put it in a container (a new container or an existing container).
But I want this item to be usable in the main campaign, so we should place this item in a crate on the starting beach, for easy testing.

I've tried opening up the editor and poking at the main module, but I'm not able to make anything stick. I am certain I'm starting off with the wrong idea on how to do this, so let's start from scratch.

Assuming I have installed the editor correctly (pointing the paths to the right folders, mostly), what are the steps I must take in order to achieve my goal, using the least number of external programs (aside from the game and editor)?


Unless otherwise specified, just an opinion or simple curiosity.
Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Try creating a new mod in the editor and during the creation process simply select MAIN as a dependency. You should be able to add an item that way.

Then once you load the game proper, activate the mod.

For testing just create a script that does ItemToCharacter during the INIT section of your goal file. Just create your own goal files don't edit the existing ones.

Last edited by SniperHF; 31/03/16 05:14 PM.
Joined: May 2013
addict
OP Offline
addict
Joined: May 2013
First issue I'm running into is the custom part.
Let's say I'm trying to make a ring with custom stats. When creating items I can see that they have a "Stats" field, which I assume dictates what the piece of equipment does when equipped, but I can't seem to find where to create a new stat. They don't seem to be templates, unless I've been missing something obvious and I'm too sleepy to understand the resources button right now.

It would also help me to see how the editor handles generic rings and amulets, as I've found no reference to them in the resource list either.


Unless otherwise specified, just an opinion or simple curiosity.
Joined: Jun 2013
K
stranger
Offline
stranger
K
Joined: Jun 2013
Damn, I didn't know you can add items to the EE main campaign. time to try!

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Originally Posted by EinTroll
First issue I'm running into is the custom part.
Let's say I'm trying to make a ring with custom stats. When creating items I can see that they have a "Stats" field, which I assume dictates what the piece of equipment does when equipped, but I can't seem to find where to create a new stat. They don't seem to be templates, unless I've been missing something obvious and I'm too sleepy to understand the resources button right now.

It would also help me to see how the editor handles generic rings and amulets, as I've found no reference to them in the resource list either.


The stats work is done mostly outside the editor in .txt / .xlsm files.

It looks like though that Larian forgot to include the .xlsm files in the Steam version of the editor.

In the GOG version they are in the folder Data\Editor\Templates

Joined: Aug 2014
old hand
Offline
old hand
Joined: Aug 2014
You have to define the stats in a text file in Public/Shared/Stats/Generated/Data and define a link to the root template in ...Stats/Generated/Links. I've added several items in Scales and you can reference that if you want to see how I've done some things. You don't have to use an existing text file in there, so you can just add your own. To get a fresh version of all the existing stats, you'll have to extract the Main/MainLSF.paks, but I think LSTools needs to be updated before you can do that. You'll have to use a UUID generator to make a new UUID for the link (I'm not sure if this link can be in the same file as the stat data, or if it needs to be in the link folder.)

Example stats (Peter Lee's Sword):

new entry "WPN_Sword_Kickstarter_Japanese"
type "Weapon"
using "_Swords"
data "Act part" "5"
data "Requirements" "Strength 7"
data "Damage" "4"
data "Damage Range" "1"
data "DamageBoost" "-15"
data "Durability" "10"
data "Value" "9"
data "Weight" "1000"
data "Movement" "1"
data "Initiative" "2"
data "SpeedBoost" "1"
data "ComboCategory" "Sword"
data "Flags" "Unbreakable"

I ought to make a video going through all the stats stuff. A lot of stuff to learn there, and I've picked up some tricks people would find useful I think. For example, note that most of those stats, like damage and value, are level-mapped so they correspond with the level of the item, and others aren't, like initiative, which is a straight value (I think).

Not sure what you mean by how they handle generic rings and amulets. They're in the Loot.lsb I think.

Joined: May 2013
addict
OP Offline
addict
Joined: May 2013
Well, I got around to trying to modify the armor.xlsm files in both Main and Shared with a couple of new entries, but they still don't show up in the editor when creating a new item. Which begs the question: Where does the editor get its stats templates from?


Unless otherwise specified, just an opinion or simple curiosity.
Joined: Aug 2014
old hand
Offline
old hand
Joined: Aug 2014
Did you run the macros to generate the .txt files from the .xlsm files? If so, did you check the text files to see if you could find your new entries. Remember, the text files are what the game actually reads, not the xlsms. I haven't actually entered in stats for the editor (just modified main directly), but I think you'll want these files in Public/yourmod/Stats/Generated/Data and Public/yourmod/Stats/Generated/Links. Personally haven't used the xlsm files and just modify the text files directly, so I can't give too detailed of advice there. I'd start with just editing the .txt files (use Notepad++ to make them readable).

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
To run the macros of the xlsm files you should edit the entries, close the files, and run the big macro in the all.xlsm file.

the XLSM files go in Public/YOURMOD/Stats.

The generated txt files end up where Baardvark said.

Joined: May 2013
addict
OP Offline
addict
Joined: May 2013
Tried using the all.xlsm to generate my modified armor.xlsm file and nothing happens. I'm using LibreOffice for this.

Since the easy way refuses to work, I'll try creating the .txt files as Baardvark said and see what happens.


EDIT: I did the .txt file editing under my mod's folders and now the new stats appear. So onto the next hurdle:

I'm trying to use Ishmashell's ring template to "Create new from selected" in the editor and I can't figure out the proper extension it keeps asking me for. Not sure that even matters, as creating from the existing template has the new object reference an unpacked Loot.lsb, which is actually in a .pak file if I understand correctly.

Creating a new object doesn't even have that field asking for an lsb, but it also doesn't seem to let me pick any PhysicsResourceID. I can open the ResourceManager, but I see no way of picking the resource I want.


[rant] I'm starting to see how difficult this editor is to use, and it feels incomplete with all the things that must be done outside the editor itself. [/rant]

Last edited by EinTroll; 06/04/16 02:43 AM. Reason: typo

Unless otherwise specified, just an opinion or simple curiosity.
Joined: Aug 2014
old hand
Offline
old hand
Joined: Aug 2014
Not sure if the macros work with programs besides Microsoft Excel. Don't seem to work for me with the Open Office Excel program.

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Libre doesn't work, gotta be the real deal. I tried it back last year. So yeah if you don't have it the txt editing way will have to be the path forward. Frankly office is worth it though, I wouldn't do any stat monkeying if it weren't for the excel files. But just for one item here or there it wouldn't be too bad.


Also, you shouldn't have to actually create a template to make an item whether it's droppable or a unique. Simply find the existing template of the item you want to use, place it in the world, and add that stat to it on the sidebar if you want to manually place it. I did this for several "unique" items in Dunamis I made as a quest reward.

And if you want it to drop randomly or be available with a vendor I think just creating an item in the right txt file will do it. This will depend on how you set the fields though.

@Baardvark, maybe that stat tutorial would be a good idea welcome.


Last edited by SniperHF; 06/04/16 03:38 AM.
Joined: May 2013
addict
OP Offline
addict
Joined: May 2013
It all works so far, just one last issue.

I can't seem to get my item to give +2 to a stat. It only gives +1, despite the file having it set to 2.

EDIT: I figured out that the max limits have to do with item level. Gave it Act Part 20 and it suddenly goes up to 3 for stats and up to 2 for skills.

EDIT #2: Fiddling around a bit, trying to document some max values, I've somehow managed to get one of my items to give up to +4 to attributes, with only making it add to all attributes.

Last edited by EinTroll; 06/04/16 02:43 PM.

Unless otherwise specified, just an opinion or simple curiosity.
Joined: Aug 2014
old hand
Offline
old hand
Joined: Aug 2014
It can be a bit difficult to get an exact value for an item for some attributes. Since loot is mostly random, level-scaling makes it easier than inputting manual values for some things. You can see what modifiers for different items take what kind of values in the Modifiers.txt file in Generated/Structure folder. So you can see that Movement on armor is a Penalty Qualifier (-10 to 10, whole numbers that are level-mapped) and that Initiative is a ConstantInt (essentially any whole number, not sure about negatives, number comes out as what you see.) You can see in the ValueLists file what values are appropriate for each type of modifier (e.g., all available attributeflags, like Crippledimmunity and Unrepairable, that you can put on armor).

I don't think you can modify the list to add or change stuff, but I might try again.


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