Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Joined: Jul 2014
J
JTE10 Offline OP
stranger
OP Offline
stranger
J
Joined: Jul 2014
Taking the knowledge provided by Norbyte and Blazedragon, I've had partial success with stat-changing but there are some irregularities as well. I thought it would be worth making a new thread to discuss, anyways (previous relevant posts are in the 'Divinity Engine Scripts don't exist thread').

If Norbyte's unpacker is used to extract the files from the Main.pak file in Steamapps/Common/Divinity-Original Sin/Data, then you'll get a folder called Public. The stat files can be found in Public/Main/Stats/Generated/Data. These are text files that the game reads in order to determine different stats; for example the Character.txt file contains information about different player character and enemy attributes (Strength, learned skills, talents, etc.) These text files are generated by the macro excel files that are found in Public/Main/Stats. Each text file has a corresponding xsml file; when you open the xsml file titled All and click the big gray button, the xsml files will take the information they contain and generate a new set of text files in Public/Main/Stats/Generated/Data. At this point I don't know if there is a significant difference between editing one of the text files directly, or editing an xsml file and then having it generate a new text file.

Blazedragon figured out that in order to mod stats without having to alter the original files, you can create stat text files in your mod directory. If you're building off of his 4-player mod (which is more convenient than creating a new mod and loading all the levels into it yourself), then these altered text files would be placed in Steamapps/Common/Divinity - Original Sin/Data/Public/4Player_-_Test_1ddd6993-6d9b-4e71-a437-1195dd217cf6\Stats\Generated\Data\Character.txt. You have to create some of those folders yourself.

However, there are some strange patterns in actually changing these files. If I put a Character.txt file in that location and give the Corpse Lieutenant guy an extra 500 health (the first enemy encounter in the game), then start a new game with the mod, he DOES have 500-something health. Likewise if I edit Jahan to have a different amount of strength, then start a new game and go find Jahan, he will have that modified strength.

BUT other things don't work, or only partially work. If I make a modifed SkillData.txt (this file contains information about the different skills and their stats) so that the Staff of Magus attack (basic magic missile that all characters automatically know upon creation) consumes 10 AP instead of 4, then it will cost 10 AP when I make a new game. Yet if I modify it to consume 1 or 2 AP, it will cost 3! It appears that the minimum it can successfully be set to is 3, and I have no idea why. This skillset.text file also contains the descriptions for the spells. But if I edit the description, like setting Staff of Magus to say it is a 'super awesome laserbeam' instead of 'missile,' the change isn't reflected at all. Likewise editing the base attributes of the player character (so base strength would be 8 instead of 5, for example) has no effect whatsoever.

So, lots of mysteries here. Hopefully we will get some official word soon on how modders should properly go about editing stats, skills, items, and son on.


Joined: Apr 2013
N
addict
Offline
addict
N
Joined: Apr 2013
Originally Posted by JTE10

At this point I don't know if there is a significant difference between editing one of the text files directly, or editing an xsml file and then having it generate a new text file.

Not much, the game only loads the .txt file, editing the .xlsm file is less eye straining tho smile

I also did a quick test to see if using partial Characters.txt files is possible in the game, and it seems that the engine loads them correctly.
Adding this to a new Characters.txt in a test mod:
Originally Posted by Characters.txt

new entry "NormalPlayer"
type "Character"
data "Vitality" "500"

... will add an extra 500% vitality to your characters in normal mode, overriding the original 0% and leaving everything else intact.

Originally Posted by JTE10

when I make a new game.

Some changes (skilldata.txt changes are among them) are applied retroactively to all savegames, you don't have to create a new game for them, as the savegame doesn't contain the properties of your skills, only the skill name references.

Originally Posted by JTE10

Yet if I modify it to consume 1 or 2 AP, it will cost 3! It appears that the minimum it can successfully be set to is 3, and I have no idea why.

TBH I don't think I've ever seen any action in the game that takes less than 3 AP.
Attacks are at least 3-4AP; using inventory items is 3AP; etc.

Originally Posted by JTE10

This skillset.text file also contains the descriptions for the spells. But if I edit the description, like setting Staff of Magus to say it is a 'super awesome laserbeam' instead of 'missile,' the change isn't reflected at all. Likewise editing the base attributes of the player character (so base strength would be 8 instead of 5, for example) has no effect whatsoever.


I think that texts cannot be changed in SkillData.txt directly; you also have to change the relevant string entry in Localization\English\english.xml:
<content contentuid="hfd7a96cdgb2dcg43adgbe2bg3023fab2f2e9">Launch a magical missile from your staff that deals [1] damage.</content>

