#gemrb@irc.freenode.net logs for 24 Aug 2009 (GMT)

Archive Today Yesterday Tomorrow
GemRB homepage


[00:08:33] <-- Edheldil has left IRC (Read error: 104 (Connection reset by peer))
[00:26:05] --> barra__out has joined #gemrb
[00:32:43] <-- barra_away has left IRC (Read error: 104 (Connection reset by peer))
[02:38:23] --> Gekz has joined #gemrb
[05:07:09] <-- Gekz has left IRC (Ping timeout: 180 seconds)
[07:20:20] --> lynxlynxlynx has joined #gemrb
[07:20:20] --- ChanServ gives channel operator status to lynxlynxlynx
[07:41:42] --> Avenger has joined #gemrb
[07:41:47] --- ChanServ gives channel operator status to Avenger
[07:48:48] <-- |Cable| has left IRC (Remote closed the connection)
[08:27:10] <Avenger> looks like all are sleeping :)
[08:28:14] <-- Avenger has left IRC ("bye!")
[08:57:17] <fuzzie> morning
[09:12:13] --> Gekz has joined #GemRB
[09:22:23] --> Avenger has joined #gemrb
[09:22:28] --- ChanServ gives channel operator status to Avenger
[09:23:20] <Avenger> hello fuzzie, you asked me once if Wait is a blocking action or not. It is. It keeps a counter in 'Scriptable' and stays on the queue until it goes down.
[09:23:29] <fuzzie> yes
[09:23:35] <Avenger> it also checks if the Scriptable is an Actor with the haste effect on
[09:23:49] <Avenger> if it has the haste effect without slow effect, it counts by 2
[09:23:49] <fuzzie> i tried fixing it to work properly
[09:23:54] <fuzzie> but it turns out that it breaks everything
[09:24:18] <fuzzie> because a lot of other code does stupid things with SetWait
[09:24:29] <fuzzie> so i have to fix those too
[09:24:32] <Avenger> it turns out the IE is very similar to GemRB. (or vice versa, hehe)
[09:24:53] <Avenger> they got the equivalent of Scriptable and Actor too
[09:25:02] <fuzzie> yes, it's worked out pretty well, i'm happily surprised :)
[09:25:09] <Avenger> the first ~ 0x300 bytes are common
[09:25:21] <fuzzie> did you find anything about triggers?
[09:25:23] <Avenger> those are the scriptable attributes
[09:25:29] <Avenger> well, first looking at actions
[09:25:38] <Avenger> but i got the offsets for the triggers too
[09:25:48] <Avenger> so if you have one specifically in your mind, i can take a look
[09:26:00] <fuzzie> i just want to know how they're handled in general
[09:26:06] <Avenger> well, uhm
[09:26:16] <fuzzie> my patch currently uses both a 'TriggerID' (for the actor) and a 'TriggerHappened' (for the event)
[09:26:25] <fuzzie> and obviously sometimes also a Spell ID, or similar
[09:26:29] <Avenger> i found the approximate location of the central handler, but that's always difficult to read :)
[09:26:58] <Avenger> it is easier to look at the branches first, to find the attributes
[09:26:58] <fuzzie> and just knowing the Scriptable structure is probably enough to see if that's how they do it
[09:27:19] <Avenger> yes, i now look for the scriptable attributes
[09:27:27] <Avenger> found 2 just by looking at Wait :)
[09:27:32] <fuzzie> seeing what 'Entered' does might be interesting for example :)
[09:27:40] <Avenger> one is the equivalent of our Scriptable->Type
[09:27:47] <Avenger> the other is the Wait time
[09:27:50] <fuzzie> i still don't understand how actions are interrupted, if you know that
[09:28:09] <fuzzie> and, well, do you know if it's Wait time or just a generic place for actions to store data?
[09:28:20] <Avenger> well, all i see now is, each action returns if they want to get off the queue, they want to stay on the queue, etc
[09:28:35] <fuzzie> yes, i want to implement that in gemrb too
[09:28:46] <Avenger> there are the following codes so far: -1 - non blocking action, 1 - blocking action stays on the queue, 2 - NoAction returns this
[09:29:05] <fuzzie> check the return of ClearActions
[09:29:11] <Avenger> k
[09:29:24] <fuzzie> that would interest me
[09:29:42] <Avenger> omg, didn't get the offset ;)
[09:29:44] <Avenger> but i will
[09:29:50] <Avenger> i thought i had all
[09:29:55] <fuzzie> (it is a 'truly instant' action, it's not added to the queue)
[09:30:14] --> Gekz_ has joined #GemRB
[09:30:28] <-- Gekz has left IRC (Nick collision from services.)
[09:31:10] --- Gekz_ is now known as Gekz
[09:33:22] <fuzzie> but i hope that i know everything useful about actions now, but i still have a lot of questions about triggers
[09:33:55] <fuzzie> and i like our CurrentAction better than messing with the queue :)
[09:35:48] <Avenger> clearallactions returns -1
[09:36:02] <Avenger> that's simple one shot nonblocking action
[09:36:06] <fuzzie> yes, that's just a boring simple action
[09:36:09] <fuzzie> i ask about ClearActions :)
[09:36:13] <Avenger> ahh
[09:36:17] * Avenger rolls eye.
[09:37:48] <fuzzie> typical usage is ClearActions(Myself) at the start of a block to make sure any previous Continue() block doesn't get run
[09:37:51] <Avenger> same
[09:38:09] <fuzzie> so i just wondered if the action itself was anything special
[09:38:10] <Avenger> but it doesn't mean it wouldn't set some attribute somewhere
[09:38:23] <Avenger> it isn't special, on the edges
[09:38:29] <Avenger> could be special inside, it is not too short
[09:39:05] <fuzzie> well, it's got to be handled differently somewhere
[09:39:09] <Avenger> actually it is the longest action code i checked so far (but i checked only very few)
[09:39:42] <Avenger> wait does stuff quite redundantly :)
[09:40:14] <fuzzie> but maybe it's easier to simply observe in the original
[09:40:24] <fuzzie> but i'd like to change gemrb actions to return blocking/nonblocking at least
[09:40:32] <Avenger> about 30 bytes to do a counter--, and it does that 3 times :)
[09:40:40] <fuzzie> hm, maybe it doesn't matter
[09:41:06] <fuzzie> and, i guess they didn't care about optimising their actions, they don't get called very much
[09:41:23] <Avenger> i thought actions are used very much
[09:41:35] <Avenger> they are in ai scripts
[09:41:36] <fuzzie> not compared to the renderer and triggers
[09:41:44] <Avenger> oh well, yes
[09:41:53] <Avenger> trigger evaluation is much more important
[09:42:40] <fuzzie> but it is nice to have the wait thing confirmed
[09:42:53] <fuzzie> i was pretty sure, since you can interrupt them just like normal blocking actions, but i'd only tested via scripts
[09:43:13] <fuzzie> i still want to know how interruption works, though
[09:43:30] <fuzzie> since these scripts that Wait() don't ever get interrupted by other blocks
[09:43:32] <Avenger> yes, we were almost sure too, we chose the internal handling because the blocking actions caused leaks a lot :)
[09:43:43] <Avenger> it was easier to handle the wait counter inside
[09:43:54] <fuzzie> yeah, the wait counter inside breaks a lot of bg2 scripts now :(
[09:44:15] <Avenger> then put it out in a blocking action
[09:44:16] <fuzzie> because it's used for lots of different things, i guess
[09:44:29] <Avenger> at least the normal wait
[09:44:40] <Avenger> keep the other inside too, for some time
[09:44:49] <fuzzie> well, i guess i check every one individually
[09:44:58] <Avenger> just make the normal wait action become a blocking action
[09:45:04] <fuzzie> but at the moment i have Wait() non-interruptable and everything else interruptable
[09:45:20] <fuzzie> i know that's right, but if i make Wait a blocking action then it can be interrupted too, disaster! so if you can find out how that works, it would be great
[09:45:41] <Avenger> actually, there are 2 wait actions
[09:45:43] <fuzzie> but it can also be simply tested with scripts, and i can do that later today myself
[09:45:45] <Avenger> but one is non documented
[09:45:59] <Avenger> i found it earlier while looking for the jumptable of actions
[09:46:09] <Avenger> maybe the other wait is noninterruptable
[09:46:09] <fuzzie> one more as well as Wait and SmallWait?
[09:46:14] <Avenger> yes, more
[09:46:23] <Avenger> smallwait simply doesn't multiply the counter by 15
[09:46:28] <Avenger> that's visible in the code :)
[09:46:32] <Avenger> exactly like ours
[09:46:37] <fuzzie> ok, good, that is what ours does
[09:46:40] <Avenger> there is another wait, though
[09:46:45] <fuzzie> i wonder if ActionOverride changes the interruptible state also
[09:46:54] <Avenger> action code: 205
[09:47:16] <Avenger> so you can use this other wait as 205 OtherWait()
[09:47:23] <Avenger> you gotta put it in action.ids
[09:47:24] <fuzzie> huh, high number
[09:47:41] <Avenger> 205 16 ? Wait????
[09:47:42] <Avenger> 206 A3 -
[09:47:44] <Avenger> 207 A3 - MoveToPointNoInterrupt(P:Point*)
[09:47:46] <Avenger> 208 A3 - MoveToObjectNoInterrupt(O:Object*)
[09:47:53] <fuzzie> what's the 16/A3 mean? :)
[09:47:53] <Avenger> so, maybe it is not interrupt wait :)
[09:48:05] <Avenger> a3 means it is only for livings
[09:48:09] <fuzzie> aha
[09:48:19] <fuzzie> did you already use that for gemrb's AF_ALIVE?
[09:48:28] <fuzzie> because that seems to not be entirely correct
[09:48:35] <Avenger> it is different
[09:48:48] <Avenger> or maybe not
[09:48:48] <fuzzie> ForceSpell works in gemrb on dead actors
[09:48:50] <Avenger> dunno
[09:48:57] <fuzzie> but in the original game i don't think it does
[09:48:58] <fuzzie> for example
[09:49:02] <Avenger> let me see
[09:49:22] <Avenger> 113 21 - ForceSpellRES(S:RES*,O:Target)
[09:49:28] <Avenger> i think it works for non-living
[09:49:50] <Avenger> i could look at the code itself :)
[09:50:03] <fuzzie> ok. i guess our effects are broken then.
[09:50:11] <fuzzie> well, or the death code somewhere. i'll have to test.
[09:50:16] <Avenger> when did you look at that?
[09:50:28] <Avenger> doesn't the summoning wand trap use forcespell???
[09:50:32] <Avenger> i fixed it
[09:50:36] <fuzzie> yes
[09:50:42] <Avenger> i fixed that, heh
[09:50:58] <fuzzie> but dead actor scripts sometimes use ForceSpell in their death script run and it screws up quests
[09:51:09] <Avenger> hmm
[09:51:22] <fuzzie> but i think the death was caused by an effect
[09:51:26] <Avenger> a dead actor is different from a nonliving scriptable :)
[09:51:27] <lynxlynxlynx> dead is original living :)
[09:51:35] <fuzzie> ok, well, meh :)
[09:51:35] <lynxlynxlynx> hehe
[09:51:56] <Avenger> maybe forcespell checks if the actor is dead
[09:52:15] <Avenger> hi Lynx
[09:52:29] <lynxlynxlynx> oj
[09:52:37] <fuzzie> anyway, my list of things to do is "fix Wait! it is blocking! don't let other actions abuse wait counter!", "fix casting time!!", "fix triggers", "commit [0] visibility patch", "remove GoNear calls", "when can you interrupt?? how does ActionOverride change?"
[09:52:50] <Avenger> wanna do another run through? but now with a sorceror :)
[09:53:08] <lynxlynxlynx> i'll do another monk, same route
[09:53:10] <fuzzie> so if you have advice on any of those i would like to hear
[09:53:23] <Avenger> heh, that won't test enough parts
[09:53:27] <lynxlynxlynx> i'm sure we can get some of our groupies to do real plays
[09:54:03] <lynxlynxlynx> fuzzie: what's the status of whatever is breaking the tree of life?
[09:54:10] <fuzzie> that is "fix triggers"
[09:54:20] <fuzzie> it's simple to write a quick hack to make the tree of life work
[09:54:20] <Avenger> gemrb beta: completion of the game works with an immortal monk :)
[09:54:21] <lynxlynxlynx> ouch
[09:54:33] <fuzzie> so i can commit that sometime if truly necessary
[09:54:38] <fuzzie> but i would prefer it be fixed properly
[09:54:45] <fuzzie> which is why i ask Avenger for any hints :)
[09:54:53] <lynxlynxlynx> i'm sure you could abi your way through with a solo sorcerer too, but i don't want to bother
[09:55:09] <fuzzie> we don't implement spells well enough for it to be much fun
[09:55:10] <Avenger> well, i will do that myself then
[09:55:17] <Avenger> heh, we do
[09:55:26] <lynxlynxlynx> protection from normal weapons is *very* handy
[09:55:30] <fuzzie> there needs to be a lot more action code written
[09:55:38] <lynxlynxlynx> not many nasties use magical weapons
[09:55:55] <lynxlynxlynx> i think only the biggest of golems have +1 :)
[09:55:55] <fuzzie> and the area effect stuff is still flaky, and the casting time is still weird, and it's all very annoying
[09:56:12] <lynxlynxlynx> yes, but the damage is dealt
[09:56:24] <lynxlynxlynx> dragon breath is instamasskill
[09:56:43] <fuzzie> same problems for thieves; we don't do hide in shadows, or backstabbing, or any real thief skills i guess :)
[09:56:47] <Avenger> i fixed some hp problems
[09:56:47] <lynxlynxlynx> so fast that you don't even see the whole animation
[09:56:58] <fuzzie> Avenger: does it fix the regeneration items, do you think?
[09:57:09] <Avenger> it could break them more
[09:57:10] <Avenger> :P
[09:57:19] <lynxlynxlynx> regeneration items worked for me
[09:57:20] <fuzzie> oh well, let us hope? :)
[09:57:26] <fuzzie> lynxlynxlynx: combining two is the problem, i think
[09:57:39] <lynxlynxlynx> i had two initially
[09:57:44] <Avenger> combining a max hp increaser, and a regen item was bad
[09:57:45] <lynxlynxlynx> only one applies?
[09:58:00] <lynxlynxlynx> yeah, helm of balduran
[09:58:00] <Avenger> two regen items are not bad
[09:58:11] <Avenger> but i think there is a chance it will work now
[09:58:21] <Avenger> i removed one variable from the equation, at last
[09:58:23] <Avenger> least
[09:58:34] <fuzzie> i should fix gemrb's fade stuff before i go mad from that
[09:58:37] <Avenger> there is a question of con bonuses
[09:58:59] <fuzzie> GlobalTimer has seperate 'Update' and 'Freeze' functions
[09:59:02] <fuzzie> this is kind of strange
[09:59:15] <Avenger> well unseparate them :)
[09:59:24] <lynxlynxlynx> so does anyone have anything left for 0.6.0?
[09:59:33] <Avenger> you: run through?
[09:59:50] <fuzzie> if you're releasing tomorrow, this action stuff should probably wait for afterwards
[09:59:55] <lynxlynxlynx> yes, but i wouldn't like to start if something that can change a lot will be done afterwards
[09:59:58] <fuzzie> it breaks too much
[10:00:04] <lynxlynxlynx> not tomorrow
[10:00:16] <Avenger> today?
[10:00:22] <lynxlynxlynx> not today :)
[10:00:37] <Avenger> when?
[10:00:50] <lynxlynxlynx> oh, tomorrow is the 25th
[10:00:51] <Avenger> if it is in the weekends, i'm sure fuzzie can put her new stuff in
[10:01:07] <fuzzie> but, go work out triggers! :)
[10:01:12] <fuzzie> i rewrote the trigger code twice now
[10:01:15] <fuzzie> but i am not happy with either of them
[10:01:18] <lynxlynxlynx> well, there's no real need to be on the same date
[10:01:54] <lynxlynxlynx> it would be nice to be able to go by the tree without cheating, since that seems to be the only thing left
[10:02:06] <lynxlynxlynx> even if it is just a temporary hack until your rewrite is done
[10:02:08] <fuzzie> well, if you really want to release tomorrow, i can add a hack for that
[10:02:11] <Avenger> what's so damn difficult with that tree? are you sure it is doable in the original game?
[10:02:21] <fuzzie> Avenger: it uses LastTrigger
[10:02:22] <Avenger> isn't it fixed by the fixpack?
[10:02:25] <fuzzie> and we wipe LastTrigger right now
[10:02:34] <fuzzie> because our trigger code is completely wrong and insane
[10:02:46] <Avenger> hmm, that's a valid statement :)
[10:03:01] <Avenger> scripting info is fuzzy at best
[10:03:12] <fuzzie> you can simply add a hack to make 'LastTrigger' and 'LastTriggerHack', it fixes the tree no problem
[10:03:16] <Avenger> that's why i said iesdp should contain some more
[10:04:13] <fuzzie> it's simple to see that gemrb's code is wrong
[10:04:24] <fuzzie> and also simple to see that IESDP's info is wrong
[10:04:40] <Avenger> what is not simple: get it correct :D
[10:04:42] <fuzzie> and the next step is to do more testing
[10:05:37] <Avenger> well, i want to get more familiar with actions
[10:05:46] <Avenger> any other action you are puzzled about?
[10:05:54] <Avenger> or you are only wanting triggers
[10:06:09] <fuzzie> i think all information is useful
[10:06:19] <Avenger> ok then i start from the beginning
[10:06:30] <Avenger> noaction: is simple, LOL
[10:06:44] <Avenger> but i'm sure it hides something
[10:06:48] <fuzzie> but i mean triggers as in, Entered and Clicked and Reset and SpellCast and Killed and TookDamage
[10:07:04] <Avenger> i'm pretty sure noaction clears the modal state
[10:07:15] <fuzzie> the modal state is cleared by the action code elsewhere
[10:07:15] <Avenger> hmm, ok
[10:07:20] <fuzzie> i don't think NoAction is special in that way
[10:07:28] <Avenger> well, it returns 2 :)
[10:07:40] <Avenger> not -1
[10:07:44] <Avenger> 2 is special
[10:07:46] <fuzzie> nothing else does that?
[10:07:52] <fuzzie> i thought that other actions did the same
[10:07:55] <Avenger> i see only the first 2-3 trees
[10:08:11] <fuzzie> in fact i'm surprised not to hear of a -2 also
[10:08:36] <Avenger> i can safely tell though if an action is used by living actors or not :)
[10:08:43] <Avenger> that sometimes helps
[10:10:24] <Avenger> hmm createcreature is surprisingly long
[10:11:33] <fuzzie> if the compiler inlines functions, then that is no surprise, it has to do a lot
[10:11:55] <Avenger> yes, there are traces of inlining
[10:12:04] <Avenger> when assertions say something about objcreature.h :)
[10:12:20] <fuzzie> the gemrb output is heavily inlined too
[10:14:31] <fuzzie> hm, i have little motivation to keep working on triggers if i might have to do it again once you worked it out :)
[10:14:37] <fuzzie> i guess i'll finish the actions
[10:14:53] <Avenger> spellcast trigger would be fun
[10:15:21] <Avenger> but i played safely too, with that setupwish action :)
[10:15:26] <Avenger> surely won't break anything, hehe
[10:16:02] <fuzzie> you added a bunch of SetModal stuff, was that a guess?
[10:16:25] <fuzzie> it seems not to match original engine very well
[10:16:28] <Avenger> more than a guess, less than research
[10:16:32] <fuzzie> but it is better than nothing
[10:16:44] <Avenger> what do you mean by not match?
[10:16:55] <Avenger> if you open something it stops the modal action, no?
[10:17:06] <fuzzie> the modal state seems not always be reset by such actions
[10:17:12] <fuzzie> and it is reset by other action also
[10:17:21] <Avenger> the other actions, yes, i know
[10:17:28] <Avenger> but the 'not always' is new to me
[10:17:52] <fuzzie> you've tried it with scripting? the ui gets in the way
[10:18:09] <Avenger> hmm, so you say, the ui stops modals?
[10:18:11] <fuzzie> since the action bar does its own resetting
[10:18:13] <Avenger> could be
[10:18:37] <lynxlynxlynx> hmm, i don't get attack animations anymore
[10:18:38] <Avenger> maybe those 'trytoopen' 'trytoattack' thingies?
[10:18:48] <lynxlynxlynx> Tried to set invalid stance id (172) <-- all the time
[10:18:50] <fuzzie> could be
[10:18:52] <Avenger> well, attack anims are weird since a while
[10:18:58] <Avenger> i tried to tell you guys :)
[10:19:19] <fuzzie> every time i try battling someone, the animations are broken in so many ways, i give up
[10:19:33] <Avenger> maybe something corrupts memory
[10:19:55] <Avenger> it is so random and ... random
[10:19:57] <lynxlynxlynx> this is my char, not some wierd creature
[10:20:08] <fuzzie> the code just isn't very well thought out
[10:20:09] <lynxlynxlynx> in the previous run the monk was kicking and punching just fine
[10:20:13] <Avenger> did you experience the gui breakdown too?
[10:20:16] <fuzzie> nothing consistently sets the correct animations
[10:20:28] <fuzzie> so you can easily end up with just random stances
[10:20:41] <Avenger> sometimes fighting causes random windows to pop in and out
[10:21:09] <lynxlynxlynx> nope
[10:21:25] <lynxlynxlynx> at least not random ;)
[10:21:46] <fuzzie> my last theory was that the save window causes the ui bugs
[10:21:53] <fuzzie> but i think wjp couldn't reproduce
[10:21:57] <lynxlynxlynx> this is easily seen if you do a standard save and then the messagewindow has mixed content
[10:22:06] <lynxlynxlynx> heh
[10:23:01] <lynxlynxlynx> Avenger: the animation is now consistently wrong
[10:23:21] <Avenger> i don't know what broke it
[10:24:19] <raevol> lynxlynxlynx: did you want to get me started on those BG1 levelling tables?
[10:24:40] <lynxlynxlynx> no
[10:24:42] <raevol> when you can
[10:24:44] <raevol> hah ok
[10:24:55] <lynxlynxlynx> i asked you to try chargen, there are supposed to be some bugs there
[10:25:24] <raevol> i made a character of each class
[10:25:35] <fuzzie> looking at logs, i guess wjp found segfaults instead of reproducing :)
[10:25:49] <fuzzie> so i fixed those and we never got back to the ui issues
[10:26:06] <lynxlynxlynx> raevol: had no problems at all?
[10:26:30] <raevol> they all created fine, the voice preview doesn't work right, but it didn't crash or error or anything
[10:26:42] <raevol> looking at the character sheets i think some of it may be wrong?
[10:26:56] <lynxlynxlynx> see, that's what we want to know about
[10:28:01] <raevol> the character sheet stuff?
[10:28:12] <lynxlynxlynx> yes
[10:28:15] <lynxlynxlynx> the preview too
[10:28:23] <raevol> ok
[10:28:30] <lynxlynxlynx> you could work on that if you want
[10:28:43] <raevol> just submitting bugs for the things i see?
[10:28:57] <lynxlynxlynx> voice preview :)
[10:30:11] <raevol> well as i told you i'm not much of a coder... hmm
[10:30:19] <raevol> do you have a bug tracking system?
[10:30:38] <lynxlynxlynx> sure
[10:30:48] <lynxlynxlynx> didn't you say you want to get started though?
[10:31:12] <fuzzie> the bug tracker is on sourceforge, and we do truly use it
[10:31:16] <raevol> i want to do what i can to help :[
[10:31:27] <pupnik_> probably filing bugs
[10:31:29] <raevol> i just can't wade through the code on my own, i'm clueless
[10:31:58] <pupnik_> i'm getting my back-friendly PC setup this week hopefully
[10:32:25] <pupnik_> mattress on floor, monitor suspended from table, passive watercooling PC :)
[10:32:50] <pupnik_> this lappy is too slow
[10:33:20] <lynxlynxlynx> effect resisted: CurrentHPModifier :(
[10:37:25] <pupnik_> is there a set of BG2 saves that we could share/use to test?
[10:37:37] <pupnik_> "hi i tested from save #240 and so-and-so happened"
[10:38:32] <lynxlynxlynx> there are plenty of saves around
[10:38:46] <lynxlynxlynx> you can just play for yourself and save when something new happens
[10:41:21] <raevol> there, but reported in the voice preview
[10:41:21] <raevol> hah
[11:03:39] <lynxlynxlynx> good, the animation thing does look random
[11:03:47] <lynxlynxlynx> a reload helped and other saves are fine
[11:05:44] <pupnik_> :)
[11:13:03] <Avenger> fuzzie: i have some news :)
[11:13:21] <Avenger> currentaction is copied entirely into the actor (scriptable)
[11:13:38] <Avenger> it's not just some lazy pointer
[11:13:55] <Avenger> so, the wait counter is actually the int1 parameter of wait :)
[11:29:50] <Avenger> hah, here is a -2
[11:30:06] <Avenger> fuzzie, you wanted to see a -2 return code :)
[12:06:38] --> Gekz_ has joined #GemRB
[12:08:30] <fuzzie> ok
[12:08:53] <fuzzie> with 'CurrentActionTarget' and 'CurrentActionState' i keep an object and integer param around
[12:09:15] <fuzzie> what returns a -2?
[12:11:50] <fuzzie> also hooray no special wait counter :)
[12:12:23] <fuzzie> we don't need to copy the whole action i think, our current code is fine
[12:13:46] <fuzzie> so long as you only find things which gemrb can do better with the current design, i am happy :p
[12:15:48] <Avenger> you need to copy the action, because you don't want to damage the original action
[12:16:00] <fuzzie> we don't
[12:16:09] <fuzzie> we just take a reference, and then keep our own state/target
[12:16:19] <-- Gekz has left IRC (Read error: 110 (Connection timed out))
[12:16:26] <fuzzie> it works just as well, nothing modifies more than that
[12:16:32] <Avenger> when you take a reference, and you decrease int0parameter, you damage the original action, no?
[12:16:49] <fuzzie> yes, so i copy int0parameter into 'CurrentActionState' and modify this instead :)
[12:17:03] <Avenger> oh i see, so you don't copy the whole action, just parts?
[12:17:12] <fuzzie> it seemed cleverer
[12:17:16] <fuzzie> although copying the whole action would be fine too
[12:17:20] <Avenger> we'll see :)
[12:17:29] <Avenger> it is definitely more sophisticated
[12:17:43] <fuzzie> so if someone wants to change it, it would be fine, i think
[12:18:25] <fuzzie> i just tried to keep things simpler, so we can't accidentally damage an action
[12:18:28] <Avenger> it won't be likely i touch the gamescript framework itself
[12:18:42] <Avenger> i'm glad it found someone else to annoy :)
[12:18:53] <fuzzie> i am glad you confirm things!
[12:19:18] <Avenger> damn Taimon, he knows all these things
[12:19:25] <Avenger> whatever i ask him, he answers, fast
[12:19:49] <fuzzie> ask him about interruptability and whether SetInterrupt(FALSE) also happens for ActionOverride? :)
[12:20:06] <Avenger> he should be here and answer you in person :D
[12:20:28] <Avenger> well, i ask him only easy questions, about action struct, infopoint struct, etc :)
[12:20:43] <fuzzie> i think he knows this also, he knew exactly how cutscenes worked internally
[12:21:00] <fuzzie> but i didn't find time to ask
[12:21:28] <Avenger> next time i ask him something i tell him about #gemrb :)
[12:21:49] <fuzzie> well, i think maybe we'd scare devSin and Taimon with so many questions they'd never come back
[12:21:56] <fuzzie> but i can surely make forum threads
[12:22:27] <Avenger> i don't think this deep stuff is forum worthy maybe use pm
[12:23:19] <Avenger> hmm the GiveOrder action actually has lots of stuff in it
[12:23:21] <fuzzie> well, if i put it in modding q&a then i don't forget it and it doesn't annoy igi :)
[12:23:24] <Avenger> i wonder if anything uses it
[12:23:42] <fuzzie> i found another thing in my notes, how does Waypoint work?
[12:23:55] <Avenger> oh well, lemme see, i think it is inactive in bg2 :0
[12:24:20] <Avenger> 2 73 A3 - empty code - AddWayPoint(P:WayPoint*)
[12:24:22] <Avenger> :)
[12:24:32] <fuzzie> oh, huh
[12:24:37] <fuzzie> it's not in any of the scripts!
[12:24:49] <Avenger> giveorder or addwaypoint?
[12:24:54] <fuzzie> addwaypoint
[12:25:00] <Avenger> well, we can forget it
[12:25:10] <Avenger> maybe it is in bg1, but maybe not even there
[12:25:12] <fuzzie> dammit, i spent so much time trying to work around that stupid code
[12:25:23] <fuzzie> it's not in scripts for bg1, bg2, pst or iwd2
[12:25:42] <Avenger> hehe, well, at least i can confirm it doesn't need
[12:25:52] <fuzzie> any other empty code? :)
[12:25:56] <Avenger> lots
[12:26:09] <fuzzie> i would like to see a list when you're done
[12:26:14] <Avenger> 37 73 A3 - empty code - FollowPath()
[12:26:16] <fuzzie> just to make sure i don't spend ages trying to make one work
[12:26:31] <Avenger> all the nidspecials, of course
[12:26:45] <Avenger> 318 73 A3 - empty code - ForceSpellRange(O:Target,I:Spell*Spell)
[12:26:47] <Avenger> 319 73 A3 - empty code - ForceSpellPointRange(P:Target,I:Spell*Spell)
[12:27:10] <Avenger> and some (but not all) of the unreferenced action opcodes
[12:27:29] <Avenger> some of the unreferenced ones actually do something :)
[12:27:32] <fuzzie> ok, thanks :) none of those seem used by those names in any of the games
[12:27:33] <Avenger> like 205 Wait
[12:29:20] <fuzzie> some of those could be useful internally, perhaps
[12:29:49] <fuzzie> certainly i would like to know how things like UseDoor work, because i would like to use them internally
[12:30:08] <fuzzie> i think i abuse some nidspecial for that at the moment
[12:32:27] <Avenger> well currently i look at action code used globally, usedoor can be called only in actors
[12:32:46] <Avenger> i gotta walk slowly, because it is unknown area for me :)
[12:33:11] <fuzzie> ok. make a list of how those are divided too, maybe? maybe on wiki?
[12:34:34] <fuzzie> all information is useful
[12:34:43] <Avenger> hmm continue is just a return -1 :)
[12:35:20] <fuzzie> yes
[12:35:34] <fuzzie> it's got to be espoecially handled in the same place as clearactions
[12:36:26] <fuzzie> which is to say, before actions are added to the list :)
[12:43:04] <Avenger> one thing they do very lamely :)
[12:43:42] <Avenger> the createcreature functions use a common function, like we do. But they compare the action opcode when doing specials
[12:43:53] <Avenger> instead of those flags
[12:43:58] <fuzzie> horrible :P
[12:44:05] <fuzzie> gemrb better again :)
[12:44:10] <Avenger> :)
[12:44:42] <Avenger> well, it is easier to read once you know they do this
[12:44:49] <Avenger> it is clear which opcode does what
[12:47:14] <Avenger> hehe it is really spaghetti here
[12:54:43] <Avenger> and it turns out a lot of this code is just for debug printing :)
[12:56:06] <Avenger> iwd2 is easier to read, but lacks the stack frames
[13:01:40] <fuzzie> iwd2 has some serious differences in actions
[13:01:46] <fuzzie> even in the basics
[13:01:56] <Avenger> how do you know?
[13:03:02] <Avenger> i read something about it, they changed LastSeen, and something in cutscenes
[13:03:48] <Avenger> but i hope we can do it without many game flags :)
[13:09:18] --- Gekz_ is now known as Gekz
[13:12:23] <fuzzie> interruptability is different in iwd2, i think almost nothing gets interrupted
[13:13:34] <fuzzie> i think that's the big difference
[13:15:44] <Avenger> ok, there might be some problems with engine differences
[13:16:18] <-- barra__out has left IRC (Read error: 104 (Connection reset by peer))
[13:16:26] <fuzzie> i don't think it's anything we can't solve with flags and some clever code
[13:16:37] <fuzzie> but i think we can fix bg2 first
[13:17:10] --> barra__out has joined #gemrb
[13:17:14] <Avenger> phew, cool, not this problem at least :) - well, i noticed some actions check on the blind state
[13:17:27] <Avenger> luckily THAT state is used by all engines
[13:17:42] <fuzzie> how about invisibility and invisibility opcode?
[13:17:58] <Avenger> i think some invis bits are not used by all engine
[13:18:08] <Avenger> improved invis
[13:18:09] <fuzzie> my object check code checks IE_SEEINVISIBLE at the moment
[13:18:17] <Avenger> ahh that is not a state
[13:18:24] <Avenger> that is safe, i gues
[13:18:24] <fuzzie> just a stat i guess :)
[13:18:44] <Avenger> we have stat incompatibilities too
[13:19:02] <Avenger> but as long as the original engines don't complain i don't plan to support modders :)
[13:19:36] <Avenger> well, not in the core at least
[13:22:11] <Avenger> blind actors cannot remove traps, it seems
[13:22:37] --> D_T_G has joined #gemrb
[13:22:55] <Avenger> that's the only state checked specifically in removetrap
[13:24:38] <D_T_G> i have a small fix to luhlaselection.py: http://wklej.org/id/139519/txt
[13:25:03] <lynxlynxlynx> btw, isn't the visibility range in the original bigger than the 2 we set (for STATE_BLIND)?
[13:28:47] <Avenger> i don't know lynx
[13:29:07] <lynxlynxlynx> now you're completely incapacitated by blindness
[13:29:08] <Avenger> our current code is not good, i already talked about it
[13:29:25] <lynxlynxlynx> attacks fail since you don't see the target anymore
[13:29:27] <Avenger> it isn't the range
[13:29:36] <lynxlynxlynx> you can't even see the actor herself
[13:29:49] <lynxlynxlynx> oh :/
[13:29:53] <Avenger> you need to add personalspace to range
[13:31:38] <-- Avenger has left IRC ("ChatZilla 0.9.85 [Firefox 3.5.2/20090729225027]")
[13:32:05] <fuzzie> range 2 is good, i think
[13:32:25] <lynxlynxlynx> not if you're a dragon
[13:32:28] <fuzzie> it should be set in the effect, though
[13:32:39] <fuzzie> i mean, it's range 2 beyond the personalspace, as Avenger says
[13:33:01] <lynxlynxlynx> that's good, yes
[13:33:03] <fuzzie> but that is a fault of the visibility code
[13:45:05] <D_T_G> should i upload that fix to sf?
[13:48:35] <fuzzie> um, you tested it?
[13:48:43] <D_T_G> yes
[13:48:45] <fuzzie> i'm not very well but i can blindly apply it if it's good :)
[13:49:21] <D_T_G> i tested it in case of 10 and 28 HLAs
[13:49:52] <D_T_G> but i think it should work with 24 and 25 hlas too, but i'm not able to produce such case ingame
[13:50:02] <fuzzie> ok, the logic reads good at a glance
[13:51:06] <CIA-22> gemrb: 03fuzzie * r7044 10/gemrb/trunk/gemrb/GUIScripts/bg2/LUHLASelection.py: LUHLASelection patch from Nugrud: don't use 25th button if it wasn't created
[13:51:22] <fuzzie> i assume that describes it correctly, heh
[13:51:37] <D_T_G> yes, that was the case
[13:51:43] <D_T_G> with 10 hlas
[13:51:47] <fuzzie> thanks again :)
[13:52:41] <D_T_G> i created 2 bugs on tracker
[13:54:37] <fuzzie> heh, i close 2 bugs and we get 3 new ones
[13:55:34] <-- Gekz has left IRC ("Lost terminal")
[14:03:28] <D_T_G> on aremap the info points have a misplaced reaction on mouse hover
[14:03:40] <D_T_G> some pixels to upper left
[14:03:48] <D_T_G> known issue?
[14:03:48] <fuzzie> they're 'map notes' i think
[14:03:59] <D_T_G> yep, 'map notes' i mean
[14:04:02] <fuzzie> and, well, i complained about it and i think Avenger said i should fix it myself :)
[14:04:12] <D_T_G> heh :)
[14:04:50] <fuzzie> i think the world map also has problems with that
[14:04:54] <fuzzie> not for the notes but for the places
[14:06:21] <fuzzie> i guess it is MapControl.cpp:295
[14:06:25] <fuzzie> i'll look at it
[14:08:53] <D_T_G> looks so
[14:13:27] --> Pygma has joined #gemrb
[14:13:30] <-- D_T_G has left IRC (Remote closed the connection)
[14:20:05] --> Avenger has joined #gemrb
[14:20:30] <Avenger> fuzzie, i think i know why we have so much trouble
[14:20:53] <Avenger> there is some messaging system in the engine, which we don't have
[14:21:13] <Avenger> a lot of things don't execute immediately, for example, endcutscenemode
[14:21:34] <fuzzie> yeah, it's very confusing
[14:21:41] <fuzzie> try Kill(Myself) followed by some actions..
[14:21:46] --> pupnik has joined #gemrb
[14:22:42] <fuzzie> but that's not a big problem to implement, if it's just for some actions
[14:22:57] <fuzzie> maybe you can work it out :)
[14:24:31] <Avenger> setcutscenelite does it
[14:25:02] <fuzzie> well, i don't think we have any problem with the cutscene stuff
[14:25:22] <fuzzie> maybe they implement it using messaging, but i didn't find any problems we couldn't solve using flags etc
[14:25:50] <Avenger> setcutscenelite is doing purely that :) just sends a message for later
[14:25:50] <fuzzie> but why Kill doesn't happen immediately, that i would like to know :)
[14:26:08] <Avenger> yes, we could do this with flags
[14:26:19] <Avenger> maybe
[14:26:26] <Avenger> if order is not terribly important
[14:26:47] <fuzzie> well, you can't set/unset the cutscene flag directly and have everything work, i think
[14:27:00] <fuzzie> but it's easy to set a "end cutscene" flag which is quickly processed
[14:27:29] <fuzzie> a messaging system sounds overly complicated :)
[14:30:59] <Avenger> yes, i would like to avoid it
[14:32:18] <fuzzie> but i'll write anything that you think is necessary, if you'd want
[14:32:19] <-- tombhadAC has left IRC (Read error: 110 (Connection timed out))
[14:32:38] <fuzzie> it looks like i'll have quite a lot of time during this semester of uni, too
[14:32:43] <fuzzie> maybe we truly can finish bg2
[14:33:21] --> tombhadAC has joined #gemrb
[14:36:29] <Avenger> ok, their equivalent of GetActorFromObject has one parameter, it can get all scriptables, or just actors. (probably can take others like 'just doors/infopoints/containers'
[14:37:28] <fuzzie> it would be nice for us to have a filter for scriptable types
[14:37:29] <Avenger> i later could make a chart from these, callighting and verbalconstant takes only actor objects
[14:37:50] <-- pupnik_ has left IRC (Read error: 110 (Connection timed out))
[14:39:44] <Avenger> kill truly just sends a message for later
[14:39:57] <Avenger> takes actors, checks if their state is already dead
[14:40:00] <Avenger> if not, sends a message
[14:40:11] <fuzzie> that i already discovered :)
[14:40:31] <fuzzie> where are the messages stored?
[14:42:08] <Avenger> they are sent to someone in their version of the 'core'
[14:42:17] <fuzzie> ok, that's fine then
[14:42:21] <Avenger> not even cgameobject
[14:42:28] <Avenger> something very core :)
[14:42:50] <fuzzie> i discovered this because lynx found a script that does Kill(Myself) in the middle!
[14:43:03] <fuzzie> but i think delaying it until later will work fine
[14:43:38] <Avenger> we'll see
[14:43:50] <fuzzie> maybe you can find out which other actions use messages
[14:43:59] <fuzzie> that would help work out if it's necessary to keep them in sync
[14:44:06] <Avenger> that's easy once i have all of them in file
[14:44:15] <Avenger> it is just a search for a certain call
[14:45:27] <Avenger> actually in many of my opcode listings, i called it 'display string'
[14:45:35] <Avenger> because one of the messages just does that
[14:45:41] <fuzzie> *nod*
[14:45:43] <fuzzie> i found that too
[14:46:03] <fuzzie> you can't rely on the string displays of actions for debugging, they're not ordered the same
[14:46:20] <Avenger> yes, we display strings immediately
[14:47:25] <fuzzie> i think that is fine, really..
[14:51:33] <fuzzie> i don't think we should complicate things before we find a problem
[14:51:39] <fuzzie> but it's nice to know how it works in their engine
[14:52:05] <fuzzie> but i don't object, as long as we don't break things then i'm happy
[14:53:01] <fuzzie> i wonder if we simply render mapnotes in the wrong place
[14:53:57] <Avenger> forcespell checks for blindness
[14:53:58] <Avenger> hmm
[14:54:18] <Avenger> i will memorise blindness in my next walkthrough :)
[14:54:59] <Avenger> oh i did, glitterdust, hehe
[15:03:19] --> |Cable| has joined #gemrb
[15:17:56] <lynxlynxlynx> loot is drawn under corpses, not over them
[15:18:04] <lynxlynxlynx> can be annoying sometime
[15:19:01] <Avenger> that's because dead actors are not deactivated?
[15:20:03] <lynxlynxlynx> no idea
[15:20:36] <lynxlynxlynx> i do get the unsummon animation for dead summons too, but this kinda makes sense
[15:26:36] <Avenger> fuzzie: even setglobal uses the messaging :)
[15:27:21] <fuzzie> meh
[15:27:26] <fuzzie> complicated :/
[15:28:23] <fuzzie> and it works different in iwd2 again, i think
[15:32:59] <fuzzie> well, i would like to see it documented
[15:41:06] <fuzzie> Avenger: look at MoveToPoint, maybe?
[15:41:11] <fuzzie> does it do similar to what we do?
[15:41:31] <Avenger> movetopoint is actor specific...
[15:41:37] <Avenger> i didn't even take a peek at those
[15:41:42] <fuzzie> ok, so too scary for now, ok :)
[15:41:48] <Avenger> yes too scary :)
[15:45:31] <Avenger> At least, setinterrupt just changes a flag.
[15:45:33] <Avenger> hehe
[15:45:49] <Avenger> i like these small things
[15:46:40] <fuzzie> :)
[15:46:51] <fuzzie> well, i stopped working on my action code for now
[15:46:58] <fuzzie> if you find new things then i don't want to have to rewrite
[15:47:04] <fuzzie> i'll go patch up other bugs
[16:17:40] --> barra_away has joined #gemrb
[16:35:07] <-- barra__out has left IRC (Read error: 110 (Connection timed out))
[16:48:14] <Avenger> fuzzie: here is another fun action: BreakInstants(), just returns -1 :0
[16:49:02] <fuzzie> it also has higher-level logic
[16:49:04] <Avenger> i guess returning -1 stops the execution?
[16:50:18] <fuzzie> does it? i thought you said -1 was just 'continue executing the queue'
[16:54:52] <Avenger> no, i think -1 is stop executing the queue, but do ReleaseCurrentAction()
[16:55:11] <Avenger> -2 is probably stop executing the queue, and no releasecurrentaction
[16:55:37] <Avenger> but when we first talked, i did some mistake and looked at the wrong function
[16:57:00] <fuzzie> so -2 is for blocking?
[16:57:12] <fuzzie> that makes some sense
[16:57:21] <Avenger> hmm i don't want to say silly things :) just found playsound returns -2 :)
[16:57:46] <Avenger> i thought, lets pick an action which is surely not blocking :>
[16:58:05] <Avenger> reputationset returns -1
[16:58:07] <Avenger> :(
[16:58:17] <Avenger> this is utterly random to me
[16:58:47] <fuzzie> BreakInstants is a red herring
[16:58:53] <fuzzie> don't base things on it
[16:59:48] <fuzzie> my testing shows that at execution time it's simply a null action
[17:00:13] <fuzzie> if you ignore it, do you still find return results random?
[17:00:52] <fuzzie> SetGlobal seems a reasonable "doesn't block" action, and Wait is a reasonable "blocks" action
[17:02:06] <Avenger> wait returns 1 if it wants to stay on queue, -1 if it expired
[17:02:46] <Avenger> setglobal returns -1
[17:03:33] <fuzzie> it is difficult finding examples which don't use actors
[17:04:29] <Avenger> continue: -1
[17:05:00] <Avenger> verbalconstant -1
[17:05:11] <fuzzie> Face might be a good example
[17:05:21] <fuzzie> but maybe it simply blocks in IE
[17:07:05] <Avenger> face is actor specific
[17:07:27] <fuzzie> i know, i just try and find examples of maybe-interesting return results
[17:11:20] <Avenger> clearactions returns -1 or -2 :)
[17:11:54] <fuzzie> weird
[17:12:24] <fuzzie> ok, that makes no sense then :/
[17:12:27] <Avenger> i think it allows clearing other actor's actions
[17:12:59] <Avenger> maybe if it is about self, it returns -2
[17:13:10] <Avenger> if it is about others, it does a lot of things, then returns -1
[17:13:22] <Avenger> i guess it cannot safely clear its own queue
[17:13:33] <fuzzie> it can't clear its own queue at that point anyway
[17:13:39] <Avenger> yes
[17:13:40] <fuzzie> it is too late there
[17:13:45] <fuzzie> it has to be earlier
[17:13:52] <fuzzie> so i don't understand
[17:14:26] <Avenger> it will clear all the actions after it, which were put in the queue in the same time?
[17:14:31] <fuzzie> yes
[17:14:38] <fuzzie> and the correct behaviour is that it must clear all actions before it
[17:14:38] <Avenger> so
[17:14:55] <fuzzie> so by the time the action executes, that is far too late for it to work on self
[17:15:30] <Avenger> are you sure?
[17:15:40] <fuzzie> yes
[17:15:41] <fuzzie> well
[17:15:45] <Avenger> displaystring(myself,1); clearactions(); displaystring(myself,2);
[17:15:47] <fuzzie> maybe there are complications
[17:15:56] <Avenger> you say you wouldn't see either strings?
[17:15:59] <fuzzie> i will run that now
[17:16:04] <fuzzie> i only checked it across blocks
[17:16:29] <Avenger> i strongly hope it doesn't affect string #1
[17:16:36] <fuzzie> why?
[17:16:54] <Avenger> because that implies the code which stuffs it in the queue has to evaluate some, clearactions in particular
[17:16:54] <fuzzie> i think it will only display string 2, anyway
[17:17:07] <Avenger> i hope it displays 1 :)
[17:17:11] <Avenger> in original
[17:17:12] <fuzzie> well, it has to display 2
[17:17:18] <fuzzie> because otherwise many scripts break
[17:19:01] <fuzzie> well, maybe a cutscene hack. let's see.
[17:19:20] <fuzzie> ok, it displays both strings
[17:20:04] <fuzzie> maybe it's specially handled if it's at the start of a block, let me test
[17:21:35] <fuzzie> huh
[17:21:40] <fuzzie> ok, i can't reproduce earlier test
[17:21:48] <fuzzie> ClearActions(Myself) seems to do nothing for me now
[17:23:50] <fuzzie> maybe it's handled differently across script files
[17:23:57] <fuzzie> but i don't have patience to check that right now
[17:24:32] <fuzzie> i had it working before across blocks with Continue(), and ClearActions(Myself) would wipe the previously queued actions, but maybe across multiple script files
[17:24:47] <fuzzie> maybe you can work it out :)
[17:33:01] <fuzzie> hm, if i put a Wait(2) after the ClearActions(Myself), i break the script forever
[17:33:22] <fuzzie> maybe it goes inactive though
[18:00:38] <Avenger> noaction returns 2 :)
[18:01:07] <Avenger> so far i seen -1,-2 and 1,2
[18:04:52] <Avenger> giverorder, like clearactions can return -1 or -2, i don't even know what's it
[18:05:02] <Avenger> *giveorder
[18:09:58] <Avenger> ahh it is similar to shout,
[18:16:07] <Avenger> ok, it seems it returns -2 mostly on error conditions
[18:16:18] <Avenger> like createitem returns -2 for nonexistent item resref
[18:21:04] --> edheldil has joined #GemRB
[19:16:17] --- barra_away is now known as barra_home
[19:36:20] <pupnik> #gemrb is like reading another languuage
[19:36:43] --> Enverex has joined #gemrb
[19:51:26] <Avenger> its perfect english, with some terminus technica and bad grammar :)
[19:52:14] <Avenger> seems like fuzzie is sleeping
[19:52:51] <fuzzie> well, i play bg2 :)
[19:52:57] <fuzzie> and wonder about clearactions
[19:53:37] <Avenger> i looked into forcespell, it checks the dead state of actors, and the same code is there for reallyforcespell/forcespell
[19:53:48] <Avenger> with some small differences
[19:53:56] <fuzzie> ok, so it doesn't work on dead actors and i don't go mad?
[19:54:51] <Avenger> dead actors don't cast it, i guess, but there are some 5-6 actions sharing the same code
[19:55:13] <Avenger> basically there are 2 forcespell actions
[19:55:22] <fuzzie> checking by action id, again?
[19:55:25] <Avenger> 1 for point target and 1 for scriptable target
[19:55:31] <Avenger> yes, there is some check inside
[19:56:04] <Avenger> force, reallyforce and forcespelldead (plus all works with +RES)
[19:58:23] <Avenger> but this is unexpected...
[19:58:44] <Avenger> it seems ReallyForceSpell checks for the dead thing
[19:59:33] <fuzzie> well, the death scripts all use ReallyForceSpellDead
[19:59:51] <fuzzie> it wouldn't make much sense for that to exist if it weren't needed
[20:01:40] <Avenger> reallyforcespelldead and forcespell can cast when caster is dead
[20:01:53] <Avenger> reallyforcespell cannot
[20:01:58] <fuzzie> huh, ok.
[20:02:13] <fuzzie> well, that still makes sense
[20:02:37] <fuzzie> the 'reallyforce' versions simply remove the casting time
[20:02:59] <fuzzie> confusing though
[20:04:01] <Avenger> this code is not organised at all
[20:04:18] <Avenger> the function goes on and on..
[20:04:29] <fuzzie> well, i guess they probably have most of the spell code in there
[20:04:38] <fuzzie> i imagine it's not very interesting to look at
[20:04:48] <Avenger> this would be several page even with inlining
[20:05:00] <Avenger> heh, not interesting? ;)
[20:05:10] <fuzzie> well, i wish to know new things :)
[20:05:20] <Avenger> it is complicated, and gibberish yet, but it is the core of the spellcaster scripts
[20:05:25] <fuzzie> like why pst is so crazy
[20:06:02] <fuzzie> i guess that question is beyond anyone so far :/
[20:06:47] <Avenger> this is a looong code
[20:07:43] <Avenger> 30 screens of assembly
[20:10:45] <Avenger> hmm, this code even references the forcespellrange opcode
[20:10:48] <Avenger> interesting
[20:11:02] <Avenger> that opcode is dead, afaik
[20:15:25] <Avenger> completely unstructured. There is the call for create projectile
[20:15:42] <Avenger> it is surely repeated in spellpoint/spell/forcespellpoint
[20:17:14] <Avenger> but i found something interesting here, if i read this correctly, it is possible for spells to override their own projectile. Useless feature, but takes up some code :)
[20:21:29] <Avenger> oops no, this is an important feature, ehhe ;)
[20:21:43] <Avenger> if target type is self, there is no projectile
[20:33:18] <lynxlynxlynx> crap
[20:33:25] <lynxlynxlynx> my monk keeps loosing his class abilities
[20:33:45] <lynxlynxlynx> i just play some and all of a sudden most of them are gone
[20:35:55] --> D_T_G has joined #gemrb
[20:36:10] <-- tombhadAC has left IRC (Connection timed out)
[20:37:03] <D_T_G> lynxlynxlynx: i finally got the point about the thie abilities diff, it took me a bit :)
[20:37:23] --> tombhadAC has joined #gemrb
[20:37:38] <D_T_G> i mean you were all right, that was the dex bonus
[20:44:04] <D_T_G> good night ppl
[20:44:09] <-- D_T_G has left IRC ()
[20:46:32] <Avenger> forcespell applies the forcevisible opcode on the caster, it seems
[20:48:11] <Avenger> and dispel sanctuary
[20:55:09] <lynxlynxlynx> Resisted 42949669 of 3 at -100% resistance to 128 huh
[21:00:10] <Avenger> LOL
[21:01:22] <Avenger> negative resistance is vulnerability, so that should have caused 6 hp, i guess
[21:01:39] <lynxlynxlynx> 12
[21:02:07] <Avenger> 12?
[21:02:19] <lynxlynxlynx> 0 resistance would be 6
[21:02:34] <Avenger> wasn't the base damage = 3
[21:02:49] <lynxlynxlynx> oh, i was looking at another line
[21:02:50] <Avenger> 0 resistance is the normal state
[21:02:53] <lynxlynxlynx> we agree :)
[21:03:19] <Avenger> what is the 'to 128' part ?
[21:03:35] <lynxlynxlynx> damagetype
[21:03:50] <lynxlynxlynx> missile in this case
[21:20:59] <Avenger> fuzzie, there is something called 'home location'
[21:21:39] <Avenger> this is where actors use for randomwalk distance
[21:21:41] <fuzzie> isn't that just the position stored in the CRE?
[21:21:52] <Avenger> it should be stored somewhere, yeah
[21:21:55] <fuzzie> you have HomePos, Pos and Destination
[21:22:11] <Avenger> i do?
[21:22:20] <fuzzie> well, i mean, apparently we should do
[21:22:27] <fuzzie> i complained about it sometime, i think Taimon documented it on the forum
[21:22:28] <Avenger> ah ok, i thought we already have
[21:22:44] <fuzzie> at the moment we just use Pos for everything, apparently this is wrong
[21:22:52] <Avenger> yes, that's why i tell you. maybe the destination field is not destination?
[21:22:57] <fuzzie> no
[21:23:04] <fuzzie> it is destination, but the pos field is 'home location'.
[21:23:12] <fuzzie> and the current position is not saved.
[21:23:15] <Avenger> and what is the current location?
[21:23:20] <Avenger> huh
[21:23:33] <Avenger> so if i save a game, and reload
[21:23:43] <Avenger> they will go home?
[21:23:51] <fuzzie> if they've been RandomWalking, apparently
[21:24:35] <fuzzie> other actions supposedly update the home location every second or two?
[21:24:38] <fuzzie> i didn't test this, at all
[21:24:42] <fuzzie> i just say what i was told :)
[21:24:58] <fuzzie> so i wouldn't trust any of it without testing
[21:25:53] <fuzzie> but you can read in the modding forums that many people have problems with this behaviour
[21:26:40] <fuzzie> http://forums.gibberlings3.net/index.php?showtopic=16570 is confusing for example
[21:27:24] <fuzzie> devSin said: Most forms of dynamic AI movement, like random walking or fleeing or attacking, only update the current location, and the engine will periodically reset all actors to their home locations
[21:27:40] <fuzzie> and: Some forms of permanent scripted movement, like JumpToPoint(), don't update the home location, so characters can eventually get reset to weird spots
[21:27:46] <fuzzie> i can't find Taimon's comments but he had them too
[21:27:48] <fuzzie> but now i should sleep
[21:31:35] <Avenger> bye fuzzie
[21:32:09] <lynxlynxlynx> nn
[21:32:22] <lynxlynxlynx> i can't make this rounding work :(
[21:32:56] <lynxlynxlynx> tried a few casts and i still get an overflow
[21:33:12] <Avenger> hmm, that reminds me, we banned importing python libs a while ago
[21:33:25] <Avenger> and i saw something import math
[21:33:40] <lynxlynxlynx> the guienhacement stuff
[21:33:45] <Avenger> yeah
[21:33:45] <lynxlynxlynx> why is it banned?
[21:33:55] <lynxlynxlynx> ah
[21:33:57] <Avenger> because it needs the lib correctly installed
[21:33:59] <lynxlynxlynx> not bundled on win
[21:34:02] <Avenger> windows crap
[21:34:25] <lynxlynxlynx> i think it can be fixed easily, afaik it is in only for ceil
[21:34:28] <Avenger> you can safely 'steal' the code from the python lib
[21:35:32] <lynxlynxlynx> resisted = int (float(damage * target->GetStat(it->second.resist_stat))/100.0); // both resisted and damage are signed ints
[21:35:58] <lynxlynxlynx> the product is fine, but the cast to float causes the overflow
[21:36:21] <Avenger> what cast?
[21:36:32] <lynxlynxlynx> resisted = int ((damage * target->GetStat(it->second.resist_stat)/100) + 0.5); //this is the current version
[21:36:34] <Avenger> cast would be (float) ...
[21:36:59] <lynxlynxlynx> so this is a constructor??
[21:37:08] <Avenger> i don't really know what is this :)
[21:37:21] <lynxlynxlynx> i thought the forms were interchangeable, let's see
[21:37:23] <Avenger> i'm old, and dumb it seems, hehe
[21:37:38] <Avenger> if you ask me, i would have said this is syntax error
[21:37:49] <Avenger> but apparently it compiled
[21:37:53] <lynxlynxlynx> and it is funny that you spoke about the math lib
[21:38:15] <Avenger> well, you talked about rounding, and i knew it is used for something like that
[21:38:15] <lynxlynxlynx> actor doesn't have cmath, this is why the rounding was done manually
[21:38:22] <Avenger> uhm
[21:39:34] <lynxlynxlynx> well, standard/correct notation doesn't help
[21:40:03] <lynxlynxlynx> this is silly ><
[21:40:39] <Avenger> resisted = (int) (damage*target->GetStat.../100.0+0.5);
[21:40:52] <Avenger> that's what i would have written first
[21:40:58] <Avenger> but i'm sleepy
[21:42:20] <fuzzie> 'import math' works fine on windows
[21:42:58] <Avenger> import math works if the user installed python, and same version as we compiled our code with
[21:43:02] <fuzzie> no
[21:43:04] <fuzzie> it's built into the dll
[21:43:21] <fuzzie> it's just the modules written with .py files that you've got to avoid
[21:43:23] <Avenger> not all dll
[21:43:35] <fuzzie> well, all dlls that the python people distributed
[21:43:41] <fuzzie> because they use it internally
[21:43:47] <Avenger> import math uses py files, like import string, no?
[21:43:48] <fuzzie> i didn't check weird dlls or older than 2.3 i guess :)
[21:43:53] <fuzzie> no, it's all C code
[21:44:30] <Avenger> but string isn't?
[21:44:35] <fuzzie> no, string is all python code.
[21:44:39] <Avenger> i see
[21:44:53] <Avenger> so some imports are fine
[21:45:34] <fuzzie> yes: things like struct, math, md5, datetime and cmath
[21:45:46] <fuzzie> anything which is entirely written in C
[21:45:48] <Avenger> good to know
[21:45:54] <fuzzie> it is helpful :)
[21:46:11] <Avenger> why aren't you sleeping :P
[21:46:28] <lynxlynxlynx> your version gives an overflow too Avenger :)
[21:46:36] <Avenger> huh, maybe ask fuzzie then
[21:46:42] <Avenger> while she is here
[21:47:03] <Avenger> hmm i know why
[21:47:13] <fuzzie> the GetStat is unsigned?
[21:47:17] <Avenger> do a (signed) conversion before getstat
[21:47:19] <fuzzie> so, disaster happens
[21:47:23] <Avenger> yeah
[21:47:25] <fuzzie> hehe, i guess Avenger got it :) ninight!
[21:47:42] <Avenger> night
[21:47:54] <lynxlynxlynx> ah, so the %d in printf just did that for itself
[21:48:09] <Avenger> yes, very tricky, this c
[21:48:37] <Avenger> well, i gotta sleep too, bye
[21:48:38] <-- Avenger has left IRC ("ChatZilla 0.9.85 [Firefox 3.5.2/20090729225027]")
[21:56:22] <CIA-22> gemrb: 03lynxlupodian * r7045 10/gemrb/trunk/gemrb/plugins/Core/Actor.cpp: fixed damage vulnerability
[21:57:41] <lynxlynxlynx> galvena/vadek are giving me consistent asserts now
[21:58:15] <-- lynxlynxlynx has left IRC (Remote closed the connection)
[22:22:30] <CIA-22> gemrb: 03edheldil * r7046 10/ie_shell/trunk/ (5 files in 3 dirs): Added SAV format
[22:36:16] <edheldil> if windows can' import string, they are broken ;)
[22:36:29] <edheldil> good night
[22:36:35] <-- edheldil has left IRC ("Leaving")
[23:17:28] <-- Enverex has left IRC (Remote closed the connection)
[23:20:55] <-- tombhadAC has left IRC ("Verlassend")
[23:23:20] --> tombhadAC has joined #gemrb
[23:40:13] <-- barra_home has left IRC ("Verlassend")