Jump to content

Photo

best stat.ids entry to highjack


31 replies to this topic

#1 K4thos

K4thos
  • Modders
  • 1198 posts
  • Gender:Male

Posted 13 August 2018 - 02:02 PM

In order to implement this system I will need 2 stat.ids entries. Spell states functionality is not an option due to design decisions that Beamdog made (those stats don't accept values and splstate is capped at just 255 entries. I need a range of at least 0-20 per stat, which would be 40 spell states entries - unacceptable in heavily modded game).

 

Hence the question - which stat.ids entry do you think would be a best candidate to highjack? I was thinking about following ones:

1. 31 INTOXICATION - can be made permanent if assigned with timing 9 and its effects don't seem to be present until you reach 50 points (as mentioned I need smaller range). On top of that can be easily checked and edited with CheckStat and ChangeStat in order to reset the value when player drinks booze. The effect can be simulated with ApplySepllRes and I don't think any mod uses this stat yet, so I think this one is pretty safe bet for one of the 2 stats needed in my mod.

2. 43 XPVALUE - other than XP that the character gives when killed I don't think this stat is used for anything else when it comes to Player1-6. On the other hand it would be a bit jarring if player decides to kill party NPC and see for example "3 XP gained" message, so maybe it's not the best candidate. Although I will use it if there won't be a better proposal.

3. 134 EXTRAPROFICIENCY20 - unlike other entries this one doesn't use name introduced by Detectable Spells mod. Is it used for anything in vanilla game? I'm pretty sure some mods may use it but if it's not related to commonly used Detectable Spells than conflicting with such mods is acceptable.

4. Moving one of the Detectable Spell entries into splstate.ids. Which of those DS stats requires check that is simple True/False and don't need value increasement, though? Maybe one of them is obsolete in EE engine?

 

Any ideas?


Edited by K4thos, 14 August 2018 - 01:40 PM.


#2 subtledoctor

subtledoctor
  • Modders
  • 2751 posts
  • Gender:Male

Posted 13 August 2018 - 04:32 PM

XPVALUE is a good find if that's true, but... is there an opcode that can change it?

Various mods of mine use different bits of stat 134; the still-in-progress psionics mod uses some of 134 and all of 132.

Kjeron mentioned an example once of a stat whose checks in the vanilla game were moved entirely to a spellstate, as of patch 2.0. But I forget which stat it is. It's in some thread around here... maybe that thread started by you about a year ago? Also there may be more stats freed up in the latest patch.

Of course just because the EE devs have moved over to checking the associated spellstates, doesn't mean various AI mods don't still use the DS stats.

If looking at proficiencies, you might look at some that are not likely to interact even if DS does use it. That's why I am comfortable using 132 (KHELBENS_WARDING_WHIP) in a mod for a thief kit that cannot multi- or dual to wizard.

Of course, if using a proficiency (stats 89-134) there is the issue that opcode 233 cannot decrement them.

There is Tracking, which can go from 0-99 and has an opcode that can set/increment/decrement it.

There are also the arcane and divine spell failure stats, which can be 0-100 and can be set/changed by opcodes... these could be useful for classes with no access to one or the other kind of spellcasting...

But the tl;dr: from my investigations is that, generally, for using stats as actual stats, the situation is not good.

Edited by subtledoctor, 13 August 2018 - 05:06 PM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#3 K4thos

K4thos
  • Modders
  • 1198 posts
  • Gender:Male

Posted 13 August 2018 - 05:08 PM

XPVALUE is a good find if that's true, but... is there an opcode that can change it?
I don't think so, but modification via opcode is not needed for the mod I'm working on. XPVALUE works with CheckStat and ChangeStat. I need it as stat to make it work with splprot.2da.
 

Various mods of mine use different bits of stat 134; the still-in-progress psionics mod uses some of 134 and all of 132. 

will skip this one in this case

 

Kjeron mentioned an example once of a stat whose checks in the vanilla game were moved entirely to a spellstate, as of patch 2.0. But I forget which stat it is. It's in some thread around here... maybe that thread started by you about a year ago? Also there may be more stats freed up in the latest patch. 

thanks, will check my old topic.

 

There are also the arcane and divine spell failure stats, which can be 0-100 and can be set/changed by opcodes... these could be useful for classes with no access to one or the other kind of spellcasting... 

if you mean in relation to the design I've proposed the bolded part is not the reason why I need those 2 stat.ids entries. They are meant to be used just for 2 missing skills that can't be implemented without stats:

- Use Magic Device

- Concentration (in order to implement it properly exe hack to change CONCENTR.2da formula would be needed as well (from Luck into some other stat number).

 

There is Tracking, which can go from 0-99 and has an opcode that can set/increment/decrement it. 

 

Tracking (Wilderness Lore) is another IWD2 skill that the mod is meant to implement (well, it's meant to bring all of them). Even though this skill doesn't really need stat.ids entry to work as intended I think it would be a bit silly to replace it when it's actually used. May be useful for other mods, if someone decides to take advantage of Wilderness Lore via spells.


Edited by K4thos, 13 August 2018 - 09:52 PM.


#4 Grammarsalad

Grammarsalad
  • Modders
  • 479 posts
  • Gender:Male

Posted 14 August 2018 - 09:36 AM

I'm almost positive that @Kjeron has said that the 'extra' proficiency stats are no longer being used by the ai in 2.5 (though, they are still set by spells--for scs, maybe?) not sure..

#5 kjeron

kjeron
  • Members
  • 131 posts

Posted 14 August 2018 - 10:23 AM

I'm almost positive that @Kjeron has said that the 'extra' proficiency stats are no longer being used by the ai in 2.5 (though, they are still set by spells--for scs, maybe?) not sure..

The Thief Skill multipliers (Scripting States) are no longer used.
The extra proficiency stats are still used, despite almost all of them now applying Spellstates as well.

#6 subtledoctor

subtledoctor
  • Modders
  • 2751 posts
  • Gender:Male

Posted 14 August 2018 - 10:23 AM

XPVALUE is a good find if that's true, but... is there an opcode that can change it?

I don't think so, but modification via opcode is not needed for the mod I'm working on. XPVALUE works with CheckStat and ChangeStat. I need it as stat to make it work with splprot.2da.


But if an opcode can't change it, you coudn't do things like make a Ring of Concentration or whatever...
 

There are also the arcane and divine spell failure stats, which can be 0-100 and can be set/changed by opcodes... these could be useful for classes with no access to one or the other kind of spellcasting...

if you mean in relation to the design I've proposed the bolded part is not the reason why I need those 2 stat.ids entries. They are meant to be used just for 2 missing skills that can't be implemented without stats:
- Use Magic Device
- Concentration (in order to implement it properly exe hack to change CONCENTR.2da formula would be needed as well (from Luck into some other stat number).


No, I meant that if you use the "Divine Casting Failure" stat on a priest, things will go wrong because he will now suffer from casting failure. But you could safely use divine casting failure on a bard, or arcane casting failure on a shaman, because those stats will never be relevant to those classes.

If you want to implement Concentration then it would be universal, which means these stats would be no good. I wonder if you really need a whole stat for that. What is the value range you need? 0-10? 0-20?

Btw here are the ideas I came up with once upon a time, and the following posts included kjeron's observations about their feasibility (or lack thereof):
https://forums.beamd...#Comment_950815

I'm very curious how you intend to apply UMD via a stat. I spent a looooong time working on a good implementation, and the only one I could find involved opcode 319 and SPECIFIC.IDS In my experience the various new opcodes that deal with stats (318, 324, 326) cannot affect item usability...

Hmmm... I suppose you could do something like, opcode 181 applied every 6 seconds, and conditionally apply 318/324 if you have the UMD stat. But 181 runs you into category problems (the inability to carve out exceptions), and I don't see how such a setup could be used as a tiered, stat-based system. It would be more like a binary spellstate.

EDIT - I still maintain that somebody should dismantle the Lore system... make all low-lore items automatically identified, and all mid/high-lore items have 999 to identify. Now if you want to identify anything you simply take it to a store and pay, or cast a spell. And you've freed up a good stat that is visible on the record sheet (!) and can be modified at will by script or opcode. Lots of possibilities for what you could do with it...

Edited by subtledoctor, 14 August 2018 - 10:27 AM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#7 K4thos

K4thos
  • Modders
  • 1198 posts
  • Gender:Male

Posted 14 August 2018 - 11:27 AM

 

But if an opcode can't change it, you coudn't do things like make a Ring of Concentration or whatever...
good point, completely forgot about it. Here are the currently missing skills stats:
- ALCHEMY (Alchemy)
- ANIMALS (Animal Empathy)
- BLUFF (Bluff)
- CONCENTRATION (Concentration)
- DIPLOMACY (Diplomacy)
- INTIMIDATE (Intimidate)
- SPELLCRAFT (Spellcraft)
- MAGICDEVICE (Use Magic Device)
 
And here are those that already exists:
- DETECTILLUSIONS (Search)
- TRAPS (Disable Device)
- HIDEINSHADOWS (Hide)
- LORE (Knowledge Arcana)
- STEALTH (Move Silently)
- LOCKPICKING (Open Lock)
- PICKPOCKET (Pick Pocket)
- TRACKING (Wilderness Lore)
- SETTRAPS (this skill actually didn't exist in IWD2)
 
Which means highjacking 8 stats would be better  :( Although if I won't be able to do find good candidates, just 2 is still enough to make the skill system work, even if it won't be as good as it could be.
 
The extra proficiency stats are still used, despite almost all of them now applying Spellstates as well.
Interesting, I will write a weidu code that analyze all files in game to check which ones are ready for re-mapping since they already use Spellstates. I will post results in this topic.
 
I'm very curious how you intend to apply UMD via a stat. I spent a looooong time working on a good implementation, and the only one I could find involved opcode 319 and SPECIFIC.IDS In my experience the various new opcodes that deal with stats (318, 324, 326) cannot affect item usability...
I was thinking about patching all scrolls and wands in game to cast different spell if specific class is using it with checks for MAGICDEVICE value in order to determinate if the casting is successful (splprot.2da checks, maybe additional Apply effects list). I'm not that good when it comes to opcodes, so will need to test what will work first. Will post example item here when (if?) I manage to get it working. Unless Kjeron can confirm that it can't be implemented already.
 
I suppose you could do something like, opcode 181 applied every 6 seconds
"Can't Use Itemtype" effect is not the way I'd like to implement it. In IWD2 player can use those items. Using them successfully is dependent on dice roll and MAGICDEVICE stat value (increased by modifier)
 
Btw here are the ideas I came up with once upon a time, and the following posts included kjeron's observations about their feasibility (or lack thereof):
 
Thanks, will check it out.
 
And you've freed up a good stat that is visible on the record sheet (!)
In this system every single skill, feat, class level etc. is meant to be visible on record screen. Same for level-up stuff (all windows related to it will be rewritten, so that you can select feats, check their descriptions, increase ability points etc. - see IWD2 gui, that's how it's meant to work). GUI is coded in Lua, and with stuff that Bubb is working on it won't be a problem to fetch data into Lua variable that can be displayed:
- Infinity_GetLocal(creatureID, local)
- Bubb_StoreLocal(S:Variable*,S:Local*)
- Bubb_StoreObjectStat(S:Variable*,O:Object*,I:Stat*STATS))
 
The system will either feel like it had been officially implemented (everything working with GUI, no workarounds that can be noticed in-game like selecting something via dialogue etc.) or I won't bother implementing it.

Edited by K4thos, 14 August 2018 - 01:46 PM.


#8 Jarno Mikkola

Jarno Mikkola

    The Imp

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

Posted 14 August 2018 - 11:29 AM

EDIT - I still maintain that somebody should dismantle the Lore system...

You are fighting the exact lore of the world with this.

Now if you want to identify anything you simply take it to a store and pay, or cast a spell. And you've freed up a good stat that is visible on the record sheet (!) and can be modified at will by script or opcode. Lots of possibilities for what you could do with it...

Well, here's a spell consept for you. Mage casts a spell, and their Lore gets a TEMPORARY BONUS OF 500 points. Should be enough ? As Bards get +10 lore per level and they can identify nearly anything.
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.

#9 K4thos

K4thos
  • Modders
  • 1198 posts
  • Gender:Male

Posted 14 August 2018 - 02:27 PM

But if an opcode can't change it, you coudn't do things like make a Ring of Concentration or whatever...
good point, completely forgot about it.
(...)
Which means highjacking 8 stats would be better  :( Although if I won't be able to do find good candidates, just 2 is still enough to make the skill system work, even if it won't be as good as it could be.
 
When I now think about it items that give bonus could still exist for all skills, even if 6 of them is stored only in local variables, not stats. Just make the item use opcode #272 (Apply Repeating EFF) which spawns invisible creature, with script like this:
//the item increases "ALCHEMY" local variable via opcode 309
//spell_with_opcode321 has item name as resource to remove further spawning, also decreases "ALCHEMY" local variable

IF
  HasItemEquiped("nameOftheItem",LastSummonerOf(Myself))
THEN
  RESPONSE #100
    DestroySelf()
END

IF
  True()
THEN
  RESPONSE #100
    ApplySpellRES("spell_with_opcode321",LastSummonerOf(Myself))
    DestroySelf()
END

So I think we're back to just 2 stats (Concentration and Use Magic Device) that are needed with at least 0-20 range. Although I will need to test it first.


Edited by K4thos, 15 August 2018 - 03:41 AM.


#10 subtledoctor

subtledoctor
  • Modders
  • 2751 posts
  • Gender:Male

Posted 14 August 2018 - 02:46 PM

Just make the item use opcode #272 (Apply Repeating EFF) which spawns invisible creature, with script


*runs screaming for the hills*  :laugh:


Edited by subtledoctor, 02 September 2018 - 06:07 PM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#11 K4thos

K4thos
  • Modders
  • 1198 posts
  • Gender:Male

Posted 14 August 2018 - 02:47 PM

*runs screaming for the hills* 

 

care to elaborate?

 

edit: simplified the script by moving variable increment into item and spell effects. This way ActionOverride and unique variable are no longer needed.


Edited by K4thos, 14 August 2018 - 03:17 PM.


#12 subtledoctor

subtledoctor
  • Modders
  • 2751 posts
  • Gender:Male

Posted 14 August 2018 - 03:22 PM

Sorry, a bit of a joke. Repeating 272 and invisicres are things I try to avoid at all costs. Combining them is my modding nightmare.

Sigh, okay, now you got me thinking about this. I'll give you my perspective on how to do it in an hour or so.


Edited by subtledoctor, 02 September 2018 - 06:08 PM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#13 lynx

lynx
  • Modders
  • 3139 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 14 August 2018 - 09:26 PM

How about 187/195 or the two stats holding titles (class strings)?


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


#14 subtledoctor

subtledoctor
  • Modders
  • 2751 posts
  • Gender:Male

Posted 14 August 2018 - 10:07 PM

Here's what I would do:

- 3.5E doesn't have the same kind of weapon proficiencies as 2E, right?  You get to be proficient in a whole class of weapons, more or less automatically.  (My only experience with that system is in NWN2.)  So consolidate.  Details up to you, but move to a pretty basic, IWD-style grouped proficiency system. 

- You can still add specialization after the fact, per 3.5E.  If you consolidate proficiencies into groups of 3, you can assign each of the 3 upper bytes to one of those weapons.  So "Short Blades" could be short sword, dagger, dart, all under stat 91.  You can be proficient with short blades, and then use feats to specialize.  The feat would increase you value bit-wise in the 2nd, 3rd, or 4th byte of stat 91.

- Then you code each of those item types to check for your value in those upper bytes, and conditionally apply specialization bonuses.  (You would apply the specialization bonuses as while-equipped .EFFs via opcode 177, and give opcode 324 protection against each such .EFF if you don't have the proper value in the proper stat.)

- Now you have freed up about a dozen proficiencies, which happen to be stats.  Yay!


Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#15 Jarno Mikkola

Jarno Mikkola

    The Imp

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

Posted 15 August 2018 - 04:10 AM

Here's what I would do:
...
- Now you have freed up about a dozen proficiencies, which happen to be stats.  Yay!

Have you actually made a single successful test of this ?
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



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users