Jump to content


Photo

[WIP] Damage Opcode Changes


  • Please log in to reply
7 replies to this topic

#1 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 28 January 2011 - 02:23 AM

Original request

Some time ago I've asked in PM for no casting interruption if no damage (100% res) is taken.

I lied. This is done.

-----870 No Spell Interruption On Zero Damage [T]
Modifies the damage opcode such that if damage is reduced to zero (with normal damage behaviour; wParam2Low = 0), spellcasting and a casting animations is not interrupted

Options:
-0: disabled
-1: enabled


Thinking more about it, could the concentration check be implemented, using creature's level as a base?

if ((level + 1d20) < damage) then interrupted=1
else interrupted=0

This is now possible, although I'd like a discussion on what people want for this before implementing anything concrete. Obviously, concentration didn't exist in ADnD, but in current rules getting attacked while casting a spell triggers a concentration check of (10 + spell level + damage taken).

Modifiers are possible if we use a hard-coded stat, and can extend to depend on WIS, INT, or whatever via 2DA.

If someone is willing to make a big 'concentration' mod, I suppose it is worthwhile putting this on.

Need discussion, please.

Otherwise, I have made some other minor bugfixes to the damage opcode.

----860 Damage Fix [F]
Fixes the following bugs with the damage opcode:
1. Killing someone with magic fire damage would cause a WEIRD damage assertion failure
2. Hitting someone with magic cold damage would not play a hit sound

Options:
-0: disabled
-1: enabled


--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#2 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 28 January 2011 - 02:32 AM

Perhaps killing someone with cold damage doesn't shatter the victim (or, at least, doesn't destroy its inventory)?

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#3 Sam.

Sam.
  • Administrator
  • 1294 posts

Posted 28 January 2011 - 09:30 AM

Perhaps killing someone with cold damage doesn't shatter the victim (or, at least, doesn't destroy its inventory)?

If you're asking for the component to do this, have you seen Miloch's P5Tweaks?

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#4 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 28 January 2011 - 09:34 AM

Yes, but support from ToBEx is more reliable (of course, only if it doesn't require more decompiling, in which case A64's time is better spent elsewhere).

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#5 Galactygon

Galactygon

    Modding since 2002

  • Member
  • 938 posts

Posted 28 January 2011 - 10:08 AM

[quote name='Ascension64' date='28 January 2011 - 10:23 AM' timestamp='1296210232' post='506494']
Modifies the damage opcode such that if damage is reduced to zero (with normal damage behaviour; wParam2Low = 0), spellcasting and a casting animations is not interrupted
[/quote]
You never cease to amaze us.

Options:
-0: disabled
-1: enabled[/quote]

[quote name='Ascension64' date='28 January 2011 - 10:23 AM' timestamp='1296210232' post='506494']
[quote]Thinking more about it, could the concentration check be implemented, using creature's level as a base?

if ((level + 1d20) < damage) then interrupted=1
else interrupted=0[/quote]
This is now possible, although I'd like a discussion on what people want for this before implementing anything concrete. Obviously, concentration didn't exist in ADnD, but in current rules getting attacked while casting a spell triggers a concentration check of (10 + spell level + damage taken).

Modifiers are possible if we use a hard-coded stat, and can extend to depend on WIS, INT, or whatever via 2DA.
[/quote]

Of all things, I think only the d20 roll should be hardcoded. This concentration check could work a bit like THAC0, the bonus is determined in various class tables on a per level basis (like base THAC0 is). Another table would determine how much and what type of damage gives what sort of equivalent "concentration damage". This would allow some modder to indicate that poison damage is less likely to break concentration than the same amount in crushing damage. The table could look something like this (row is damage type, column is damage value, entry is the damage used for the purposes of calculating spell disruption) :
   SLASHING PIERCING CRUSHING ...
1  1        1        1
2  2        2        2
3  3        3        3
...

