#gemrb@irc.freenode.net logs for 13 Nov 2010 (GMT)

Archive Today Yesterday Tomorrow
GemRB homepage

[00:04:00] <Avenger> bye!
[00:04:02] <-- Avenger has left IRC (Quit: bye!)
[00:25:52] <pipnuk> hmm
[00:26:14] <pipnuk> i found the cemetary in bg2 rather difficult for paths
[00:26:28] <fuzzie> wasn't thinking of the pathfinding
[00:26:36] <fuzzie> just of the actual broken bits in the code leading to incorrect results
[00:27:11] <pipnuk> ah
[00:36:56] <Lightkey> edheldil: was that meant ironically? because Oracle did that just now
[00:50:33] <-- Maighstir has left IRC (Ping timeout: 245 seconds)
[01:41:52] --> Maighstir has joined #GemRb
[03:24:17] <-- Maighstir has left IRC (Quit: ~ Trillian Astra - www.trillian.im ~)
[07:04:21] --> spike411 has joined #GemRb
[07:30:56] --> Bo_Thomsen has joined #GemRb
[07:58:22] --> Bo_Thomsen1 has joined #GemRb
[08:01:36] <-- Bo_Thomsen1 has left IRC (Client Quit)
[08:53:02] <-- Bo_Thomsen has left IRC (Quit: Leaving.)
[09:37:48] --> lynxlynxlynx has joined #GemRb
[09:37:49] --- ChanServ gives channel operator status to lynxlynxlynx
[10:40:08] --> Avenger has joined #GemRb
[10:40:08] --- ChanServ gives channel operator status to Avenger
[10:40:15] <Avenger> hi
[10:44:00] <lynxlynxlynx> oj
[10:46:21] <Avenger> heh, taimon really knows his business
[10:46:44] <Avenger> spotting a variable overwrite in disassembly is really amazing :)
[10:49:15] <fuzzie> you don't read enough broken code :)
[10:50:14] <Avenger> well this is disassembly, though i guess if he did it in IDA, and marked the offsets with symbols, it might just popped up
[10:50:32] <fuzzie> do you know if Ascension64's description of VVC sounds is right? (for looped VVCs: if second sound is set, first sound is played and then second sound is looped after, otherwise first sound is looped)
[10:51:56] <Avenger> in my opinion: first sound is used for the onset graphic, second sound is used for the duration graphic, and third sound is used for the ending graphic
[10:52:16] <fuzzie> it is not true :)
[10:52:19] <Avenger> if some are missing, then there is a default order (or flags)
[10:52:46] <fuzzie> i fixed it so that the first sound was used even when the onset graphic was missing, which made lynx happy
[10:52:52] <fuzzie> but i am curious about the rest
[10:53:07] <Avenger> hmm, so you say, they are not connected?
[10:53:09] <fuzzie> but it is not important, i didn't find any example i cared about
[10:53:12] <Avenger> i thought they are
[10:53:41] <fuzzie> well, lynx just wanted the summon sound to work, where there's apparently no onset graphic?
[10:53:50] <Avenger> i'm pretty sure THEIR implementation of the vvc is also full of hacks :)
[10:53:54] <lynxlynxlynx> yes, none
[10:53:56] <fuzzie> yes, it is broken
[10:54:06] <Avenger> what?
[10:54:09] <Avenger> no onset?
[10:54:23] <lynxlynxlynx> no, only onhold
[10:54:24] <Avenger> the summon is all onset, and no duration/ending
[10:54:29] <lynxlynxlynx> of the sounds, only the first
[10:54:37] <Avenger> well, duration is the middle looping anim
[10:54:51] <fuzzie> the summon anim isn't looped, i think
[10:54:59] <Avenger> onset is played once (on hit)
[10:55:00] <lynxlynxlynx> most of the vvc's were fine, spsummon was the problematic
[10:55:10] <Avenger> then looping the duration anim
[10:55:18] <Avenger> and on removal playing the ending anim
[10:55:52] <fuzzie> yes, but IE_VVC_LOOP isn't always set, which means the duration only plays once
[10:56:01] <fuzzie> if i understand right :)
[10:56:19] <fuzzie> i have way too many branches locally :(
[10:56:28] <Avenger> that would only be true, if you can put an onset before that :)
[10:56:30] <Avenger> can you?
[10:56:49] <fuzzie> sure, but i think there just isn't an onset for lynx's example.
[10:57:29] <Avenger> well, maybe you are right, and the onset sound is played when there is no onset graphic... *shrug*
[10:57:47] <fuzzie> well, i dooon't know :P
[11:02:44] <fuzzie> i'm just trying to make sure we have all the sound handle stuff we need
[11:02:59] <fuzzie> i added SetPos and StopLooping
[11:03:27] <fuzzie> maybe we also need something about time left, though..
[11:03:36] <fuzzie> but i can't tell without examples
[11:11:42] <Avenger> you can get a looping vvc: sanctuary or minor globe, i guess
[11:11:56] <Avenger> those got some droning sound
[11:12:34] <fuzzie> i really like the walking sounds
[11:13:50] <Avenger> i hope they work for npcs too
[11:13:59] <Avenger> try a dog or wolf?
[11:14:02] <fuzzie> you didn't watch the bg2 intro yet? :)
[11:14:05] <Avenger> they got some panting sound
[11:14:06] <fuzzie> i mean, the SoA one
[11:14:11] <CIA-28> GemRB: 03fuzzie * r700279450950 10gemrb/gemrb/ (3 files in 2 dirs): add SetPos and StopLooping functions to SoundHandle
[11:14:14] <CIA-28> GemRB: 03fuzzie * r4954254ea0bc 10gemrb/gemrb/core/Projectile.cpp: move projectile sounds when projectiles move
[11:14:17] <fuzzie> ah, i see, i'll have to try
[11:14:26] <fuzzie> watching the projectiles right now
[11:14:48] <Avenger> the guy still doesn't die the disintegration death :)
[11:14:56] <Avenger> the falling skull is gross
[11:14:58] <fuzzie> well, that is an option in the original anyway :)
[11:15:55] <fuzzie> everything seems to work pretty well
[11:16:06] <lynxlynxlynx> :)
[11:16:15] <fuzzie> wjp: you have a 64-bit linux and bg2?
[11:24:02] <wjp> yes
[11:24:11] <wjp> several of both :-)
[11:27:17] <Avenger> cool, can you try shapeshifting jaheira?
[11:27:45] <Avenger> it doesn't work for me, but apparently works for fuzzie and lynx
[11:28:01] <lynxlynxlynx> on 32bit
[11:28:13] <Avenger> lynx: you saw it on 64 bit not working?
[11:28:22] <lynxlynxlynx> i mean it works on 32bit, haven't tried elsewhere - no hw
[11:28:43] <Avenger> trying on windows now
[11:28:52] <Avenger> win xp, should be 32 bit... i guess
[11:29:10] <wjp> hm, haven't run gemrb in a a few weeks, but I'm getting an ImportError: cannot import name GetStatOverview
[11:29:23] <wjp> (after loading)
[11:29:31] <Avenger> remove all py files :)
[11:29:37] <Avenger> from your install dir
[11:30:05] <wjp> right, better
[11:30:38] <wjp> seems to work
[11:30:45] <Avenger> shapeshifts to animal?
[11:30:52] <wjp> she's now a bear
[11:31:01] <Avenger> wtf, why it doesnt' work for me
[11:31:07] <Avenger> should be a game data problem then
[11:31:25] <wjp> [Actor]: Unregistered attack. We shouldn't be here?
[11:31:52] <Avenger> right, my attack list should be refactored by fuzzie ;P
[11:32:10] <lynxlynxlynx> http://sprunge.us/fYWA <-- right way?
[11:32:52] <Avenger> huh, what is the hotkey in the original to restore the gui ?
[11:34:37] <Avenger> lynx: why is it called puteffectv1 when it writes a v2 effect
[11:34:38] <fuzzie> lynxlynxlynx: should maybe abort if you don't have an EffectMgr?
[11:34:54] <fuzzie> also what Avenger said :) but the idea is good
[11:35:01] <Avenger> v1 effects are short v2 effects are long :)
[11:35:17] <lynxlynxlynx> heh
[11:35:25] <Avenger> and anyone tell me, what's the hotkey to restore the panels :)
[11:35:30] <lynxlynxlynx> must've missed it at the start
[11:35:48] <wjp> hm, valgrind warning in the pathfinder
[11:36:04] <lynxlynxlynx> Hide Interface=H
[11:36:05] <lynxlynxlynx> Right Interface=U
[11:36:10] <lynxlynxlynx> Left Interface=Y
[11:36:11] <Avenger> ahh cool, thans
[11:36:23] <Avenger> phew ;)
[11:36:36] <fuzzie> wjp: searchmap?
[11:36:50] <fuzzie> i haven't valgrinded it since avenger did char->short
[11:37:07] <Avenger> eep :)
[11:37:28] <Avenger> ok, i don't have gamedata problem, the original jaheira can shapeshift, even from a gemrb save
[11:37:29] <wjp> fuzzie: InitPathFinder / terrainsounds
[11:37:49] <wjp> in strnuprcpy
[11:38:03] <lynxlynxlynx> footsteps huh
[11:38:10] <Avenger> yep, that's footsteps
[11:38:22] <Avenger> that's a smaller eep :P
[11:38:45] <wjp> but no valgrind warnings when shapeshifting
[11:38:48] <Avenger> what exactly the problem? copying uninitialized data?
[11:38:48] <fuzzie> Avenger: it is quite possible we're not handling some fixpacked/etc gamedata difference, though; you're sure it isn't just resisted?
[11:39:02] <Avenger> fuzzie: don't know yet
[11:39:06] <fuzzie> wjp: many thanks for checking
[11:39:19] <Avenger> i plan to get to the end of this now
[11:39:33] <wjp> fuzzie: sure :-)
[11:39:57] <wjp> that InitPathFinder/strnuprcpy is writing one byte past the end of a buffer
[11:40:39] <wjp> likely because strnuprcpy seems to write count+1 bytes?
[11:41:07] <Avenger> i just do this step by step, first step passed: IE on windows, using gemrb save. second step failed: gemrb on windows, using same save.
[11:41:12] <Avenger> so this isn't a 32 bit problem
[11:41:18] <Avenger> err 64 vs 32
[11:41:23] <Avenger> more likely fixpack then?
[11:42:16] <Avenger> the odd thing is: it loads bearbl.cre
[11:42:22] <Avenger> so, the effect isn't resisted
[11:42:35] <Avenger> the substitute cre is loaded
[11:42:51] <Avenger> oh, i even get the bear paws
[11:43:03] <Avenger> just the avatar animation isn't changed
[11:43:20] <Avenger> and jaheira's paperdoll is weird
[11:43:38] <lynxlynxlynx> we don't animate the paperdoll, so that's expected
[11:47:11] <Avenger> the paperdolls are not animated, you mean, we dont find the bear anim?
[11:47:29] <fuzzie> we have a pdolls.2da
[11:47:46] <fuzzie> i thought it was simply missing entries?
[11:47:59] <Avenger> it still uses ceff1inv
[11:48:06] <Avenger> it should use some 'bear'inv
[11:48:39] <fuzzie> oh, wait
[11:48:41] <Avenger> mber0inv
[11:48:53] <fuzzie> i mean, if the avatar anim doesn't work for you, you probably have a bad anim id anyway?
[11:49:26] <Avenger> yes, i think that's the case. but.. do you have the mber paperdoll ?
[11:49:45] <Avenger> if yes, it would be clear what i miss ;)
[11:49:51] <fuzzie> the paperdoll is simply looked up in pdolls.2da with the anim id
[11:50:02] <fuzzie> i don't have the game here though, studying :)
[11:50:07] <Avenger> yep, and i still get ceff
[11:50:19] <wjp> I get a very broken bear paperdoll
[11:50:44] <wjp> (but a bear)
[11:50:58] <lynxlynxlynx> that's fine
[11:50:58] <Avenger> let me guess? half a bear? or... miscolored?
[11:51:05] <lynxlynxlynx> grayed out?
[11:51:08] <wjp> miscolored, and with equipment still showing
[11:51:43] <Avenger> yep, we should detect own paletted anims vs clown color anims.
[11:52:17] <Avenger> ok, i still don't see why my animID isn't changed, when everyone else's does
[11:52:21] <wjp> http://www.usecode.org/gemrb/bearpdol.png
[11:52:34] <Avenger> haha
[11:52:39] <fuzzie> well, it just looks at polystat.2da and then does the lookup in stats.ids
[11:52:54] <fuzzie> both are in our override/shared/ so i don't see what can go wrong
[11:53:16] <lynxlynxlynx> fuzzie: i get an invalid free with my code; http://sprunge.us/jaKO http://pastebin.ca/1990037 ; could it be a problem that the stream is also opened by the effect manager?
[11:54:21] <wjp> re. that strnuprcpy thing: I suppose I should just replace the sizeof(ieResRef) by 8?
[11:54:22] <fuzzie> yes, can you not set autoFree to false?
[11:54:38] <fuzzie> wjp: if strnupercpy doesn't include the null-terminator?
[11:55:10] * wjp nods
[11:55:22] <fuzzie> i mean, about the autoFree: you do 'eM->Open( stream, true);' which is asking for the stream to be deleted, i thought
[11:55:41] <lynxlynxlynx> yeah, i see
[11:56:18] <lynxlynxlynx> the paperdoll used to look better months ago or maybe i was just testing with empty inventories
[11:56:37] <lynxlynxlynx> i get the same result as wjp :)
[11:56:41] <Avenger> hmm i don't have animID on the polymorph stats list?
[11:56:59] <fuzzie> Avenger: "23 ANIMATIONID" at the bottom of polystat.2da?
[11:57:09] <Avenger> yes i see it there
[11:57:14] <Avenger> its value should be 205
[11:57:21] <fuzzie> sure, it's looked up in stats.ids
[11:57:31] <fuzzie> "205 ANIMATIONID"
[11:57:36] <CIA-28> GemRB: 03wjpalenstijn * r8a24a120da6e 10gemrb/gemrb/ (core/Map.cpp plugins/IWDOpcodes/IWDOpcodes.cpp): Fix off-by-ones in strnuprcpy calls
[11:57:54] <Avenger> but the last stat value is 74 for me
[11:57:57] <Avenger> wtf
[11:58:13] <Avenger> i got 23 numbers there (0-22)
[11:58:18] <Avenger> [22]=74
[11:58:43] <fuzzie> polymorph_stats[22]?
[11:58:47] <Avenger> yes
[11:58:52] <Avenger> that is resist poison
[11:59:06] <fuzzie> what's polymorph_stats[21]? :)
[11:59:25] <Avenger> oh ok, it starts with 0
[11:59:30] <Avenger> so we got 24 numbers
[11:59:34] <Avenger> i just don't have the last
[11:59:39] <Avenger> and i wonder how YOU have it
[11:59:54] <fuzzie> well, tab->GetRowCount() returns 24, so we have 24
[12:00:03] <Avenger> polystatcount = 23 for me
[12:00:03] <fuzzie> i guess it doesn't return 24 for you?
[12:00:37] <Avenger> i'm stating right in the for(int i=0;i<polystatcount;i++) {
[12:00:45] <Avenger> it is only 23, MEH
[12:01:02] <fuzzie> maybe it is picking up the wrong file?
[12:01:04] <Avenger> polystatcount = tab->GetRowCount();
[12:01:09] <Avenger> ok, maybe
[12:01:15] <Avenger> shared is overrridden by something?
[12:01:18] <fuzzie> i only added the last line when i fixed polymorphing
[12:01:26] <Avenger> yes!
[12:01:45] <lynxlynxlynx> shared is overriden by gametypes
[12:01:49] <Avenger> but why did you put this in shared?
[12:01:57] <fuzzie> it's always been in shared
[12:01:59] <Avenger> iwd2 has different stats
[12:02:02] <fuzzie> i only fixed the code
[12:02:06] <Avenger> well...
[12:02:16] <lynxlynxlynx> then just the iwd2 file needs another line
[12:02:20] <fuzzie> and it doesn't have stat numbers, only stat names, and the stats.ids is in shared/ too
[12:02:42] <Avenger> ok, looks like i had them in the game dirs
[12:02:42] <lynxlynxlynx> or separate files apparently
[12:02:57] <fuzzie> i guess lynx moved them, because the iwd2 stats.ids was identical to all the others
[12:02:58] <Avenger> atm, i have exactly the same files, so i will just delete them
[12:05:01] <Avenger> haha, and now she got bear walksounds and anim ;)
[12:05:24] <fuzzie> :)
[12:05:55] <Avenger> the animation is very ugly, doesn't move
[12:05:58] <fuzzie> also the right speed, i hope
[12:06:10] <fuzzie> if not, then there should be some complaint on the console
[12:06:11] <Avenger> it is a still anim sliding through the screen
[12:06:38] <Avenger> and i get a continuous console feedback: searching for mber_bl
[12:06:51] <Avenger> sucks
[12:07:08] <lynxlynxlynx> yep
[12:07:20] <lynxlynxlynx> since it is an effect, we update it each tick
[12:07:39] <lynxlynxlynx> so you get other frames very rarely
[12:07:40] <fuzzie> i added a cache for the poly effect
[12:07:40] <Avenger> but there shouldn't be an animation change if it is the same as before
[12:07:53] <fuzzie> maybe someone sabotaged the pcf?
[12:08:13] <fuzzie> i think i had to force the pcf call, because the effect code sucks and items suck and i hate it all
[12:08:41] <Avenger> at one point i had an if(oldvalue!=newvalue) inserted before the setAnimationID :)
[12:08:46] <Avenger> but i didn't commit that
[12:08:49] <Avenger> maybe i should
[12:08:57] <fuzzie> well, i thought it worked :(
[12:09:11] <Avenger> lets see
[12:09:42] <Avenger> the animations suck in other way too, the palette colors don't restore
[12:10:34] <fuzzie> this *did* work, in fact
[12:11:18] <Avenger> ok, the pcf tweak didn't fix the continuous bear palette reload
[12:11:19] <fuzzie> pcf didn't get called
[12:11:37] <fuzzie> did we change Modified somewhere?
[12:12:35] <Avenger> yes, Modified is always set back to the basestats on start of the refresh cycle
[12:12:46] <Avenger> i don't know how this worked :)
[12:13:21] <fuzzie> yeah
[12:13:51] <fuzzie> Actor::SetStat should use GetSafeStat to calculate 'previous'
[12:14:21] <Avenger> the funny thing is: the animation is not changed back
[12:14:23] <fuzzie> also we should kill all the idiotic RefreshEffects callers
[12:14:54] <fuzzie> but, try fixing SetStat?
[12:15:07] <Avenger> so, when it overwrites modified in the beginning, it doesn't set the animation back
[12:15:25] <Avenger> i guess i could hack setanimationID to notice it is still the bear so no need of change
[12:15:25] <fuzzie> it should fix both these problems
[12:15:38] <fuzzie> Actor.cpp:1997
[12:16:01] <Avenger> what's there
[12:16:26] <Avenger> i don't know what you could do there
[12:17:37] <fuzzie> change Modified[StatIndex] to GetSafeStat(StatIndex)
[12:18:49] <lynxlynxlynx> sounds dangerous
[12:19:33] <Avenger> i wouldn't overwrite the previous...
[12:19:42] <fuzzie> i'm confused
[12:19:49] <Avenger> unsigned int previous = GetSafeStat(StatIndex);
[12:19:52] <fuzzie> yes, that is good
[12:19:54] <Avenger> i would do this, only, right?
[12:20:02] <Avenger> all other Modified's are unchanged
[12:20:04] <fuzzie> then it should handle the pcf properly
[12:20:27] <Avenger> that could work, here, hough i'm not sure it is correct
[12:20:32] <fuzzie> oh, it won't, because the pcf_animid doesn't work
[12:20:33] <fuzzie> grr
[12:20:53] <Avenger> my pcf_animid has an olvalue!=newvalue check now, so it would work, for me
[12:21:19] <fuzzie> well, ok, you could just commit both
[12:21:25] <Avenger> i'm just unsure if all pcf's will take it kindly if the oldvalue is the safe stat
[12:21:50] <fuzzie> "if (previous!=Value || Modified[StatIndex]!=Value) {" would be better, i guess
[12:22:17] <Avenger> that smells even more fishy, it that was ever possible :P
[12:22:33] <fuzzie> well, if the oldvalue isn't the safe stat, then the oldvalue is nonsense
[12:22:43] <fuzzie> this code is just incorrect
[12:23:03] <fuzzie> the main pcf caller in RefreshEffects does it with the safe stat.
[12:23:35] <Avenger> yes, it is not clear what oldvalue should be. It could be the previous value in an incremental change (it was before), or the base stat, or the previous modified stat (it is now this)
[12:24:00] <fuzzie> it does the equivalent of plain 'if (previous!=Value) {' but that is not correct on its own in SetStat, because it needs to update Modified if necessary.
[12:24:50] <fuzzie> so, i guess really there should be two 'if' statements in SetStat: the existing one for changing Modified, and a 'if (previous!=Value) {' for the pcf
[12:25:32] <Avenger> the continuous bear bmp lookup is fixed by this
[12:25:39] <Avenger> i just don't know what else we broke
[12:26:19] <fuzzie> http://fuzzie.org/nfs/pcf.txt
[12:27:02] <fuzzie> that should fix it, even without the pcf_animid check
[12:27:14] <Avenger> yes
[12:27:25] <Avenger> but that would change behaviour for even more things
[12:27:28] <fuzzie> it doesn't
[12:27:30] <Avenger> do you want that?
[12:27:47] <fuzzie> most of the pcf calls are done in this way
[12:27:49] <Avenger> it would introduce an oldvalue!=newvalue check for all pcf
[12:28:13] <fuzzie> this SetStat one was just broken
[12:28:30] <Avenger> ok, lets do this :P
[12:28:48] <Avenger> so it isn't just me who breaks ac/hitpoints stuff :)
[12:32:10] <fuzzie> i'm sure i already broke ac/hitpoints stuff in the past :)
[12:32:30] <fuzzie> but someone should check if that patch actually fixes polymorph anims, without needing any silly pcf changes
[12:32:59] <Avenger> it fixes my problem at least
[12:33:19] <Avenger> i'm sure that continuous bmp lookup had a performance hit
[12:33:45] <-- Avenger has left IRC (Quit: ChatZilla 0.9.86 [Firefox 3.6.12/20101026210630])
[12:35:03] <lynxlynxlynx> i have another problem
[12:35:43] <lynxlynxlynx> saving triggers an assert, there's a byte too many written
[12:36:07] <fuzzie> you have an updated patch?
[12:36:10] <lynxlynxlynx> that coresponds to the Open call of the importer, but it does a Seek -8 afterwards, so i'm confused
[12:36:27] <lynxlynxlynx> http://sprunge.us/CNNa?diff
[12:36:58] <lynxlynxlynx> i've double checked that the main writting is still the same
[12:37:04] <fuzzie> why call Open at all?
[12:38:46] <lynxlynxlynx> good question :D
[12:44:39] <lynxlynxlynx> yeah that did it
[12:44:55] <lynxlynxlynx> in saradush i get some wierd sounds on load
[12:45:06] <lynxlynxlynx> like birds were dying
[12:46:28] <lynxlynxlynx> squirrels actually
[12:46:34] <lynxlynxlynx> [Actor]: Getting sound 2da asqu entry: DIE
[12:49:12] <fuzzie> oh, GetHpAdjustment still broken
[12:49:12] <lynxlynxlynx> looks like it is from scripts kicking in
[12:50:05] <CIA-28> GemRB: 03lynxlupodian * r51166e8a953c 10gemrb/gemrb/ (5 files in 4 dirs): factored out the EFFv2 saving into EFFImporter
[12:55:20] <CIA-28> GemRB: 03fuzzie * r145c160a7f5b 10gemrb/gemrb/core/Scriptable/Actor.cpp: only call pcf in SetStat when stat actually changed
[13:03:16] <fuzzie> lynxlynxlynx: http://fuzzie.org/nfs/hpadjust.txt make sense?
[13:03:28] <fuzzie> wait, where did SetupFist go.
[13:03:59] <lynxlynxlynx> yeah
[13:05:46] <lynxlynxlynx> without that, isn't the second chunk a noop?
[13:06:40] --> Bo_Thomsen has joined #GemRb
[13:07:16] <fuzzie> the first chunk needs Modified to be set first, that's what the second chunk is for
[13:07:44] <lynxlynxlynx> right
[13:08:52] <fuzzie> but maybe SetupFist modifies stats? so i won't commit
[13:10:21] <lynxlynxlynx> it can, yes
[13:10:49] <lynxlynxlynx> the magical fists have at minimum a tohit bonus
[13:11:30] <lynxlynxlynx> not as effects though
[13:12:14] <fuzzie> http://fuzzie.org/nfs/hpadjust.txt
[13:12:44] <lynxlynxlynx> :)
[13:17:37] <fuzzie> this reproduces the old behaviour.. i don't know if it's correct?
[13:21:55] <lynxlynxlynx> it should definitely look up the bonus with the modified stat
[13:26:32] --> Maighstir has joined #GemRb
[14:04:54] --> Avenger has joined #GemRb
[14:04:54] --- ChanServ gives channel operator status to Avenger
[14:05:07] <Avenger> thanks wjp for catching those strnupr size problems :)
[14:15:11] <-- barraAway has left IRC (Read error: Connection reset by peer)
[14:15:27] --> barraAway has joined #GemRb
[14:22:20] <-- Lightkey has left IRC (Ping timeout: 276 seconds)
[14:33:50] --> Lightkey has joined #GemRb
[14:49:40] <CIA-28> GemRB: 03fuzzie * r085019127c2a 10gemrb/gemrb/core/Scriptable/Actor.cpp: fix GetHpAdjustment
[14:58:18] <Avenger> what did you fix with this?
[15:00:07] <Avenger> what if you just move that memcpy a few lines up?
[15:00:29] <Avenger> move it after createderivedstats
[15:10:49] --- pipnuk is now known as pinpuk
[15:13:47] <fuzzie> Avenger: SetupFists can equip things which adjust stats
[15:13:50] <fuzzie> see the irc log :)
[15:14:08] <fuzzie> so i thought this way is safest, and fixes the bug
[15:16:42] --- pinpuk is now known as pupnik
[15:28:13] <fuzzie> oh, i gues the irc log is now kind of useless
[15:28:25] <fuzzie> but anyway, i tried it and i wasn't sure and this seemed the 'simplest' change which didn't break anything
[15:31:48] <Avenger> yes, it is better for now
[15:46:03] --> SiENcE has joined #GemRb
[16:08:27] --> barra_away has joined #GemRb
[16:11:48] <-- barraAway has left IRC (Ping timeout: 245 seconds)
[16:19:32] <-- SiENcE has left IRC (Quit: cya @all)
[16:27:26] <lynxlynxlynx> buh
[16:27:47] <lynxlynxlynx> i don't understand monster summoning (the spell)
[16:28:08] <lynxlynxlynx> sometimes it just doesn't fire the effect and nothing is summoned
[16:28:44] <lynxlynxlynx> i tried breaking it at different locations higher up, but didn't get anywhere
[16:34:08] <fuzzie> what's on the console?
[16:34:10] <fuzzie> just the .spl?
[16:36:08] <lynxlynxlynx> no spl at all
[16:36:24] <lynxlynxlynx> this effect looks up new effects to do the summoning
[16:37:28] <lynxlynxlynx> it's odd that the spell has only one header, but we call the spell's effect up to three times
[16:38:36] <fuzzie> i mean, which spell is this?
[16:39:50] <lynxlynxlynx> spwi504
[16:39:56] <fuzzie> bg2?
[16:41:25] <lynxlynxlynx> yes
[16:42:49] <fuzzie> that looks ok from my copy
[16:43:17] <fuzzie> twelve headers, with levels set, each pointing at three identical effects
[16:47:00] <fuzzie> i don't understand what gemrb's level code is doing, though
[16:47:21] <fuzzie> i mean, the spell's extended headers have the level *increasing*, from 11 to something high
[16:47:36] <fuzzie> but GetHeaderIndexFromLevel just checks 'header.RequiredLevel > level', which will match the first one
[16:47:48] <fuzzie> oh, no, it won't, i'm a sleepy idiot
[16:49:50] <fuzzie> so the first extended header is never used for actors casting spells?
[16:50:30] <lynxlynxlynx> oh, i was looking at an innate of the same name in dltcep
[16:53:47] <lynxlynxlynx> i don't know about the first header
[16:55:11] <lynxlynxlynx> maybe we screw the probabilities
[16:55:12] <Avenger> fuzzie, why do you think so?
[16:55:22] <lynxlynxlynx> 2x 61-100% + 1x 0-60%
[16:55:45] <lynxlynxlynx> we reroll each time?
[16:56:04] <fuzzie> Avenger: i am having trouble reading the code :) but it looks fine now i understand it, sorry
[16:56:34] <Avenger> no need of sorry :)
[16:58:16] <Avenger> i don't know if we screw the probabilities or not, but there is a chance
[16:58:25] <Avenger> :)
[16:58:49] <Avenger> we don't reroll each time, we shouldn't :)
[16:59:04] <Avenger> there supposed to be a random num precalculated
[16:59:06] <lynxlynxlynx> we do somewhere, i remember a comment
[16:59:39] <Avenger> there-->int EffectQueue::AddAllEffects(Actor* target, const Point &destination) const
[17:01:18] <lynxlynxlynx> we also roll in fx_apply_spell which this uses, but i'm not sure if it is always a good idea to share this roll with all the effects in the queue
[17:01:39] <lynxlynxlynx> it would fix this issue though
[17:02:18] <lynxlynxlynx> in this spell, the chance of complete failure is almost 10%, which matches observations
[17:02:21] <lynxlynxlynx> i'll go try that
[17:07:47] <Avenger> that is a question for Taimon :)
[17:07:55] <Avenger> or i could try to find out
[17:08:07] <lynxlynxlynx> didn't help enough
[17:18:39] <lynxlynxlynx> check_probability always has a 1% chance of resisting the effects if they cover the whole range like here
[17:18:57] <lynxlynxlynx> a roll of 61 would break all three
[17:24:37] <Avenger> 61 would break 0-60%? why?
[17:25:44] <lynxlynxlynx> 0-60 + 61-100, not separately
[17:26:22] <lynxlynxlynx> well separately too, it is greater than 60
[17:35:54] <Avenger> a 0 - 1 spell would never succeed?
[17:36:03] <Avenger> because roll is 1-100 ?
[17:37:49] <lynxlynxlynx> yes
[17:38:08] <lynxlynxlynx> we need to handle the case where Probability2 is 0 specially
[17:46:02] <Avenger> if max prob is 0, then the chance is 0
[17:46:36] <Avenger> i don't think we need any special handling here
[17:46:38] <lynxlynxlynx> Probability2 is the min one
[17:46:56] <lynxlynxlynx> no idea why it is named differently
[17:47:00] <Avenger> i think 1-100 is 99%. 100-100 is 0%
[17:47:25] <Avenger> simply the roll should be [0-99] and not [1-100]
[17:48:18] <Avenger> but i thought someone already fixed these rolls
[17:48:21] <lynxlynxlynx> would be simpler, yes
[17:48:55] <CIA-28> GemRB: 03lynxlupodian * r5bd867afe1a6 10gemrb/gemrb/plugins/FXOpcodes/FXOpcodes.cpp: fx_apply_effect: don't reroll the random value
[17:55:25] <lynxlynxlynx> odd
[17:55:57] <lynxlynxlynx> i cast the spell and apply effect is hit two times with the same roll and two times with a different one
[17:56:08] <lynxlynxlynx> i'd expect only 3 calls and with the same roll
[17:57:09] <lynxlynxlynx> yet multiples of 2 happen
[17:57:49] <Avenger> hmm
[17:58:17] <Avenger> which spell you fight with?
[17:58:26] <lynxlynxlynx> in the end the number correlates with the number of summoned critters
[17:58:30] <lynxlynxlynx> summon monster 3
[17:58:40] <lynxlynxlynx> ... and all have the same backtrace
[18:01:09] <lynxlynxlynx> oh, i also noticed that in the original tob, summoning starts the combat counter (or atleast the music)
[18:02:28] <fuzzie> yes, it's a hostile spell
[18:02:39] <fuzzie> another reason we should get rid of all this attackers stuff
[18:07:35] <Avenger> i thought you already work on that :P
[18:08:01] <fuzzie> no
[18:08:18] <fuzzie> i will get to it, someday, but i have enough other things right now :)
[18:08:40] <fuzzie> lynxlynxlynx: you should probably remove "gets a new chance to roll percents" from there if it's no longer true
[18:08:41] <lynxlynxlynx> merge more stuff
[18:09:20] <fuzzie> or does that comment refer to something else?
[18:09:51] <lynxlynxlynx> probably not, i'm just not sure if this is all correct, since there are so many things going on
[18:14:09] --> Maighstir_ has joined #GemRb
[18:15:10] <-- Maighstir has left IRC (Ping timeout: 260 seconds)
[19:24:56] --> Dark-Star has joined #GemRb
[19:24:56] --- ChanServ gives channel operator status to Dark-Star
[19:35:19] <lynxlynxlynx> Avenger: so, any insight?
[19:47:52] <Avenger> uhm about what?
[20:02:20] <lynxlynxlynx> i'll take that as a no
[20:02:36] <Lightkey> hehe
[20:02:37] <lynxlynxlynx> these effect issues
[20:02:52] * Lightkey waves at Dark-Star
[20:05:13] <Avenger> i already said what i think abou the percentages
[20:06:21] <Lightkey> fuzzie: useless logs?
[20:06:30] * Dark-Star waves back at Lightkey
[20:06:33] <fuzzie> Lightkey: referring to files i changed :)
[20:11:53] <lynxlynxlynx> the percentages would only fix that rare 1% case
[20:12:15] <lynxlynxlynx> do you know why we'd get double effect application?
[20:17:53] <Avenger> we should
[20:18:11] <Avenger> 61-100 is duplicated
[20:18:49] <Avenger> there is 40% that the effect will be applied twice
[20:18:50] <lynxlynxlynx> there are three effects and we do 2,4 or 6 applications (two each)
[20:18:56] <Avenger> oh
[20:19:07] <Avenger> 2 4 or 6?
[20:19:14] <fuzzie> and you're not counting the fx_apply_effect ones?
[20:19:18] <Avenger> it should be 1 or 2
[20:19:27] <fuzzie> Avenger: the spell has 3 features
[20:19:33] <fuzzie> oh, lynx said
[20:19:55] <Avenger> he also said that there is one with 0-60 and 2x 61-100
[20:20:04] <lynxlynxlynx> checking if any other immunity is problematic
[20:20:16] <Avenger> so, it is 60% to apply the first, and 40% to apply the second and third
[20:20:25] <fuzzie> it is 0-3c, 63-64 and 3d-64
[20:20:45] <fuzzie> oh, no, wrong header
[20:20:52] <fuzzie> yes, 0-3c and 2x 3d-64
[20:21:16] <Avenger> how could it be applied 6 times?
[20:21:18] <fuzzie> i don't understand it - why do they have durations?
[20:21:41] <Avenger> the summon duration goes into the summon removal effect
[20:21:43] <fuzzie> the durations are just junk?
[20:21:46] <Avenger> no
[20:21:53] <fuzzie> no, these are the 'apply effect' effects
[20:22:12] <Avenger> the duration is passed to the called effect, i think
[20:22:14] <fuzzie> they then apply spmon3.eff, with 0-64 prob and a better duration
[20:22:21] <fuzzie> ah
[20:22:22] <Avenger> hmm
[20:22:46] <fuzzie> gemrb does copy the duration/timing mode
[20:23:02] <Avenger> timing mode too?
[20:23:11] <Avenger> hmm, well, i don't know
[20:23:16] <fuzzie> spmon3.eff itself is FX_DURATION_INSTANT_PERMANENT which i also don't understand :)
[20:23:37] <Avenger> that's ignored, imo
[20:23:55] <Avenger> i think it is overwritten by the parent
[20:24:08] <lynxlynxlynx> interesting, when it fails, it does due to the probabilities
[20:24:10] <fuzzie> well, we certainly do that
[20:24:17] <lynxlynxlynx> somehow the random value is different each time
[20:24:39] <Lightkey> it isn't always 9?
[20:25:08] <lynxlynxlynx> it's also true i may have just been lucky and hit that 1%
[20:25:10] <lynxlynxlynx> will retry
[20:26:31] <lynxlynxlynx> doh, i didn't, i can see the values
[20:31:07] <Avenger> how did it fail then?
[20:31:41] <lynxlynxlynx> > somehow the random value is different each time
[20:31:48] <fuzzie> the code for the random value looks ok
[20:32:20] <lynxlynxlynx> i'm checking it now ingame too
[20:32:56] <lynxlynxlynx> here's the gist: http://pastebin.ca/1990539
[20:37:47] <lynxlynxlynx> as if AddAllEffects was called multiple times
[20:39:08] <lynxlynxlynx> oh, it is
[20:39:50] <lynxlynxlynx> Spell::GetEffectBlock iterates over the headers and applies each one separately
[20:40:12] <fuzzie> fx->Target is FX_TARGET_SELF?
[20:40:17] <lynxlynxlynx> must be
[20:40:37] <Avenger> but self effects (that get applied instantly) shouldn't go into the projectile
[20:40:43] <fuzzie> Avenger: they can go into a local queue
[20:40:51] <lynxlynxlynx> yes, we have code for that
[20:41:02] <fuzzie> and then just call AddAllEffects at the end
[20:41:05] <Avenger> i don't understand
[20:41:18] <lynxlynxlynx> i'm not sure if it is correct to just override all the applied effects target
[20:42:00] <fuzzie> Avenger: make a second EffectQueue, say 'selfeffectqueue', and then add to that while looping
[20:54:20] <CIA-28> GemRB: 03lynxlupodian * radd9fe7277c2 10gemrb/gemrb/ (core/EffectQueue.cpp plugins/FXOpcodes/FXOpcodes.cpp): roll the effect random number between 0 and 99
[20:54:23] <CIA-28> GemRB: 03lynxlupodian * redb221b0ba21 10gemrb/gemrb/plugins/FXOpcodes/FXOpcodes.cpp:
[20:54:23] <CIA-28> GemRB: fx_apply_effect: *do* reroll the random value
[20:54:23] <CIA-28> GemRB: This reverts commit 5bd867afe1a693a1842776357d3cad1b1955a9c7.
[21:02:03] <Avenger> does this fix the summon?
[21:23:22] <lynxlynxlynx> no
[21:25:43] <fuzzie> a local queue doesn't help?
[21:27:32] <lynxlynxlynx> i haven't tried that yet
[21:27:54] <lynxlynxlynx> something for late tommorow or later
[21:37:33] <fuzzie> you have time to test a patch for it?
[21:39:31] <lynxlynxlynx> only briefly
[21:40:37] <fuzzie> http://fuzzie.org/nfs/gemrb/spell_queue.txt
[21:43:02] <lynxlynxlynx> ok
[21:47:14] <lynxlynxlynx> i expect i'll need to revert my revert
[21:47:26] <lynxlynxlynx> ok, it built
[21:50:36] <fuzzie> honestly i don't see why we use ApplyEffect in there at all, since it would only be bouncing back at the same actor
[21:52:01] <lynxlynxlynx> works as it should :D
[21:52:32] <fuzzie> and if this is correct behaviour, Item::GetEffectBlock should be changed too
[21:53:48] <fuzzie> i guess really, all the callers of ApplyEffect outside FXOpcodes/IWDOpcodes/etc are silly
[21:54:45] <lynxlynxlynx> the only way for it to summon nothing is the 61, but that may also be a data bug
[21:55:37] <lynxlynxlynx> good night
[21:55:46] <fuzzie> night!
[21:55:55] <-- lynxlynxlynx has left IRC (Remote host closed the connection)
[21:57:59] <CIA-28> GemRB: 03fuzzie * r4274e9b55cbd 10gemrb/gemrb/core/ (Interface.cpp Interface.h): add ApplyEffectQueue, which does CheckImmunity for a queue, and use it
[21:58:04] <CIA-28> GemRB: 03fuzzie * rf3e59abd517c 10gemrb/gemrb/core/Spell.cpp: Spell::GetEffectBlock: apply all self-targeted effects at once (maybe not best fix)
[22:01:54] <-- DrMcCoy has left IRC (Disconnected by services)
[22:02:07] --> DrMcCoy has joined #GemRb
[22:31:54] <Avenger> yeah, i was just too lazy to collect the self effects into a queue. You do this to have all the same random number?
[22:32:49] <Avenger> probably they should have the same as the other queue, though :)
[23:04:35] <-- Avenger has left IRC (Quit: bye!)
[23:15:48] --> pupnik_ has joined #GemRb
[23:19:18] <-- pupnik has left IRC (Ping timeout: 245 seconds)