Jump to content


Photo

[COMPLETE] Proficiency Modifier Mod


  • Please log in to reply
15 replies to this topic

#1 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 20 February 2011 - 09:00 PM

Hmm, a little related stuff, can you extend/fix the opcode #233 so we can set proficiencies to zero, or to numbers that are less than the current one the character possesses.


Can someone explain why they need this?
This is straightforward enough, but since proficiencies are stats, you would need to hold a zero proficiency with an effect if you want it to last.

Edited by Ascension64, 25 February 2011 - 01:30 AM.

--------------
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 phordicus

phordicus
  • Member
  • 212 posts

Posted 22 February 2011 - 02:11 PM

Hmm, a little related stuff, can you extend/fix the opcode #233 so we can set proficiencies to zero, or to numbers that are less than the current one the character possesses.


Can someone explain why they need this?
This is straightforward enough, but since proficiencies are stats, you would need to hold a zero proficiency with an effect if you want it to last.

i'm going to assume it's for changing npc proficiencies. setting it to 0 on a prof they already have pips in does nothing tangible (math! X+0=X!) and the syntax doesn't allow for setting a negative number, so the only way to get rid of a CRE's existing proficiencies is actually deleting the effect from the CRE (and then re-assigning it if what you wanted was a smaller # of *s).
Druid Kit Enhancements 1.0 (requires Dispel Magic fix, whether ToBEx's or Taimon's)

#3 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 22 February 2011 - 04:52 PM

Doing so will ruin DS to extent, should effects sharing the same prof overlap - and they do sometimes.

Retired from modding.


#4 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 22 February 2011 - 04:58 PM

DS with ToBEx can shortcircuit the problem by using the expanded stat.ids to ensure that different spells are mapped to different stats, rather than them being forced to share a stat.

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 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 22 February 2011 - 05:41 PM

Well, tt can. I suppose the increase of trigger size won't be significant enough to warrant a notable increase in loading time. Still... If you ask me, I'd try to not make a feature that will break mods if not accounted for.

*Casts Summon Imp*
- Come forth, Jarno!

Retired from modding.


#6 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 22 February 2011 - 10:08 PM

Doing so will ruin DS to extent, should effects sharing the same prof overlap - and they do sometimes.

Would it ? Cause if the zero has no effect as now, the Detectable Stats effect would have no effect as it was... so what's the logic there ? Hate to say this, but you could replace this...
...
THEN
  RESPONSE
    SetGlobal("TheProffsaZero","GLOBAL",1)
    ApplySpell("donothing")
...
To:
...
THEN
  RESPONSE
    SetGlobal("TheProffsaZero","GLOBAL",1)
    NoAction()
...


And what comes to the 1-5's, there shouldn't be that much of a problem to always set the stat to so that it actually means something, and not just "let's increase this by one, just to be sure, so we can then decrease it to a total of zero with a proper spell, never mind what the actual effect was".

But ah... then again, this is not needed anymore. As there's other ways to go around the problem that the manual doesn't say.

Edited by Jarno Mikkola, 22 February 2011 - 11:37 PM.

Deactivated account. The user today is known as The Imp.


#7 phordicus

phordicus
  • Member
  • 212 posts

Posted 23 February 2011 - 01:46 AM

nevermind. it didn't work as an overwrite when i used

set_bg2_proficiency ~proficiencywhatever~ 0

but

set_bg2_proficiency 69 0

actually removed the effect/prof altogether.

sometimes it's fun being a newb and getting to learn things. i almost feel young.
Druid Kit Enhancements 1.0 (requires Dispel Magic fix, whether ToBEx's or Taimon's)

#8 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 23 February 2011 - 01:52 AM

SET_BG2_PROFICIENCY is an install-time BG2 command; I suspect Jarno is talking about game-time adjustments (whether it's something actually needed or only theoretically needed is up for debate).

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.


#9 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 23 February 2011 - 04:06 AM

But ah... then again, this is not needed anymore. As there's other ways to go around the problem that the manual doesn't say.

So my question remains unanswered. What's the reason for the request? What are you trying to do with such a feature?
While "so we can set profs to 0" is a method, it is not the aim. I'm asking about the aim.

--------------
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)


#10 DavidWallace

DavidWallace
  • Validating
  • 337 posts

Posted 23 February 2011 - 06:21 AM

DS with ToBEx can shortcircuit the problem by using the expanded stat.ids to ensure that different spells are mapped to different stats, rather than them being forced to share a stat.


It can but it's not going to, at least as long as I'm caretaking it (others can of course do as they will). The DS stat list has been stable for more than five years and I'm very loath to change it now - especially since that would require retrofitting plenty of older mods with ToBEx and dropping support for non-ToBEx-compatible installs.

#11 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 23 February 2011 - 07:15 AM

After the obligatory acknowledgment that we're discussing seriously the consequences of something that was suggested by Jarno Miccola...

It can but it's not going to, at least as long as I'm caretaking it (others can of course do as they will). The DS stat list has been stable for more than five years and I'm very loath to change it now - especially since that would require retrofitting plenty of older mods with ToBEx and dropping support for non-ToBEx-compatible installs.

Adapting old mods is an issue, but this doesn't necessarily add compatibility problems for non-ToBEx installs: the current DS stat list would still continue working on non-ToBEx installs, it would just need adapting for ToBEx installs (again, if Jarno's suggestion is implemented by Ascension64). Of course, maintaining two implementations of DS is more busy work that shouldn't be done unless really needed.

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.


