Jump to content


Future tweak ideas - post 'em here

95 replies to this topic

#91 Salk

  • Modders
  • 2935 posts
  • Gender:Male
  • Location:Sweden

Posted 28 November 2017 - 03:36 AM

Eh I feared that.


Too bad then.

#92 qwm.fur

  • Members
  • 2 posts

Posted 10 December 2017 - 06:33 AM

Exe mod, I think.



Please, excuse my ignorance. I never used the Gibberlings Tweaks, so I don't know what's inside.

Does the sentence I quoted mean that the code modding is outside the scope of this project?


The problem is: I was always disappointed by the fact that IWD2 does not use HPCONBON.2DA rule table which means there's no easy way to implement CONstitution-based HP-regeneration.

HP-regen is my personal fetish, which lead me to dislike the game without it, 'cause I don't feel like the sleeping without a camp after every couple of battles is the way a group of real adventurers would go.

Some days ago I decided to implement regeneration the hard way, and found a bug during this research.


It resides in the function (sub_542a90 in GOG version):

CRuleTables::RollHitPoints(int nSides, int nRolls, int nLevel, int nMinRoll, int nModifier)

This method is called on level-ups to roll for hit points. When the roll result is less then nMinRoll, the nMinRoll value is used.

But when it is greater, then the die is rerolled, and the new value is used indiscriminately, instead of just using the old value.

This means that the HP value rolled on level-ups tend to be lesser than average, and can even be less than nMinRoll.


For player characters nMinRoll usually equals 1, which makes HP roll of 1 more probable than all the other values. 

Edited by qwm.fur, 10 December 2017 - 06:34 AM.

#93 lynx

  • Modders
  • 3038 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 10 December 2017 - 09:13 AM

To the first part, yes. To the second: interesting, this is in iwd2? At one point there was an exe mod for it at Sorcerer's place, but it has long been abandoned. It's the only thing of that kind afaik and not sure if it contains sources; however I doubt this bug was tackled.


Of course this is not a problem in gemrb, but why don't you just use a script to do the regeneration? A bunch of con checks and timers ...

GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...

#94 qwm.fur

  • Members
  • 2 posts

Posted 10 December 2017 - 10:29 AM

Yes, the bug is in IWD2.

What about scripting, I guess I'm not a huge fan of both the scripting language and its API. I got too tired of implementing things with an instrument that doesn't seem adequate for such tasks.

So now I'm looking for a way to re-implement some features that pre-IWD2 were a part of the engine. And add some features I previously used scripts for.


Actually, at first I hoped those features are still a part of the engine, and all I need is some bit-hacking. But the content was actually removed.

For example, if we talk about HP-regen, all that's left is a rudimentary field m_lastRegenerationTime in CGameSprite objects which gets updated with actual game time every once the effect list of the creature gets processed. Other than that, this field is never used for anything else.


Anyway the rudimentary field update was a good injection point for a call to my regeneration subroutine, so I guess I should be thankful to some IWD2 programmer -)


Now I'm looking for an easy way to implement XPBONUS.2DA. I like the idea of receiving XP for disarming traps, etc.

But it demands changes in three parts of one nasty big function, so I might as well get bored too soon.


Well, thank you for your answer. It's a pity there's noone who fix bugs in original IWD2 though.

I guess gemrb is written from scratch, so it most likely has its own unique bugs, and not the ones inherited from vanilla Infinity Engine -)

#95 zenblack

  • Members
  • 69 posts

Posted 10 December 2017 - 07:06 PM

After playing through IWD:EE I think we need an option to use the IWD spell effects. They are just IMO better.  Grease, Web, Clouds all look much cleaner.

#96 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6360 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 10 December 2017 - 10:11 PM

... I think we need an option to use the IWD spell effects. They are just IMO better.  Grease, Web, Clouds all look much cleaner.

They do ?

Show me a real blue spider web from the actual real world, and then come talk about looks.

And you do know that you can enable the 3d animations that look a bit better in BG2 ... than the ones that don't use that feature.

Edited by Jarno Mikkola, 11 December 2017 - 06:38 AM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

Reply to this topic


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users