Help with a small beyond the flesh tweak?

A place to post your add ons and ideas for them

Moderator: Moderator

Message
Author
jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Help with a small beyond the flesh tweak?

#16 Post by jenx »

nsrr wrote:Seems to be working as intended, with one bug. If you don't have a weapon in the mainhand, it throws an error. That might be my bad, or maybe it was something that got mixed up in the tweaking. Either way, at the beginning of the changes, after you check for the weapon and ammo, the first check should be ' if weapon and weapon.subtype ~= "mindstar" ' . As it is now, it will pass this check without a weapon and try to index the weapon even if you do not have one equipped.

Aside from that, looks good to go. The code is much cleaner than on the first pass, too :wink: . I hadn't thought to check for Resonant Focus bonuses, either, good call. I'm not that familiar with Mindslayer, honestly.

I tested it with 1h sword, 2h sword, staff, dagger, bow, sling and mindstar, with varying stat values, all seemed to work as intended.
It must be made to work with bows and slings, which I regularly use in TK archers.

And with exotic weapons, which are often used with Mindslayer builds.

You also need to account for adventurers who use temporal combat tree, which overwrites Wil with Mag for all weapons.
MADNESS rocks

nsrr
Sher'Tul
Posts: 1126
Joined: Mon Sep 21, 2015 8:45 pm
Location: Middle of Nowhere

Re: Help with a small beyond the flesh tweak?

#17 Post by nsrr »

jenx wrote:
nsrr wrote:Seems to be working as intended, with one bug. If you don't have a weapon in the mainhand, it throws an error. That might be my bad, or maybe it was something that got mixed up in the tweaking. Either way, at the beginning of the changes, after you check for the weapon and ammo, the first check should be ' if weapon and weapon.subtype ~= "mindstar" ' . As it is now, it will pass this check without a weapon and try to index the weapon even if you do not have one equipped.

Aside from that, looks good to go. The code is much cleaner than on the first pass, too :wink: . I hadn't thought to check for Resonant Focus bonuses, either, good call. I'm not that familiar with Mindslayer, honestly.

I tested it with 1h sword, 2h sword, staff, dagger, bow, sling and mindstar, with varying stat values, all seemed to work as intended.
It must be made to work with bows and slings, which I regularly use in TK archers.

And with exotic weapons, which are often used with Mindslayer builds.

You also need to account for adventurers who use temporal combat tree, which overwrites Wil with Mag for all weapons.
I mean, the only things it must do are the things Frumple wants it to.

That said, it does work with bows and slings (steamguns, too) and it will work with Exotic Weapons. Right now there are no checks in place for a magic damage modifier, though, so it's not really compatible with Strength of Purpose.

Frumple
Sher'Tul Godslayer
Posts: 1517
Joined: Sat May 15, 2010 9:17 pm

Re: Help with a small beyond the flesh tweak?

#18 Post by Frumple »