... or Public\Main\Localization\Stats.lsb, which contains the same text and content UID.

Joined: Jul 2014
J
JTE10 Offline OP
stranger
OP Offline
stranger
J
Joined: Jul 2014
That clears a lot up, thanks for taking the time to sort through these things. Limitations aside, the file placement outlined here at least allows Jahan and Madera to be modified- I'm conducting a playthrough with tweaked companions now.

Another remaining question is how to edit the henchmen in the hall of heroes- their data isn't in the character.txt file and actually doesn't seem to be in any of the stats files.

Joined: Jul 2014
N
stranger
Offline
stranger
N
Joined: Jul 2014
Check in Data/Mods/Main/CharacterCreation/HenchManPresets

Looks like they're all there, but I haven't tested anything yet.

Joined: Jul 2014
J
JTE10 Offline OP
stranger
OP Offline
stranger
J
Joined: Jul 2014
Good find- I opened one of the henchmen presets with the unpacker and all the important bits are stored right in those .lsx files. Theoretically I could edit and save a new version of one of the presets using the unpacker, I'll do some testing and see if I can get it working.

Edit: Success! I edited one of the henchmen preset .lsx files and placed my edited version in SteamApps\Common\Divinity - Original Sin\Data\Mods\4Player_-_Test_1ddd6993-6d9b-4e71-a437-1195dd217cf6\CharacterCreation\HenchManPresets

So the process is similar for editing companion stats, but you are creating folders and files inside 'data/mods' rather than 'data/public.'

And as Norbyte pointed out for stats, you don't need to copy over every henchmen preset- I just copied over the single henchman that I edited, and it overrode the original just fine.


Last edited by JTE10; 03/07/14 04:01 AM.
Joined: Jul 2014
S
stranger
Offline
stranger
S
Joined: Jul 2014
Has anyone figured out where the parameters for Traits live?

Joined: Jul 2014
J
JTE10 Offline OP
stranger
OP Offline
stranger
J
Joined: Jul 2014
What do you mean by traits? Attributes, skill proficiency (Man-at-Arms, Crafting, etc.), and talents are all included in the character.txt file (or henchmen preset .lsx files for them).

However, skills- like ice bolt and laser bomb or whatever- are found in the skillset.txt file, in the same folder as the character.txt file. So if you want to change which skills Jahan has learned, for example, you would do it there. (But for Henchmen skills are included in the same .lsx file)

Last edited by JTE10; 03/07/14 03:17 AM.
Joined: Jul 2014
S
stranger
Offline
stranger
S
Joined: Jul 2014
Originally Posted by JTE10
What do you mean by traits? Attributes, skill proficiency (Man-at-Arms, Crafting, etc.), and talents are all included in the character.txt file (or henchmen preset .lsx files for them).

However, skills- like ice bolt and laser bomb or whatever- are found in the skillset.txt file, in the same folder as the character.txt file. So if you want to change which skills Jahan has learned, for example, you would do it there. (But for Henchmen skills are included in the same .lsx file)


Yeah, I've found both of those data. But I'd like to give Bodybuilder a bonus to elemental resistance; I can't find the Bodybuilder global parameters to do that.

Joined: Jun 2014
journeyman
Offline
journeyman
Joined: Jun 2014
Originally Posted by JTE10
Edit: Success! I edited one of the henchmen preset .lsx files and placed my edited version in SteamApps\Common\Divinity - Original Sin\Data\Mods\4Player_-_Test_1ddd6993-6d9b-4e71-a437-1195dd217cf6\CharacterCreation\HenchManPresets


OK so, if all I want to do is make my own henchmen using these folders, can you give a tl;dr step by step? I just want a blank mod I can enable to give me altered henchmen. Also I assume this will work with an existing save file since it loads the list of henchmen dynamically?

I had made a blank mod earlier while trying to do this (it has Main dependency) and I've activated the mod, then loaded a save. I did as you say, putting the latered file into \CharacterCreation\HenchManPresets\HenchMan00.lsx, but in game she is still the same as the default. I'd like to create a shell mod so people can easily edit their own henchmen, any help would be appreciated.

Last edited by Pestilence; 03/07/14 06:38 AM.
Joined: Apr 2013
N
addict
Offline
addict
N
Joined: Apr 2013
Originally Posted by Pestilence
OK so, if all I want to do is make my own henchmen using these folders, can you give a tl;dr step by step? I just want a blank mod I can enable to give me altered henchmen. Also I assume this will work with an existing save file since it loads the list of henchmen dynamically?


