Jump to content

jmerry's Tweak Collection


Recommended Posts

Posted (edited)

Well, that's something I'll have to look into, because I did test the drow MR component myself and didn't see anything like that. It works by flagging the characters with local variables, setting base MR to zero, and applying spells to do the day/night changes. And it looks like your problem is the light/dark scripts not working right for you. Viconia thought it was always daytime/outdoors, and Baeloth thought it was always night/indoors. The spells themselves were working exactly as expected. (Baeloth starts with archmage robes for +5 MR from equipment. Level 6 = 50+12 base, +5 equip = 67 total MR)

Setting base MR to zero, by the way, is an essential feature of the component; it's done as soon as any of the drow characters join the party. I then use one spell to add resistance at night or indoors/underground, and a different spell to set the "dazzled" effect outdoors during the day.

Wait. My component does the script parts by appending its blocks to the end of the global baldur.bcs script (or other global scripts for other parts of the game). If there's something earlier in the script that's always intercepting them so those blocks never run, it'll break and never update the sun/not sun status of the drow characters. Through no fault of its own, but instead some other mod breaking things.

So that's my diagnosis: probably the fault of some other mod updating the global script with an attention-hog block that prevented this component from doing its work by always executing. After letting things through at least once to set Viconia's status to "daytime".

What can I do on my end? Well, I did put "Continue()" in all of the blocks of my script addition; I could move it to the beginning of the script and avoid any attention hog blocks by beating them to the punch. But that only really treats this one symptom, not the underlying problem. Any other mod components that add things to the end of that global script will still fail.

Edited by jmerry
Link to comment

BTW, the +2 MR/level should start at level 2, not level 1.

Otherwise, a drow's MR is 52 at level 1, i.e., she is already getting +2 bonus at level 1. 

MR should start at 50 at level 1.  Then, she gets the first +2 at level 2.

Source: https://adnd2e.fandom.com/wiki/Drow

Quote

At level 1 drow are 50% magic resistant

  • Every level they increases the resistance by 2% (to a maximum of 80%).
  • Multiclassed drow use the higher level to determine this bonus.

 

Edited by ktchong
Link to comment
24 minutes ago, jmerry said:

And it looks like your problem is the light/dark scripts not working right for you.

I've just thought about this one... it does not even make sense, because I had BOTH Viconia AND Baeloth in my party AT THE SAME TIME.  Viconia was dazzled, and Baeloth was not, both were in the same game at the same time.  Why would the light/dark scripts work differently for Viconia and Baeloth who were in the same game, in the same party, at the same time? 

Also, Viconia's MR was set to 0.  I used EE Keeper to open the save file and looked into Viconia's Resistance.  Her Magic Resistance was ZERO.  I changed it to 50.  I loaded the edited save game.  Her MR was reset to 0 again.  It was the dazzled the kept suppressing and resetting her MR.

Link to comment

Applying the change starting at level 1 was based on the drow enemies seen in BG2; the scaling you had is exactly the formula that most of them use. Including that they go up to 90% - there are some level 20 drow in Sendai's enclave with 90% MR.

As for the mechanics of things ... here are what the spells involved do:

- dw0 (initial): Sets base MR to zero. Applied once, when the character first joins the party.

-dwsun (sunlight): Removes the effect of dwres. Applies the "dazzled" penalty, if you chose that option at installation.

-dwres (resistance): Removes the effect of dwsun. Applies a MR increment appropriate to level; exact numbers depend on choices made at installation.

Also, it is possible for characters to be out of sync; they're checked individually based on their locations, so if you have one character inside and one outside during the day, the first should have their resistance and the second should have the sunlight state.

1 hour ago, ktchong said:

I changed it to 50.  I loaded the edited save game.  Her MR was reset to 0 again.

Now that? That means something weird is going on. Because the dw0 spell is the only one of the bunch that alters base MR, and it's only ever supposed to be applied once. It's all controlled by a local variable, see - 1 on the CRE file before they join, 2 in thedaylight state, 3 in the night/indoors state. My script never resets that variable to 1, and the initial zeroing spell is only ever cast at that value ... is this EEKeeper losing track of local variables again? Well, that's not something I can test - I literally can't run EEKeeper at all on my current system, because the most recent Mac version I'm aware of is a 32-bit app.

I might have to come back to this, but not now. My attention is elsewhere at the moment.

Link to comment

Daytime, outside, both Viconia and Baeloth are in the party, same save file.  

Seems like not all of the MR or dazzled effects were applied to both characters.  DWRES was not applied to Viconia, and DWSUN was not applied to Baeloth. 

(This is after a fight in which Viconia was affected by a fear spell, which made me suspect her MR must not be working correctly.)

Not exactly sure what the "0x0148" for MONHST1 is... I hate it when coders do not give proper identifiable names to their variables.  It is just irresponsible coding.

 

elO9dtr.jpg

ZQr6F0X.jpg

Edited by ktchong
Link to comment

Anyway, I really just want to get on with my game at this point.  I am gonna use this opportunity to reinstall all my mods and update them to the latest versions,  and also remove the MR components and all the JB# effect variables in the drow characters.  I am gonna continue to the game without the MR components.

Edited by ktchong
Link to comment

I think it's scripting errors/oversight.

For Viconia: DW0 was applied but DWRES was not.  DWSUN was applied.  (So she really got screwed over.)

For Baeloth: Both DW0 and DWRES was applied, but DWSUN was NOT.

 

Edited by ktchong
Link to comment
Posted (edited)

Hi @jmerry

I think i have found a little error in your code, component 70 -> "Close polymorph immunity loopholes"

At line 176 (from setup_jtweaks.tp2), you've specified a function item_effect_to_spell ... str_var new_itm_spl=bolt05.itm <- should be .spl ?

Because, in my setup, my bolt05.spl has no effects in its header, and the bolt does nothing ingame.

Edited by ptifab
Link to comment

Probably true ... yes. Corrected in my master version. I'll try to push out an update soon. (And correcting that yourself would fix the error)

Without the correction, the bolt's effect becomes "Cast a spell on the target you hit. That spell does nothing."

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