Jump to content


skellytz

Member Since 08 Nov 2015
Offline Last Active Private

Posts I've Made

In Topic: ToB existing translations

08 March 2019 - 02:15 PM

German, French, Polish, Russian.


In Topic: BGT 1.19: bugs and typos thread

24 February 2019 - 08:05 AM

I like to get things done. Here's the package which restores the classic BG1 spawns.

 

The files from the package need to merge with BGT files before you install BGT:

 

1. First copy the folder "bgt" and the file "setup-bgt.exe" extracted from "bgt-v1.20.zip" to your BG2 directory

 

2. Copy the folder "bgt" extracted from the downloaded "spawnfix.zip" to your BG2 directory and allow replacing files

 

3. Run "setup-bgt.exe" and install BGT

 

Basically, I wrote a patch that reads spawn points in the classic BG1 ARE files and then replaces the values in the ARE files distributed by BGT. I inserted protection against invalid resrefs: everything was fine (the expected WOLF.cre had to be renamed to BGWOLF.cre). The spawn parameters are all the same as in the classic BG1 with the exception of spawn method flags:

 

- normalize to "spawn until paused (0)"

 

- keep "disable after spawn (1)" if set in the classic BG1

 

- remove "spawn paused (2)" (the engine sets in internally)

 

- remove unused flags (3) - (15)

 

Of course, encounter difficulty has been adjusted for the BG2 engine. Confusingly enough, rest encounters use set modifiers for encounter difficulty in both BG1 and BG2, so they don't need any patching.

 

This should be a good base for further tweaking of random spawn difficulty in BGT Tweaks (e.g., multiplying the encounter difficulty).

 

Edit: While testing, please remember that many BG1 areas have varying encounter difficulty and max spawned creatures in spawn points. So, you may be getting fewer spawned creatures than the formula indicates, because of the max creature cap set in a given spawn point. BGT Tweaks could allow to alter the difficulty by multiplying the encounter difficulty and give the option to normalize or set the max spawned creatures even higher.


In Topic: BGT 1.19: bugs and typos thread

23 February 2019 - 08:41 AM

IIRC, the formula itself was correct, but in BG2 the scaling factor ended up being off by 100 so you always ended up with one creature spawning. That would jive, I think, with your testing.

 

The IESDP formula? It isn't correct, because it says (Frequency (offset 0x78) * Average Party Level) / Creature Power, while it's actually (Encounter Difficulty (offset 0x76) * Average Party Level * Party Members) / Creature Power Level.

 

Using this knowledge, wouldn't you like to restore proper BG1 spawns?


In Topic: BGT 1.19: bugs and typos thread

23 February 2019 - 05:56 AM

great investigative work! And with a solution too!

 

I've also discovered that IESDP is wrong. It states:

 

Base creature number to spawn. The actual number to spawn is given by:

(Frequency * Average Party Level) / Creature Power
With results rounded down.

 

The correct formula is actually pretty much the same in both BG1 and BG2. The only difference is the engine interpretation of Encounter Difficulty, which in BG1 is a set number modifier and in BG2 a percentage modifier.

 

BG1:

 

(Encounter Difficulty set number * Average Party Level * Party Members) / Creature Power Level with results rounded down

 

BG2:

 

(Encounter Difficulty % * Average Party Level * Party Members) / Creature Power Level with results rounded down

 

Note: Each class for multi-classed characters is treated as a "party member."

 

This needs more testing. Anybody would like to help me confirm the two formulas?


In Topic: BGT 1.19: bugs and typos thread

22 February 2019 - 06:50 AM

In regard to BGT spawn system:
 
King Diamond changed the spawns to groups, because he couldn't figure out the BG2 spawning formula. Using BG1 values typically resulted in only one creature spawning within a single spawn point. Apparently, he also incorrectly assumed the creature slots in spawn points were a list of creatures to be spawned together, rather than a pool of individual creature types for the engine to select from.
 
I think I may have nailed down the BG2 formula. IESDP says: (Frequency * Average Party Level) / Creature Power with results rounded down. But in BG2 it seems to be:
 

(Encounter Difficulty % * Average Party Level * Party Members) / Creature Power Level with results rounded down.


Encounter Difficulty is actually a percentage modifier. Spawn Rate (frequency/delay before spawn) doesn't seem to affect the results. For example:
 

Creature 1: GIBBER.cre
Creature 2-10: none
Creature Count: 1
Encounter Difficulty: 300%
Spawn Rate: 1
Max Spawned Creatures: 10
Probability: 100%

Gibberling CRE Power Level = 4
3 Party Members (Fighter Lvl 4, Mage Lvl 1, Thief Lvl 1)
Average Party Level = 2

Number of Gibberlings to spawn: (3 * 2 * 3) / 4 ≈ 4 (rounded down)

 

1 Party Member (Fighter Lvl 4)
Average Party Level = 4

Number of Gibberlings to spawn: (3 * 4 * 1) / 4 = 3

 

Encounter Difficulty: 100%

1 Party Member (Fighter Lvl 4)
Average Party Level = 4

Number of Gibberlings to spawn: (1 * 4 * 1) / 4 = 1


It's entirely possible to use spawn points just like in the classic BG1 by tweaking the encounter difficulty.

Salk, would you like to help me out with testing the formula?