Larian Banner
Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
#585149 08/09/16 08:12 AM
Joined: Jul 2016
E
Echo123 Offline OP
journeyman
OP Offline
journeyman
E
Joined: Jul 2016
Hi

Is it possible to change enemy stats such as HP, AP, initiative etc, just like in the source difficulty mod?

Joined: Jun 2015
F
enthusiast
Offline
enthusiast
F
Joined: Jun 2015
Originally Posted by Echo123
Hi

Is it possible to change enemy stats such as HP, AP, initiative etc, just like in the source difficulty mod?

Yes, it is possible, the stats file Character.txt needs to be changed to do it, all character stats are defined there.

There should be several threads with the topic of character stat changing in the modding forum already. But changing enemy stats requires quite some experience because it can become quite complex, so I would not recommend it for a start.

You could download and examine the mod 'Scales' from Nexus and look what Baardvark has done.
I believe there is currently no other difficulty mod for the Extended Edition.

Joined: Jul 2016
E
Echo123 Offline OP
journeyman
OP Offline
journeyman
E
Joined: Jul 2016
Well I already did that and I found that these lines were affected

[Linked Image]

[Linked Image]

(The original author had changed the vitality to 100 and initiative to 3 in their mod. In this image, I have changed it to 1000 and 4 respectively).

The only problem I am having right now is that the enemy's vitality didn't actually increase that much. What I am saying is, I am near silvergren entrance and I am examining the rogue earth elementals. Their vitality was 428 and initiative was 16, before I used the mod(I was checking it without any mods active, or I was using the scales mod). After changing their vitality to 1000 and initiative to 4, their vitality increased to 648 and initiative remained same.

Joined: Jun 2015
F
enthusiast
Offline
enthusiast
F
Joined: Jun 2015
The attribute values are 1 lower than the values companions have when you hire them. In classic, Wolgraff started with 4 Strength and Baardvark might have wanted to roll that back. I'm too lazy to read his Scales Readme which might have information.
I'm not sure if a change to Wolgraff's stats can even affect an already started game. His stats should be created when a new game starts. From then on, only manual changes (i.e. when he is in the party) should be able to change them. (and changes by scripts of course, but I think there are none.)

I do not know why companions have one less in each attribute in stats, my best guess is that all NPCs get +1 in each attribute as a compensation for gear players might collect during the course of the game. Companions are normal NPCs until you hire them, so if my speculations are true, they need to have stats in Character.txt 1 lower than the final desired stats to achieve the results we see when we hire them. All enemies need to be adjusted accordingly then too, but it is not more than speculation from my side, no confirmed info.


I cannot say anything about the Vitality thing, I always thought it was a percentage added after base vitality was calculated.

If I look at a player's character sheet on Explorer difficulty - which I did just a moment ago -, it tells me 'From Difficulty Setting: 80%', which is the value in 'new entry "CasualPlayer"' in the unmodified Character.txt which defines the multipliers for players in Explorer difficulty.

I did a quick test, started a new game on Explorer, chose Scarlett as Fighter with no changes, that is then 6 CON, and started. On Cyseal Beach, the char sheet shows 111 vita, 62 from CON and a boost of 80%, which would be 111.6, obviously truncated. Quicksaved and exited, changed Vita of CasualPlayer to 50 and loaded the save, it showed 93 vita, which is exactly 62 + 62/2, as expected. Existed again, changed Vita to 1000 and loaded. Now Vita shows 682, which is NOT 10 times 62.
This can only be explained if the Vitality in the meta entry is added to the one in the individual stat which is 100 for players from _Hero. 62*11 = 682, 62*1 = 62, 62*1.8 = 111.6, truncated to 111.
Where the 62 comes from I do not know, of course it's from some formula.

I checked HP values for different values of CON from level 1 to level 3, they are
1 2 3
CON 5 52 79 105
CON 6 62 93 124
CON 7 72 109 145
CON 8 83 125 167
CON 9 95 143 190
CON 10 107 161 215

