BatBrain -- a central nervous system for consult scripts

Ioeth

Member
And now r61 tries a slightly better way of doing what we did in r60.

I never get any of these errors (aside from the recent pasta/sauce issue) so I'm debugging what to me are unfindable/nonexistent bugs. Hope this is an improvement.

I'm back to getting the sauce error again with r61:

Code:
Expression syntax errors for 'modifier_eval()':
Expected end, found sauce (zlib.ash, line 188)
You're on your own, partner.

This error goes away when I remove the "sauce" modifier from lines 1387 and 1488 of batfactors.txt.
 
Last edited:

Fluxxdog

Active member
Got an ASH debug log and trimmed it from the 87.2 MB file. I tracked down the part with Saucegeyser (suspected that was the issue for me) and tidied it so it's be readable. Hopefully it can shed some light. If I'm reading it right, modifier_eval is being passed "1.1*(65+(0.4*481.0)+10.0+0.0) sauce" which causes the problem as 'sauce' is not a recognized variable of modifier_eval(). This seems to be caused by sauce not having a value. At line 2006 in the log, that's when it starts evaluating sauce. Hope it can help.
 

Attachments

  • SGDebug.txt
    81 KB · Views: 28

ckb

Minion
Staff member
For Ed:
Ed skills need to be added to batfactors
For fights where you lose, go to the underworld, and the return to the fight, you start fresh, and you are able to re-cast any skill even if it is marked 'once'. Maybe this requires a reset of the 'happenings'? But I don't know enough to solve this completely.
 

Theraze

Active member
The messy thing is that (if I understand properly) it doesn't count as a new turn, which is what happenings uses to track if a skill has been used. There probably won't be a good way to track this easily. But maybe Zarqon will have an awesome plan.
 
Ok now my main is back to giving me the error, I assume that yesterday it didn't because i was starting a fresh ascension and in the early levels i never have enough mana to cast saucestorm so the script doesn't even consider it a posibility therefore not reading that line in the batfactors file (if that is how the script works)

EDIT

Ok I figured out why whenever I tried to do the fixes that other people said worked for them didn't for me, I thought I only had to delete the word "sauce/pasta", but it turns out that i had to delete that word, everything that is on the right to it and the space just before it, now I am able to run the script.

It still needs fixing, though
 
Last edited:

Bale

Minion
While I feel bad for everyone else who is getting new errors I just want to say that my combat script is working like lightning. All these recent speed improvements are really making a huge difference at improving my KoL experience. I invoke my combat script by clicking the script button in the relay browser so even a quarter-second less hesitation is noticeable. This last day has been amazing!

Thank you, zarqon.
 
Last edited:

zarqon

Well-known member
So, r63 brings us yet another attempt to resolve these issues. Moved pasta and perfect global variables into a string[string] map, and we now calculate sauce in set_monster() as well.

@DeathPhoenyx: Which error, exactly? The pasta or the sauce? If it was sauce, I suspect that this update fixes it.

@Fluxx: Actually, the problem with a non-replaced string being sent to to_spread() happens well before the actual to_spread() call. For any skill with special handling needed, we alter factors on the fly so that when it's converted to an event it will be accurate. In the case of special damage calculations, we go ahead and calculate those into a spread (d). This is where we're replacing damage type strings. After all the custom handling, we check to see whether d was set. If not, we load it as normal from factors. So the problem was actually the check to see that d was already set. It was weird.

Your debug log did reveal another problem, though. The function to calculate bonus elemental spell damage is called before the custom handling, so it was being passed damage types like "pasta" and "sauce" which it didn't know what to do with and returned 0. This update solves that issue. Thanks for making, whittling down, and posting the log.

@Ioeth: The problem may go away, but you introduce another problem when you remove the "sauce" keyword. Removing the damage type means that BatBrain assumes the action deals entirely physical damage. It would thus consider Saucegeyser to be basically useless against ghosts, for instance -- when in fact it's one of the most useful against them. You'd be better off replacing "sauce" with "hot,cold".

However, your mentioning two lines in batfactors led me to discover another error. I had completely forgotten that BatBrain was also tuning Saucemageddon according to "sauce" rules. So I just added that skill into the custom handling. I suspect that was the difference between DeathPhoenyx's main vs. alt -- one had Saucemageddon available and the other didn't.

@ckb: It will take me a while to get around to Ed. Feel free to add the skills to batfactors in the meantime.

@Bale: Thanks very much for the positive feedback, Bale. It's nice to feel appreciated occasionally amidst all the error reports.

So, hopefully this update fixes it.
 

Bale

Minion
@ckb: It will take me a while to get around to Ed. Feel free to add the skills to batfactors in the meantime.

I got started with this by adding Summon Love Scarabs and Fist of the Mummy, but I have no idea what the formulas are for Ed's other attack skills. Can anyone help out?

Code:
skill	7248	Summon Love Scarabs	max(9,0.1*monsterhp)	0	mp max(9,0.1*monsterhp)/3, once, stun
skill	17007	Fist of the Mummy	min(buffedmys,50)	0	0	!! works against physically immune monsters

Also, What is the bonus to damage for having a Priest as your active servant? It's pretty a huge damage boost and zarqon will need to include that in BatBrain itself.
 
Last edited:

ckb

Minion
Staff member
I got started with this by adding Summon Love Scarabs and Fist of the Mummy, but I have no idea what the formulas are for Ed's other attack skills. Can anyone help out?

Code:
skill	17007	Fist of the Mummy	min(buffedmys,50)	0	0	!! works against physically immune monsters

Fist of the Mummy benefits from spelldmgpercent, so I believe the formula should be:
Code:
skill	17007	Fist of the Mummy	spelldmgpercent*min(50,buffedmys)	0

also, in other news, I don't remember how to update batfactors.
 
I am getting a new error now

Code:
Expression syntax errors for 'modifier_eval()':
Can't understand fweight+3,10)+floor(sqrt(max(fweight-7,0)))
Expected ,, found
Unexpected end of expr
Expected ), found (zlib.ash, line 188)
You're on your own, partner.

I tracked it down to the Toss skill (line 1369), no idea why this would be broken now
 

Theraze

Active member
Any chance you had a network blip just before that? I've been getting a lot of those over the last day or two, and each of those breaks the BatBrain parsing, but is fixed by just running your combat script again. If that's the case, it's not a BatBrain error, just KoL being way too busy.
 
Nope, I have had that error show up in both my characters at different times of the day, and trying to run the script again still gives the error
 

zarqon

Well-known member
1. Make sure your copy of batfactors is fresh. (Slightly trickier than it used to be. I delete batfactors, add a # to a blank line in batbrain and then automate one fight.)

That works, although a faster method would be to delete zversions.txt. A slightly less fast but more optimal method would be to delete only the batfactors line from zversions.txt.

Afterwards, just run BatBrain. No need to spend an actual turn.
 

Crowther

Active member
1. Make sure your copy of batfactors is fresh. (Slightly trickier than it used to be. I delete batfactors, add a # to a blank line in batbrain and then automate one fight.)
I just download it from the link you gave in step #3.
 
Any idea how to fix the issue I am having now with Toss? or just a way to disable the line about Toss without breaking the script so I can at least continue adventuring?

EDIT

Ok I tried deleting the "happenings" file and now it finally works
 
Last edited:
Top