#12 -GuestGuestGuest-

-GuestGuestGuest-
  • Guest

Posted 23 February 2011 - 10:18 AM

So my question remains unanswered. What's the reason for the request? What are you trying to do with such a feature?
While "so we can set profs to 0" is a method, it is not the aim. I'm asking about the aim.


It would allow modders to e.g. have a cursed item which lowers the NPCs proficiency when using it. Or a potion that increases proficiency for a period of time. Or a poison that randomly removes a proficiency point every x periods.

#13 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 23 February 2011 - 01:53 PM

So as I understand it, DS uses:
109 CLERIC_HALLOW
110 CLERIC_ARMOR_OF_FAITH
116 WIZARD_SPELL_DEFLECTION
117 PROTECTION_FROM_EVIL
118 TRUE_SIGHT
119 CLERIC_CHAOTIC_COMMANDS
120 CLERIC_INSECT_PLAGUE
121 CLERIC_BLADE_BARRIER
122 CLERIC_PHYSICAL_MIRROR
123 CLERIC_SHIELD_OF_THE_ARCHONS
124 CLERIC_REGENERATION
125 WIZARD_FIRE_SHIELD
126 WIZARD_PROTECTION_FROM_MAGIC_ENERGY
127 WIZARD_MISLEAD
128 WIZARD_PROTECTION_FROM_MAGIC_WEAPONS
129 WIZARD_SPELL_TURNING
130 WIZARD_PROTECTION_FROM_THE_ELEMENTS
131 CLERIC_FREE_ACTION
132 WIZARD_KHELBANS_WARDING_WHIP
133 CLERIC_DEFENSIVE_HARMONY
134 LEVELDRAIN
with settings between 0-9.

Remember that when I try to implement TobEx features, I aim to maintain vanilla compatibility (which also means compatibility with mods thereof). This would be slightly untrue because used proficiencies values range from 0-7 before wrapping over.

Hence, if I were to change modify proficiencies opcode it would be something like:

#233 (0x0E9) Stat: Proficiency Modifier [233]
Parameter #1: Amount
Parameter #2 Low: Type
Parameter #2 High: Behaviour
Description:

Applies 'Behaviour' to the weapon proficiency points for the weapon type specified in the 'Type' field with the value specified by the 'Amount' field, for the targeted creature(s).

Values for 'Behaviour' are:
0 (vanilla behaviour) set proficiency 'Type' to 'Amount' only if 'Amount' is higher than the current profiicency points
1 Proficiency points of 'Type' = Proficiency points of 'Type' + 'Amount'

Values for 'Type' are:
...proficiencies...


Current DS wouldn't use the high word of param2.
The untrue part of above would be that I would need to limit used proficiencies (not the ones used by DS) between 0 and 5 because values of 6 and 7, while allowed, are not described in WSPECIAL.2DA and would effectively count as 0. (i.e. 4 points in Bastard Sword + 2 points = 0 points). Again, this won't actually affect DS.
Obviously, any mod that decides that they want to change PROFICIENCYMARTIALARTS, for example, using the sum 'Behaviour' would muck up DS (CLERIC_ARMOR_OF_FAITH).

P.S. I forgot to mention, sum would apply ad hoc (after all set), so set 2, add 3, set 0 = 5 (since param2 high = 0 still chooses the highest).

Edited by Ascension64, 23 February 2011 - 02:00 PM.

--------------
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)


#14 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 25 February 2011 - 01:30 AM

Here is what I've got.

-----1030 Proficiency Modifier Mod [M]
Extends the proficiency modifier opcode to allow incrementation/decrementation of proficiencies
Standard Throne of Bhaal proficiencies are limited to a maximum of 5 stars

Description
#233 (0x0E9) Stat: Proficiency Modifier [233]
Parameter #1: Amount
Parameter #2 Low: Type
Parameter #2 High: Behaviour
Description:

Applies 'Behaviour' to the weapon proficiency points for the weapon type specified in the 'Type' field with the value specified by the 'Amount' field, for the targeted creature(s).

Values for 'Behaviour' are:
0 Set proficiency 'Type' to 'Amount' only if 'Amount' is higher than the current proficiency points
1 Proficiency points of 'Type' = Proficiency points of 'Type' + 'Amount' (applied after all of Behaviour 0)

Values for 'Type' are:
See STATS.IDS for proficiency values

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)


#15 rajman

rajman
  • Member
  • 28 posts

Posted 13 March 2011 - 12:02 PM

As of beta20, this component is causing issues when dual classing: on taking the first level in the new class, all profs ( old ones, new one, even styles, even if the class is capped at * or ** ) are set to *****.

Edited by rajman, 13 March 2011 - 12:04 PM.


#16 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 13 March 2011 - 05:14 PM

As of beta20, this component is causing issues when dual classing: on taking the first level in the new class, all profs ( old ones, new one, even styles, even if the class is capped at * or ** ) are set to *****.

How very peculiar. I've fixed this issue, thanks.
It appears that the proficiency stats are compartmentalised such that bits0-2 represent current proficiency points, and bits3-5 store the original class proficiency points in a dual-class.

--------------
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)