Navigation

    City of Arabel

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Random Script Commenting

    Scripting
    3
    10
    3418
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Yardsale
      Yardsale last edited by

      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.

      1 Reply Last reply Reply Quote
      • Yardsale
        Yardsale last edited by

        hc_used_campfire (3): // Campfire kumbiya time
        
        1 Reply Last reply Reply Quote
        • Yardsale
          Yardsale last edited by

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

          cs_am_sp_patrol (7):     // * guards don't drink
          
          1 Reply Last reply Reply Quote
          • Yardsale
            Yardsale last edited by

            cs_am_sp_tag (21):     //** I can spawn just about anything, but usually I clone myself
            
            1 Reply Last reply Reply Quote
            • Yardsale
              Yardsale last edited by

              We have many systems that work like this:

              cs_area_enter (33):     //Randomize the Random!
              
              1 Reply Last reply Reply Quote
              • Yardsale
                Yardsale last edited by

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

                cs_bash_damage (14):     //** heal the door
                
                1 Reply Last reply Reply Quote
                • Yardsale
                  Yardsale last edited by

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

                  cs_disguise_entr (13):     //** NPCs don't care
                  
                  1 Reply Last reply Reply Quote
                  • Yardsale
                    Yardsale last edited by

                    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
                    
                    1 Reply Last reply Reply Quote
                    • B
                      Black Rose last edited by

                      All the CS stuff is Agrafes, for reference purposes.

                      [14:52] <moloch_>Half the DMs don't know what's going on because they don't read the plot forums.</moloch_>

                      1 Reply Last reply Reply Quote
                      • Snowstorm
                        Snowstorm last edited by

                        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);
                        

                        White teddy bear

                        1 Reply Last reply Reply Quote
                        • 1 / 1
                        • First post
                          Last post