I believe all you need to do is create a new mod, add Main as data & mod dependency, copy the \Mods\%yourMod%\CharacterCreation\HenchManPresets\HenchMan00.lsx and change it as you wish.

If it doesn't work you could try adding a new henchman instead, to see if the game is able to override existing henchmen from the main campaign, or can only add new ones.

Joined: Jun 2014
journeyman
Offline
journeyman
Joined: Jun 2014
Originally Posted by Norbyte
Originally Posted by Pestilence
OK so, if all I want to do is make my own henchmen using these folders, can you give a tl;dr step by step? I just want a blank mod I can enable to give me altered henchmen. Also I assume this will work with an existing save file since it loads the list of henchmen dynamically?


I believe all you need to do is create a new mod, add Main as data & mod dependency, copy the \Mods\%yourMod%\CharacterCreation\HenchManPresets\HenchMan00.lsx and change it as you wish.

If it doesn't work you could try adding a new henchman instead, to see if the game is able to override existing henchmen from the main campaign, or can only add new ones.


Neither of these seems to be working for me, but JTE10 did manage to get it working so there's something I must be doing wrong. Made a new mod with dependencies, copied folder, loaded game with mod enabled, henchman list isn't any different.

JTE10 is there any chance you can tell me where I've gone wrong or upload the proper Mod folder that you know works? Did you start a new game or were you able to load an existing one?

Joined: Jul 2014
J
JTE10 Offline OP
stranger
OP Offline
stranger
J
Joined: Jul 2014
My further messing with the henchmen presets has indicated that there is at least one factor I'm not accounting for and it is screwing things up- but I will say here what I know.

Changes to henchmen presets *are* reflected in existing saves; I have a save in the hall of heroes that I load up every time I want to see if one of my changes worked.

In terms of mods and dependencies, I am just using Blaze's four player mod as a base. But you could create your own mod from scratch using Bobbylein's guide: http://www.larian.com/forums/ubbthreads.php?ubb=showflat&Number=504576#Post504576 as well.

----------------------------------------------------------------------------------------------------
So from a clean, fresh install of the game, here is what I am doing:

1) Putting the four player base mod into Documents\Larian Studios\Divinity Original Sin\Mods... if you choose to use the four player mod too, make sure that you have the newer version of the mod (refer to this thread: http://www.larian.com/forums/ubbthreads.php?ubb=showflat&Number=504225&nt=3&page=1)

2) Using Norbyte's unpacker's un-PAK function to extract the contents of Main.Pak into an empty folder on my desktop. Main.Pak is found in SteamApps\Common\Divinity - Original Sin\Data

As I understand it, if a mod contains certain files in the right place, then those files will be read/used before the base game files so that a mod can override anything. So when the game says 'what are Jahan's stats?' it will look in SteamApps\Common\Divinity - Original Sin\Data\Public\Main\Stats\Generated\Data.txt for that information. BUT if you are using a mod, it will FIRST check SteamApps\Common\Divinity - Original Sin\Data\Public\NAMEOFMOD\Stats\Generated\Data.txt for that information. In this case the name of the mod I am using is 4Player_-_Test_1ddd6993-6d9b-4e71-a437-1195dd217cf6. So any stats put into that second folder will be read first and used to override the original stats.

The pattern there seems to be that if you recreate file paths so that the name of your mod is an alternative to 'Main,' you can override things without editing base files (which upsets the game). So the henchmen preset files are located in Data\Mods\Main\CharacterCreation\HenchManPresets... following the pattern I made my own folder chain SteamApps\Common\Divinity - Original Sin\Data\Mods\4Player_-_Test_1ddd6993-6d9b-4e71-a437-1195dd217cf6\CharacterCreation\HenchManPresets. My thinking was that any .lsx preset file I put into that new folder would override the original preset. Anyways, short version is:

3) Creating a place to put my new henchmen presets that will override the old ones, in SteamApps\Common\Divinity - Original Sin\Data\Mods\4Player_-_Test_1ddd6993-6d9b-4e71-a437-1195dd217cf6\CharacterCreation\HenchManPresets

4) Norbyte's unpacker can open, edit, and save .lsb and .lsx files. So that is what will be used to view and modify the henchmen preset files which are all .lsx

5) Now comes the initial test, which is the success I reported above- I opened a random henchmen preset, changed their strength and dexterity values, and saved it (mind again that the .lsx being edited is a copy that exists in my mod folder; the original presets should not be edited).

