Random Script Commenting

  • The City of Arabel codebase is a few years old. With age, a codebase has a tendency to accumulate lots and lots of useless/deprecated/buggy code and comments. My scripting activities have led me to discover marvelous gems of proper and improper commenting of code. I'll post some of them here as I stumble upon them again.

    I also encourage all the coding-savvy amongst our playerbase to post funny comments from their own codebase!

    p.s This is an exercise in attempt to keep my sanity while spending half my free time coding and scripting for a computer game. Everyone should do the same! Your sanity will thank me later.

  • hc_used_campfire (3): // Campfire kumbiya time

  • We all know this one's just a load of bull..

    cs_am_sp_patrol (7):     // * guards don't drink

  • cs_am_sp_tag (21):     //** I can spawn just about anything, but usually I clone myself

  • We have many systems that work like this:

    cs_area_enter (33):     //Randomize the Random!

  • Sometimes, the name of the script doesn't really describe its effect properly.

    cs_bash_damage (14):     //** heal the door

  • That's how most of our NPC's are coded to react to players:

    cs_disguise_entr (13):     //** NPCs don't care

  • Sometimes, desperate scripters will write down messages of hope.

    cs_baz_hasgld (8):     // Azz: I hope rerunning the bazaar init script here will make
    cs_baz_hasgld (9):     // sure that the right variables are grabbed just before the sale

  • All the CS stuff is Agrafes, for reference purposes.

  • Conversation between scripters. One sentence written/2 years. I don't think my repply was ever read XD

    // These messages are not as important, they are sent to the debug PC if the debug mode has been activated.
    void DebugMessage(string sMsg, int iLevel = 0)
        //Azz: I don't see a reason not to write this to the log.
        //Agrafes: Because it generates a ton of stuff?
        //Snowy: We should try to take out DebugMessage from scripts that were debugged then.
        WriteTimestampedLogEntry("DEBUG:" + sMsg);

Log in to reply