#tfl@irc.freenode.net logs for 22 Nov 2006 (GMT)

Archive Today Yesterday Tomorrow
tfl homepage


[00:32:04] <-- Marzo_away has left IRC (Read error: 104 (Connection reset by peer))
[02:18:16] --> Marzo has joined #tfl
[02:18:16] --- ChanServ gives voice to Marzo
[02:18:28] <-- Marzo has left IRC (Read error: 104 (Connection reset by peer))
[07:55:35] <-- SleepingDragon has left IRC (Connection reset by peer)
[09:41:54] <-- Kirben has left IRC ("System Meltdown")
[09:48:35] --> Kirben has joined #tfl
[09:48:35] --- ChanServ gives voice to Kirben
[11:33:13] <-- Kirben has left IRC ("System Meltdown")
[11:38:47] --> Kirben has joined #tfl
[11:38:47] --- ChanServ gives voice to Kirben
[14:22:33] <-- Kirben has left IRC (Read error: 110 (Connection timed out))
[20:49:21] --> Marzo has joined #tfl
[20:49:22] --- ChanServ gives voice to Marzo
[22:26:28] --> SleepingDragon has joined #tfl
[22:26:28] --- ChanServ gives voice to SleepingDragon
[22:26:34] <SleepingDragon> moo
[22:26:53] <Marzo> You are sleepmooing, it seems
[22:26:55] <Marzo> :-)
[22:27:12] <SleepingDragon> indeed
[22:27:16] <SleepingDragon> How goes things?
[22:27:28] <Marzo> I added two new intrinsics last night
[22:27:33] <SleepingDragon> Sweet
[22:27:45] <Marzo> UI_book_mode_ex and UI_display_map_ex
[22:28:13] <Marzo> I am working on the spell rituals today
[22:28:32] --> Kirben has joined #tfl
[22:28:32] <Marzo> UI_book_mode_ex: http://seventowers.u7feudallands.com/ucc_ref.php?TYPE=5&DATAFILE=UI_book_mode_ex
[22:28:32] --- ChanServ gives voice to Kirben
[22:28:50] <Marzo> UI_display_map_ex: http://seventowers.u7feudallands.com/ucc_ref.php?TYPE=5&DATAFILE=UI_display_map_ex
[22:29:11] <SleepingDragon> Neat
[22:29:22] <SleepingDragon> So we can kinda have custom book gumps now?
[22:29:24] <SleepingDragon> :P
[22:29:38] <Marzo> No, I didn't think that it would be neccessary
[22:29:49] <Marzo> But there is still time to change that
[22:30:30] <Marzo> Is there really need for custom book gumps? I mean, all that is needed are blank pages...
[22:35:30] <SleepingDragon> Well, recall, we couldn't make new scrolls because the book_mode assumed it was a book
[22:35:51] <SleepingDragon> And there will at least be the "ancient" scrolls and spell scrolls from SI imported
[22:36:02] <Marzo> That isn't a problem for book_mode_ex, and if you had followed the link you'd see that :-)
[22:36:18] <SleepingDragon> Yes but Im lazy
[22:36:38] <Marzo> The ancient scrolls are a good thing to think about...
[22:36:41] <SleepingDragon> So when are we going to have a scroll one then?
[22:36:54] <Marzo> Follow the link :-)
[22:37:08] <Marzo> UI_book_mode_ex(bool is_scroll, int font)
[22:37:08] <Marzo> Used to display books and scrolls; displays a book gump if 'show_loc' is 'false' or a scroll shape if it is 'true'. The font shape in 'FONTS.VGA' used to render the text is specified in 'font'.
[22:37:18] <Marzo> There, here it is
[22:37:32] <SleepingDragon> Right
[22:37:42] <SleepingDragon> Well at least we can have scrolls
[22:37:53] <SleepingDragon> Would be nice if we can have those custom scrolls though :-)
[22:38:22] <Marzo> The problem with custom scrolls would be the need to define the text area(s)
[22:38:41] <SleepingDragon> Yes and no
[22:39:08] <SleepingDragon> The text ones IIRC used the same text area
[22:39:08] <Marzo> Well, if we assume that the shape sizes are identical it might work
[22:39:21] <SleepingDragon> It was the map ones and spell ones that were different
[22:39:31] <SleepingDragon> I mean bonus points if you can do that, but I dont think its needed
[22:39:32] <SleepingDragon> :-)
[22:39:54] <Marzo> It wouldn't be all that difficult, realy
[22:39:57] <Marzo> *really
[22:40:20] <SleepingDragon> Well then you might get some bonus points :-)
[22:40:26] <Marzo> lol
[22:40:30] <SleepingDragon> Focus on the easy bit first though.
[22:40:55] <SleepingDragon> perhaps if is_scroll is true, you can pass optional parameter scroll_shape
[22:41:04] <SleepingDragon> if it isnt passed, use the normal scroll graphic
[22:41:11] <SleepingDragon> if it is, use the specified custom one
[22:41:39] <Marzo> Aha, got it
[22:41:57] <Marzo> It will be ridiculously easy to make the text areas settable
[22:42:26] <Marzo> It will even be possible to make books with more than two pages, if that is somehow desirable
[22:43:44] <SleepingDragon> "more than two pages" explain.
[22:43:53] <Marzo> What I thought to do is to pass the shape (instead of the is_scroll flag) and an array of rectangles to the intrinsic
[22:44:14] <Marzo> Oh, a book which displays (say) 3 pages simultaneously
[22:44:46] <Marzo> For example, because it has a folding page which can be unfolded to display something
[22:44:48] <SleepingDragon> I dont think that would be needed.
[22:44:51] <SleepingDragon> But
[22:44:53] <Marzo> Neither do I
[22:44:59] <SleepingDragon> It would be nice to have different page shaoes
[22:45:09] <SleepingDragon> Say for a text with pictures
[22:45:10] <SleepingDragon> :P
[22:45:17] <Marzo> I assume 'shaoes' == 'sizes'?
[22:45:23] <SleepingDragon> shapes
[22:45:35] <Marzo> That would be more difficult
[22:45:36] <SleepingDragon> the statement thereafter puts it in context :P
[22:46:02] <Marzo> I finished typing before I read that line
[22:46:48] <Marzo> But I must say that I like the idea of text with pictures
[22:47:00] <Marzo> It would bring a whole new life to the Codex :-)
[22:47:20] <SleepingDragon> It could be neat to have one or two texts in the illuminated olf Medieval text, especially, say, the codex.
[22:47:27] <SleepingDragon> *olf / old
[22:47:31] * Marzo might rewrite the Codex to use book_mode_ex
[22:50:48] <Marzo> On another hand, display_map_ex now removes any excuses Crysta might have about finishing the TFL map :-)
[22:52:34] <Marzo> Making book_mode_ex accept the custom shapes and text areas will be easy, but having it accept images will not
[22:53:15] <Marzo> What I was thinking for it (which would likely be overkill) is to enable some sort of 'rft' syntax
[22:53:38] <Marzo> (allowing mixed font styles, as well as pictures, with some sort of markup code)
[22:53:59] <SleepingDragon> That would be overkill, but still nice.
[22:54:02] <Marzo> But it would be even harder, and for a dubious benefit
[22:54:08] <SleepingDragon> Would maybe allow a user to make "map notes"
[22:54:09] <Marzo> *for->of
[22:55:22] <Marzo> Well, I finished the 'getSpellRitual' function; now to make the spell system use it
[22:55:53] <Marzo> But I think I will deal the book_mode_ex first
[22:57:34] <SleepingDragon> Commit the ritual code please?
[22:58:01] <Marzo> It is just the function for now; it doesn't even get used
[22:58:08] <Marzo> (never called)
[22:58:24] <Marzo> And all the spells still have their rituals in place
[22:58:35] <Marzo> (I just copied it)
[22:59:03] <SleepingDragon> I wanna see the code :P
[22:59:21] <Marzo> It is a lookup table... not much to see :-)
[22:59:44] <Marzo> The basic idea can be gotten from the first few lines:
[22:59:53] <Marzo> var getSpellRitual(var circle, var spell)
[22:59:53] <Marzo> {
[22:59:53] <Marzo> var scr = new script { nohalt; };
[22:59:53] <Marzo> if (circle == 0) //linear spells
[22:59:53] <Marzo> if (spell == SPELL_AWAKEN)
[22:59:54] <Marzo> scr << { actor frame SWING_1; actor frame SWING_3; };
[22:59:56] <Marzo> else if (spell == SPELL_DOUSE)
[22:59:58] <Marzo> scr << { actor frame SWING_1; actor frame SWING_3; };
[23:00:15] <SleepingDragon> Hmm
[23:00:33] <Marzo> lots of lines suppressed
[23:00:34] <Marzo> return scr;
[23:00:35] <Marzo> }
[23:01:32] <SleepingDragon> So you're basically moving the pyshical actions out of the spell functions?
[23:01:40] <Marzo> The sfx, possible 'attack' command or function call will be delegated to a 'getSpellEffects' function
[23:01:44] <Marzo> Yes
[23:02:35] <Marzo> I am thinking of also adding a 'say getSpellBark(circle, spell);' just after the 'nohalt;'
[23:03:01] <Marzo> That, for now, is the very first stage though
[23:03:28] <Marzo> (I have begun this task in the last half hour or so, there wasn't time for much else)
[23:03:43] <SleepingDragon> Indeed
[23:03:50] <SleepingDragon> Modularizing spell code :-)
[23:03:50] <Marzo> Errr... one-and-a-half hour or so
[23:04:15] <Marzo> The spellbook override will be a hassle...
[23:04:49] <SleepingDragon> Indeed it will
[23:05:06] <SleepingDragon> It will be very handy to aspiring modders other than ourselves though, and is thus very useful, though :-)
[23:05:22] <Marzo> I don't know if you noticed, but there were some spells which I haven't made available for NPCs and hence didn't override
[23:05:53] <Marzo> (Help, Mark, Recall and Armagggedon)
[23:06:13] <SleepingDragon> Right.
[23:06:18] <Marzo> I did the minimum amount of overriding neccessary for multimap compatibility
[23:06:25] <SleepingDragon> Right.
[23:06:58] <SleepingDragon> In the sake of compliance we should have them changed over evnetually, but its not a huge priority
[23:07:00] <Marzo> I was thinking of adding them to the roll too
[23:07:12] <Marzo> Yeah, my thoughts more or less
[23:07:44] <Marzo> My justifications for not having done them:
[23:08:09] <Marzo> - Help: It sets a flag when you use it; you would be able to use only once
[23:08:33] <SleepingDragon> Have a isNPC check for them maybe/
[23:08:42] <SleepingDragon> and trip and abort if they are a NPC
[23:09:15] <Marzo> - Mark & Recall: Since they involve the Virtue Stones, I thought that they might make more sense for the avatar only (or maybe each NPC be only able to mark/recall the ones in which he is a partial avatar)
[23:09:45] <SleepingDragon> That would make sense for the companions, I think.
[23:09:49] <Marzo> - Armaggedon: No NPC would ever cast it -- even after the AI system were finished; so why bother?
[23:11:25] <SleepingDragon> Armageddon Im not worried about it.
[23:11:28] <Marzo> (it would take a truly fiendish mod-maker to have an NPC cast Armaggedon and ruin the game)
[23:11:35] <Marzo> Neither am I
[23:11:41] <SleepingDragon> It would be purely code compliance on Armageddon's count
[23:11:51] <Marzo> Yes
[23:12:02] <Marzo> But I don't know if it is worth it...
[23:12:02] <SleepingDragon> Nice and we should do it eventually, but its not a priority, let alone a high one :-)
[23:13:33] <Marzo> A quick question about the rituals -- should the spell bark be done with 'item_say' intrinsic as it currently is or be done through the 'say' script command as I am thinking? I have no real preference in the matter
[23:14:01] <SleepingDragon> Im not sure what the distinction is
[23:14:35] <Marzo> With the intrinsic, it would happen simultaneously with the first few moves in the ritual
[23:14:54] <Marzo> With the script command, it would displace the rest of the ritual by one tick
[23:15:02] <Marzo> Basically, one tick of difference :-)
[23:15:46] <Marzo> brb
[23:16:05] <SleepingDragon> Not that big of a diff :P
[23:16:07] <SleepingDragon> ok
[23:16:36] <Marzo> back
[23:16:56] <SleepingDragon> Say is the technically better one but theyres not a huge diff
[23:17:11] <Marzo> :-)
[23:17:29] <Marzo> I will add the 'say' then
[23:17:40] <Marzo> But first the book_mode_ex
[23:17:52] <SleepingDragon> :-)
[23:18:43] <Marzo> How is this for the interface: UI_book_mode_ex(int gumpshape, int fontshape, int[] textareas)
[23:19:40] <Marzo> textareas[] can have 4 or 8 components, on the form of [x, y, width, height] or [x1, y1, width1, height1, x2, y2, width2, height2]
[23:20:25] <Marzo> What determines if it is a scroll or a book is if textareas[] has 4 or 8 components (being scroll or book, respectivelly)
[23:21:06] <SleepingDragon> Hmm
[23:21:17] <SleepingDragon> Hmm
[23:21:21] <SleepingDragon> gumpshape
[23:21:24] <Marzo> If textareas is zero, Exult uses the default text areas and decides based on the gumpshape if it is a scroll or a book
[23:21:37] <SleepingDragon> I dunno
[23:22:03] <SleepingDragon> have it able to take named constants "book" or "scroll" to use the defaults, otherwise use the gump number specified?
[23:22:08] <SleepingDragon> Perhaps?
[23:23:10] <Marzo> Hm; that is a thought
[23:23:47] <Marzo> Or maybe having gumpshape = -1 => default scroll, gumpshape = -2 => default book?
[23:25:24] <Marzo> Oh, before I forget: book_mode_ex does not perform any translation (like standard book_mode does) if the READ flag is set
[23:25:47] <Marzo> I did this intentionally, so that you can provide alternative text if desired
[23:26:02] <SleepingDragon> That would work as long as you document it
[23:26:10] <Marzo> Indeed
[23:27:09] <Marzo> (the example that came to mind is gargish -- add a gargish font, and write the text in gargish, using a gargish font, and you would need a translation other than simply changing the font)
[23:27:53] <Marzo> It will be handy for mikefictici0us if he ever goes forward with his U6 conversion :-)
[23:29:00] <Marzo> A question: is there a real need to set custom text areas for books and scrolls?
[23:29:20] <Marzo> I think I am going the lazy way and doing it differently
[23:29:42] <Marzo> Say: UI_book_mode_ex(bool is_scroll, int gumpshape, int fontshape)
[23:29:55] <SleepingDragon> Right.
[23:30:09] <Marzo> If gumpshape < 0, use the default scroll/book
[23:30:51] <SleepingDragon> I think, have (bool is_scroll, int fontshape, int gumpshape)
[23:30:56] <SleepingDragon> have gumpshape optional
[23:31:00] <SleepingDragon> If it is supplied, use that gump
[23:31:14] <SleepingDragon> if not use default book or scroll as indicated by presence of is_scroll
[23:31:31] <Marzo> I am trying to avoid overloaded intrinsics, as it seems a design phylosophy in Exult
[23:32:47] <Marzo> But what the heck -- this intrinsic would not be used with enough frequency to give a performance for checking the number of parameters, so I'll overload it :-)
[23:33:53] <SleepingDragon> Dont use overloaded intrinsics too much, but in cases like this, it's useful and neccesary, IMO.
[23:34:52] <Marzo> DrCode gave to reasons to avoid overloading intrinsics -- the performance hit and that it may lead to confusing code
[23:35:31] <Marzo> In this case, the performance hit will be nearly non-existant while the code will not neccessarily be confusing
[23:35:36] <Marzo> So I'll risk it
[23:36:13] <SleepingDragon> :-)
[23:40:15] <Marzo> So, how useful do you think that a 'continue' command (similar to C++'s continue) would be?
[23:42:01] <SleepingDragon> I actually wouldn't know.
[23:42:46] <Marzo> Why not?
[23:45:10] <Marzo> OK, the new book_mode_ex intrinsic is done
[23:46:44] <SleepingDragon> I havent really had any code thats been in situations like that, where that would be useful.
[23:46:56] <Marzo> :-)
[23:47:36] <Marzo> I know it could be for ucxt output, but I haven't come around to that too, I must say
[23:49:08] <SleepingDragon> Heh
[23:56:56] <Marzo> UI_book_mode_ex(bool is_scroll, int font)
[23:56:57] <Marzo> UI_book_mode_ex(bool is_scroll, int font, int gump)
[23:57:01] <Marzo> Used to display books and scrolls; displays a book gump if 'show_loc' is
[23:57:01] <Marzo> 'false' or a scroll shape if it is 'true'. The font shape in 'FONTS.VGA'
[23:57:01] <Marzo> used to render the text is specified in 'font'. If 'gump' is specified, and
[23:57:01] <Marzo> is >=0, will use it as being the shape from 'GUMPS.VGA' to display; if
[23:57:01] <Marzo> 'gump' <= -1, will use the default shapes for scrolls and books instead.
[23:57:05] <SleepingDragon> whee
[23:57:10] <Marzo> **** IMPORTANT NOTE *****
[23:57:10] <Marzo> Unlike the 'UI_book_mode' intrinsic, this intrinsic performs *no*
[23:57:10] <Marzo> translation of any kind if the avatar's 'READ' flag is set. This is an
[23:57:10] <Marzo> intentional design feature -- for example, text written in Gargish and
[23:57:10] <Marzo> being displayed in a Gargish font should be translated by more than a mere
[23:57:12] <Marzo> font substitution.
[23:57:14] <Marzo> ** END IMPORTANT NOTE ***
[23:57:26] <Marzo> That just about covers it, right?
[23:57:39] <Marzo> Oh, wait...
[23:57:58] <Marzo> Maybe also explain that it will write the text to the same areas?
[23:58:15] <Marzo> (so that gumps have to have compatible shapes)
[23:58:31] <SleepingDragon> Yes