For WIS, INT, etc. modifiers a better idea would be to build tables of .effs or .spls that are applied whenever the character has a certain value for a certain stat, and then stripped/reapplied when the stat changes. These .effs/.spls could carry a whole slew of effects, including a concentration stat modifier. This will satisfy many modmakers, who might be looking for something like, bards/sorcerers gaining additional spell slots based on high charisma. And it's less work for you too, since you don't have to bother on implementing every single stat dependant request.

This table would look like this:
         1        2        3        4        5     ...     25
EFFECT1  MODEFF11 MODEFF21
EFFECT2  MODEFF12 MODEFF22
EFFECT3  MODEFF13 MODEFF23
...
So a character with 2 WIS will carry effects MODEFF21.eff, MODEFF22.eff, and MODEFF23.eff, which could be anything.

[quote name='Ascension64' date='28 January 2011 - 10:23 AM' timestamp='1296210232' post='506494']
Need discussion, please.
[/quote]
You've got plenty. There is one driving concept behind all of my ideas: hardcode as little as possible.

Otherwise, I have made some other minor bugfixes to the damage opcode.
[quote]----860 Damage Fix [F]
Fixes the following bugs with the damage opcode:
1. Killing someone with magic fire damage would cause a WEIRD damage assertion failure
2. Hitting someone with magic cold damage would not play a hit sound
[/quote]
This will be one of those must-have components.

[quote name='the bigg' date='28 January 2011 - 10:32 AM' timestamp='1296210743' post='506495']
Perhaps killing someone with cold damage doesn't shatter the victim (or, at least, doesn't destroy its inventory)?
[/quote]
I think this shatter stuff is really neat, a pity cold death and petrification only looks nice on paletted avatars. So I'd rather vote for a DropInventory instead.

-Galactygon
Posted Image

#6 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 28 January 2011 - 05:03 PM

I'm speachless speechless :)

10 + spell level + damage taken

Spell-like innates will count as 1 then, but I guess that's neglectable.

Modifiers are possible if we use a hard-coded stat, and can extend to depend on WIS, INT, or whatever via 2DA.

By hardcoded you mean from expanded STATS.IDS? That would be very useful.

This concentration check could work a bit like THAC0, the bonus is determined in various class tables on a per level basis (like base THAC0 is). Another table would determine how much and what type of damage gives what sort of equivalent "concentration damage". This would allow some modder to indicate that poison damage is less likely to break concentration than the same amount in crushing damage. The table could look something like this (row is damage type, column is damage value, entry is the damage used for the purposes of calculating spell disruption) :

Imo all classes can be treated the same, as neither strikes me as having greater affinity for casting under sword strikes.

Table for difficulty of damage types is good. Though using a single column for percentage is better, because damage can jump over 100 sometimes (crit, backstab, etc.), and that'd be one real long table then.

For WIS, INT, etc. modifiers a better idea would be to build tables of .effs or .spls that are applied whenever the character has a certain value for a certain stat, and then stripped/reapplied when the stat changes. These .effs/.spls could carry a whole slew of effects, including a concentration stat modifier. This will satisfy many modmakers, who might be looking for something like, bards/sorcerers gaining additional spell slots based on high charisma. And it's less work for you too, since you don't have to bother on implementing every single stat dependant request.

Sounds great.

Edited by GeN1e, 28 January 2011 - 05:48 PM.

Retired from modding.


#7 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 28 January 2011 - 05:44 PM

I'm speachless :)

You don't say?

</grammarnazi>

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#8 Galactygon

Galactygon

    Modding since 2002

  • Member
  • 938 posts

Posted 30 January 2011 - 07:48 AM

Imo all classes can be treated the same, as neither strikes me as having greater affinity for casting under sword strikes.

I guess this will work. If some modder decides that clerics and monks deserve a higher concentration value, then they can apply concentration modifiers through CLAB/LU files.

Table for difficulty of damage types is good. Though using a single column for percentage is better, because damage can jump over 100 sometimes (crit, backstab, etc.), and that'd be one real long table then.

Sounds good.

-Galactygon
Posted Image