Using Mods to Change Stats, Skills, etc. - 02/07/14 07:32 PM
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.
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.