#gemrb@irc.freenode.net logs for 25 Jul 2010 (GMT)

Archive Today Yesterday Tomorrow
GemRB homepage

[00:59:36] --> budlust_ has joined #GemRb
[01:00:28] <-- budlust has left IRC (Ping timeout: 265 seconds)
[01:08:52] <-- budlust_ has left IRC (Ping timeout: 248 seconds)
[07:06:41] --> budlust has joined #GemRb
[07:28:18] <-- budlust has left IRC (Quit: Lost terminal)
[10:24:33] --> SiENcE has joined #GemRb
[11:26:33] --> Maighstir_laptop has joined #GemRb
[11:39:56] <SiENcE> hey i need some help proting gemrb
[11:40:19] <SiENcE> i compiled everything for dingoo...a mips handheld
[11:40:31] <SiENcE> startup works...i use BG2 for testing
[11:40:33] <SiENcE> but
[11:41:00] <SiENcE> i get an seg fault
[11:41:05] <SiENcE> during startup
[11:41:06] <SiENcE> [Core]: Broadcasting Event Manager...[OK]
[11:41:06] <SiENcE> [Core]: Initializing Window Manager...[OK]
[11:41:06] <SiENcE> Segmentation fault
[11:41:25] <SiENcE> i think it during the loading of the GuiScript plugin
[11:54:49] <wjp> were you here earlier?
[11:55:15] <wjp> do you have gdb set up?
[12:02:53] --> Avenger has joined #GemRb
[12:02:55] --- ChanServ gives channel operator status to Avenger
[12:02:59] <Avenger> hi
[12:05:04] <wjp> hi
[12:09:23] <Avenger> sience: everything works now?
[12:11:30] <SiENcE> hi avenger
[12:11:34] <SiENcE> mh nah
[12:11:51] <SiENcE> i have the segfault when it comes to loading the guiscript plugin
[12:12:01] <Avenger> can you run gdb?
[12:12:28] <SiENcE> i cant
[12:12:54] <SiENcE> its runs on the handheld
[12:12:56] <Avenger> what is the last message?
[12:13:09] <SiENcE> i added a debug printf
[12:13:11] <SiENcE> wait
[12:13:22] <SiENcE> i think the problem is the Py_Initialize();
[12:13:24] <Avenger> hmm add many more debug printf
[12:13:47] <Avenger> the guiscript plugin doesn't initialize?
[12:14:27] <SiENcE> i think so
[12:14:36] <SiENcE> [Core]: Initializing Window Manager...[OK]
[12:14:36] <SiENcE> [Core]: Test Test Test Test Test Test[OK]
[12:14:36] <SiENcE> [Core]: Initializing GUI Script Engine...Py_Initialize()
[12:14:36] <SiENcE> Segmentation fault
[12:14:38] <Avenger> you got a debug printf before and after py initialize, and the latter isn't working?
[12:14:46] <SiENcE> Tes Test is from me ...from the core
[12:15:07] <SiENcE> and .Py_Initialize is a printf from me in the plugin
[12:15:15] <SiENcE> the first line in ::Init
[12:15:27] <SiENcE> now i try this
[12:15:29] <Avenger> got a printf right after Py_Initialize too?
[12:15:51] <SiENcE> wait
[12:15:55] <Avenger> if not, then it could be the initmodule
[12:16:02] <Avenger> and that may be a bad guiscript path
[12:18:13] <SiENcE> ok
[12:18:27] <SiENcE> i only need to link the python2.5.a lib?
[12:18:41] <SiENcE> do i need any scripts from python for gemrb?
[12:18:46] <Avenger> hmm
[12:18:47] <SiENcE> standard scripts?
[12:19:00] <Avenger> we do import sys
[12:19:02] <SiENcE> from lib/python ?
[12:19:04] <SiENcE> mh
[12:19:15] <Avenger> so i guess, we use some python path
[12:19:17] <SiENcE> maybe it can't find the path to this
[12:19:41] <SiENcE> but my python interpreter finds it...mh
[12:19:47] <SiENcE> i have to test
[12:21:17] <SiENcE> my path to script is
[12:21:18] <SiENcE> GUIScriptsPath=/usr/local/games/GemRB
[12:21:34] <SiENcE> or do i have to add GUIScript?
[12:21:43] <SiENcE> GUIScriptsPath=/usr/local/games/GemRB/GUIScript
[12:21:45] <SiENcE> ?
[12:22:04] <SiENcE> because on the Cache dir i have to add /GUIScript
[12:22:11] <SiENcE> ahm /Cache
[12:26:32] <Avenger> GUIScriptsPath=/usr/local/games/GemRB/GUIScript i think, let me see
[12:26:51] <wjp> no, without
[12:26:58] <wjp> if you have GUIScriptsPath=/usr/local/games/GemRB
[12:27:04] <Avenger> actually i don't even have it
[12:27:11] <CIA-27> GemRB: 03avenger_teambg * r0a845a481938 10gemrb/gemrb/ (14 files in 5 dirs):
[12:27:11] <CIA-27> GemRB: removed a little redundancy with the FullScreen variables
[12:27:11] <CIA-27> GemRB: ctrl-f now can toggle fullscreen mode (but removed the local config option)
[12:27:11] <CIA-27> GemRB: always use the original config for fullscreen and always update the variable
[12:27:11] <CIA-27> GemRB: fixed IWD2 area music slots (4->10)
[12:27:11] <wjp> then you need to have the file /usr/local/games/GemRB/GUIScripts/GUICommon.py
[12:27:12] <CIA-27> GemRB: implemented graceful music switching
[12:27:35] <Avenger> the best is to remove it completely?
[12:29:21] <SiENcE> mh i think both paths should have the same specs...with or without naming
[12:29:41] <SiENcE> ok i get
[12:29:42] <SiENcE> [Core]: Initializing GUI Script Engine...
[12:29:42] <SiENcE> Py_Initialize()
[12:29:42] <SiENcE> Segmentation fault
[12:30:52] <Avenger> where is the next printf after py_Initialize?
[12:31:18] <SiENcE> yes
[12:31:24] <SiENcE> but no output
[12:31:44] <wjp> "where is X" is not a yes/no question :-)
[12:32:53] <Avenger> most likely he means it is right after Py_Initialize (hopefully)
[12:33:25] <Avenger> in that case, it is not a path problem
[12:33:41] <Avenger> maybe it is a memory problem
[12:33:50] <Avenger> not enough memory for python to load up?
[12:34:22] <SiENcE> just python.elf works
[12:35:20] <SiENcE> but could be
[12:37:06] <Avenger> it seems like py_initialize loads some stuff
[12:37:14] <Avenger> like os.py
[12:37:45] <-- Maighstir_laptop has left IRC (Quit: Maighstir_laptop)
[12:37:57] <SiENcE> ok...so no gemrb problem
[12:41:44] <SiENcE> i take the other device with 64mb ram
[12:45:24] <SiENcE> it's no out of mem problem
[12:45:49] <SiENcE> same segfault
[12:48:30] <Avenger> hmm
[12:48:50] <fuzzie> you really want to run it under gdb.
[12:49:09] <fuzzie> gemrb works on mips, so it's presumably not an alignment issue.
[13:00:41] <SiENcE> yes
[13:00:44] <SiENcE> what means
[13:00:45] <SiENcE> GUIScript_la_LDFLAGS = -module -avoid-version -shared
[13:00:51] <SiENcE> -module and -shared?
[13:01:05] <SiENcE> when linking python2.5.a into guiscript plugin
[13:01:23] <SiENcE> does it mean...i must have a shared lib pf python?
[13:02:00] <SiENcE> because i compiled python statically...i cannot compile it dyn. just because it wont work when using PIC
[13:05:42] <SiENcE> it seems that the guiscript plugin is linked dyn. against the python lib
[13:05:47] <SiENcE> right?
[13:08:09] <fuzzie> by default, yes
[13:08:24] <fuzzie> you should be fine linking it statically
[13:08:29] <SiENcE> how?
[13:08:54] <SiENcE> just "GUIScript_la_LDFLAGS = -module -avoid-version" ?
[13:09:17] <SiENcE> what means -module ?
[13:09:22] <fuzzie> i don't think you can do that.
[13:09:39] <fuzzie> just replace @PYTHON_LIBS@ with the manual path of your static python library, i'd think.
[13:10:43] <fuzzie> if you want the whole thing to be static then the plugins have to be statically linked into your gemrb binary, and you can't do that with the autotools build.
[13:20:05] <SiENcE> when i just add the pyhon lib...i get
[13:20:09] <SiENcE> -Wall -W -Wpointer-arith -Wcast-align -pedantic -Wno-format-y2k -Wno-long-long
[13:20:09] <SiENcE> -fno-strict-aliasing -Werror -fvisibility=hidden -L/dingux/mipsel-linux-uclibc/
[13:20:09] <SiENcE> lib -o GUIScript.la -rpath /usr/local/games/GemRB/plugins GUIScript.lo -L/usr/lo
[13:20:09] <SiENcE> cal/lib/python2.5/config/libpython2.5.a -lpng -lz
[13:20:09] <SiENcE> libtool: link: libtool library `GUIScript.la' must begin with `lib'
[13:20:10] <SiENcE> libtool: link: Try `libtool --help --mode=link' for more information.
[13:20:10] <SiENcE> make: *** [GUIScript.la] Error 1
[13:23:14] <fuzzie> oh
[13:23:31] <fuzzie> i guess the static filename needs to go under LDFLAGS?
[13:23:35] <fuzzie> i know nothing about autotools
[13:24:13] <fuzzie> but i assume that error is misleading..
[13:24:33] <SiENcE> mh
[13:25:28] <fuzzie> just hack the generated Makefile and remove that -L bit and see, if the autotools times are a problem
[13:25:40] <SiENcE> if i add -module ...linking works
[13:25:59] <fuzzie> oh, right
[13:26:05] <SiENcE> but i dont know what it means
[13:26:24] <fuzzie> it means "this will be opened by gemrb, rather than linked against"
[13:26:34] <SiENcE> ah ok
[13:26:39] <SiENcE> mh
[13:26:56] <fuzzie> (so it's a module, not a library)
[13:27:02] <SiENcE> yes
[13:27:10] <fuzzie> sorry, didn't see you ask above
[13:27:38] <SiENcE> np. :)
[13:27:44] <SiENcE> but now i'm lost
[13:27:54] <SiENcE> i have no exp. with python
[13:28:18] <fuzzie> well, i guess if Py_Initialize segfaults, it must mean it got built wrong
[13:28:30] <fuzzie> so linking against the static version sounds like the right idea
[13:28:36] <fuzzie> but it doesn't work even if you do that?
[13:30:50] <SiENcE> yep
[13:31:01] <SiENcE> but my python interpreter works
[13:31:02] <SiENcE> fine
[13:31:12] <SiENcE> also linked static against the python lib
[13:31:24] <SiENcE> i added on guiscript the following
[13:31:25] <SiENcE> bool GUIScript::Init(void)
[13:31:25] <SiENcE> {
[13:31:25] <SiENcE> char pySearchPath[] = "/usr/local/lib/python2.5";
[13:31:25] <SiENcE> Py_SetPythonHome(pySearchPath);
[13:31:44] <SiENcE> but also don't work
[13:32:41] <fuzzie> and 'ldd' on your built GUIScript.so doesn't show it linked dynamically against python?
[13:34:05] <SiENcE> wait
[13:34:40] <fuzzie> and 'import os' works in your static python interpreter? :)
[13:34:56] <fuzzie> just ideas
[13:35:09] <SiENcE> yes
[13:35:12] <SiENcE> oh
[13:35:34] <SiENcE> when i start mipsel-linux-uclibc-ld.exe GUIScript.so
[13:35:43] <SiENcE> i get undefined references
[13:36:11] <fuzzie> that's the linker? you're still passing '-shared'?
[13:36:19] <SiENcE> no
[13:36:27] <SiENcE> and i dont have a mipsel ldd
[13:37:27] <SiENcE> ah and for info...i use cygwin
[13:37:55] <fuzzie> you can usually find ldd on the device, i think
[13:38:46] <fuzzie> but if you don't do -module -avoid-version -shared, it won't work
[13:39:30] <SiENcE> ah mh
[13:39:51] <SiENcE> when i use -static instead of .-shared i get an guiscript.a lib
[13:40:48] <fuzzie> but passing -shared should be no problem
[13:41:08] <SiENcE> true
[13:41:10] <SiENcE> but
[13:41:34] <SiENcE> can i link the static GUIScript.a lib into gemrb?
[13:41:43] <SiENcE> maybe this works
[13:41:53] <fuzzie> only if you use cmake and define STATIC_LINK.
[13:42:10] <fuzzie> and making cmake cross-compile for you under cygwin is probably hours of work.
[13:42:20] <SiENcE> i have no exp. with cmake and how to setup a cross compile
[13:42:47] <fuzzie> so, really, you should just use -shared and pass it the static python library manually
[13:42:52] <SiENcE> i used cmake on softopenal
[13:43:11] <SiENcE> and it was no problem making a cross compile build
[13:43:34] <SiENcE> i did, but it brings me this SegFault
[13:44:01] <fuzzie> and 'import os' works fine in your interpreter?
[13:44:06] <SiENcE> yes
[13:44:09] <wjp> isn't linking a static library into a shared library a bit risky (PIC) ?
[13:44:34] <SiENcE> mh
[13:44:38] <SiENcE> i dont know
[13:44:40] <fuzzie> yes, i have no idea if it works, but the easiest solution is to just build a shared python
[13:44:40] <SiENcE> could be
[13:44:53] <SiENcE> i tryed
[13:45:04] <SiENcE> but it is no possible
[13:45:09] <SiENcE> for mipsel
[13:45:10] <CIA-27> GemRB: 03avenger_teambg * r897a30b42fc3 10gemrb/gemrb/ (4 files in 3 dirs): fixed selected state of actors on load
[13:45:12] <SiENcE> pic issues
[13:45:45] <fuzzie> i have no experience with building under cygwin, nor building for the dingoo
[13:46:20] <fuzzie> gemrb with shared everything does work fine on mipsel, is all i know for sure
[13:46:49] <SiENcE> ok
[13:48:46] <SiENcE> so no idea
[13:49:19] <SiENcE> i cannot compile a shared python on dingux
[13:49:51] <SiENcE> and i cannot link a static python lib in GUIScript, just because the segfault issue and maybe a problem when loading it as module
[13:49:53] <fuzzie> it looks like no-one can compile a shared python on dingux
[13:50:15] <SiENcE> the only solution is
[13:50:26] <Avenger> grr, the most annoying bug right now: npcs ai script sees opponents through walls and at great distances and they go and try attack them
[13:50:43] <SiENcE> a static gemrb build, or to rewrite some stuff and link GUIscript static build directly into gemrb
[13:52:38] <fuzzie> Avenger: obj matching needs to obey a lot of things (invisible states, visibility distance, etc), i didn't finish fixing it
[13:52:52] <fuzzie> especially since it only applies to *some* matching
[13:53:59] <fuzzie> and at least at the moment, it doesn't break the games, which restricting distance for everything does..
[13:54:20] <fuzzie> SiENcE: well, it is possible to link some modules statically, but you'd want to talk to tomprinc
[13:55:43] <SiENcE> ok thanks for this info
[13:56:10] <SiENcE> i have to go now. thanks
[13:56:13] <SiENcE> cya
[13:56:53] <-- SiENcE has left IRC (Quit: cya @all)
[14:21:42] --> Maighstir_laptop has joined #GemRb
[15:06:38] --- nickdaly` is now known as nickdaly
[15:27:52] <-- nickdaly has left IRC (Remote host closed the connection)
[15:28:10] --> nickdaly has joined #GemRb
[15:37:43] <CIA-27> GemRB: 03avenger_teambg * rc9448ab3950e 10gemrb/gemrb/ (7 files in 4 dirs): fixed CombatCounter
[16:35:05] --> pupnik_ has joined #GemRb
[16:37:29] --> nickdaly` has joined #GemRb
[16:39:35] <-- nickdaly has left IRC (Ping timeout: 265 seconds)
[16:43:25] --> lynxlynxlynx has joined #GemRb
[16:43:25] --- ChanServ gives channel operator status to lynxlynxlynx
[16:43:58] --- nickdaly` is now known as nickdaly
[16:59:55] <lynxlynxlynx> wow, some nice commits while i was gone
[17:12:16] <Avenger> more to come soon
[17:14:05] <nickdaly> @lynx Dualclassing works with 2 visual issues, I'm posting screenshots. I think the earlier issue was that I was using the ``make`` instead of ``cmake`` build. A new checkout built with cmake worked perfectly.
[17:15:28] <nickdaly> is it possible to post screenshots to the gemrb.sf.net wiki?
[17:16:31] <lynxlynxlynx> it's slow
[17:16:39] <lynxlynxlynx> paste it somewhere
[17:16:49] <lynxlynxlynx> there are also image pastebins around
[17:17:04] <lynxlynxlynx> i'd guess one is imaginatively called imagebin
[17:17:17] <nickdaly> yeah, I was thinking that or imageshack or somethingk
[17:17:56] <lynxlynxlynx> Avenger: i'm eager to see how the combat counter stuff affects combat
[17:19:04] <Avenger> combat is still crippled by the clairvoyance of npcs
[17:19:16] <Avenger> they see guys far far away
[17:20:12] <lynxlynxlynx> that's a given, but isn't that bad
[17:20:30] <lynxlynxlynx> probably worst in bg1 with all the open space
[17:21:28] <nickdaly> Dualclassing works perfectly, with 3 minor visual errors:
[17:21:28] <nickdaly>
[17:21:28] <nickdaly> Extra "Back" text: http://img836.imageshack.us/img836/1092/20100725121056800x600sc.png
[17:21:28] <nickdaly> Specialist Mage button selectable without text: http://img808.imageshack.us/img808/8528/20100725121142800x600sc.png
[17:21:31] <nickdaly> "Cancel" button missing text: http://img833.imageshack.us/img833/8455/20100725121159800x600sc.png
[17:21:35] <nickdaly>
[17:22:10] <Avenger> I wonder why this doesn't work:
[17:22:16] <Avenger> NoteLabel = NoteWindow.GetControl (1)
[17:22:16] <lynxlynxlynx> nickdaly: where's the extra back text?
[17:22:17] <Avenger> NoteLabel = NoteLabel.ConvertEdit (1)
[17:22:19] <Avenger> NoteLabel.SetText (Text)
[17:22:20] <Avenger> NoteLabel.SetStatus (IE_GUI_CONTROL_FOCUSED)
[17:22:22] <Avenger> print "Just set this:", NoteLabel.QueryText()
[17:22:52] <lynxlynxlynx> maybe convertedit now expects to be fed an object(NoteLabel)?
[17:23:09] <nickdaly> @lynx on the up arrow (below the class and skills buttons)
[17:23:39] <Avenger> convertedit works, and returns a control
[17:23:49] <Avenger> because SetText and SetStatus works
[17:23:55] <Avenger> QueryText doesn't work!!!
[17:24:17] <Avenger> even though i checked, convertedit returns a TextEdit (which has QueryText), and it breaks inside QueryText
[17:24:56] <lynxlynxlynx> nickdaly: meh, minor nit, i'll ignore it
[17:26:08] <lynxlynxlynx> second pic: you can dualclass to a specialist mage? I doubt it, this would mean a kit/kit combo was possible out of iwd2
[17:26:37] <Avenger> haha lynx, why is that back there
[17:26:58] <nickdaly> no, the button doesn't do anything, it's just label-less, clickable, and irrelevant
[17:27:04] <nickdaly> it'd be awesome were it disabled
[17:27:30] <Avenger> ahh generic code
[17:27:32] <lynxlynxlynx> patch welcome, it is trivial, see DualClass.py
[17:27:48] <nickdaly> ok, I'll look into it later today
[17:27:53] <lynxlynxlynx> iwd has the same button there
[17:27:54] <Avenger> i guess the back is needed for some other game?
[17:28:03] <nickdaly> possibly?
[17:28:06] <lynxlynxlynx> i don't remember if it had any useful function in the original
[17:28:22] <lynxlynxlynx> Avenger: i guess bg2 doesn't have the arrow image on it
[17:28:31] <Avenger> yep
[17:28:55] <Avenger> that's what you get for being generic, 80% are the same, but there are little differences
[17:29:29] <lynxlynxlynx> the last one i don't know about either - how did it work in the original - could you cancel?
[17:30:00] <nickdaly> you're able to, I think. it brings you back to the level up screen
[17:31:51] <lynxlynxlynx> need to check all of this
[17:32:07] <lynxlynxlynx> Avenger: it's more like 95%
[17:34:57] <Avenger> how do you define variable parameter count in python?
[17:35:12] <Avenger> in def ConvertEdit(self, ScrollBarID)
[17:35:22] <Avenger> ScrollBarID is not always needed
[17:37:51] <lynxlynxlynx> def ConvertEdit(self, ScrollBarID=0)
[17:38:06] <lynxlynxlynx> give it a magical default and handle it in the code
[17:38:15] --> nickdaly` has joined #GemRb
[17:38:23] <lynxlynxlynx> i'm sure it can do true variable parameter counts, but this is way simpler
[17:38:54] <-- nickdaly has left IRC (Read error: Operation timed out)
[17:40:23] <Avenger> ok, it is not a big deal
[17:55:29] <Avenger> lynx it was you who made these python meta classes? I cannot fix ConvertEdit :(
[17:56:39] <Avenger> I thought print _GemRB.Window_GetControl(self.WinID, self.ID) will return self (or at least an object representing the same chui object)
[17:59:43] <fuzzie> what do you want to do?
[18:00:22] <Avenger> i want to fix ConvertEdit
[18:00:27] <fuzzie> where's that?
[18:00:43] <Avenger> it is used, for example, in iwd2's map editor
[18:00:52] <Avenger> got iwd2?
[18:01:09] <fuzzie> well, i mean, what do you want to do?
[18:01:27] <Avenger> ConvertEdit should return the new control it created
[18:01:42] <Avenger> it is in GUIClasses.py
[18:01:50] <fuzzie> but newID is incorrect?
[18:02:04] <Avenger> NewID is the same as self.ID
[18:02:44] <Avenger> i just don't understand, why
[18:02:55] <fuzzie> wjp wrote the code, but i don't see why _GemRB.Window_GetControl(self.WinID, self.ID) shouldn't work fine
[18:02:57] <Avenger> NewID is the return value of the C function
[18:03:08] <Avenger> it is: int ret = core->GetControl( WindowIndex, ta->ControlID );
[18:03:39] <fuzzie> if it is a known control type, of course
[18:03:42] <Avenger> the problem is that it is not a control ID, but already an index
[18:04:31] <fuzzie> but Window_GetControl doesn't work for you?
[18:04:49] <Avenger> window_getcontrol expects a control id, i guess?
[18:04:57] <fuzzie> yes
[18:05:29] <fuzzie> but self.ID should be fine, no?
[18:05:55] <Avenger> no, self.ID is also an index
[18:05:59] <Avenger> hmm
[18:06:14] <Avenger> maybe i shouldn't do anything?
[18:06:31] <fuzzie> hmm
[18:06:43] <fuzzie> right, i understand now
[18:06:45] <Avenger> the converter converts the control to a different type, but it is otherwise ALL THE SAME
[18:07:00] <Avenger> the python object has no direct reference to it
[18:07:07] <Avenger> so, it won't notice a change :)
[18:07:09] <Avenger> right?
[18:07:23] <Avenger> it should simply return self
[18:08:04] <fuzzie> yes, if it's already a GTextEdit before and after
[18:08:10] <fuzzie> but i don't think that is true
[18:09:11] <Avenger> it is a textarea :(
[18:09:12] <fuzzie> what you want is to return GTextArea(self.winID, self.ID) i think?
[18:09:25] <Avenger> hmm, yes, probably
[18:09:40] <fuzzie> as you say, only the python side needs to care :)
[18:09:59] <fuzzie> but wjp wrote the code, i am unfamiliar
[18:10:31] <Avenger> from what i see you are 99.999% right :) and i will soon see the missing percent :)
[18:11:09] <Avenger> yeah, much better
[18:13:55] <Avenger> now it just needs to be a multi line editbox...... i thought that already worked
[18:13:55] <CIA-27> GemRB: 03avenger_teambg * rd1a13fdf9387 10gemrb/gemrb/ (7 files in 7 dirs): fixed the map editor of the games in many ways
[18:14:28] <Avenger> anyway, check out PST, its map notes are much much better now
[18:15:48] <fuzzie> i have no games here :|
[18:16:05] <fuzzie> haven't seen any of the commits today
[18:16:29] <fuzzie> but am happy to hear about CombatCounter, if it is now fixed
[18:18:42] <Avenger> well, it is now doing what the consensus is about it: when an attack happens, it is set to 150, then it goes down by one at each ai cycle. When it is 0, the battlesong is replaced ith the area song
[18:19:33] <Avenger> the even/odd rounds are now calculated in each actor individually
[18:19:34] <fuzzie> ok, i agree with that
[18:20:03] <Avenger> that's another change, before that it was tied to the combat counter
[18:21:24] <Avenger> i also tried to fix attackers that lose their target
[18:21:39] <Avenger> an Attackers array with 1 element is always wrong :)
[18:21:53] <Avenger> you need 2 for a fight
[18:22:18] <fuzzie> do we really need an attackers array at all?
[18:22:48] <fuzzie> we have to trigger the CombatCounter on non-attackers anyway, haven't looked at the commit so don't know if that's possible yet
[18:22:50] <Avenger> the alternative is to go through all loaded maps, and all actors of their maps
[18:23:12] <Avenger> whenever you check if any attack is going on
[18:23:23] <Avenger> combatcounter is a global variable
[18:23:32] <fuzzie> sure
[18:23:41] <fuzzie> but it's set by actions, not attacks
[18:23:55] <fuzzie> (try a summon in the original game for a simple example with no attackers)
[18:24:00] <fuzzie> but something to fix another time
[18:24:18] <Avenger> well, you can set combatcounter in any action
[18:24:24] <Avenger> now it will work
[18:24:26] <fuzzie> so, simple to fix :) cool
[18:24:42] <Avenger> i already set it in SetMusic
[18:24:45] <fuzzie> i will go through and just try the actions i guess
[18:25:01] <Avenger> because iwd2 sets it when it uses SetMusic(3...)
[18:25:06] <Avenger> 3 = combat music
[18:25:17] <Avenger> err, PlayAreaSong, or whatever is it, not SetMusic
[18:25:19] <fuzzie> nice find
[18:25:50] <Avenger> now if you know an action that sets combatcounter, you just need to do the same
[18:25:59] <lynxlynxlynx> [Actor]: Unregistered attack. We shouldn't be here? <-- i get this regularly btw
[18:26:04] <Avenger> hmm
[18:26:14] <Avenger> that's a logic error :)
[18:26:20] <Avenger> good i didn't add an abort there
[18:27:43] <Avenger> Why would PerformAttack be called without InitRound???
[18:28:23] <fuzzie> where is InitRound called?
[18:29:06] <fuzzie> is it still in UpdateScripts?
[18:29:24] <Avenger> yes
[18:29:31] <fuzzie> this is why i don't like the attacker list, it just means we have a bunch of hacks
[18:30:15] <Avenger> Or all PerformAttack calls should just add the actor to the attackers list :)
[18:30:21] <fuzzie> PerformAttack is called inside an action
[18:30:25] <Avenger> yes
[18:30:43] <fuzzie> there's no way of knowing whether you're attacking, other than seeing if that got called this script round
[18:30:48] <Avenger> but it should be delayed
[18:31:00] <fuzzie> it doesn't work properly if it's delayed
[18:31:06] <Avenger> the damage is dealt in PerformAttack
[18:31:08] <lynxlynxlynx> iirc the fact that this is called from UpdateScripts also prevents combat if you don't see the combatants
[18:31:32] <fuzzie> i think the combat-preventing thing is really deep inside the draw code, no?
[18:31:36] <Avenger> you don't deal the damage instantly when you perform Attack()
[18:31:45] <Avenger> it should be delayed by initiative
[18:31:56] <fuzzie> Avenger: that is handled inside PerformAttack, no?
[18:31:59] <Avenger> so, Attack() should just put you on the attackers list
[18:32:01] <fuzzie> i don't know what you changed
[18:32:04] <lynxlynxlynx> initiative is handled, yes
[18:32:15] <fuzzie> but i stopped this code from using an attackers list because it didn't work
[18:32:32] <fuzzie> because attacks would happen without Attack being called that script round!
[18:32:43] <pupnik_> urgh
[18:33:15] <fuzzie> so it just got all moved to inside PerformAttack as far as i remember
[18:33:56] <Avenger> hmm
[18:34:04] <Avenger> maybe you are right
[18:34:09] <fuzzie> there's a TODO somewhere for moving the rest of the round stuff in there too, because at the moment, the code can't work out when someone has stopped being in combat
[18:34:41] <Avenger> well, i fixed something about that
[18:35:06] <Avenger> if the target is not existant in the same map, the attack stops
[18:35:15] <fuzzie> oh?
[18:35:24] <fuzzie> i mean, that should be handled by the script..
[18:35:31] <Avenger> no
[18:35:41] <fuzzie> otherwise, it breaks for when you are followed between maps
[18:36:01] <Avenger> well, that is still handled by the script
[18:36:07] <fuzzie> the dream sequence thing in the original game is a good example of this
[18:36:27] <Avenger> hmm, yes, i remember, but i don't clear the action queue :0
[18:36:52] <fuzzie> well, i don't know what you mean by "the attack stops" :)
[18:36:54] <Avenger> i just remove x from the attackers list, if y isn't on the same map as x
[18:36:58] <fuzzie> ok.
[18:37:03] <fuzzie> i don't know what we need the attackers list for.
[18:37:42] <Avenger> to see if any attacks are on, without looking for every map
[18:37:49] <fuzzie> but what needs to check that?
[18:37:52] <fuzzie> i can only think of the savegame code
[18:38:04] <fuzzie> which has to check for NOINT anyway
[18:38:22] <Avenger> or to call InitRound, but it is probably not needed now
[18:38:35] <fuzzie> i mean: i don't know which is the right way!
[18:38:45] <fuzzie> but if we just move InitRound somewhere sensible, i wonder if we can get rid of it
[18:38:53] <fuzzie> i know that it was used by a lot of Triggers, last time i looked
[18:39:07] <Avenger> yes
[18:39:11] <Avenger> i use it for triggers
[18:39:19] <Avenger> other than the initround
[18:39:21] <fuzzie> but i think those don't work properly
[18:39:27] <Avenger> and i agree that initround is probably not good
[18:39:33] <Avenger> hmm why?
[18:39:42] <fuzzie> because the attackers in the list are different to what the original game considers attackers
[18:40:11] <fuzzie> let me take a look
[18:40:32] <-- nickdaly` has left IRC (Ping timeout: 240 seconds)
[18:41:32] <Avenger> i add someone to the Attackers list when they get a target
[18:41:58] --> nickdaly has joined #GemRb
[18:42:19] <Avenger> And remove them when they lose their target
[18:42:19] <fuzzie> i can't actually find any of this
[18:42:30] <Avenger> in SetTarget
[18:42:41] <Avenger> Actor::SetTarget
[18:42:49] <fuzzie> i mean, i see no triggers
[18:43:04] <fuzzie> there's the ActuallyInCombat one
[18:43:26] <Avenger> AnyPCInCombat
[18:43:30] <fuzzie> which is mis-implemented in gemrb i think
[18:44:16] <Avenger> what's the difference?
[18:45:01] <Avenger> in gemrb, if any pc is target, or has target, then anypcincombat is true
[18:45:08] <fuzzie> iesdp claims "if combat counter is above 0", but i don't believe it
[18:45:24] <Avenger> well, gemrb has that line too
[18:45:26] <fuzzie> because combatcounter is set momentarily by *loads* of stuff
[18:45:41] <Avenger> or rather, gemrb checks combatcounter only in one way
[18:46:01] <Avenger> if combatcounter is 0, then no pc in combat
[18:46:09] <Avenger> but if combatcounter>0 i do more checks
[18:46:22] <fuzzie> you think the checks are correct?
[18:46:39] <fuzzie> this way you miss anyone who isn't directly targeting someone
[18:46:40] <Avenger> yes
[18:46:56] <Avenger> when does that happen
[18:47:03] <fuzzie> projectiles
[18:47:26] <Avenger> hmm
[18:47:37] <Avenger> we should test this with two archers maybe
[18:47:39] <fuzzie> you seem to have a 86_actuallyincombat.txt with commentary
[18:47:49] <fuzzie> so i thought you might know better than me
[18:48:51] <Avenger> haha, it checks combatcounter :)
[18:49:03] <Avenger> though.... yeah, you are right
[18:49:12] <Avenger> the original IE has combatcounter per area
[18:49:17] <Avenger> yes, i know that :)
[18:49:29] <fuzzie> interesting
[18:50:13] <Avenger> i will have to see wtf is in [0AA6FF8h]
[18:50:20] <Avenger> -44 is totally nonsense
[18:50:22] <fuzzie> see, i would never have guessed that, with my tests in the original engine
[18:50:25] --> budlust has joined #GemRb
[18:50:56] <fuzzie> i know that a lot of people replace !CombatCounter(0) with ActuallyInCombat(), so there's surely some difference
[18:51:15] <Avenger> 00494C30 is combat counter 2
[18:51:21] <Avenger> each area has 2 combat counters
[18:51:45] <Avenger> i don't know what is in cc 2
[18:51:55] <Avenger> cc 1 is the 150, ticking down
[18:52:11] <Avenger> probably cc2 is a sizeof attackers :P
[18:52:38] <fuzzie> would make sense
[18:53:24] <Avenger> well, i will check this again
[18:55:00] <-- Avenger has left IRC (Quit: bye!)
[18:58:59] <nickdaly> If you guys are interested, I've updated the multi-config patch to the latest head, it builds cleanly and works as expected.
[19:01:44] <Maighstir_laptop> Sorry to interrupt the discussion, I'd like some help though. Given these two different logs http://pastebin.com/XqUqfZCv http://pastebin.com/TGPPpxBi and this script http://pastebin.com/52ymppYa can someone tell me what I'm doing wrong?
[19:01:45] <Maighstir_laptop> In the first log I click on MaleButton then NextButton, in the second I click FemaleButton then NextButton... not only can I not figure out why I get errors, the errors are different as well even though the code should take the same path in both cases.
[19:02:24] --> Avenger has joined #GemRb
[19:02:25] --- ChanServ gives channel operator status to Avenger
[19:03:16] <Avenger> huh, that is truly -45
[19:03:28] <Avenger> it seems like combatcounter counts below 0
[19:04:36] <Avenger> btw, combatcounter(0) is true for ANY value below 1 :)
[19:04:50] <fuzzie> that is interesting
[19:04:52] <Avenger> but combatcounter(-1) is true only once
[19:05:02] <Avenger> it handles 0 specially
[19:05:12] <Avenger> check 53_combatcounter
[19:06:02] <Avenger> this gets the parameter from the trigger--> call 004943F0
[19:06:20] <Avenger> this returns the area specific cc1-->00494C10
[19:08:13] <Avenger> omg
[19:08:31] <Avenger> we won't implement this
[19:08:38] <Avenger> this is surely a bug :0
[19:09:07] <Avenger> if combatcounter's parameter is nonzero, it compares it to cc1 and cc2 too
[19:09:20] <Avenger> if it is not equal to any of them, the trigger is false
[19:09:39] <Avenger> now, why would two counters be equal :)
[19:09:54] <Avenger> if they are not equal, then the trigger is definitely false, haha
[19:10:42] <fuzzie> combatcounter definitely works for non-zero values
[19:10:59] <fuzzie> i don't know how reliable it is though, maybe just luck
[19:11:53] <Avenger> if it works more than once in a blue moon, then cc1 and cc2 are mostly equal
[19:12:04] <Avenger> otherwise it cannot be equal to 2 different values
[19:13:36] <Avenger> btw actuallyincombat is almost the same as combatcounter(0)
[19:13:45] <Avenger> combatcounter(0) seems to be more restrictive
[19:14:04] <fuzzie> i think the problem is that some things (like dialog?) set combatcounter to 0
[19:14:15] <fuzzie> or something like that.. it messes up combatcount(0) checks, anywa
[19:14:16] <fuzzie> y
[19:14:19] <fuzzie> maybe you can work it out
[19:14:25] <fuzzie> Maighstir_laptop: will look now
[19:14:55] <Avenger> actuallyincombat: if (cc1>-45 and cc2>0) return true; else return false;
[19:15:12] <fuzzie> Maighstir_laptop: my guess on the first would be that you are passing -1, and that is for some reason causing problems, but i don't see why
[19:16:26] <fuzzie> but the GetTableValue one is simply because it's an invalid call
[19:16:39] <fuzzie> you need to construct a table object, and then call GetValue on it
[19:18:17] <fuzzie> you seem to do the first bit, but then you want to do PortraitsTable.GetValue() on that?
[19:18:40] <fuzzie> that Roll one is odd, though
[19:19:03] <lynxlynxlynx> Maighstir_laptop: instead print type(PortraitsCount); i suspect it is a string (so you'd wrap it in int())
[19:19:16] <fuzzie> oh
[19:19:20] <fuzzie> right, lynx has the answeer i guess
[19:19:27] <fuzzie> i was about to say, my guess is not correct, it works fine with -1.
[19:19:43] <fuzzie> and now i am being shouited at, got to go again
[19:20:09] <lynxlynxlynx> Maighstir_laptop: and the second one you made up :P
[19:21:27] <Maighstir_laptop> I didn't make it up! I looked through the docs and did what I thought it said. :-P
[19:21:38] <Maighstir_laptop> Thanks both of you
[19:22:16] <lynxlynxlynx> Avenger: could the second combat counter be for spellcasting? I'm thinking about aura cleansing
[19:22:43] <Avenger> not sure, i see both are checked for spells that are 'not in combat'
[19:23:12] <Avenger> i should see where they are set
[19:23:22] <Avenger> but i found only code where they are checked
[19:23:26] <lynxlynxlynx> Maighstir_laptop: it's internal now, so it can't be accessed that way anymore
[19:23:33] <Maighstir_laptop> but uh... no, they're int's
[19:23:34] <Maighstir_laptop> PortraitsCount: 2 <type 'int'>
[19:23:34] <Maighstir_laptop> PortraitsStart: 0 <type 'int'>
[19:23:42] <Maighstir_laptop> ah, right
[19:23:55] <Avenger> it is weird anyway
[19:24:14] <Avenger> if two npcs are attacking each other in an area, you cannot cast a non-combat spell ???
[19:24:20] <lynxlynxlynx> PortraitsTable.GetValue
[19:24:32] <Avenger> it sucks, the check should see if the caster is in combat
[19:24:42] <lynxlynxlynx> Avenger: sounds fishy
[19:24:44] <Avenger> or, the party, att most
[19:28:13] <fuzzie> projectiles always have owners?
[19:28:37] <Avenger> huh fuzzie, you ask nasty questions :)
[19:29:03] <Avenger> i hope they do
[19:29:11] <fuzzie> and what if i cast some nasty effect onto my enemies, like poison/acid over time, i still get to cast non-combat spells?
[19:29:11] <Avenger> but they can have non-actor owners
[19:29:27] <lynxlynxlynx> like traps
[19:29:34] <Avenger> hmm there are very few non-combat spells fuzzie
[19:29:36] <lynxlynxlynx> this casting thing sounds bogus
[19:29:44] <Avenger> probably the pocket plane
[19:29:54] <Avenger> that's the only one
[19:29:55] <lynxlynxlynx> friends, luck?
[19:30:05] <Avenger> you can cast them in combat, no?
[19:30:16] <lynxlynxlynx> sure
[19:30:29] <Maighstir_laptop> lynxlynxlynx: yeah, now female works, but not male... that -1 worked before but not now... I'll need to do the -1 another way (first portrait is 0, not 1)
[19:30:35] <lynxlynxlynx> i can't think of anything that you can't cast in combat
[19:30:39] <fuzzie> if there's anything i found in the last few days of playing bg2, it is that bg2 is buggy when working out when you're in or out of combat, so i wouldn't pay too much attention to my nasty questions
[19:30:40] <Avenger> pocketplane is no combat
[19:31:03] <lynxlynxlynx> ok
[19:31:14] <lynxlynxlynx> it would permit saving in combat otherwise
[19:31:49] <Avenger> it is possible to save in combat, if you leave the area through a party only exit :)
[19:32:15] <Avenger> i meant, physically it is possible, it will keep an almost consistent state
[19:32:20] <lynxlynxlynx> well this makes much more sense now that you've clarified the "non-combat spell" definition
[19:32:51] <-- nickdaly has left IRC (Quit: ERC Version 5.2 (IRC client for Emacs))
[19:33:09] <Avenger> lynx: there is a flag in spells, i call spells no combat, that have that flag set 'cannot cast in combat' ;)
[19:33:42] <Avenger> of course, there is a flag you meant too, that's 'hostile spell'
[19:34:04] <Avenger> if a spell flagged by 'hostile spell' hits a target, it is automatically an attack
[19:34:13] <Avenger> damage spells don't need it
[19:34:43] --> nickdaly has joined #GemRb
[19:35:07] <lynxlynxlynx> mhm
[19:35:19] <Avenger> weird, hold person has no such flag
[19:35:31] <Avenger> i wonder if it is considered hostile
[19:35:45] <Avenger> ooh
[19:35:50] <Avenger> the priest version has no such flag
[19:35:55] <Avenger> the mage version has it
[19:35:57] <Avenger> LOL
[19:36:22] <Avenger> now i wonder if this is a bug or feature
[19:38:28] <Avenger> in bg1 neither has the flag
[19:38:38] <wjp> when priests restrain you it is for your own good? :-)
[19:39:11] <Avenger> yeah wjp, even if they are nasty bhaalie priests, dragging you to the sacrificial altar
[19:39:27] --> nickdaly` has joined #GemRb
[19:39:28] <Avenger> it is totally weird
[19:40:53] <Avenger> see you later!
[19:40:55] <-- Avenger has left IRC (Quit: ChatZilla 0.9.86 [Firefox 3.6.8/20100722155716])
[19:41:32] <-- nickdaly has left IRC (Ping timeout: 265 seconds)
[19:43:00] <lynxlynxlynx> could be just buggy
[19:43:18] <lynxlynxlynx> started off as a copy of another spell that has that flag unset
[19:46:58] --> pupnik has joined #GemRb
[19:50:33] <-- pupnik_ has left IRC (Ping timeout: 260 seconds)
[19:57:27] --- nickdaly` is now known as nickdaly
[20:22:32] --> SiENcE has joined #GemRb
[20:24:29] <lynxlynxlynx> it appears like every second ongoing attack triggers that initround warning
[20:27:10] <lynxlynxlynx> or maybe not
[20:45:17] <pupnik> heh
[20:45:28] <pupnik> is this only relevant to IWD?
[20:46:11] <lynxlynxlynx> unlikely
[21:06:10] <CIA-27> GemRB: 03lynxlupodian * r080aac48e1e7 10gemrb/gemrb/GUIScripts/DualClass.py: DualClass: only display the main back button text in bg2
[21:16:13] <-- Maighstir_laptop has left IRC (Quit: Maighstir_laptop)
[21:21:03] <-- lynxlynxlynx has left IRC (Remote host closed the connection)
[21:32:12] --> Maighstir_laptop has joined #GemRb
[22:04:30] <-- pupnik has left IRC (Quit: leaving)
[22:21:02] <-- SiENcE has left IRC (Quit: cya @all)
[22:31:14] <-- Maighstir_laptop has left IRC (Read error: Connection reset by peer)
[22:31:31] --> Maighstir_laptop has joined #GemRb
[22:39:46] --> nickdaly` has joined #GemRb
[22:41:31] <-- nickdaly has left IRC (Ping timeout: 252 seconds)
[22:50:43] <nickdaly`> /nick nickdaly
[22:50:43] <nickdaly`> /msg nickserv identify 202020
[22:51:03] --- nickdaly` is now known as nickdaly
[23:02:08] <-- Maighstir_laptop has left IRC (Ping timeout: 276 seconds)
[23:28:38] <-- nickdaly has left IRC (Disconnected by services)
[23:30:22] --> nickdaly has joined #GemRb
[23:30:22] <-- anji has left IRC (Quit: ZNC)
[23:40:40] --> nickdaly` has joined #GemRb
[23:42:18] <-- nickdaly has left IRC (Ping timeout: 240 seconds)
[23:48:20] --- nickdaly` is now known as nickdaly