Yeeaaah, I've got no idea how strength of purpose interacts with the thing. Though it's strength that gets overwritten, not willpower. At least thinking on it, it should do its conversion first (since it's passive and always on), so BtF wouldn't find any strength to convert to will, ever. It'd still play with cunning, so if there's dex scaling involved it'll run the check, but... I don't remember what happens when a SoP warden turns on BtF normally. Whether the mag gets overwritten by wil. Guess I can check...

... and tentative testing says it works with SoP... sorta'. Looks like it still runs the strength check and won't attempt the change unless the wil > str check passes (I'm ignoring whether dex is involved or not with that, more in a sentence or two), but the mag replacement overwrites either of them and defaults to what SoP normally does. Basically the only point it interacts consistently is with bows or daggers, and with both only with the dex scaling aspect (and then, only if wil+cun *.6+RF is higher than str+dex). I, uh. I'm not even sure if it's behavior that actually needs fixing, tbh. Only half-way ken how you'd go about it at the moment anyway. Maybe stick a check in front that says if you've got SoP, only do a dex vs cun check and ignore anything having to do with strength?* Or just leave it be. Notably, this is a BtF tweak, and not a SoP one, so if SoP wants to flat overwrite regardless of what happens to the modifier elseways I'm not going to try to argue with it :P

And yeah, the not weapon thing was in that first attachment, heh. Though yeah, there's no checks for a mag modifier. As near as I can tell, whatever BtF is doing elsewhere doesn't even recognize magic exists, so there... wasn't really a reason for one. Checking with the bit of coding that's being played with wouldn't really do anything.

*If <whatever says do I have SoP> and weapon and weapon.combat.dammod.dex or <repeated, except ammo> then yaddayadda vs cunX, probably stuck in the front of it all and not bothering with the talent anywhere else. Conceptually you'd want to do a launcher check, I guess, but I'm having trouble figuring out what the edge case would be where you'd pass one of those checks and not be benefited but not the other so effort, re: lack thereof.

... incidentally, could I paren the weapon/ammo check? Talcheck and (weaponetc or ammoetc) then foo? I could check but it's probably easier to ask, heh. I'm not even sure if it'd make a difference but I've apparently forgotten how order of operations works in sentential logic so yeah.

nsrr
Sher'Tul
Posts: 1126
Joined: Mon Sep 21, 2015 8:45 pm
Location: Middle of Nowhere

Re: Help with a small beyond the flesh tweak?

#19 Post by nsrr »

Actually, thinking about it, there's no need for an SoP check. This won't, and shouldn't, affect SoP at all. The dam mod changes made by SoP are done before psi-combat is checked for, so any STR mods will have already been converted to MAG. That is, BtF would not normally affect SoP in any way, because it's only concerned with STR and DEX. Sure, it would still change the DEX mod to CUN, but it would have no effect on the STR mod because the SoP check already converted it to MAG at 1:1. As Frumple said, there is already a check to see if the CUN mod from BtF would be better than the default DEX mod, as long is there is no STR mod, so daggers and arrows affected by SoP will still have their DEX converted to CUN if it passes that check because the STR mod will have already been converted to MAG.

As for the checks... well, they could probably be tidied up a bit, but they're not that messy, and they work, so I would just say leave them. Honestly, I would have to try changing it to see if it worked myself, as I'm not entirely sure how LUA treats parens in this case, either. Also, I'm not entirely sure I know which check you're referring to :?:

Frumple
Sher'Tul Godslayer
Posts: 1517
Joined: Sat May 15, 2010 9:17 pm

Re: Help with a small beyond the flesh tweak?

#20 Post by Frumple »

Ehehe, it was a potential SoP check. Not anything actually in the code at th'mo. I'm pretty sure there's less-edge edge cases with non-SoP builds that would end up mildly shafted if you tried to bundle the weapon and ammo check together for other stuff,* so I wouldn't really try that, but for a specific talent check it's a bit more reasonable. Looking for the talent more than what the weapon is, more or less.

... though now that I'm thinking about it, you could probably leave the check for weapon/ammo out entirely. Just roll with if SoP and dex < cun#, activate.

*Something odd that's actually using a hand cannon, maybe? Probably something or another, anyway, and more likely with a build that's not replacing strength with magic regardless, heh. Less cognitive investment to just split the check and not have to worry about it :V

E: Though, that said, the loose SoP testing did seem like there was some interaction with the tweak code. Specifically, it seemed to still need to make the wil check if it was a str/dex weapon (dagger, arrow), even with str replaced with mag. After that it wouldn't change the mag modifier or whatev', but it looked like the BtF tweak check was pulling the weapon's pre-SoP dammod instead of the post one. Which more or less meant it would be running them through the str+dex check instead of the just dex one. At least from what the half-hearted and entirely-likely-to-just-be-me-failing-a-math-check fiddling I did for a few minutes before getting distracted by something else seemed to indicate, ahaha.

E2: Also, I'd like to state for the record doing this made an unholy mess of my computer. I currently have 11 different N++ tabs related to this, five different .7zip instances, three separate spreadsheets (though two are not explicitly related to the BtF stuff), and a couple plain ol' folders open. Plus ToME itself and two or three tabs open in opera attending it. Wheeeee

nsrr
Sher'Tul
Posts: 1126
Joined: Mon Sep 21, 2015 8:45 pm
Location: Middle of Nowhere

Re: Help with a small beyond the flesh tweak?

#21 Post by nsrr »

You're right, items affected by SoP are still affected in some way by the tweak. I was confusing myself. SoP is applied before BtF, when it is applied, but that's happening after we do all this stuff to determine if psi-combat is set, not before, heh. The point there is that BtF should only be affecting the Dex component and not the Str component. So, going from there...

I see what you were saying. Yeah, though, I would just add a check for the talent (if self:knowTalent(self.T_STRENGTH_OF_PUPOSE) ) as the first check after determining if a launcher is equipped or not, since if you know SoP we only have to worry about Dex vs Cun. Something like " if self:knowTalent(self.T_STRENGTH_OF_PUPOSE) and ammo and ammo.combat.dammod.dex then foo". Do your Dex vs Cun check and set psi-combat if Cun is better. Same for the case where a launcher is not equipped, except with the weapon, of course (if self:knowTalent(self.T_STRENGTH_OF_PUPOSE) and weapon and weapon.combat.dammod.dex then foo). Then if you don't know SoP, it will pass on to the rest of your checks in each case, as normal.

Edit: Yeah, you don't even want to know how many folders, files and archives I have related to ToME and ToME addons...

Patashu
Higher
Posts: 74
Joined: Tue Dec 18, 2012 3:54 am

Re: Help with a small beyond the flesh tweak?

#22 Post by Patashu »

Frumple wrote: E2: Also, I'd like to state for the record doing this made an unholy mess of my computer. I currently have 11 different N++ tabs related to this, five different .7zip instances, three separate spreadsheets (though two are not explicitly related to the BtF stuff), and a couple plain ol' folders open. Plus ToME itself and two or three tabs open in opera attending it. Wheeeee
That's it? That's a normal day for me...

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Help with a small beyond the flesh tweak?

#23 Post by jenx »

I thought of one more thing - arcane might prodigy.

Ouch! Hope it isn't toooooo complicated!
MADNESS rocks

nsrr
Sher'Tul
Posts: 1126
Joined: Mon Sep 21, 2015 8:45 pm
Location: Middle of Nowhere

Re: Help with a small beyond the flesh tweak?

#24 Post by nsrr »

jenx wrote:I thought of one more thing - arcane might prodigy.

Ouch! Hope it isn't toooooo complicated!
Not complicated at all. Arcane Might just adds 0.5 Mag modifier to all weapons (and ammo). It doesn't affect Dex or Str mods, so there's no extra check needed there. Same goes for Superpower, except it's a 0.3 Wil modifier.

Frumple
Sher'Tul Godslayer
Posts: 1517
Joined: Sat May 15, 2010 9:17 pm

Re: Help with a small beyond the flesh tweak?

#25 Post by Frumple »

... I cannot for the life of me get this thing to recognize that when SoP is there, to stop trying to include strength in the gorram stat check.* And it's irritated me enough SoP users (myself included) can just bloody deal with it. I've fixed the unarmed thing as suggested, and changed the stat check formatting to mirror what the vanilla code itself uses in its psi_combat code.** As near as I can tell everything I and those that've chimed have in been willing to test and I still care about (which doesn't include shields, SoP, offhand, mostly accuracy, TK weapon's modifiers, and probably stuff I'm forgetting or didn't notice) works well enough that if someone wants something better they're going to be doing it themselves :lol:

Going to go ahead and upload as soon as I figure out description and name and whatnot, then probably start up a feedback thread for it so if anyone likes it and wants to add features or finds a bug and wants to complain, they can ask someone that's not me to fix their issue or do it themselves and I'll either upload a new version or give them my blessing (probably more nsrr's by proxy, tbh, but eh) to upload their own version.

Many many thanks for the help, ehehe. I may have done some of the scut work but nsrr should probably be getting most of the credit for this thing.

*And yeah, I tried every variation of if self:know-etc. then just dexcheck I could kick until it stopped throwing up errors I could think of. No dice. Don't ask me why, frumple and frumple's headache doesn't know and doesn't really know where to start looking to find out, either.

** Representative example being self:getStr(100, true) < self:getWil(100, true) * (0.6 + self:callTalent(self.T_RESONANT_FOCUS, "bonus")/100). I don't know that does and it still seems to work the same so I don't particularly care at this point, either :V

E: Done and done. I'll leave this thread open 'cause I'm too hungry to bother figuring out how to lock it/going through the effort of doing so and will forget I had intended to within the hour anyway.

Post Reply