Chaos on Autonomon Configuration

From LSWiki

Jump to: navigation, search

This is 'man chaos_autonomon_1' (/txt/doc/classes/chaos_autonomon_1) inside the MUD, and may be more readable there.

   [2006-04-23 16:28:09] [Workshop Chaos] test baby test baby 1 2 3 4
   [2006-04-23 16:28:45] [Workshop Chance] Booga
   [2006-04-23 20:05:29] [Workshop Chaos] test
   [2006-04-23 20:38:31] [Workshop Chaos] test
   [2006-04-23 20:38:37] [Workshop Nyx] Oh, fancy.
   [2006-04-23 20:38:43] [Workshop Chaos] nothing but the best
   [2006-04-23 20:38:58] [Workshop Chaos] now 'log workshop'
   [2006-04-23 20:39:16] [Workshop Chaos] hm
   [2006-04-23 20:42:51] [Workshop Chaos] i have a channel ;)
   [2006-04-23 20:42:53] [Workshop Chaos kicks Chance]
   [2006-04-23 20:43:03] [Workshop Nyx] But a workshop room would be cute.
   [2006-04-23 20:43:07] [Workshop Chaos] well, what i was thinking of starting with was
   /obj/examples/autonomon.c
   [2006-04-23 20:43:11] [Workshop Chaos] true
   [2006-04-23 20:43:19] [Workshop Chaos] but we've stalled enough without waiting to
   make one ;)
   [2006-04-23 20:43:21] [Workshop Chaos] so maybe next time
   [2006-04-23 20:43:53] [Workshop Chaos] but yeah, autonomon example, figure we can chew
   through that one bit at a time
   [2006-04-23 20:43:59] [Workshop Chaos] sound like an idea?
   [2006-04-23 20:44:25] [Workshop Nyx] Joku's not on the channel?
   [2006-04-23 20:44:33] [Workshop Chaos] oh, heh
   [2006-04-23 20:45:25] [Workshop Chaos] he'd been logged on for too long
   [2006-04-23 20:46:54] [Workshop Chaos] can just work through it at whatever pace
   [2006-04-23 20:46:58] [Workshop Chaos] and use the damn channel chance
   [2006-04-23 20:47:00] [Workshop Chaos smirks]
   [2006-04-23 20:47:04] [Workshop Chaos] alias ws to workshop
   [2006-04-23 20:47:20] [Workshop Chance] no
   [2006-04-23 20:47:24] [Workshop Chance] i'll use q, instead
   [2006-04-23 20:47:36] [Workshop Chaos] and not for quote?  heresy
   [2006-04-23 20:47:42] [Workshop Chaos] so ANYWAY
   [2006-04-23 20:47:48] [Workshop Chaos] unless i hear some more objections
   [2006-04-23 20:48:00] [Workshop Chaos] let's turn our attention to
   /obj/examples/autonomon.c
   [2006-04-23 20:48:38] [Workshop Chance] nice use of your fucking channel
   [2006-04-23 20:49:07] [Workshop Chaos] thanks ;)
   [2006-04-23 20:49:31] [Workshop Chaos] so, yeah, THAT never happened... ahem
   [2006-04-23 20:49:33] [Workshop Chaos] // Example of autonomon construction, with
   explanatory comments
   [2006-04-23 20:49:33] [Workshop Chaos] //
   [2006-04-23 20:49:33] [Workshop Chaos] // Chaos '95, '97
   [2006-04-23 20:49:33] [Workshop Chaos] //
   [2006-04-23 20:49:33] [Workshop Chaos] // Revised by Chaos, Tue Oct 19 18:20:01 EDT
   2004
   [2006-04-23 20:49:33] [Workshop Chaos] //
   [2006-04-23 20:49:33] [Workshop Chaos] // Revised by Chaos, Sun Dec 18 00:25:16 CST
   2005
   [2006-04-23 20:49:39] [Workshop Chaos] our lovely comment block
   [2006-04-23 20:49:41] [Workshop Nyx] Don't blush, Chaos. Don't do it.
   [2006-04-23 20:49:51] [Workshop Chaos smirks]
   [2006-04-23 20:49:55] [Workshop Chance] actually, i thought comment blocks were /* */
   [2006-04-23 20:50:17] [Workshop Chaos] there are two kinds of comments, those are
   C-style, the // are C++ style
   [2006-04-23 20:50:33] [Workshop Chaos] /* starts a comment that */ terminates, where a
   // comment just goes to end of line
   [2006-04-23 20:50:51] [Workshop Chaos] i tend to prefer C++ style
   [2006-04-23 20:51:15] [Workshop Chaos shrugs]
   [2006-04-23 20:51:25] [Workshop Chaos] if you wanna call one a comment 'block' and not
   the other, okay ;)
   [2006-04-23 20:51:37] [Workshop Chaos] #include <Project.h>
   [2006-04-23 20:51:37] [Workshop Chaos] #include <autonomon.h>
   [2006-04-23 20:51:37] [Workshop Chaos] _
   [2006-04-23 20:51:37] [Workshop Chaos] inherit "/std/autonomon";
   [2006-04-23 20:51:37] [Workshop Chaos] _
   [2006-04-23 20:52:01] [Workshop Chaos] project master include file, omnibus include for the type of thing we're making, and base class
   inherit
   [2006-04-23 20:52:24] [Workshop Chaos] the omnibus include thing clear to you guys?
   [2006-04-23 20:52:30] [Workshop Chance] so this particular convo isn't going into
   depth in each part
   [2006-04-23 20:52:54] [Workshop Chaos] well, i know the two of you are both conversant
   with the project architecture thing
   [2006-04-23 20:53:04] [Workshop Nyx] Cloudy for me, but vaguely understandable. I've
   already lost most of what I've learned thusfar, due to lack of use/refresher. :P
   [2006-04-23 20:53:06] [Workshop Chaos] so i was going to save the in-depth for later
   [2006-04-23 20:53:10] [Workshop Chaos nods]
   [2006-04-23 20:53:28] [Workshop Chaos] hm, well, let's slow down on those a bit then
   [2006-04-23 20:53:46] [Workshop Nyx] I'm shtupid. :)
   [2006-04-23 20:54:04] [Workshop Chaos] #include <Project.h> is an example of including
   our project include file, which 'man projects' has good reference stuff on
   [2006-04-23 20:54:12] [Workshop Nyx nods]
   [2006-04-23 20:54:12] [Workshop Chaos] yay we can be shtupid together
   [2006-04-23 20:54:38] [Workshop Nyx] Yay.
   [2006-04-23 20:54:40] [Workshop Chaos] project master file defines things like
   Project_Room(), Project_Monster(), and so on, giving us a nice pretty maintainable way
   of talking about our files
   [2006-04-23 20:54:40] [Workshop Nyx] Phone again :(
   [2006-04-23 20:54:48] [Workshop Chaos] ws :hehs
   [2006-04-23 20:54:54] [Workshop Chaos hehs even]
   [2006-04-23 20:55:53] [Workshop Chaos] in the inherit "/std/autonomon" we're saying
   that we want the object we're defining to be an autonomon, and to get all the
   functionality that normally comes with that
   [2006-04-23 20:57:11] [Workshop Chaos] the #include <autonomon.h> is including a sort
   of "shorthand" include file that, in turn, includes a whole bunch of other .h files
   that you're likely to need when working with an autonomon... skills.h, identity.h,
   sex.h, special_attack.h, all kinds of stuff
   [2006-04-23 20:57:39] [Workshop Chaos] it's /lib/autonomon.h if you want to look at
   it... item.h, room.h, and daemon.h are similar for different kinds of object
   [2006-04-23 20:58:09] [Workshop Chaos] questions?
   [2006-04-23 20:58:51] [Workshop Chaos] okay, next bit:
   [2006-04-23 20:58:53] [Workshop Chaos] void configure() {
   [2006-04-23 20:58:53] [Workshop Chaos]     ::configure();
   [2006-04-23 20:59:50] [Workshop Chaos] here we are saying that we want to define a
   function called "configure", that does not output any information (that's what the
   'void' means) and does not take any arguments (the () after it is an empty argument
   list)
   [2006-04-23 21:00:50] [Workshop Chaos] we're defining a function called configure()
   because that function, and several others, are guaranteed to be called when the object
   is loaded, so we can put instructions for how we want the object initially set up in
   it
   [2006-04-23 21:01:32] [Workshop Chaos] the { is the beginning of the function's
   contents; it will later be closed with a }
   [2006-04-23 21:02:55] [Workshop Joku] o hi
   [2006-04-23 21:02:57] [Workshop Chaos] saying ::configure(); means we want to call the
   function "configure" that /std/autonomon defines... we absolutely must do this because
   our base file does a lot of important stuff in its configure() function that will
   cause breakage if we stop it from being called
   [2006-04-23 21:02:59] [Workshop Chaos] yeah hi
   [2006-04-23 21:03:57] [Workshop Chaos :configure(); has a semicolon on the end because
   it constitutes exactly one LPC statement; the semicolon is the statement terminator
   mark, and is required to tell LPC that we're done telling it to do one thing and will
   now be moving on to telling it another]
   [2006-04-23 21:04:01] [Workshop Chaos] meh
   [2006-04-23 21:04:55] [Workshop Chaos] questions?
   [2006-04-23 21:05:19] [Workshop Joku] why does it has :: before it
   [2006-04-23 21:05:37] [Workshop Chaos] that's how we tell it "one level up the
   inheritance tree"
   [2006-04-23 21:05:47] [Workshop Chaos] you could also write autonomon::configure();
   [2006-04-23 21:06:01] [Workshop Chaos] meaning call configure() as defined in the
   autonomon module
   [2006-04-23 21:06:19] [Workshop Chaos] and you do that sort of syntax when you're
   inheriting multiple things
   [2006-04-23 21:06:21] [Workshop Joku] ah ok as opposed to the void configure
   beforehand?
   [2006-04-23 21:06:29] [Workshop Chaos] but if we're just inheriting one thing, we can
   just use ::configure()
   [2006-04-23 21:06:33] [Workshop Joku] hrm
   [2006-04-23 21:06:39] [Workshop Chaos] the void configure() is a function declaration
   [2006-04-23 21:06:51] [Workshop Chaos] we're saying we want to define a function
   called that
   [2006-04-23 21:06:58] [Workshop Chaos] the ::configure() is a function call
   [2006-04-23 21:07:10] [Workshop Joku] ok and the ::configure() gets all that from the
   autonomon
   [2006-04-23 21:07:12] [Workshop Chaos] we're actually calling the configure() function
   one step up the hierarchy, in our base object, /std/autonomon
   [2006-04-23 21:07:32] [Workshop Joku] k
   [2006-04-23 21:07:34] [Workshop Chaos nods]
   [2006-04-23 21:07:44] [Workshop Chaos] anything else?
   [2006-04-23 21:07:48] [Workshop Joku] newp
   [2006-04-23 21:08:16] [Workshop Chaos]     // Set the autonomon's race.  If we wanted
   a specific sex, we would set it
   [2006-04-23 21:08:16] [Workshop Chaos]     // after the race, but we're comfortable
   with the default behavior, which
   [2006-04-23 21:08:16] [Workshop Chaos]     // is to let the system select a sex
   according to those typical to the
   [2006-04-23 21:08:16] [Workshop Chaos]     // race.  It's always best to call
   set_race() right away.
   [2006-04-23 21:08:16] [Workshop Chaos]     set_race("orc");
   [2006-04-23 21:09:16] [Workshop Chaos] here, what we're doing is calling another
   function, this one called set_race()
   [2006-04-23 21:10:08] [Workshop Chaos] if we're doing this, it must mean that
   /std/autonomon or something it in turn inherits defines that function, either that or
   the function is defined globally
   [2006-04-23 21:10:16] [Workshop Chaos] as it turns out, it's the former here
   [2006-04-23 21:10:27] [Workshop Joku] nod
   [2006-04-23 21:10:33] [Workshop Chaos] we're sending this function one argument, a
   string "orc"
   [2006-04-23 21:10:51] [Workshop Chaos] double quotes are how you specify a string,
   obviously
   [2006-04-23 21:11:49] [Workshop Chaos] it's good to define the race early on in the
   file so that anything that might depend on it later doesn't get confused... you
   especially have to call it before you do set_level()
   [2006-04-23 21:15:35] [Workshop Chance] heh, thought you sid "it's the fomor here"
   [2006-04-23 21:15:45] [Workshop Chaos laughs]
   [2006-04-23 21:15:51] [Workshop Chance] why doesn't inheriting inherit includes
   [2006-04-23 21:16:05] [Workshop Chaos] ahh, now there's a kinda interesting bit
   [2006-04-23 21:16:17] [Workshop Chaos] that's to do with someone we call the
   'preprocessor'
   [2006-04-23 21:16:31] [Workshop Chaos] it turns out that #include and #define type
   statements are kinda not part of "real" LPC
   [2006-04-23 21:16:37] [Workshop Joku] heh
   [2006-04-23 21:16:51] [Workshop Chaos] they're almost their own separate language that
   gets applied to LPC code before it's reallycompiled
   [2006-04-23 21:16:59] [Workshop Chance nods]
   [2006-04-23 21:17:10] [Workshop Joku] so does include include inherits?!
   [2006-04-23 21:17:32] [Workshop Chaos] the preprocessor would, for example, take a
   #define Foo 27 and run through the file replacing instances of Foo with 27, before
   then handing it off to the true LPC compiler
   [2006-04-23 21:17:42] [Workshop Chaos] yes, because includes are of arbitrary text
   [2006-04-23 21:17:52] [Workshop Joku] ah right
   [2006-04-23 21:17:56] [Workshop Joku] i keep typing workship
   [2006-04-23 21:18:02] [Workshop Chaos] so now when we're inheriting, that's something
   that happens at LPC level
   [2006-04-23 21:18:26] [Workshop Chaos] which means it's happening to code that the
   preprocessor is already completely done with and has handed over to the compiler
   [2006-04-23 21:18:43] [Workshop Chaos] so basically, by the time something is
   inherited, its #includes and #defines and such don't really exist any more
   [2006-04-23 21:18:59] [Workshop Joku] oic
   [2006-04-23 21:19:01] [Workshop Chaos] and what's why inherits don't inherit #includes
   or #defines
   [2006-04-23 21:19:33] [Workshop Chance] so you need to reinclude things in every file,
   even tho it inherits others
   [2006-04-23 21:19:47] [Workshop Chaos] yup
   [2006-04-23 21:19:57] [Workshop Chaos] hence why we have those omnibus include files
   now
   [2006-04-23 21:20:09] [Workshop Chaos] because it got really annoying #including all
   the millions of things you could need
   [2006-04-23 21:20:15] [Workshop Joku] wat omnibus include files, like autonomon?
   [2006-04-23 21:20:27] [Workshop Chaos] yup
   [2006-04-23 21:20:29] [Workshop Joku] k
   [2006-04-23 21:20:47] [Workshop Chaos] any more questions about that?
   [2006-04-23 21:21:25] [Workshop Chaos kicks Chance in the head]
   [2006-04-23 21:21:45] [Workshop Chance] Sorry, do inherited files inherit inherits
   from the inherited file
   [2006-04-23 21:21:58] [Workshop Chaos] yes indeed
   [2006-04-23 21:22:08] [Workshop Chaos] when you inherit something, you're inheriting
   everything it inherits in turn
   [2006-04-23 21:22:24] [Workshop Chaos] same applies to includes, really
   [2006-04-23 21:22:24] [Workshop Chance] so files inherit inherits from inherited
   files, and include includes from included files, but dont inherit includes from
   inherited files
   [2006-04-23 21:22:26] [Workshop Chaos] in its own way
   [2006-04-23 21:22:30] [Workshop Chaos] right
   [2006-04-23 21:22:38] [Workshop Chance] sorry, i just wanted to say that, long leadin
   i know
   [2006-04-23 21:22:38] [Workshop Joku] so basically inheriting would be like writing
   the entire file right into the file ur writing
   [2006-04-23 21:22:40] [Workshop Chaos] because they're mechanisms that happen at
   different levels of the process, basically
   [2006-04-23 21:22:46] [Workshop Chance] except the includes, joku
   [2006-04-23 21:22:46] [Workshop Chaos smirks]
   [2006-04-23 21:22:50] [Workshop Joku] ya
   [2006-04-23 21:22:56] [Workshop Chance nods]
   [2006-04-23 21:23:10] [Workshop Chaos] that's really more what an include is joku
   [2006-04-23 21:23:24] [Workshop Chaos] the reason we have inheritance and not just
   inclusion is that it's more efficient than that
   [2006-04-23 21:23:36] [Workshop Chance] oh, because it just waits for you to call a
   function in the inherited file?
   [2006-04-23 21:23:40] [Workshop Chance] rather than put all the file in
   [2006-04-23 21:23:44] [Workshop Chaos] and it understands the relationshop between the
   different objects
   [2006-04-23 21:23:56] [Workshop Joku] ic
   [2006-04-23 21:24:10] [Workshop Chaos] well, it doesn't define a new copy of the code
   [2006-04-23 21:24:14] [Workshop Chaos] which is what you'd get with inclusion
   [2006-04-23 21:24:26] [Workshop Chaos] it just references the parent class's code
   [2006-04-23 21:24:47] [Workshop Chaos] if we included for everything instead of
   inheriting, it'd be insanely memory abusive
   [2006-04-23 21:25:21] [Workshop Chaos] not that we really could do that
   [2006-04-23 21:25:51] [Workshop Chaos] any more on that then?
   [2006-04-23 21:26:35] [Workshop Chaos] k... meanwhile, back at the ranch, Junior had
   just defined his autonomon's race as "orc"
   [2006-04-23 21:27:35] [Workshop Chaos] incidentally, what we're doing there is telling
   the system what race definition from /def/race we want our autonomon to be defined in
   terms of
   [2006-04-23 21:29:40] [Workshop Chaos] anything about that?
   [2006-04-23 21:30:04] [Workshop Joku] nope
   [2006-04-23 21:30:14] [Workshop Chaos] k... now something we might do for more "NPC"
   as opposed to "monster" autonomones, at this point, is e.g. set_sex(Sex_Male);
   [2006-04-23 21:30:26] [Workshop Chaos] not doing that in /obj/examples/autonomon.c,
   but it's relevant
   [2006-04-23 21:30:48] [Workshop Chaos] this is ofc very similar to configuring race,
   except instead of sending a string we're sending Sex_Male
   [2006-04-23 21:30:58] [Workshop Chaos] which happens to be a macro defined by
   /lib/sex.h
   [2006-04-23 21:31:45] [Workshop Chaos] in the past, people have been known to be
   literally too lazy to #include the header files that define these macros, but to look
   in them and use the literal integer numbers instead of the macros.
   [2006-04-23 21:31:49] [Workshop Chaos] these people are all dead now.
   [2006-04-23 21:32:01] [Workshop Chaos] questions?
   [2006-04-23 21:32:07] [Workshop Joku] ya how did they die
   [2006-04-23 21:32:15] [Workshop Chaos] horribly
   [2006-04-23 21:32:19] [Workshop Joku] excellent
   [2006-04-23 21:32:57] [Workshop Chaos]     // Assign an identity noun, which will be
   modified as per the race.
   [2006-04-23 21:32:57] [Workshop Chaos]     alter_identity(Identity_Nouns, ({ "shaman"
   }));
   [2006-04-23 21:33:11] [Workshop Chaos] now here we're starting to get into the
   fancy-pants stuff
   [2006-04-23 21:33:19] [Workshop Joku] ya
   [2006-04-23 21:33:49] [Workshop Chaos] alter_identity(), which has a 'man
   alter_identity' incidentally, is used to make changes to a game object's identity
   information
   [2006-04-23 21:34:05] [Workshop Chance] why don't we use the Race_Blah's ?
   [2006-04-23 21:34:09] [Workshop Chaos] identity meaning, is this thing a rock, or a
   sword, or an orc shaman, or what-have-you
   [2006-04-23 21:34:50] [Workshop Chaos] hmm... mainly because race was never a setting
   where we did a hard-and-fast lockdown to only the system-level-known values
   [2006-04-23 21:35:00] [Workshop Chaos] you were always allowed to define a race the
   core system hadn't heard of
   [2006-04-23 21:35:08] [Workshop Chance] not evne for continuity? ah, right
   [2006-04-23 21:35:30] [Workshop Chaos] what happens now is that you wind up using
   /def/race/default.c as your race def
   [2006-04-23 21:35:38] [Workshop Chaos] and anything else from there is up to you to
   define
   [2006-04-23 21:35:50] [Workshop Chaos] it's not really a good way to operate, much
   better to get a race def in there
   [2006-04-23 21:35:56] [Workshop Joku] ok so whats the deal with Identity_Nouns
   [2006-04-23 21:36:02] [Workshop Chaos] but there's still some stuff out there that
   doesn't have race defs
   [2006-04-23 21:36:50] [Workshop Chaos] well, Identity_Nouns is one of the macros from
   identity descriptors, cf. 'man identity'... they're, well, nouns, things that the
   object can be identified as being
   [2006-04-23 21:37:12] [Workshop Chaos] in this case, due to various magic down in the
   guts of the system, this will result in our boy here being identified as an "orc
   shaman"
   [2006-04-23 21:37:26] [Workshop Chaos] whereas without this setup he'd just be an
   "orc"
   [2006-04-23 21:37:34] [Workshop Joku] o
   [2006-04-23 21:37:42] [Workshop Chaos] he'll also be identifiable as "orc" and
   "shaman" separately
   [2006-04-23 21:37:56] [Workshop Chaos] the second argument we're sending to
   alter_identity is ({ "shaman" })
   [2006-04-23 21:38:01] [Workshop Chaos] which is an array
   [2006-04-23 21:38:37] [Workshop Chaos] an array being a simple data structure that
   lets you pack together multiple items
   [2006-04-23 21:39:27] [Workshop Chaos] for instance, if we sent ({ "shaman", "priest"
   }) instead, then he'd be alternately identifiable as "orc priest" and "priest"
   [2006-04-23 21:39:55] [Workshop Joku] ya but what would u see him as
   [2006-04-23 21:40:07] [Workshop Chaos] green-skinned orc shaman, or whatever
   [2006-04-23 21:40:19] [Workshop Joku] so the 2nd part is just an extra thing u can exa
   him as
   [2006-04-23 21:40:23] [Workshop Chance] you see the first
   [2006-04-23 21:40:25] [Workshop Joku] k
   [2006-04-23 21:40:27] [Workshop Chaos nods]
   [2006-04-23 21:40:45] [Workshop Chaos] this is different from with adjectives, where
   all the adjectives you specify will show up
   [2006-04-23 21:40:57] [Workshop Chaos] because, well, that makes sense for adjectives
   and not for nouns
   [2006-04-23 21:41:09] [Workshop Chaos] do i need to go into arrays more?
   [2006-04-23 21:41:46] [Workshop Joku] as far as alter_identity is concerned no
   [2006-04-23 21:41:54] [Workshop Chaos] fair nuff
   [2006-04-23 21:42:06] [Workshop Chaos]     // Give the autonomon a description.
   [2006-04-23 21:42:08] [Workshop Chaos]     add_description(Description_Type_Generic);
   [2006-04-23 21:42:40] [Workshop Chaos] what we're doing first off here is telling the
   autonomon to have a generalized description provided by its race definition
   [2006-04-23 21:43:00] [Workshop Chaos] which will generally cover basic things like
   skin/eye/hair/whatever colors, though sometimes gets more interesting
   [2006-04-23 21:43:16] [Workshop Joku] nod
   [2006-04-23 21:43:18] [Workshop Chaos] the generic descriptions will prolly find
   themselves spiced up at some point ;)
   [2006-04-23 21:43:30] [Workshop Chaos] then:
   [2006-04-23 21:43:32] [Workshop Chaos]     add_description(({
   [2006-04-23 21:43:32] [Workshop Chaos]         ({ 'p', 0 }), ({ "are", 0 }), "dirty
   and wild-eyed, festooned with "
   [2006-04-23 21:43:32] [Workshop Chaos]         "sticks, feathers, rocks, and other
   primitive adornments. ",
   [2006-04-23 21:43:32] [Workshop Chaos]         'c', ({ 'p', 0 }), ({ "look", 0 }),
   "rather hostile and aggressive.",
   [2006-04-23 21:43:32] [Workshop Chaos]     }));
   [2006-04-23 21:43:46] [Workshop Chaos] we want to add some descriptive goodness of our
   own here
   [2006-04-23 21:43:50] [Workshop Chaos] hmm
   [2006-04-23 21:43:56] [Workshop Chaos] actually that's a poor example and i'm gonna
   change it, sec
   [2006-04-23 21:44:24] [Workshop Chaos]     add_description(({
   [2006-04-23 21:44:24] [Workshop Chaos]         ({ 'p', 0 }), ({ "are", 0 }), "dirty
   and wild-eyed, festooned with "
   [2006-04-23 21:44:24] [Workshop Chaos]         "sticks, feathers, rocks, and other
   primitive adornments.",
   [2006-04-23 21:44:24] [Workshop Chaos]     }));
   [2006-04-23 21:44:24] [Workshop Chaos]     add_description(({
   [2006-04-23 21:44:24] [Workshop Chaos]         ({ 'p', 0 }), ({ "look", 0 }), "rather
   hostile and aggressive.",
   [2006-04-23 21:44:24] [Workshop Chaos]     }));
   [2006-04-23 21:44:28] [Workshop Chaos] there
   [2006-04-23 21:44:51] [Workshop Chaos] now, these descriptions we're adding are in
   message() format, as documented quite extensively in 'man message'
   [2006-04-23 21:45:49] [Workshop Chaos] when the descriptions are finally displayed, in
   place of ({ 'p', 0 }) we will see "he", "she", or whatever as appropriate to the
   critter's sex
   [2006-04-23 21:46:01] [Workshop Chaos] if for some reason it were to look at itself,
   it would see "you"
   [2006-04-23 21:46:21] [Workshop Chaos] ({ "are", 0 }) will be replaced with "is" for
   any viewer other than itself
   [2006-04-23 21:46:47] [Workshop Joku] nod because p makes the 0 a pronoun and "are", 0
   makes the 0 use are as a verb
   [2006-04-23 21:46:57] [Workshop Chaos] and similarly with ({ "look", 0 }), becomes
   "looks" when others see it
   [2006-04-23 21:47:15] [Workshop Chaos] right
   [2006-04-23 21:47:41] [Workshop Chaos] where the 0 is is actually where, in a
   message(), you're specifying the object you want to be taking the pronoun from, or
   that's doing the verb
   [2006-04-23 21:47:53] [Workshop Chaos] the 0 generically means "self"
   [2006-04-23 21:48:04] [Workshop Chaos] gets replaced with our autonomon itself here
   [2006-04-23 21:48:10] [Workshop Nyx] Wow, I've missed a lot. Stupid phone.
   [2006-04-23 21:48:16] [Workshop Chance] well, doesnt it mean whatever your calling the
   message in?
   [2006-04-23 21:48:26] [Workshop Chaos] yeah, when actually using message()
   [2006-04-23 21:48:28] [Workshop Chance] ah
   [2006-04-23 21:48:38] [Workshop Chaos] we're in a kinda different context here, and it
   means the autonomon the desc is in
   [2006-04-23 21:48:56] [Workshop Chaos] you can more /txt/log/channels/workshop to
   catch up nyx
   [2006-04-23 21:49:06] [Workshop Chaos] we'll chill out for a minute while you do
   [2006-04-23 21:49:30] [Workshop Nyx] No, my family is driving me nuts. I have to go
   soon. :(
   [2006-04-23 21:49:42] [Workshop Chaos] and yeah, as chance was saying on the wrong
   channel, one of the reasons to use this format is that if the critter's sex changes or
   something, the description will change appropriately as well
   [2006-04-23 21:49:54] [Workshop Chaos] ahh, k
   [2006-04-23 21:52:41] [Workshop Chaos] we good with the descriptions there, then?
   [2006-04-23 21:53:13] [Workshop Joku] ya
   [2006-04-23 21:53:37] [Workshop Joku] im actually pretty good with the npc stuff if ur
   just doing this for me it smostly unnecessary ;)
   [2006-04-23 21:53:39] [Workshop Chaos]     // Set the autonomon's level, which
   influences its attributes, combat
   [2006-04-23 21:53:39] [Workshop Chaos]     // ability, and so on, but most especially
   its experience value.
   [2006-04-23 21:53:39] [Workshop Chaos]     set_level(18 + random(4));
   [2006-04-23 21:54:18] [Workshop Chaos] ooookay.  as it implies here, what you're
   really doing the most of is picking the experience value of your critter.
   [2006-04-23 21:54:52] [Workshop Chaos] when something's set with a high level, it does
   get skills and stuff that make it tougher, but definitely not automatically tough
   enough to merit its level's worth of XP.
   [2006-04-23 21:55:16] [Workshop Chaos] so this is something you're setting because
   something is a given degree of tough, not to make it a given degree of tough.
   [2006-04-23 21:55:16] [Workshop Chance] so levels atm are kind of arbitrarily set?
   [2006-04-23 21:55:20] [Workshop Chaos] entirely
   [2006-04-23 21:55:50] [Workshop Chance] since there's no way to really judge a
   characters toughness based on complete char
   [2006-04-23 21:56:00] [Workshop Chance] for xp calcs
   [2006-04-23 21:56:39] [Workshop Chaos] yeah... back in the day, really nothing
   mattered about a character but its level, race did basically nothing, etc... its AC,
   WC, HP and all that were just set on formulas from its level
   [2006-04-23 21:56:59] [Workshop Chaos] so mostly all you were doing was just fighting
   lumpier versions of the same thing, with different prosthetic foreheads on
   [2006-04-23 21:57:07] [Workshop Chance] heh
   [2006-04-23 21:57:07] [Workshop Chaos] i found this annoying
   [2006-04-23 21:57:19] [Workshop Chaos] of course, we have our own set of problems
   because i found this annoying
   [2006-04-23 21:57:23] [Workshop Chaos shrugs]
   [2006-04-23 21:58:09] [Workshop Chaos] now, a bunch of interesting things happen
   behind the scenes when you call set_level()
   [2006-04-23 21:58:39] [Workshop Chaos] the critter gets its attributes and limbs
   defined out, which is why you really need to call set_race() and set_sex() (if you're
   going to) before it
   [2006-04-23 21:59:29] [Workshop Chaos] skill assignment is also done
   [2006-04-23 21:59:35] [Workshop Chaos] the rest is mostly minor housekeeping
   [2006-04-23 22:00:18] [Workshop Chaos] the attributes that are assigned at this point
   are random within the critter's racial ranges
   [2006-04-23 22:00:38] [Workshop Chaos] and it gets 5x its level-1 in attribute
   development points just like a PC
   [2006-04-23 22:01:06] [Workshop Chaos] these being assigned in a partially random way
   that's set up so that the critter tends to focus on its strengths
   [2006-04-23 22:01:26] [Workshop Chaos] so an elf will tend to put more of its
   development points into dex than con, e.g.
   [2006-04-23 22:01:38] [Workshop Joku] heh
   [2006-04-23 22:02:00] [Workshop Chaos] questions, comments?
   [2006-04-23 22:02:10] [Workshop Chance] i like pancakes
   [2006-04-23 22:02:22] [Workshop Chance] do you?
   [2006-04-23 22:02:24] [Workshop Chaos feels far more enlightened than a moment ago]
   [2006-04-23 22:02:40] [Workshop Chaos] yeah, generally... haven't had any in a while
   [2006-04-23 22:02:48] [Workshop Chaos] need to hit an IHOP
   [2006-04-23 22:03:39] [Workshop Chaos] okay, been at this for a couple hours and some,
   think i'll call it a day
   [2006-04-23 22:03:49] [Workshop Chaos] mayhap we'll pick up after set_level() next
   time
Personal tools