#exult@irc.freenode.net logs for 11 Apr 2013 (GMT)

Archive Today Yesterday Tomorrow
Exult homepage


[01:24:37] --> jvlee has joined #exult
[02:06:31] <sh4rm4> Dominus, *stepping throuh* code usually helps much better
[02:08:03] <-- jvlee has left IRC (Ping timeout: 245 seconds)
[02:17:39] --> jvlee has joined #exult
[03:01:27] --> jvlee_ has joined #exult
[03:01:28] <-- jvlee has left IRC (Read error: Connection reset by peer)
[03:35:33] <-- jvlee_ has left IRC (Ping timeout: 240 seconds)
[03:48:47] --> jvlee has joined #exult
[03:55:51] <-- jvlee has left IRC (Ping timeout: 245 seconds)
[04:08:21] --> jvlee has joined #exult
[04:17:03] <-- jvlee has left IRC (Ping timeout: 260 seconds)
[04:20:24] --> jvlee has joined #exult
[05:15:52] <-- jvlee has left IRC (Remote host closed the connection)
[07:18:30] --> Quester has joined #exult
[07:18:53] --- Quester is now known as Guest78270
[07:34:53] --- Guest78270 is now known as Quester_
[07:35:15] --- Quester_ is now known as timquester
[08:55:52] <-- timquester has left IRC (Quit: Page closed)
[11:36:39] * Dominus glares at sh4rm4
[11:37:29] <Dominus> so when I commented the if !gotpath and put some loggings there http://pastebin.com/EPsW1RGV
[11:38:07] <Dominus> I get crystal-1 crystal-4 crystal-5 crystal-6 crystal-7 crystal-9
[11:38:57] <Dominus> which leads me to believe that the gotpath definition in Patrol_schedule::Patrol_schedule( needs tweaking
[11:39:19] <wjp> gotpath is really just "is the set of eggs non-empty"
[11:39:42] <wjp> there's no room there
[11:41:08] <Dominus> later (where I placed cout crystal-6) it mostly does the same as in gotpath but finds the eggs then
[11:49:05] <wjp> hmm, one thing that might do that is if the npc is not on-screen when the schedule is starting
[11:49:15] <wjp> then the map around it might not be loaded yet
[11:49:40] <wjp> and I suppose for crystal-ball scenes that is not implausible
[11:50:04] <Dominus> yes
[11:50:17] <Dominus> AFAIR it's the invisible cat
[11:52:09] <wjp> try adding some debug info to the bottom if/else in Actor::set_schedule_type
[11:52:38] <wjp> (the one with the gmap->is_chunk_read(get_cx(), get_cy()) )
[11:53:03] <wjp> but it does sound like regardless if this is what happens, it is a mistake to get the path eggs in the constructor
[11:53:13] <wjp> it should only do this the first time the schedule is actually executed
[11:58:40] <Dominus> wjp, nothing logs there when viewing the crystal ball
[12:01:14] <wjp> at all?
[12:01:25] <Dominus> yes
[12:01:46] <wjp> not even before actually viewing the crystal ball?
[12:02:00] <Dominus> after double clicking the ball nothing logs there
[12:02:31] <Dominus> before, just standing there I get a lof of logs for if (!gmap->is_chunk_read(get_cx(), get_cy()))
[12:03:04] <wjp> hm, maybe add a check for the specific npc and schedule combination
[12:03:28] <wjp> so that would be...
[12:04:35] <wjp> if ((Schedule::Schedule_types)new_schedule_type == Schedule::patrol && npc_num == something) { cout << "Something" << endl; }
[12:04:39] <wjp> I think
[12:04:50] <wjp> where you hopefully know the relevant somethings
[12:07:14] <Dominus> no, no idea what npc that is...
[12:08:24] <wjp> you can do a cout << npc->get_npc_num() << endl; where you did the crystal-6 or so to get that
[12:09:49] <Dominus> -1
[12:13:34] <wjp> um
[12:16:18] <wjp> so not a real NPC I suppose
[12:16:50] <Dominus> yes, likely. the logging before did log actually but it got drowned in noise. http://pastebin.com/2U6CQzZj
[12:17:39] <wjp> npc_num == -2?
[12:17:50] <Dominus> dang...
[12:18:09] <wjp> doesn't mattr
[12:19:04] <wjp> so something somewhere started a patrol schedule while the map around it wasn't loaded
[12:21:52] --> TheCycoONE has joined #exult
[12:21:58] <Dominus> the only place the crystal ball is mentioned is in intrinsics.cc
[12:22:16] <wjp> I don't think the crystal ball itself really matters
[12:59:27] <Dominus> so the problem is when it derfines gotpath there is no map yet so no path eggs can be found
[13:00:24] <Dominus> we *could* check for npc -1 in if !gotpath (and for npc 37 for the patrol schedule change later) but I think that is not the correct way to solve these two problems :)
[13:05:55] <wjp> right, and no, not quite :-)
[13:06:33] <wjp> who is npc 37?
[13:13:42] <Dominus> npc 37 in si is th eparrot causing the crash when safenpc->update_schedule... later in the !gotpath if...
[13:13:47] <Dominus> gone for a bit...
[13:14:08] <wjp> ah
[13:14:16] <wjp> ok, bye
[14:17:02] <-- Rottingbeef has left IRC (*.net *.split)
[14:19:03] --> Rottingbeef has joined #exult
[15:35:30] <-- TheCycoONE has left IRC (Quit: And then there were n-1)
[16:31:16] --> TheCycoONE has joined #exult
[17:11:44] <wjp> Dominus: moving that initialization to the first time the patrol schedule is actually run fixes the hang, but that Batlin/Cantra chase scene is still very broken
[17:11:57] <wjp> looks like Cantra ends up loitering instead of running...
[17:14:02] --> timquester has joined #exult
[17:16:45] <timquester> Hi. wjp, I want try build idados in mingw, it is possible? I must use SDK 5,7 or 6.1?
[17:18:32] <wjp> hi
[17:19:23] <wjp> I haven't tested the current git version of idados with anything below ida 6.4
[17:20:01] <wjp> I'd expect 6.1 has a better chance of working than 5.7; there were some significant debugger api changes around 6.0
[17:20:16] <wjp> but I have no experience with building ida plugins with mingw
[17:22:54] <wjp> that said, old version of idados definitely did work in mingw
[17:23:01] <wjp> s/version/versions/
[17:24:21] <timquester> you mean 0.1?
[17:24:37] <wjp> yes
[17:25:09] <timquester> yes, I was use it some years ago
[17:25:38] <wjp> things are much better with current versions of IDA
[17:25:44] <timquester> but old IDA not work correctly with addresses in 16 bit DOS
[17:25:48] <wjp> they improved 16 bit debugging a _lot_
[17:28:40] <timquester> ok, thanks. I will try to build it tomorrow. bye.
[17:29:27] <wjp> cool, let me know how it goes
[17:29:30] <wjp> bye
[17:29:33] <-- timquester has left #exult
[17:54:34] <wjp> Dominus: ah, but that was just me being stupid
[17:55:31] <wjp> http://www.usecode.org/misc/gotpath.patch
[18:23:16] <Dominus> wjp, that looks good
[18:23:44] <Dominus> probably still crashes at the schedule change for #37
[18:24:06] <wjp> yes, that is unrelated to this
[18:24:54] <Dominus> yeah
[18:25:39] <Dominus> before you arote "me being stupid" I was about to seriously suggest to comment the whole !gotpath part :)
[18:26:15] <wjp> I think I'll just commit this minus the debugging bits
[18:26:25] <Dominus> oh and can you give me a savegame with the cantra/batlin vision?
[18:26:38] <wjp> I think I got that from a ticket?
[18:27:07] <Dominus> and yes, please commit this! :)
[18:28:38] <Dominus> thanks for solving this part of the puzzle
[18:29:03] <Dominus> Now it's time for dinner. the little one took ages to get to bed and I'm starving...
[18:31:03] <wjp> ok, enjoy :-)
[18:32:37] <wjp> committed
[20:25:48] --> TheCycoTWO has joined #exult
[20:27:38] <-- TheCycoONE has left IRC (Ping timeout: 245 seconds)
[20:35:09] <-- TheCycoTWO has left IRC (Read error: Connection reset by peer)
[20:46:28] <Dominus> so, one down, one more to go :)
[20:57:06] <wjp> I suppose the question there is if we dare to move that "unchanged schedule" check up a level
[20:57:17] <wjp> or if we should add a custom check in patrol
[20:58:05] <Dominus> otoh it seems logical to check sooner whether a schedule is unchanged by update_schedule
[20:58:30] <Dominus> on the other, I'm not sure we can dare that for all schedules
[21:05:22] <Dominus> right now it loops from schedule.cc update_schedule to actors.cc Npc_actor::update_schedule, to actors.cc case Schedule::patrol in Actor::set_schedule_type, then to actors.cc Actor::ready_best_weapon and finally back to schedule.cc
[21:05:59] <wjp> ready_best_weapon isn't involved
[21:06:12] <wjp> that's just where it finally crashes when out of memory
[21:11:44] <Dominus> actually it seems to get caught in the loop. I put a cout there because it came up in the backtrace. but it's probably just collateral damage
[21:12:15] <Dominus> this is the loop I see in terminal
[21:12:16] <Dominus> schedule #968 next
[21:12:16] <Dominus> actors #4878
[21:12:16] <Dominus> actors #1811
[21:12:16] <Dominus> actors #579
[21:16:35] <Dominus> last night I tried to compare find_schedule_change for (gclock->get_hour() / 3, 8, -1) with the current schedule/Patrol schedule but couldn't make it work and wasn't sure whether that would give the needed result...
[21:17:05] <wjp> I'll clean up this schedule change code a bit to make it easier to try both
[21:49:25] <Dominus> wjp, nothing to do with the problem at hand, so don't get sidetracked but I think the background noise problem you experienced is caused by gamewin.cc #194 (the commented if (player...) vs the if (player) and maybe (additionally) the following comment about crickets
[21:49:50] <wjp> just committing those cleanups
[21:50:58] <wjp> there's now a function to get the schedule at a given time
[21:52:46] <wjp> although from outside Npc_actor it doesn't have the most convenient interface
[21:53:36] <wjp> oh, but it's not so bad in Patrol_schedule as you already have the actual schedules in list there in that !gotpath
[21:54:51] <wjp> list[npc->find_schedule_at_time(gclock->get_hour() / 3)].type
[21:55:04] <wjp> valid inside the "if (cnt != 0)" only
[21:56:53] <Dominus> so some "if (list[npc->find_schedule_at_time(gclock->get_hour() / 3)].type != this) {safenpc->update_schedule...} could/should work?
[21:57:41] <wjp> != Schedule::patrol
[21:58:21] <Dominus> will try out in a minute. first need to finish the snapshot
[21:59:02] <wjp> common syntax for line numbers is gamewin.cc:194 by the way
[21:59:07] <wjp> if that's what you mean by #194
[22:00:26] <Dominus> no, I meant that in rev 7279 Marzo enabled background music tracks for all midi players, while it was only the digital music player before
[22:00:43] <wjp> ?
[22:00:57] <Dominus> bah, I don't know why I can't read sometimes
[22:01:18] <Dominus> yes, I meant gamewin.cc:194
[22:01:23] <Dominus> :)
[22:10:52] <Dominus> wip, with http://pastebin.com/jmUKRJpv
[22:11:20] <Dominus> error: no member named 'find_schedule_at_time' in 'Actor'
[22:11:21] <Dominus> ...if (list[npc->find_schedule_at_time(gclock->get_hour() / 3)].type !=..
[22:11:43] <wjp> oh
[22:11:58] <wjp> that's a bit annoying
[22:12:45] <Dominus> had the same problem last night when I tried find_schedule_change
[22:12:55] <wjp> one sec
[22:17:19] <Dominus> hmm, right, when you playback the batlin/cantra scene again, the roles are reversed somewhat :)
[22:17:38] <wjp> Cantra seems to get stuck/confused at the beginning
[22:18:23] <wjp> ok, should be better now
[22:18:30] <wjp> but the .type should have been .get_type() I see
[22:18:35] <wjp> and the safenpc can be inside the if
[22:18:44] <Dominus> I was about to report :)
[22:22:07] <Dominus> ok, that works
[22:22:31] <Dominus> to that paste above I added
[22:22:32] <Dominus> else{
[22:22:33] <Dominus> npc->set_schedule_type(loiter);
[22:22:56] <wjp> that needs such a safenpc construction too
[22:23:17] <wjp> or no
[22:23:21] <wjp> a direct return after it
[22:23:55] <wjp> (since that will have deleted the current patrol schedule, so we shouldn't continue executing the current Patrol_schedule::now_what() )
[22:24:31] <Dominus> ah, understand
[22:27:29] <Dominus> so http://pastebin.com/iTpS7agJ is what I changed the if (cnt !=0).... to
[22:27:54] <wjp> move the safenpc down a line
[22:30:22] <Dominus> the Actor *safenpc = npc; line in the if? or an ampty line between the comment and the safenpc->update_schedule ?
[22:32:01] <wjp> the former
[22:32:07] <wjp> safenpc is only used inside that if
[22:32:14] <Dominus> k
[22:33:04] <Dominus> works for the parrot and batlin/cantra scene is still working as well
[22:35:09] <Dominus> just to be sure, the else works that way that it is the opposite of the if? (so no need to make it something like "else if (list... == Schedule::patrol)", right?)
[22:35:36] <wjp> no, it's correct as is
[22:36:15] <wjp> although I don't understand why we wouldn't also want loiter if cnt == 0 here
[22:37:04] <Dominus> if I understand correctly, cnt==0 means there are NO preset schedules, right?
[22:37:31] <Dominus> hmm, you are right
[22:38:55] <wjp> yes
[22:39:29] <Dominus> the way it is now an NPC without preset schedules that somehow gets into patrol mode but has no path eggs, will seek combat
[22:39:39] <wjp> that would give: if (cnt != 0 && list ... == Schedule::patrol) { update } else { set to loiter }
[22:39:57] <Dominus> or is he stuck in the if (GAME_SI)?
[22:40:14] <wjp> no, the first one
[22:40:58] <Dominus> so that is perhaps the intended behaviour, to swithc first, but if that is not possible seek combat
[22:42:13] <wjp> could be, yes
[22:45:25] <Dominus> or maybe you are right. I guess SI is more peaceful
[22:56:39] <wjp> so, something like this? www.usecode.org/misc/patrol.patch
[22:56:54] <wjp> um, no
[22:57:15] <Dominus> oops, I thought I did it right
[22:57:17] <wjp> this :-)
[22:57:31] <Dominus> (except for the tabs I left in)
[22:59:36] <Dominus> so, is the if (safenpc->get_schedule() != this) no longer needed and should the return be out of the else as you did it?
[22:59:42] <wjp> yes
[22:59:48] <wjp> cleaner this way I think
[23:00:08] <wjp> the safenpc stuff is no longer necessary as we now made sure the schedule will change in this update_schedule
[23:00:26] <wjp> (so that return in there will always have triggered)
[23:00:48] <Dominus> but Actor *safenpc = npc; is still needed?
[23:00:52] <wjp> no
[23:01:21] <wjp> reload that .patch if you get errors about that
[23:01:31] <wjp> (that was the "um, no. This")
[23:01:52] <wjp> (or just replace safenpc->update by npc->update if you had the old one)
[23:02:03] <Dominus> ah, because I already dared to commit my imperfect one :)
[23:02:14] <Dominus> right before your patch came
[23:02:24] <wjp> oh
[23:02:28] <wjp> I'll just commit the cleanup then
[23:03:17] <Dominus> can you take care of the tabs I left in as well?
[23:03:22] <wjp> sure
[23:04:48] <wjp> done
[23:05:42] <Dominus> thanks a lot
[23:06:06] <Dominus> that was quite something to learn from the last few days
[23:07:38] <wjp> bedtime now :-)
[23:07:40] <wjp> good night
[23:07:55] <Dominus> if you can, please check out the gamewin.cc:194 thing for the annoying music/sfx. Probably as Marzo commented, should be limited to digital and mt32/Emu
[23:08:02] <Dominus> and yes, bedtime!!!