6) When I opened my save in the Hall of Heroes, I saw that the henchman I had edited now had the strength and dexterity stats I gave him.

7) I started changing other things and it all went to hell and ARGH.

----------------------------------------------------------------------------------------------------

So editing the presets SEEMS to be fairly straightforward. Different tabs, different nicely labelled boxes, everything easy to understand. It is a bit tricky to know the right names for things though- for example if you want to give someone blacksmithing you add points to "Repair". It would be really nice if somebody could make a master list of all the 'true' names of skills, talents, etc. I haven't been able to find most of them so I just guess what I think the obvious ones should be.

But there seems to be a problem depending on WHICH henchmen preset you choose to edit. For example, if I edit Ithalos, and then go to the Hall of Heroes, the Henchmen will endless scroll between a set of five henchmen, with bugged out appearances, and some of my edits will stay, and some won't, and it just seems random and unpredictable. If I edit Sondre, it is a little better but still somewhat bugged out, etc. This is especially weird because appearance data is stored inside the preset files, but sometimes when I try to edit someone their appearance in the game becomes totally different from what is set in their preset file. I have no idea.

I also experimented with adding a new Henchmen. There are 64 kickstarter henchmen, so I made a new .lsx file that was number 65 and added it to my mod folder. I copied another preset, but changed the name, description, etc. This actually worked, sort of- my new henchman did appear. BUT the weirdness with the order and number of henchmen available still happened. I suspect that it may have something to do with the ID number of the preset? I don't know how to go about creating a brand new ID for a new henchmen, which means I can't truly create one from scratch- my new one did share an ID with another preset, anyways.

*Possibly related*, but I noticed something else weird- Henchman #24 and Henchman #58 are both Ithalos. Identical presets.

Another weird thing, sometimes I get stuck in henchmen loops in the Hall of Heroes after trying to make an edit- so I can scroll through Henchman 1, 2 ,3, 4, BAM 5, 6, 5, 6, 5, 6, 5, 6, into infinity. Also if I scroll backwards (scroll = clicking the arrow buttons), then there are different henchmen, and different loops.

Edit: Another weird thing I should mention: if all of the henchmen presets are copied to the mod folder but *not changed at all*, then scrolling through henchmen in the hall of heroes will still bug out. The way I understand it, there should be NO difference between the game reading files in the mod folder and the original files IF the files are identical... but clearly there is a difference.

So... yeah. That should bring anyone reading this completely up to speed on what I've done, and observed.

Last edited by JTE10; 03/07/14 05:09 PM.
Joined: Jun 2014
journeyman
Offline
journeyman
Joined: Jun 2014
Before I even started trying to alter henchmen and was running the game normally, I noticed some weird appearance changes too. I have the Rogue, Seamus Black, and his hair sometimes does not appear and his head is bald instead. I couldn't pin down the cause, seems to be random, as it will come back sometimes. I also get some weird behavior with scrolling back and forth occasionally, but I think I had a case of that before I started trying to change things.

When you're using the 4 player mod, are your save games actually made with this mod enabled from the start? The save files I have are using no mods, and I was enabling my blank mod and loading a save to test. My mod is blank aside from the henchmen directory I've added (and dependencies), whereas you seem to be already using a mod and just altering it further.

Is it possible you cannot retroactively use mods at all? i.e if your save file is default and unmodded, enabling mods (even those with only stat changes) and loading a save won't work?

Last edited by Pestilence; 03/07/14 05:21 PM.
Joined: Jul 2014
J
JTE10 Offline OP
stranger
OP Offline
stranger
J
Joined: Jul 2014
I know that the four player mod won't retain four player functionality unless you start a new game with it... and as for me, I had the mod enabled when I made the new game. Though when I think about it, I don't see why mods wouldn't be retroactive.


Joined: Jun 2014
journeyman
Offline
journeyman
Joined: Jun 2014
That's my hope, but it doesn't seem to be working unless I've missed something.

1. Create a blank mod with Main dependency
2. Add modified files to (in this example) Mods\Henchmen\CharacterCreation\HenchManPresets
3. Enable mod in game, load existing (unmodded) save

I edit a henchman, but when I find them in the hire list there are no changes.

Joined: Apr 2013
N
addict
Offline
addict
N
Joined: Apr 2013
Originally Posted by JTE10
As I understand it, if a mod contains certain files in the right place, then those files will be read/used before the base game files so that a mod can override anything. So when the game says 'what are Jahan's stats?' it will look in SteamApps\Common\Divinity - Original Sin\Data\Public\Main\Stats\Generated\Data.txt for that information. BUT if you are using a mod, it will FIRST check SteamApps\Common\Divinity - Original Sin\Data\Public\NAMEOFMOD\Stats\Generated\Data.txt for that information. In this case the name of the mod I am using is 4Player_-_Test_1ddd6993-6d9b-4e71-a437-1195dd217cf6. So any stats put into that second folder will be read first and used to override the original stats.