Now I can only guess that some (Act Part + 1) multiplier is involved in the formula for the per level increase because Larian loves that ;-). The HP values are rounded or truncated to integer of course. So try it out on different levels, divide it by (level + 1) and then build the average because the values you get should be approximately the same. The value found is what is calculated from CON, and I'm too bad in math to find any formula behind that ... and too busy and lazy right now. I assume it's not too complicated, but for me it is. Testing values with less than 5 CON is work I don't feel like doing, as are values above 10 ;-)

What I would say is that Vitality is a multiplier in % and Vitality of base stat entry and from the meta entry are added before they make the multiplier for the base HP. (So it is not 100% of base and then 1000% of the result but (100% + 1000%) of base.)

Better take back your change to 1000, no matter if you understand why the values are far from what you expected. Baardvark basically doubled HP of all NPCs that have a base of 100 and changed others accordingly, like the Void Dragon from 500% to 600% ;-)

If you want to find out and calculate why you get the values you get, you'd have to beg Raze to dig for information with the headquarters ... and I think they have little nerves for EE modders currently with D:OS2 already postponed ;-)

... or find the base HP formula yourself with the information in mind that all values you see are round()ed, truncate()d or ceil()ed. And that this (level+1) multiplier is probably used in the formula.


Joined: Sep 2015
A
addict
Offline
addict
A
Joined: Sep 2015
Quote
I do not know why companions have one less in each attribute in stats, my best guess is that all NPCs get +1 in each attribute as a compensation for gear players might collect during the course of the game. Companions are normal NPCs until you hire them, so if my speculations are true, they need to have stats in Character.txt 1 lower than the final desired stats to achieve the results we see when we hire them. All enemies need to be adjusted accordingly then too, but it is not more than speculation from my side, no confirmed info.

Didn't read the whole text (so maybe I don't get the problem right) but as I wrote in my guide: the difference between the nominal value in Character.txt for companions and the ingame value when you hire them comes from the act part (3). Attributes defined in Character.txt get increased by a certain formula depending on the 'level' (act part).

http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=582571#Post582571

I couldn't figure out the exact formula (s. my last post in the guide thread), but I gave an orientation.


My mods for DOS 1 EE: FasterAnimations - QuietDay - Samaritan
Joined: Jul 2016
E
Echo123 Offline OP
journeyman
OP Offline
journeyman
E
Joined: Jul 2016
In short, I wanted to increase every enemy's vitality. But changing the vitality value(as can be seen in the screenshots above) only seem to work until a certain limit. So there seem to be a certain limit.

And after reading both of your posts and the guide from the link above, if I understand it right, the act part is limiting the attributes? In that case, is it possible to increase each enemy's level by 3 or 5 without modifying individual entry?

Joined: Jun 2015
F
enthusiast
Offline
enthusiast
F
Joined: Jun 2015
No the Act Part does not limit attributes, attributes are scaled to the defined Act Part by an internal formula unknown to modders.

The only thing that limits attributes in the stat entry is that it is defined as a "Qualifier" according to Modifiers.txt and a "Qualifier" can have values from 1 through 10 (and the special value "None") as can be seen in ValueLists.txt

So attributes can have values from 1 to 10 in Character.txt to be valid. (And "None", which is a special case that probably brings the result to a real 0, because the used formulas probably cannot do that, as is the case with the weapon damage formulas where even Damage 0 and Damage Range 0 results in a damage different from 0.)

'Act Part' is the internal name for 'Level', internally, there is no 'Level', only an 'Act Part'. It does not matter at all, how it's called, Larian called it 'Act Part'.
The attributes you see in Character.txt are increased by the engine with some formula that has the value of the attribute and the level (Act Part) as parameters.
(As Abraxas said, this is the reason why the main companions, who all start at Level 3, have attributes each 1 more than the values defined in Character.txt.)
So what you see in Character.txt is not what the character finally has, because it's only a base value that is used to calculate the final real value.

