Jump to content

Modders' use of limited resources


Recommended Posts

1 hour ago, subtledoctor said:

(like some of the old megamods used to do),

Yeah, and they added their own kits and other utilities which wouldn't likely be compatible with your Sorcerer kit either way, or EE, so what's your point exactly ? Aka, what are you after ?

Link to comment
46 minutes ago, Jarno Mikkola said:

what are you after ?

In case it wasn't clear from the first post, and at risk of feeding the troll:

What I'm after is for modders who use these sorts of resources to mention it out in the open, so that other modders and players can be aware of any possible collisions, and we can more efficiently work with and around these contraints.

Link to comment

Yes, you're right about SPPR and SPWI, those are the most important slots because they're also available to the player and the like.

I was simply saying that there's no "harm" in adding something to either SPIN or SPCL (if someone wants to), there's plenty of room...

Link to comment

Spell levels: You can create unique spell (umm) variations by adding headers with extremely high casting level requirements and then, under certain circumstances, adding the relevant number of casting levels to the character. For example, Pecca's spontaneous casting mod adds cure/inflict/summon effects to all priest spells and gives priests an innate that increases their casting level by the relevant amount.

This should be done in 50 level increments to account for spell advancement over 50 levels for mod compatibility. I'm not sure what, if any, the spell level limits are. I know I tested up to (I think it was) spell level 10,000 and it worked. But, conflicts can arise if two mods use the same range of levels for the same classes.

Edit: Pecca's mod (and shortly b_spells and fnp) is the only mod that uses this to my knowledge and I don't know offhand what level ranges are used. I'll update

 

Edited by Grammarsalad
Link to comment

Noob(er) question. I don't fully understand all that was said, so I'm not totally sure if the unused proficiencies (EXTRA2, EXTRA3, etc.) in weapprof.2da would be fully usable for creating new proficiencies for the user, or might clash with mods using the data for storing their own stuff.

I got that the Proficiency() trigger already checks only the 3 lowest bits that are editable by a player when setting proficiency points, and that opcodes(?) seem to be able to use the other bits safely. I also found that @Grammarsalad has asked about about exposing the hidden proficiencies, and that it seemed to be initially successful, but I don't know if that was just a first step in showing them, or compatibility was working well also.

I don't use any mods that do fancy stuff like you mentioned on the first post. I'm mostly concerned about SCS, where I just don't understand the magic done by stuff like detectable spells.

Thank you!

Link to comment

Most of the extra profs are used for Detectable Spells in mods like SCS, SR, and others. What they do can now (in the EEs) be done in better ways, but many of the mods using Detectable Spells will never be updated. So the lower bytes of most of the extra proficiencies are (IMO) gone and not worth trying to use. 

If (in the EEs) you want to use the higher bytes of a proficiency to do something similar to spellstates, then you can use any proficiency, extra or not. E.g. my mods use the Club proficiency, and it works fine and doesn’t conflict with anything. You could do the same with long sword proficiency, or sword-and-shield style, or whatever. 

If you really want to use extra proficiencies like proficiencies, then what is available are 134, 109, and I think 108. (I think DavidW said SCS no longer uses 108... but it’s possible it does use it, and he intends to stop using it but has not yet made the change.) In this case the lower, ‘normal’ bytes are available... but of course, if two modders want to use them, then those two mods may not be compatible. 

Link to comment

Thank you. I've found that in SCS, the detectable spells directory has "notes on current use.txt" file with some notes, and indeed the 134 one mentions being unused, but all the other ones seem in use. I'll try to learn on that code to see if something can be squeezed out of it, or the whole data is unsuitable for user proficiencies.

Link to comment
On 8/26/2021 at 6:13 PM, suy said:

Noob(er) question. I don't fully understand all that was said, so I'm not totally sure if the unused proficiencies (EXTRA2, EXTRA3, etc.) in weapprof.2da would be fully usable for creating new proficiencies for the user, or might clash with mods using the data for storing their own stuff.

I got that the Proficiency() trigger already checks only the 3 lowest bits that are editable by a player when setting proficiency points, and that opcodes(?) seem to be able to use the other bits safely. I also found that @Grammarsalad has asked about about exposing the hidden proficiencies, and that it seemed to be initially successful, but I don't know if that was just a first step in showing them, or compatibility was working well also.

I don't use any mods that do fancy stuff like you mentioned on the first post. I'm mostly concerned about SCS, where I just don't understand the magic done by stuff like detectable spells.

Thank you!

Yes, the process exposes the extra proficiecies for player selection as per the other profs (excepting the first 8 or so). But, as SD has pointed out, they are already being used by detectable spells. Also, I don't even think that the most recent update changes spell detection using another method. It actually makes some sense as it would mess with those mods semi-unnecessarily.

My plan was to create a mini mod (for ee only) that would be installed last and that would switch detectable spells to a different system. But, darn, that's just a lot of work and I don't even want to start it unless I finish my non- weapon proficiency mod. No idea if that'll happen.

