Closed lynxlynxlynx closed 4 years ago
Is it a viable test to open up some weak enemy in NI, add a permanent invisibility effect to it, plus some other effect, start up IE, console in a copy of the creature and see if the spell effects are visible? I tried that with a handful of effects, and in BG2 none of them showed so far. Also, concerning overlay.2da, we're talking about the FLAGS column, which is currently empty, or the UNDER column?
It's the last column, yes (but it's not empty).
the testing plan sounds fine — the question is whether gemrb behaves the same as the original.
Uh, then the column heads are misaligned maybe.
Cool, then I'd make this my next job, unless you'd prefer me doing something else? If I gotta check all the games, then it might take a bit - don't have so much free time like last year anymore, but a week or two should be okay?
Looking at bg2 is enough and there's no rush at all. :)
Just in the process of testing the different overlays, and noticed the following: On the original, if I use the above described method, I create a skeleton that has an invisibility plus another effect added via NI. As soon as the skeleton attacks the party, invisibility wears out and the other overlay becomes visible. On GemRB, however, it doesn't. After the skeleton gets visible, it has the effect active when I check with Ctrl.+M, but the overlay is not drawn subsequently for some reason.
And also, BG2s overlay.2da contains some entries for VVCs not available in this game, so do you want it sorted out or don't you mind them being in there?
Other entries can stay.
How are you adding the effect? Not by an item, equipping effect, right?
No, not by item.
Which timing mode did you use?
Instant / Permanent.
Hmpf, everything looks fine with fx_cure_invisible_state and what it calls. And it has to work or they wouldn't appear, so it's like the actual effect removal line doesn't do it, but I can't see how that'd be possible (fxqueue.RemoveAllEffects
). Can you try breaking on it and stepping through (instead of "next", use "step")? The loop in the next function should set the effect to expired.
In which file is this?
FXOpcodes.cpp, but it doesn't matter, just: b fx_cure_invisible_state
Uh, bear with me... in the console?
after you run gdb with gemrb (however you do it, from the build dir you can run ../admin/run.gdb someconfig.cfg). Then b above and r to run.
Ah, okay, sorry for being daft.
So what's supposed to happen when it hits that breaking point? Right now, nothing happens, the game just keeps running.
you're supposed to next until the RemoveAllEffects line then step there, which will take you to a different file. Just next there until exit and note if any effect got their timing changed — since it appears that it's somehow getting skipped. It's that one obvious line, did it get executed or not.
I'm not familiar with gdb, but I think my problem is that the breaking point doesn't work.
Hmm, tell me everything you type after gdb starts.
break fx_cure_invisible_state
r
That should stop execution when this function is called and give me the gdb prompt, right?
Actually no, since the plugin is loaded later — you probably get a warning about that breakpoint. Try r for gemrb to start up, then ctrl-c in the console to get back to gdb, and then the break and then c to continue.
No change, still doesn't 'break'.
It doesn't break when the skelly goes visible again?
Nope.
how about "b Actor::ResetState"?
Sorry, had to go...
No breaking with this, either. Did the running, Ctrl.+C, then b, then c. Said:
Function "Actor::ResetState" not defined.
Make breakpoint pending on future shared library load? (y or [n])
Tried with yes and no.
how about "b GemRB::Actor::ResetState"?
Some progress:
(gdb) next
Single stepping until exit from function _ZN5GemRB5Actor10ResetStateEv@plt,
which has no line number information.
0x00007ffff7a93470 in ?? ()
from /home/nadia/Software/Games/gemrb2020_1_20/build/gemrb/core/libgemrb_core.so.0.8.6-git
(gdb) n
Cannot find bounds of current function
Ah, it looks like you don't have a debug build — you'd have to rerun cmake with -DCMAKE_BUILD_TYPE=Debug for all the symbols to get included and being able to use gdb for anything helpful.
KK, I'll do that tomorrow afternoon, repeat above steps and post any progress (hopefully!) then.
FYI, you can do b File:Line
so you don't have to remember all the namespacing.
Actor.cpp is part of the core, so breakpoints inside it shouldn't generate warnings anyway 🤷♂
Actually for me the namespacing isn't needed any more. Either gdb improved or the dwarf info from the compiler is better.
Tried with the debug build, but I'm still getting this "Cannot find bounds of current function" with it.
Eh, please just upload the modified CRE then.
Ah, sorry about that.
SKELET01.cre has currently Minor Globe Overlay and Invisibility active:
When I try it, once they attack they only have the overlay effect in their queue.
Here, too, same on the original. I thought that was due to the attack dispelling invisibility.
I checked all BG2 overlays now, and everyone I was able to test didn't show while invisibility was active, so I'd assume the same value for the others (additional ones mentioned above) and just set all the flags to 1. Also sampled some on IWD1 to see how it looks there: the same. So can we just assume 'Invisibility = no overlays drawn' for all games? Then I could go over the 2da's tomorrow.
Haha, what a misunderstanding! I thought you were saying the invisibility effect is still in the queue, but you meant the overlay one.
re flags: it's also true for spell turning? Interesting. Which weren't you able to test? Maybe I played it too many times in gemrb, but I thought some of the protections from the lich contingency remained visible, while they go invisible through mislead or projected image.
Since it appears then they're always hidden, it's better to rework 942c1a16 than to set the flags in the table. It could likely be just partially reverted, but let's first see if we need the flags col for anything else — like the sound issue still open.
Some that BG2 doesn't have at all, like e. g. Death Armor, Flame Shroud, Seven Eyes, and a few I couldn't find in NIs drop-down list, where you select the effects. E. g. Insect Plague or Globe of Invulnerability (might use the Minor Globe overlay instead?).
I'll start up the IE and pay a visit to some liches then.
Side note, before I forget: On IWD1 it looks as if the overlays are drawn just slightly too low compared to the original:
GemRB:
IE:
Probably not so noticeable for human or elves, but this armored skeleton is somewhat bigger. Just caught my eye with this one yesterday, so we might take a look at some other of the overlays too.
I thought some of the protections from the lich contingency remained visible, while they go invisible through mislead or projected image
Sorry about the delay, you're right here. Spell turning and spell deflection overlays are indeed drawn for the lich's mislead:
I wanted to test them with my skeleton, too, but strangely they aren't drawn if I just add the effect with NI. Even when I removed the invisibility, it drew no overlay for both 200 and 201 opcodes.
So, they're drawn on the actual actor, not the mislead illusion, which is good.
Too bad our testing approach isn't bulletproof. Maybe just illusions are special, but can you try testing turning and deflection via a script? ForceSpell them and invisibility ...
Yep, I'll get to it on Monday.
Testing with a combat script showed that Spell Turning and Spell Deflection do show while Invisibility is active. I then tried with some other spells previously tested with the other method, and results were consistent with the previous ones. So looks like Spell Turning and Deflection are somewhat special, since they're drawn for invisible actors; so far everything else I tested was not.
Are there any other spells I could test while I'm at it, something not in overlay.2da maybe? Right now nothing comes to my mind...
Thanks, so then is this it? http://sprunge.us/c9o2Cu?diff
Yep, looks good.
Since most other games don't have anything like that, I'll just suppose they don't display anything and transpose the changes.
I could take a look at IWD1 - gotta test the overlays for #623 anyway, and I'll do it with a script, it's much quicker than adding effects to the creature. Could use the same like for this test, some spell plus invisibility.
Sure, better coverage is always good, but iwd doesn't have turning or deflection, so I don't expect deviations.
Checked out Invisibility along with the overlays for IWD1 now, and everything except for Insect Plague was invisible on the original. However, testing them on GemRB showed the opposite behavior - looks like HOWs overlay.2da is missing from https://github.com/gemrb/gemrb/commit/f9de9f23203c78838a675825f63afdeb68847a2c
Updated the 2da - https://github.com/gemrb/gemrb/compare/master...caillean7:master - but I still get to see supposed to be invisible overlays with it :frowning_woman:
Nice catch! Are you sure you didn't misplace a file into our override or something like that? Check the log to see where it found overlay.2da, just to rule that out.