HP is calculated from constitution for players, I cannot image this to be different for NPCs. But we neither know how an attribute entered in Character.txt increases with level, nor do we know, how the base HP is calculated from constitution.
The only thing that seems clear is that the value Vitality is used as a multiplier to those base HP. And it is a percentage. And the value from the stat entry and the one from the meta entry ("HardcoreNPC","CasualPlayer",etc.) are added, divided by 100 and then used as the multiplier for the resulting HP.

So what you changed should actually increase (most) NPC's HP by 1000% instead of the 100% that Baardvark entered in the field. I do not know if you want to fight enemies with ten times more HP than in standard.
If your game was a standard Tactician and you examined 428HP, the base HP of this mob should be around 356HP, because the standard Tactician HP multiplier for enemies is 1.2. With Baardvark's Scales that should become 356 * 2 == 712, and with your change it should be 356 * 11 = 3916.

Why you did not get the expected result must have another reason than limits, because there are no such limits, in fact a Vitality of 1000 is used in several places in stat files, almost all indestructible doors, chests, etc. use a Vitality 1000 in their stat entry.
And my test with 1000 Vitality in the meta entry showed exactly what was expected.
The Void Dragon has 'data "Vitality" "500"' in his stat entry, that will become 1500 with your change. He has only 5 constitution but that will be a lot more on level 20, which is the level defined for him.

It must have something to do with the 'testing environment' which is largely unknown to us.
As I said, if what you did was really the only change compared to a standard Tactician game, the HP value should have been MUCH higher.

Of course enemy HP would also increases if you increase mob level. This can in some cases done by increasing their 'level' (Act Part) in the stat entry but only works for enemies that do not have a manual level override. There are quite a few mobs that have level overrides in their object stats, which can be seen in the editor sidebar. Spawned mobs always use the level defined in Character.txt, but to find out which mobs get spawned, you'll have to fight your way through character scripts. Summons always use the level of the character that summoned them.

The easiest way to increase mob HP is the method you used, increasing Vitality in the meta entry. You only have to find why it did not work as expected for you.

My advice would be not to change attributes in the stats entries because that might have unforeseeable consequences, we have no knowledge of the formulas that calculate the real values used by the game. Better search for the real reason why your change did not work as expected. It's neither limits nor attributes nor Act Part.
(Well, indirectly, it could be Act Part, if some change, for whatever reason, managed to downlevel the mob to level 1. A single typo in any of the stat files can make a stat entry or a whole file be ignored and maybe even crash the game; a typo in the stat files manages to safely crash the editor on startup for sure. The game is a lot more robust than the editor and might simply ignore typos, throw away a stat entry and use default values, which could be '1' for the Act Part. I do not know how the game reacts to entries that have the Windows line ending CRLF instead of the UNIX line ending LF in stat entries. The CR would be a character you do not see in any text editor but it could make a difference. The standard text files for the game seem to use the UNIX line endings. A text editor might use a Windows line ending for changed lines if configured this way which could make lines unusable for the game. Only speculation though. But as said, it is highly unlikely that the 'error' lies in attributes or limits.)


Last edited by FrauBlake; 09/09/16 11:12 PM.
Joined: Jul 2016
E
Echo123 Offline OP
journeyman
OP Offline
journeyman
E
Joined: Jul 2016
I got the time to change every enemy's constitution and act part to as high as possible, but their stats remain unchanged.

Also, I deleted the characters.txt file to check stats. Strangely, the stats were same as a unmodded tactician run. I am confused and now I'm not sure if the original mod actually changed anything.

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
This might be a stupid point but I'm gonna ask it anyway:

Where do you have the TXT files located at?

Joined: Jul 2016
E
Echo123 Offline OP
journeyman
OP Offline
journeyman
E
Joined: Jul 2016
Originally Posted by SniperHF
This might be a stupid point but I'm gonna ask it anyway:

Where do you have the TXT files located at?


Shared/Stats/Generated/Data/Character.txt

I have also tried putting the txt file in this directory.

Main/Stats/Generated/Data/Character.txt

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Are you trying to modify a standalone or dependent mod created via the editor?

Joined: Jul 2016
E
Echo123 Offline OP
journeyman
OP Offline
journeyman
E
Joined: Jul 2016
Originally Posted by SniperHF
Are you trying to modify a standalone or dependent mod created via the editor?