You would need you cycle through all scripts and change various prof related triggers as well as spells and items that set those proficiencies. In my brain, the code feels fairly simple, but it's probably going to be a messy affair in practice..

Link to comment

For the EEs, you can just apply 319s to the relevant items instead of using the kit usability flags.

SP Collection uses 319s on the EEs, and kit usability flags for oBG2: Helm flag for the Sylvan Mystic kit, Undead Hunter for the Archer of Sylvanus, and Talos for the Arcane Fist.

Link to comment
32 minutes ago, CamDawg said:

For the EEs, you can just apply 319s to the relevant items instead of using the kit usability flags.

SP Collection uses 319s on the EEs, and kit usability flags for oBG2: Helm flag for the Sylvan Mystic kit, Undead Hunter for the Archer of Sylvanus, and Talos for the Arcane Fist.

There is a similar method using 180 which I believe works in the tob engine (maybe it requires tobex). You can even apply it on a kit by kit basis while leaving the standard usability system intact with the use any item effect. I don't remember the details but an implementation can be found in the old faiths of faerun mod by Mordeus and Requiem.

Edit: here

https://forums.beamdog.com/discussion/17118/mod-faiths-of-faerun-kitpack-v0-5c-ready-for-testing/p1

Edited by Grammarsalad
Typos and link
Link to comment

For the originals, 180 is a questionable tradeoff--it's inferior for a number of reasons (e.g. the item doesn't get tinted red, no description update) which makes your stuff stick out as mod content, but the alternative is monopolizing a limited resource.

Link to comment
4 hours ago, Grammarsalad said:

Yes, the process exposes the extra proficiecies for player selection as per the other profs (excepting the first 8 or so). But, as SD has pointed out, they are already being used by detectable spells. Also, I don't even think that the most recent update changes spell detection using another method. It actually makes some sense as it would mess with those mods semi-unnecessarily.

My plan was to create a mini mod (for ee only) that would be installed last and that would switch detectable spells to a different system. But, darn, that's just a lot of work and I don't even want to start it unless I finish my non- weapon proficiency mod. No idea if that'll happen.

You would need you cycle through all scripts and change various prof related triggers as well as spells and items that set those proficiencies. In my brain, the code feels fairly simple, but it's probably going to be a messy affair in practice..

 

Thanks, coincidentally, I was looking at this again to see if by reading this thread again for the 10th time I would get something. 🙂 I've also looked a bit at the ds.tph code, and I could not understand anything at all.

But I looked at the game files after installing SCS and hence Detectable Spells, and I made some findings (brain dump mode ON, hopefully is helpful for someone, and please correct if I say something wrong):

In the source code, there is a file named "ds/notes on current use.txt" that contains this:

Quote

133 CLERIC_DEFENSIVE_HARMONY                    bit-valued indicator; no current redundancy
134 EXTRAPROFICIENCY20                        currently unused


OK, so seems one of the proficiencies is free. But say that I need two, so let's look at the previous one (133). Looking at the spell I find that it has this two effects:

Quote

Type: Set spell state (328)
Target: Preset target (2)
Power: 4
Unused: 1
State: BUFF_ENHANCEMENT - 68

And:

Quote

Type: Modify proficiencies (233)
Target: Preset target (2)
Power: 4
# stars: Active class: 1, Original class: 0
Proficiency: CLERIC_DEFENSIVE_HARMONY - 133
Behavior: Set if higher (0)

The one that modifies proficiencies was expected, of course, but I'm confused by the fact that two effects are needed, and using a different approach.

I've searched into SCS's code, and I found very few occurrences on the AI scripts of CLERIC_DEFENSIVE_HARMONY, and all seem to be triggers of enemy scripts on enemies themselves of only two kinds: green dragon and priest. If I were to use this proficiency to allow some incompatible class like Sorcerer or Monk (which can't be dual/multi with Priests), initially this would not collide. Say that a CLAB file contains an "AP_" spell on every level that grants effects if a character has enough proficiency in this or that. I've tried this on regular proficiencies, and it worked. However If a character were buffed by this spell on level up then it would get unexpected bonuses.

End the brain dump for now, but I have lots of questions:

  1. Could this last mentioned problem be worked around by removing effects by resource? I mean, the AP_ spell from the CLAB file could clear Defensive Harmony's effects, then check for proficiency, right? It would be weird that you level up and get that buff dispelled, but it's not a big deal as it's very short lived.
  2. Can Detectable Spells be changed to only use spell states? Should it? Or is it needed for compatibility with pre-EE games or older Detectable Spell versions?
  3. If splstate.ids is limited to 256 entries, I'm concerned that I see mine being almost 200 lines, and some of them of no apparent value for enemy AI scripts, like SHAMANIC_DANCE or ENHANCED_JESTER_SONG. After a search, I don't see them used (if I searched correctly). For party AI scripts, shouldn't this be done via checks on the modal state? Or am I missing some other use case of Detectable Spells?

Thank you.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...