#gemrb@irc.freenode.net logs for 28 Oct 2009 (GMT)

Archive Today Yesterday Tomorrow
GemRB homepage

[01:29:56] --> Maighstir_ has joined #gemrb
[01:38:23] <-- Maighstir has left IRC (Read error: 145 (Connection timed out))
[02:29:25] <-- Maighstir_ has left IRC (Read error: 145 (Connection timed out))
[02:40:06] <-- Forgetful_Lion has left IRC (" HydraIRC -> http://www.hydrairc.com <- In tests, 0x09 out of 0x0A l33t h4x0rz prefer it :)")
[03:11:25] <-- tombhadAC has left IRC (Remote closed the connection)
[03:56:47] --> tombhadAC has joined #gemrb
[04:20:02] <-- tombhadAC has left IRC ("Vision[0.9.7-H-090423]: i've been blurred!")
[06:06:55] --> barra_library has joined #gemrb
[06:21:05] --> Maighstir has joined #gemrb
[07:01:12] --> Forgetful_Lion has joined #GemRB
[07:16:11] <-- Maighstir has left IRC (Read error: 145 (Connection timed out))
[07:38:37] <-- barra_library has left IRC ("Verlassend")
[07:49:19] --> lynxlynxlynx has joined #gemrb
[07:49:19] --- ChanServ gives channel operator status to lynxlynxlynx
[08:30:33] --> barra_library has joined #gemrb
[09:52:44] <-- |Cable| has left IRC (Remote closed the connection)
[10:05:54] --- barra_library is now known as barraAway
[10:37:37] --- barraAway is now known as barra_library
[11:41:28] <fuzzie> hm
[11:41:35] <fuzzie> Taimon informs that we implement triggers incorrectly
[11:41:53] <fuzzie> "every AI object has a trigger list, all non-0x4000 triggers are matched via this list"
[11:42:07] <fuzzie> we should do that too, it would fix bugs
[12:27:47] <lynxlynxlynx> we do it radically differently?
[12:28:10] <fuzzie> we just have a single trigger variable for each possible trigger
[12:28:35] <fuzzie> this is what i was meaning when i said i wanted to fix triggers a while ago, but i ended up writing some hack for the tree of life and etc
[12:29:26] <fuzzie> and Taimon mentioned somewhere on the forums that it wasn't really possible to patch triggers in the ToB exe, so i thought i'd ask why.
[13:20:36] <-- Forgetful_Lion has left IRC (" HydraIRC -> http://www.hydrairc.com <- *I* use it, so it must be good!")
[14:14:45] <-- barra_library has left IRC ("Verlassend")
[15:10:07] --> barra_library has joined #gemrb
[15:21:57] <pupnik> hice find fuzzie
[15:59:50] --> Maighstir has joined #gemrb
[17:01:48] --> tombhadAC has joined #gemrb
[17:03:24] --> Avenger has joined #gemrb
[17:03:27] --- ChanServ gives channel operator status to Avenger
[17:04:23] <Avenger> lynx: there is another luck stat application, when checking if mirror images are hit instead of the target.
[17:05:24] <lynxlynxlynx> ah
[17:05:44] <lynxlynxlynx> i'll change it then
[17:09:33] <Avenger> and i found that the original engine doesn't play the battlecry verbalconstants for non party members
[17:11:48] <Avenger> i dived deeper into the message which applies damage. So i now see part of the combat feedback and the stoneskin/mirror image handling
[17:12:01] <Avenger> it is quite complicated compared to ours :)
[17:13:19] <CIA-66> gemrb: 03lynxlupodian * r7423 10/gemrb/trunk/gemrb/plugins/Core/Actor.cpp: luck also affects whether a mirrored image is hit instead of the actor
[17:16:32] <lynxlynxlynx> do you know which battlecry constants there are? I'd like to exclude VB_{DAMAGE,CRITMISS,CRITHIT} and VB_ATTACK
[17:18:09] <CIA-66> gemrb: 03lynxlupodian * r7424 10/gemrb/trunk/gemrb/override/shared/: override/shared/: set svnignore
[17:18:18] <Avenger> only battlecry 1-5 are excluded
[17:18:35] <Avenger> that is when initiating attack
[17:19:44] <Avenger> i don't know what is the difference between battlecry 1-5 and attack 1-4 O-o
[17:20:30] <Avenger> the slots i talk about are 9-13
[17:21:04] <lynxlynxlynx> yeah, i found them
[17:21:39] <lynxlynxlynx> we currently use only 9 (VB_ATTACK) :)
[17:22:09] <Avenger> well it should be 9-13 randomly, and only for PC
[17:22:35] <Avenger> the code works like this: it counts the valid slots (counting from 9, stopping at first invalid)
[17:22:40] <Avenger> then picks one
[17:24:26] <Avenger> i can do this if you don't want
[17:25:06] <lynxlynxlynx> i just added the InParty check
[17:26:04] <lynxlynxlynx> the counting change will be in the reading functions?
[17:26:53] <lynxlynxlynx> http://pastebin.com/d114e7c0c <-- the only caller
[17:29:14] <Avenger> yes
[17:29:50] <Avenger> hmm, no, cannot be there. or we would alter the .cre
[17:30:44] <Avenger> it would be the easiest that way, but i don't want to alter them. it is easier to spot changes if we try to be as binary compatible as possible
[17:31:27] <Avenger> or we could have a separate field just to hold the counts
[17:32:58] <CIA-66> gemrb: 03lynxlupodian * r7425 10/gemrb/trunk/gemrb/plugins/Core/GSUtils.cpp: only display the attack verbal constant(s) for party members
[17:34:06] <lynxlynxlynx> i didn't mean the cre importer, but the Actor::GetSoundFrom* functions
[17:35:03] <lynxlynxlynx> just a bit of random string manipulation
[17:40:26] <Avenger> yes, most likely
[17:40:47] <Avenger> i thought simply going one slot back if the slot is invalid
[17:40:58] <Avenger> it is not exactly the same, but who cares :)
[18:10:06] <Avenger> btw, bg2 can hold 12 areas in memory
[18:40:55] --> |Cable| has joined #gemrb
[18:41:47] <-- |Cable| has left IRC (Client Quit)
[18:41:54] --> |Cable| has joined #gemrb
[18:54:00] <fuzzie> Avenger: Taimon suggests that original engine implements non-0x4000 triggers with a list instead of fields, do you see otherwise?
[19:26:42] <Avenger> no i don't
[19:27:37] <Avenger> in fact i don't see clearly
[19:27:54] <Avenger> i don't see any list either, i just see the messages
[19:28:24] <Avenger> lets pick a single trigger
[19:29:03] <Avenger> like 'targetunreachable'
[19:29:56] <Avenger> all triggers are set by sending the 'send trigger' message
[19:30:03] <Avenger> so, that is a list already
[19:30:39] <pupnik> fuzzie: ?
[19:31:01] <pupnik> maybe it needs explanation
[19:31:23] <Avenger> there is a list in each actor at 0x272
[19:31:25] <lynxlynxlynx> hehe
[19:31:40] <Avenger> that should be the trigger list
[19:32:27] <Avenger> the send trigger message adds elements to this list
[19:32:52] <Avenger> then does some special things depending on the trigger type
[19:33:12] <Avenger> for example: AttackedBy fills the LastAttacker field
[19:33:21] <fuzzie> right, but it also adds a trigger to the list?
[19:33:24] <Avenger> And DamageType
[19:33:33] <Avenger> yes, all triggers get on the list
[19:33:35] <fuzzie> ok
[19:33:40] <fuzzie> gemrb doesn't have a trigger list right now, that's all
[19:33:46] <Avenger> but that list is only to store values as a sparse vector
[19:33:48] <fuzzie> i wanted to add one, but i didn't understand why no-one saw it
[19:33:53] <Avenger> their order is insignificant
[19:34:03] <fuzzie> since the original engine seems to let you add multipel actors to a trigger
[19:34:11] <Avenger> hmm
[19:34:20] <Avenger> LastAttacker is a field
[19:34:22] <fuzzie> and gemrb doesn't like that, it just stomps over the old trigger entry
[19:34:29] <Avenger> you cannot have 2 lastattackers
[19:34:31] <fuzzie> well, Taimon says that the trigger check checks the list
[19:34:40] <fuzzie> and the LastXxx checks the field
[19:35:05] <Avenger> how?
[19:35:15] <fuzzie> like, AttackedBy checks the list
[19:35:40] <Avenger> i don't see where it does that
[19:35:51] <fuzzie> well, he was talking about a central function which is used for all non-0x4000 triggers
[19:36:02] <Avenger> i see all triggers put on the list, and some triggers set special fields
[19:36:05] <fuzzie> which is passed a trigger id, and checks the list for any matching trigger ids and objects
[19:36:15] <fuzzie> i mean, AttackedBy is the check, so it doesn't add anything
[19:36:32] <Avenger> what i look at now is the send trigger message
[19:36:40] <Avenger> not the trigger evaluation
[19:36:43] <fuzzie> ah
[19:36:52] <fuzzie> well, what i mean is: the trigger evaluation checks the *list*
[19:37:04] <fuzzie> and gemrb doesn't maintain a list right now
[19:37:30] <Avenger> yes, but how could it have multiple instances of the same trigger if the accompanying fields, like lastattacker is a single field
[19:37:41] <fuzzie> because the trigger evaluation doesn't check the field
[19:37:46] <fuzzie> it only checks the list
[19:38:00] <Avenger> but then it is irrelevant if there are multiple instances on the list
[19:38:21] <fuzzie> oh?
[19:38:35] <fuzzie> i mean, if i do AttackedBy([PC]), it should be true if a PC attacked last turn
[19:38:41] <Avenger> AttackedBy(xxx) <--- XXX is the last attacker
[19:38:44] <fuzzie> even if a non-PC attacked afterwards and overwrote the LastAttacker field
[19:39:16] <fuzzie> because AttackedBy is checking the list, not the LastAttacker
[19:39:18] <fuzzie> you see it otherwise?
[19:39:24] <Avenger> well, i meant when sending the trigger
[19:39:45] <fuzzie> yes, but to see the need for the list, you have to look at the evaluation, i guess :)
[19:39:49] <Avenger> in an attack, it would overwrite the field, it cannot store the previous last attacker
[19:39:56] <Avenger> yep,
[19:40:04] <Avenger> i'm looking for it
[19:40:29] <fuzzie> you think the trigger list only has trigger ids in it, no actors?
[19:44:01] <Avenger> hmm i thought so, but it seems to be a bigger structure
[19:44:06] <Avenger> size seems to be 0x2e
[19:45:17] <fuzzie> my theory is that it is some <trigger id, object id> pair, but 0x2e seems huge
[19:47:54] <-- tombhadAC has left IRC (Read error: 113 (No route to host))
[19:48:26] --> tombhadAC has joined #gemrb
[19:50:24] <Avenger> i still don't see how its fields get set
[19:50:37] <Avenger> i see the initialisation to zero in the constructor
[19:51:16] <Avenger> the message itself holds the actor, but that is not inside the trigger structure
[19:56:28] <Avenger> ok, i see 0xc probably holding the target ids
[19:57:42] <Avenger> that takes up a lot of the trigger
[19:58:04] <Avenger> 0xc-0x24, i think
[20:04:04] <Avenger> i still don't see how this works
[20:05:18] <fuzzie> well, perhaps it doesn't work how i think
[20:06:21] <Avenger> well, most of the trigger is a target ids structure
[20:06:38] <fuzzie> Taimon said in another post that it checks first the trigger id, then int1 if non-zero, then does the object matching
[20:07:06] <fuzzie> and the matching function compares two trigger objects
[20:07:25] <fuzzie> so i would guess that the trigger object is reused for both the trigger list and the actual trigger check?
[20:07:32] <fuzzie> which might explain why it is so complicated
[20:08:22] <fuzzie> because it really is just a list of objects like gemrb's 'Trigger' object?
[20:08:37] <Avenger> oh now i see better
[20:08:45] <fuzzie> it can't be that simple, there's no space for the strings..
[20:08:47] <Avenger> it seems it uses multiple constructors for trigger creation
[20:08:49] <fuzzie> but maybe the thoughts help you :)
[20:08:55] <Avenger> this is used for TookDamage -->00430810
[20:09:06] <Avenger> it stores an integer, the damage amount
[20:09:24] <Avenger> another constructor takes an object parameter, and stores the target ids of it
[20:09:26] <fuzzie> ok, so that is the 'int1' Taimon discusses, i guess
[20:09:31] <fuzzie> and that is the object match :)
[20:14:22] <Avenger> 0 - word - trigger code, 2 - dword - integer value, 6 - object ids
[20:14:28] <Avenger> err target ids
[20:14:59] <Avenger> 1a,1e,22 are 0 dwords
[20:15:17] <fuzzie> ok. easy to implement :)
[20:15:18] <Avenger> i don't know if 6-19 is enough for the whole targeting ids
[20:15:34] <fuzzie> well, it is missing the strings, no?
[20:15:59] <fuzzie> i mean, the name
[20:16:31] <Avenger> strings?
[20:16:41] <fuzzie> it's enough for what we call 'objectFilters' and nothing else, i guess?
[20:16:53] <Avenger> the middle of the structure is 'empty'
[20:16:57] <fuzzie> seems strange
[20:17:05] <Avenger> that is the object filters, and it seems stored too
[20:17:14] <Avenger> i see only a dword less...
[20:17:17] <fuzzie> but i'm not sure it matters, do we really need to store anything except an id?
[20:17:18] <Avenger> maybe bad calculations
[20:17:34] <Avenger> and the integer value
[20:18:27] <Avenger> well i don't see this completely clearly. Lots of value transfers from this bucket to that bucket then back
[20:18:52] <fuzzie> ok, well, gemrb needs a struct, i guess, and someone can always improve the struct later
[20:19:39] <Avenger> 26 and 2a seems to hold resrefs
[20:19:41] <Avenger> weird
[20:20:10] <Avenger> hmm not resref
[20:20:12] <Avenger> but pointer?
[20:20:56] <Avenger> or pointer to resref
[20:20:58] <Avenger> so odd
[20:21:13] <Avenger> why waste 4 bytes to point to 8 bytes
[20:26:41] <Avenger> well, i give up for today
[20:26:45] <Avenger> see you later :)
[20:26:48] <-- Avenger has left IRC ("ChatZilla 0.9.85 [Firefox 3.5.3/20090824101458]")
[20:26:53] <-- lynxlynxlynx has left IRC (Remote closed the connection)
[20:57:58] --> pupnik_ has joined #gemrb
[20:58:00] --> pupnik__ has joined #gemrb
[21:01:15] <-- tombhadAC has left IRC ("Vision[0.9.7-H-090423]: i've been blurred!")
[21:04:05] --> tombhadAC has joined #gemrb
[21:14:16] <-- pupnik has left IRC (Read error: 110 (Connection timed out))
[21:14:18] <-- pupnik___ has left IRC (Read error: 110 (Connection timed out))
[22:39:21] --> Forgetful_Lion has joined #GemRB
[23:46:05] --> barra_desktop has joined #gemrb