Log in

View Full Version : Import NPC Thac0



raif11152
June 18th, 2022, 06:39
When I import an NPC the Thac0 in the Stat lock I import is always increased by 1. Like if I import a monster with thac0 15, it populates the field with a 16.

Bug or feature?

celestian
June 18th, 2022, 07:08
When I import an NPC the Thac0 in the Stat lock I import is always increased by 1. Like if I import a monster with thac0 15, it populates the field with a 16.

Bug or feature?

Give me a copy of the statblock and ill see if its either of them ;)

raif11152
June 18th, 2022, 18:56
I am importing monsters from the Greyhawk MC Appendix. It happens for every one of the 20+ monsters i've imported, but for example:

Grung
CLIMATE/TERRAIN: Tropical and subtropical/Swamps
FREQUENCY: Uncommon
ORGANIZATION: Tribal
ACTIVITY CYCLE: Day
DIET: Carnivore
INTELLIGENCE: Average (8-10)
TREASURE: C
ALIGNMENT: Lawful Evil

NO. APPEARING: 4-48
ARMOR CLASS: 7
MOVEMENT: 9, Sw 12
HIT DICE: 1 + 2
THACO: 19
NO. OF ATTACKS: 2
DAMAGE/ATTACK: 1-3 (bite)/1-6 (weapon)
SPECIAL ATTACKS: Poison
SPECIAL DEFENSES: Nil
MAGIC RESISTANCE: Nil
SIZE: S (3' tall)
MORALE: Elite (13)
XP VALUE:
Normal: 120
Tadpole: 7
Juvenile: 35
Shaman, 1st or 2nd: 175
Shaman, 3rd: 270

celestian
June 18th, 2022, 20:55
Found the issue. I'll submit the fix (their process wont do anything with it until NEXT Tuesday not the one coming up).

What it is doing right now is calculating the THACO based on HD, so 21-HD. This is a fallback method when it didnt find THACO. The issue was that my search pattern matching wasn't working as I expected (I come from regular expression and the LUA pattern matching isnt exactly the same).

raif11152
June 19th, 2022, 06:48
Awesome. It's not much of an inconvenience. But it was a headscratcher. :)