The pattern there seems to be that if you recreate file paths so that the name of your mod is an alternative to 'Main,' you can override things without editing base files (which upsets the game). So the henchmen preset files are located in Data\Mods\Main\CharacterCreation\HenchManPresets... following the pattern I made my own folder chain SteamApps\Common\Divinity - Original Sin\Data\Mods\4Player_-_Test_1ddd6993-6d9b-4e71-a437-1195dd217cf6\CharacterCreation\HenchManPresets. My thinking was that any .lsx preset file I put into that new folder would override the original preset. Anyways, short version is:


I believe this is technically incorrect.
The game determines a load order for mods based on the dependencies specified in the mod meta.lsx files; then it'll load all mod files in that order.

Eg. for Character.txt, it'll first load Public\Main\Stats\Generated\Character.txt and load all stat entries.
Then it'll load the same file from other mods (Public\4Player_-_Test_1ddd6993-6d9b-4e71-a437-1195dd217cf6\Stats\Generated\Character.txt in this case). The way conflict resolution works can vary from file to file; in the case of Character.txt, newer entries with the same name seem to overwrite the older ones.
(Though this can create interesting edge cases, such as when two mods contain the same entry but can be loaded in a different order)

Joined: Jul 2014
J
JTE10 Offline OP
stranger
OP Offline
stranger
J
Joined: Jul 2014
Pestilence that file path seems right, maybe try it with the four player mod? That way you could determine whether it is something about the modified preset that is the problem, or if it is a problem with the mod base.

Norbyte so it's more complicated than it thought... but it sounds like it's the correct file location, right? Just that it isn't guaranteed to override the original data in all circumstances?


I discovered a problem with my edits to Jahan and Madera and thought I'd leave a note about it here- in the Character.txt file in my mod folder, I deleted everything except the entries for Jahan and Madera. It looked like it worked until I took them into combat and realized they were horribly, horribly crippled. The problem was that those entries include a line: using "_Hero", but the _Hero entry was not included in my modified data file. I copied the _Hero entry into my Character.txt and the problem was fixed. If you don't include that, then your characters will have 0 base vitality, 0 base AP/AP Recovery, and will have no aversion to running into hazardous surfaces.


Last edited by JTE10; 03/07/14 07:18 PM.
Joined: Jul 2014
N
stranger
Offline
stranger
N
Joined: Jul 2014
I was finally able to get the two henchman I edited to appear by naming them KSHenchMan65 and KSHenchMan66. I wasn't able to get them to appear without changing the number to make it a new henchman. Overwriting existing henchman just wouldn't work for me.

Something to note: you can load edited and new henchman into the Main mod, and thus get your custom henchman in vanilla saves.

Editing lsx files with Notepad++ didn't give me any issues either.

Joined: Jun 2014
journeyman
Offline
journeyman
Joined: Jun 2014
Originally Posted by nates1984
I was finally able to get the two henchman I edited to appear by naming them KSHenchMan65 and KSHenchMan66. I wasn't able to get them to appear without changing the number to make it a new henchman. Overwriting existing henchman just wouldn't work for me.

Something to note: you can load edited and new henchman into the Main mod, and thus get your custom henchman in vanilla saves.

Editing lsx files with Notepad++ didn't give me any issues either.


Did you also have to change any ID information or other lines in the lsx files? I tried adding one too and had no luck, can you give a tl;dr of the steps you did? Blank mod with dependencies?

Joined: Jul 2014
N
stranger
Offline
stranger
N
Joined: Jul 2014
No mods.

1) So fresh install
2) Create .../Divinity - Original Sin/Data/Mods/Main/CharacterCreation/HenchManPresets folder
3) Place KSHenchMan65.lsx and KSHenchMan66.lsx in the newly created directory

I messed with lots of different entries: talents, stats, abilities, skills, name, body/hair values, etc. Not all changes had made a difference. For example, changing the class value near the top of the lsx file didn't change the class name in the henchman list.

The HairColor and other body/hair values are weird. Changing these doesn't always produce a change in game.

Edit: No, I didn't change the ID value, or anything that might resemble an internally used variable.

Last edited by nates1984; 04/07/14 02:27 AM.
Page 1 of 2 1 2

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