I am using the 4 CC mod which you created.

Edit- Wow you helped me again SniperHF. After your post, I realized that there are stats folders inside public/*modname* folders as well. I needed to put the file in the stats folder of that folder. I wasted a lot of time in editing constitution and act part, but now after putting it in the correct folder, I realize that changing only "vitality" does the trick. Thanks a lot man.

Last edited by Echo123; 14/09/16 12:46 AM.
Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
That's indeed where I was going :P

You might want to remove the txt files you added to the other folders as well because you changed MAIN and Shared when you did that.

Last edited by SniperHF; 14/09/16 01:17 AM.
Joined: Jul 2016
E
Echo123 Offline OP
journeyman
OP Offline
journeyman
E
Joined: Jul 2016
Yeah, I will delete them. The initiate that's guarding silverglen has now about 11k HP lol. I hope this doesn't change the animal's HP though.

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Oh one other tip, It's probably better to increase constitution as opposed to using the raw vitality column. That seems to be mostly used for bosses.

Do you have the "Creating Combat" document? Larian put it out awhile ago and while it has some erroneous information from the old game I think it's still the best explanation for how most of the stats work.

I think the link is dead though so if you want I can put up a copy of it.

Joined: Jul 2016
E
Echo123 Offline OP
journeyman
OP Offline
journeyman
E
Joined: Jul 2016
Originally Posted by SniperHF
Oh one other tip, It's probably better to increase constitution as opposed to using the raw vitality column. That seems to be mostly used for bosses.

Do you have the "Creating Combat" document? Larian put it out awhile ago and while it has some erroneous information from the old game I think it's still the best explanation for how most of the stats work.

I think the link is dead though so if you want I can put up a copy of it.


Oh man, I think I deleted those character.txt files where I increased constitution. Guess I'll have to start from the beginning again.

I didn't know that there was such document. If you can upload it, then please do. That will be very helpful.

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
If you're starting from scratch I'd switch to using the excel files, unless you don't have excel anyway.

Joined: Jul 2016
E
Echo123 Offline OP
journeyman
OP Offline
journeyman
E
Joined: Jul 2016
There are several excel files inside public>*modname*(four CC) folder(including the character excel file). Does the game check for excel files first or the txt files?

Joined: Sep 2015
A
addict
Offline
addict
A
Joined: Sep 2015
Quote
Edit- Wow you helped me again SniperHF. After your post, I realized that there are stats folders inside public/*modname* folders as well. I needed to put the file in the stats folder of that folder. I wasted a lot of time in editing constitution and act part, but now after putting it in the correct folder, I realize that changing only "vitality" does the trick.

And in Public\Shared it doesn't work? I just tried to give a vitality boost to CasualNPC and GEN_Bodyguard in an editor-modded game, and the vitality bonus was applied correctly.


My mods for DOS 1 EE: FasterAnimations - QuietDay - Samaritan
Joined: Jul 2016
E
Echo123 Offline OP
journeyman
OP Offline
journeyman
E
Joined: Jul 2016
Originally Posted by Abraxas*
Quote
Edit- Wow you helped me again SniperHF. After your post, I realized that there are stats folders inside public/*modname* folders as well. I needed to put the file in the stats folder of that folder. I wasted a lot of time in editing constitution and act part, but now after putting it in the correct folder, I realize that changing only "vitality" does the trick.

And in Public\Shared it doesn't work? I just tried to give a vitality boost to CasualNPC and GEN_Bodyguard in an editor-modded game, and the vitality bonus was applied correctly.


That's something I don't understand. Like I mentioned in post #3, I tested it and it worked until a certain vitality limit(vitality was 428, and it was increased to 648). So, in "hardcorenpc", vitality 80 was same as vitality 100, and ALSO same as vitality 2000.

Later I emptied the shared folder, and checked in-game to find that the npc(initiate guarding silverglen entrance/rogue earth elemetal) had 648 HP.

Page 1 of 2 1 2

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