#tfl@irc.freenode.net logs for 21 Sep 2006 (GMT)

Archive Today Yesterday Tomorrow
tfl homepage

[00:00:03] <wizardrydragon> Cluck, I say
[00:00:06] * Marzo prepares to administer emergency CPR
[00:00:28] <Marzo> UCC classes are mostly done
[00:01:31] <wizardrydragon> if (classes_done == true)
[00:01:31] <wizardrydragon> {
[00:01:31] <wizardrydragon> world -> destroy
[00:01:31] <wizardrydragon> }
[00:01:43] <Marzo> lol
[00:01:56] <Marzo> I have even commited a lot of code
[00:02:04] <wizardrydragon> Executable?
[00:02:16] <Marzo> I am affraid I will get blocked in the cvs list for spamming :-)
[00:02:37] <Marzo> I am finishing a few things now, and will send exes as soon as I am finished
[00:02:44] <wizardrydragon> Lol
[00:02:48] <Marzo> I am working on getting static arrays working
[00:03:09] <wizardrydragon> I commit to CVS every time I have a change that I have made that is stable
[00:03:09] <Marzo> The class stuff is really mostly done
[00:03:24] <Marzo> It *is* stable
[00:03:44] * wizardrydragon was waiting for the witty comment about his lack of commits.
[00:04:04] <Marzo> I have made a commit to TFL too
[00:04:10] <wizardrydragon> Lol
[00:04:23] * wizardrydragon found an original copy of Borland Delphi when he was going through his CDs
[00:04:27] <Marzo> Fixing usecode; several functions with too many (or too few) parameters
[00:05:01] <Marzo> Also, fixing functions which returned no values while declared as returning them and the reverse too
[00:05:51] <wizardrydragon> I think what youre saying must be secret code for "update your files, moron"
[00:06:01] <wizardrydragon> :)
[00:06:02] <Marzo> lol
[00:06:19] <Marzo> Several of these I introduced when I merged in the Q&I mod
[00:06:27] <wizardrydragon> Actually if it wasnt in the Karma, Random Quests, or House System code, I didnt do it
[00:06:29] <wizardrydragon> So hah
[00:06:31] <Marzo> The rest were all in the Karma code
[00:06:47] <wizardrydragon> Mind you a lot of the Karma code is being rewritten
[00:06:57] <wizardrydragon> To get rid of the awful hacks for npc props
[00:07:14] <Marzo> Didn't you commit that to CVS already?
[00:07:20] <wizardrydragon> No
[00:07:26] <wizardrydragon> Not the Karma changes
[00:07:48] <wizardrydragon> just the map changes and an unrelated usecode fix
[00:07:49] <Marzo> In any case, I think I that classes can make your life easier with the karma code
[00:08:03] <wizardrydragon> static variables that work would make my life easier
[00:08:19] <Marzo> Let me just finish loops with static arrays and I'll explain it better
[00:08:50] <wizardrydragon> Mmmm shiny DevC++ goodness
[00:09:06] <Marzo> ?
[00:09:18] <wizardrydragon> What, dont use DevC++?
[00:09:27] <Marzo> I use at work
[00:09:39] <Marzo> At home, I use VC++ 2005 Express Edition
[00:09:41] <wizardrydragon> Its a IDE that uses the GCC compiler. I use it for compiling Exult and random C++ mucking about
[00:10:25] <wizardrydragon> Or in the most recent case, I used my old (2003) version of DevC++ to compile the latest source :)
[00:10:50] <wizardrydragon> the latest source version of DevC++, that is
[00:37:11] <Marzo> Loops with static arrays now work
[00:38:32] <wizardrydragon> yay
[00:38:38] <wizardrydragon> UCC executable?
[00:39:17] <Marzo> Given that you can now get/set elements of static arrays, and that they can now be used in loops; is there any more problems with static vars which I am not remembering?
[00:40:03] <wizardrydragon> normal static vars werent get/set -ing properly
[00:40:42] <Marzo> This one should be working; especially considering that I stole a lot of code from them to get static arrays working
[00:40:56] <wizardrydragon> Id hope so then
[00:41:00] <wizardrydragon> Exe?
[00:41:10] <Marzo> I will upload it; please stand by
[00:47:40] <Marzo> Here it is: http://www.geocities.com/mg_rpg_online/Exult.zip
[00:48:01] <Marzo> Syntax for declaring class variables:
[00:48:16] <Marzo> class<Classname> varname
[00:48:32] <wizardrydragon> varname? you mean the type?
[00:48:39] <Marzo> This goes for function parameters, function returns and variables themselves
[00:48:53] <Marzo> No, the type is class<Classname>
[00:49:11] <wizardrydragon> hmm
[00:49:21] <Marzo> To declare a class itself, it is like this:
[00:50:01] <Marzo> class Classname [: Baseclass] { var decls. method decls. }
[00:50:10] <Marzo> The items in [] being optional
[00:50:28] <wizardrydragon> okay i think im going to need an example :P
[00:51:00] <Marzo> An example of two class definitions (outside any functions) including inheritance:
[00:51:03] <Marzo> class NPCSay
[00:51:04] <Marzo> {
[00:51:04] <Marzo> var facenpc;
[00:51:04] <Marzo> speak (var text)
[00:51:04] <Marzo> {
[00:51:04] <Marzo> facenpc->say(text);;
[00:51:06] <Marzo> facenpc->hide();
[00:51:08] <Marzo> }
[00:51:10] <Marzo> }
[00:51:12] <Marzo> class FaceSay : NPCSay
[00:51:14] <Marzo> {
[00:51:16] <Marzo> var facenum;
[00:51:18] <Marzo> speak (var text)
[00:51:20] <Marzo> {
[00:51:22] <Marzo> facenpc->hide();
[00:51:24] <Marzo> facenpc->show_npc_face(facenum);
[00:51:26] <Marzo> NPCSay::speak(text);
[00:51:28] <Marzo> }
[00:51:30] <Marzo> inc_facenum ()
[00:51:32] <Marzo> { facenum = facenum + 1; }
[00:51:34] <Marzo> reset_facenum ()
[00:51:36] <Marzo> { facenum = 0; }
[00:51:38] <Marzo> var get_facenum()
[00:51:40] <Marzo> { return facenum; }
[00:51:42] <Marzo> }
[00:51:48] <Marzo> An example of declaring classes in a function:
[00:52:28] <Marzo> class<FaceSay> test = new FaceSay(-356, 0);
[00:52:29] <Marzo> class<FaceSay> test2;
[00:52:29] <Marzo> test2 = new FaceSay(-356, 2);
[00:52:39] <Marzo> You can delete a class like this:
[00:52:45] <Marzo> delete test2;
[00:53:23] <Marzo> Since FaceSay is derived from NPCSay, you can convert any instances of FaceSay to NPCSay
[00:54:11] <Marzo> By default, these classes will still be FaceSay for purposes of class vars and functions, but UCC will treat them as NPCSay
[00:54:18] <Marzo> * otherwise
[00:55:37] <Marzo> In function 'speak' of class 'FaceSay', you see a call to function 'NPCSay::speak'; this means that the function 'speak' of class 'NPCSay' will be called
[00:55:54] <Marzo> To call a member function outside a class, do it like this:
[00:56:06] <Marzo> test2->speak("text");
[00:57:02] <Marzo> In all class functions, the variable 'this' is defined implicitly and has the same type as the class; it can be used to return 'pointers' to the variable
[00:57:08] <Marzo> *variable->class
[00:58:07] <Marzo> Currently, you must use member functions to get/set class member vars (which cannot be classes) after you initialize them with the 'new Classname()' constructor
[00:58:29] <Marzo> I am still writing the ConTEXT highlighter file, should be done shortly
[00:58:34] <Marzo> Any more questions?
[00:59:05] <wizardrydragon> HHHHmm
[00:59:36] <wizardrydragon> Is it possible to have a class definition that includes subclasses?
[00:59:48] <Marzo> What do you mean by subclasses?
[01:00:10] <wizardrydragon> Well, Im thinking you have generic karma, then karma for compassion, justice, etc
[01:00:19] <Marzo> Oh, the inheritance
[01:00:37] <wizardrydragon> Theyd all use the same functions
[01:00:44] <wizardrydragon> But the variables themself would be different
[01:00:45] <Marzo> Take a look at the example I gave: 'class FaceSay : NPCSay'
[01:01:18] <Marzo> Strictly speaking, you'd need only to have multiple instances of a base Karma class
[01:01:40] <Marzo> Each one with its own variable and each named after a virtue
[01:01:54] <Marzo> They can even be static and global
[01:02:02] <wizardrydragon> Treu
[01:02:05] <wizardrydragon> *True
[01:04:12] <wizardrydragon> Can they have more than one function?
[01:04:23] <wizardrydragon> Ie, for karma you'd need get/set, obviously
[01:04:28] <Marzo> Yes; as many as you want, in fact
[01:04:40] <wizardrydragon> sweet
[01:04:56] <Marzo> I am starting to work on 32-bit function IDs to ensure that it will really be 'as many as you want'
[01:05:05] <wizardrydragon> Lol
[01:05:15] * wizardrydragon was just going to make a witty remark about that
[01:05:29] * Marzo knows that, which is why he made the comment
[01:05:35] <wizardrydragon> lol
[01:10:28] <wizardrydragon> Actually if there's any code the classes will help, its the random quest code
[01:10:41] <Marzo> Possibly
[01:14:01] <Marzo> FYI: 'item' is not guaranteed to be meaningful inside a class function, so it is best to avoid it
[01:17:12] <wizardrydragon> hrm
[01:18:14] <Marzo> I mean, it will retain its value when you call a member function, but you have no way of setting it
[03:20:31] <Marzo> Good night
[03:30:22] <-- Marzo has left IRC ("Marzo vanishes suddenly.")
[05:02:25] <-- wizardrydragon has left IRC (Read error: 110 (Connection timed out))
[13:23:35] --> Marzo has joined #tfl
[13:23:35] --- ChanServ gives channel operator status to Marzo
[13:23:56] <-- Marzo has left IRC (Client Quit)
[17:12:15] --> wizardrydragon has joined #tfl
[17:12:21] --- ChanServ gives channel operator status to wizardrydragon
[22:36:45] --> Marzo has joined #tfl
[22:36:45] --- ChanServ gives channel operator status to Marzo
[22:36:57] <Marzo> Hi
[23:28:29] * Marzo pokes wizardrydragon with the Death Scythe
[23:28:43] <Marzo> exultbot: Hi
[23:28:43] <exultbot> Hi Marzo!
[23:28:51] <Marzo> At least exultbot answers :-)
[23:30:35] <servus> exultbot: Hi
[23:30:35] <exultbot> Hi servus!
[23:30:43] <servus> I was hoping exultbot would have a special message for me.
[23:30:50] <Marzo> lol
[23:30:58] <Marzo> Try ?seen servus
[23:31:08] <Marzo> Like this:
[23:31:09] <servus> exultbot: Nose
[23:31:12] <Marzo> ?seen servus
[23:31:12] <exultbot> servus is right here!
[23:31:20] <Marzo> ?Marzo
[23:31:22] <servus> I know, that's a common response among bots
[23:31:25] <Marzo> ?seen Marzo
[23:31:25] <exultbot> That's you!
[23:31:35] <Marzo> ?seen Crysta
[23:31:35] <exultbot> crysta left IRC around Tue Sep 19 03:01:58 2006 (GMT) ("Trillian (http://www.ceruleanstudios.com")
[23:31:39] <servus> exultbot: Name
[23:31:41] <servus> exultbot: Job
[23:31:45] <servus> exultbot: Bye
[23:31:45] <exultbot> goodbye!
[23:31:50] <Marzo> Yeah, I tried those
[23:31:56] <servus> exultbot: Health
[23:32:02] <Marzo> Name and Job seems to have been disabled
[23:32:09] <servus> I rememer text adventure NPCs responding to "NPC" often
[23:32:32] <Marzo> There was also 'url' and 'exult' commands, but they also don't seem to work anymore
[23:32:53] <servus> Channel specific.
[23:33:10] <Marzo> Yeah, I thought so
[23:33:34] <Marzo> Name doesn't work in #exult too, so wjp may have disabled it
[23:34:46] <servus> ?exult
[23:34:50] <servus> ?tfl
[23:37:47] * wizardrydragon is quite dead after being poked with the Death Scythe.
[23:40:27] <servus> Is the TFL map done yet?
[23:44:11] <wizardrydragon> Its not going to be done for a while.
[23:44:25] <wizardrydragon> Read: It'll be done when it's done. :P
[23:45:54] <servus> I meant the U7MAP.
[23:46:03] <servus> Are all the last pieces fixed up?
[23:46:06] <wizardrydragon> Ah. Yes, it is for the moment.
[23:46:24] <wizardrydragon> I have to clean up the forests but that's nitpicking.
[23:46:38] <servus> The forests should be very clean AFAIK
[23:46:53] <wizardrydragon> Yes but the ground doesnt match up.
[23:46:58] <wizardrydragon> As I said, nitpicking.
[23:48:27] <servus> In the last TFL map I have, the forests look nearly flawless - the best part of the construction
[23:48:36] <wizardrydragon> Oh?
[23:48:47] <servus> Are you talking about grass patches?
[23:48:52] <wizardrydragon> Yes.
[23:49:13] <servus> That's normal. It matches two end-forest pieces as an interior join. I like the way it looks
[23:49:55] <servus> It's like animal trails... it reminds me a lot of Silverleaf. I think it's keen
[23:50:05] <wizardrydragon> Hmm
[23:50:21] <wizardrydragon> The borders in the one I have are non existent as well, however
[23:50:32] <servus> What borders?
[23:50:38] <servus> Forest to true-grass interface?
[23:50:45] <wizardrydragon> The transition from forest to not so forest
[23:52:43] <servus> I see only two misplaced chunks here: http://sammatthews.com/images/Exult3D/u7mapper-out6.png - one is just under the cursor
[23:53:41] <wizardrydragon> In my version it just goes from forest to grass with minimal border chunks, mind you I used one of the earlier u7maps
[23:56:04] <servus> well does it look as good as my screenshot?
[23:56:18] <servus> That's in the southwest area, Match 'em up
[23:57:01] <wizardrydragon> One moment.