26 August 2013

Back in the Saddle

I'm back!

Tonight was Compiling the Update night, something that I should have done over the weekend but was all strung out from vacationing up in northern New England.  Lots of cool behind-the-scenes stuff going in.  Maybe you'll get to see some of it!

19 August 2013

The Great AFK

I will be gone for the remainder of the week, returning this weekend.  I hope that my new script does not break anything in my absence!

18 August 2013

And Now I Dust My Hands

I have completed my work on my latest script to the point where I feel comfortable checking it in to the script repository.  I began adding one of my "it would be nice – but not mandatory – to include this cool feature" ideas and quickly learned that Socks would not readily support what I wanted to do, and by this point I lack the energy and motivation to crowbar new technologies into this script.  As it stands, the script is "good enough" for now, and that future feature can simmer on the back burner.

Now comes the uncertain part: releasing the script into the wild.

I must say that I am rather pleased with the result.  Maybe one of you may see it in action sometime soon.

16 August 2013

Literal Humor

I read this joke the other day and got a laugh from it:
A wife asked her husband to go to the market.  "Buy one carton of milk, and if they have avocados, get six."  A short time later the husband returned with half a dozen cartons of milk.  "Why did you buy six?" asked the wife.  Replied the husband "they had avocados."
After writing logic code for the past week, I found this especially funny.

15 August 2013

Scripter Humor

I have been reading other scripts with the intent of plagiarizing becoming inspired by other GMs/scripters' works.

Scripters will often add comments within their code as to describe what task/role the section of code performs.  I was interested in how other GMs have handled math problems (like calculating the average size of a mobile), and while researching that subject I was entertained by some amusing one liners.  Or in some cases, multi-liners.

    // Initialize it, cap'n!
   
    //    This is a public file.

    //    Everyone is welcome, nay encouraged,
    //    to use it and add to it.   
   
    // OK, dumkopf. You use it, you lose it.
       
    // All the nifty display poo goes here

    /*
    **    utilities for manipulating the [player]'s store-string
    **    err, I mean the data-string
    **    no, wait, make that the thing-string
    */


And my personal favorite:

    **    **Warning** this code is god-like and perfect.
    **    When we work on it choirs of angels
    **    gather around and sing. Mortals must keep out.
    **    This code is so blindingly beautiful
    **    that your eyes will melt if you look at it.

14 August 2013

Sign o' the Times

I have received some feedback on the new signposts from some of the players.  The feedback has been very constructive, and I spent this evening preparing the script and items for the next generation of signposts.

I just had an idea.  Neon signposts!  The action bubble box could change from red to blue to green!

13 August 2013

The Back-up Back Up Plan

My creative patch for my current script did not work as intended, which means I go to Plan B.  Or am I now on Plan C?

Anyways, work continues on it, although sometimes it is discouraging.  I want to get it done and away from me so that I may work on something else, but then I also want it to work well.

Writing bad code is easy!  It's the good stuff which takes time.

12 August 2013

Timing Is Everything

While putting the finishing touches on my latest script, I came across a wrinkle in which no amount of ironing would smoothen.

The script, like another script I recently completed, is a process which hangs out in the background and watches the goings-on of nearby NPCs.  The function of this script needs to know if the NPC is busy with a player.

I tested my script on my test server, and overall the script is looking sturdy.  It did fumble a little bit on the task of checking the availability of a NPC: the script could not seem to recognize that a player was bumping into a NPC.

As with the combat script, I think this too is a matter of bad timing on my part.  My derpy script is looking blindly for bump flags which may or may not have been set.  I think that I am checking too early in the clock cycle – way before the NPC/player bump has been processed.

So I have rigged a hack-ish solution.  It's not very pretty, but it looks as though it will get the job done.  Maybe.  I will test it and confirm that it works.  Or I will confirm that it does not work.

As the old saying goes, timing is everything.  I seem to have a genius for bad timing.

11 August 2013

Marathon Scripting

I arrived home late this morning from a long day out (arriving home close to 2:00am), so I slept in until 10:30am.  At 10:31am, after brewing a pot of coffee, I was sitting at my computer and there I remained for twelve hours: first restructuring, rewriting, and then refining a new Clan Lord script.

The new script is looking very solid.  I still need to add some back-end commands (like a kill switch: in the event that things go badly, it's always comforting to have a self-destruct button to panic-stab while sobbing uncontrollably).

A couple of more lines of code and this should be ready for testing on the test server – on tomorrow.  Not tonight.  I think I'm done for today.

09 August 2013

Oot and Aboot

I am AFK for today and tomorrow.  Sunday will be my day to finish and test my new script.

08 August 2013

Jitterbugs

I have been corresponding with a player who has been sending me a steady list of uncovered bugs.  Some of these bugs are eyebrow arch-inducing.  I want to acknowledge this player's efforts: thank you, you know who you are.

If you find a jitterbug bug, or have an idea or a suggestion, then please let us know!  You may either /bug it, or you may address an email to me, YappyGM, at my gmail account.

07 August 2013

Who's the Boss?

Some while ago I had implemented a new monster template: the Boss.  The idea behind this monster type is that it would always be a slaughter, it would be big and bad, and everyone would be rewarded for participating in defeating it.

Well, the last part I got right, but the first part was a complete and decided failure on my part.  After a formidable boss was defeated, I recall players laughing in town and announcing "ha ha! Rank number 17!"  I had jacked the boss's Histia ranks up to a ludicrous level, and the just-as-high slaughter ranks were absolutely ignored.  So yeah, the boss template was not working in practice the way I had designed it on paper.  Players who defeated the boss received both shared reward experience and got credit for the not-a-slaughter-but-instead-a-very-juicy vanquish.  What an embarrassing disaster for me.

I have been redesigning the entire template and giving a lot of thought to my goals for Boss Template v2.0.  I still love the elements of increased rewards based on increased participants, and I want all of the active participants to be rewarded (whether they are in the area or not: nothing sucks like falling and getting chained to the safe cave just as the Boss falls and the big reward chest is popped: both the kill credit and the bonus are missed).  And I am exploring the possibility of a new slaughter/dispatch/kill/vanquish mechanic: "You have massacred Yappy the Black!" or "You have conquered Eldon the Grey!" or some other unique description of defeating of a boss.

And then players can gloat over the corpse of the boss.  "Who's the boss now?"

06 August 2013

Script Reconstruction

I went from polishing a script to dismantling a script to reconstructing a script within the period of three hours.

As I was rereading the code to my current project, I had realized that I was not negative enough in its organization.  In fact, I was not negative at all, and the free-for-all organization which I had structured the script made it difficult for me to understand what it was that I was trying to accomplish.

So the good news is that the new script looks great!  The less-than-great news is that I wrote it out longhand on a piece of scrap paper, which means that there is an entire transcribing process which still needs to happen, and that the transcribing process is highly unlikely to happen before the v819 update goes live.

Perhaps if I employ puppy dog eyes then ServerGM would be willing to transfer the completed (and full tested) script to the live world this weekend.

05 August 2013

Script Polishing

Today was a vacation day for me, so I got to stay home and do fun stuff: I spent my entire day debugging and polishing a new script (and this script is not in any way related to combat).

The script runs a new tool for v819, and I got it to a point where it works well enough, but it works well with vulnerabilities.  Being a rather frightened and slightly paranoid Yappy, I am working to seal off any perceived leaks and problems.  The last thing I want to have is a scripting misfire resulting in the injury of one of our gerbils.

I need to work fast.  The update is less than 48 hours away.  Does anyone know where I can buy some gerbil insurance?

04 August 2013

Did I Tag Yet?

I have learned far more about the internal mechanisms of combat than I had ever had hoped to learn.  Or cared to have learned.

Before pushing the v819 update out to the UpdateGMs, I wanted to get one more script submitted before the deadline.  And as the one who receives and packages the updates, I get to choose the timing of that deadline!

The script is a simple one on paper: monitor the combat of a monster and inform the script when the monster has tagged a player.  Simple, right?  In practice it is, and there are heaps of scripts that already handle this precise function (herpetids come to mind: if the herpetid hits the player, then the player becomes increasingly intoxicated).

The catch: my script is a sort of a supplemental script which kind of hangs out in the background.  It isn't as plugged into combat system the same way as, say, the monster AIs scripts are.  My script is an independent entity, if you will, and just observes combat.

I completed the script and tested it.  What a disaster.  I spawned several monsters running my monitoring script, and while the monsters were knocking the stuffing out from me, my monitoring script observed my beat-down in awed silence.  That was bad.  The script should have been triggered by the monster's first damage delivery, and nothing happened.

Back to the drawing board.  I added my debugging notices.  I recompiled the script.  I generated more monsters running my script.  I got pwned by my monsters.  I cried – not because my monsters pwned me, but because after reviewing the logs I saw that my script was receiving absolutely no notification of my entering combat and subsequent pwnage.  I added more debugging notices.  More monsters.  More beat-downs.  And a lot more of nothing from the script.

At this point I felt that I failed to understand the mechanics of Clan Lord combat, so I started researching and reading about it.  It's a fascinating mechanic, IF YOU LOVE MATH.  Out of desperation (and by this point I was also nearly out of time), I then turned to the ServerGM and described my problem.  What was I doing wrong?  Why was my script ignoring combat?

ServerGM had the answer: this was not so much of a scripting issue as it was a timing issue.  ServerGM described what was happening:
  • At the beginning of each frame, all of the combat flags are cleared (Clan Lord runs roughly five frames per second)
  • My goofy script would then check the status of the combat flags and see that no combat had taken place
  • Then sometime before the end of the frame, combat would take place, and the appropriate combat flags would get set
  • The frame ends, combat resolves, and then we go on to the beginning of the next frame.
ServerGM recommended a couple of approaches to help achieve my intention for the script.  These suggestions worked brilliantly, and my script now correctly recognizes a monster tagging a player.

Maybe you'll encounter this script in v819.  BUT YOU HAD BETTER PRAY THAT YOU DONT HAHAHahaha hoo boy.

03 August 2013

Random Dungeons

I am arriving a little late to the party, but I recently purchased Torchlight (the original version, not Torchlight II: the sequel is not yet available for the Mac, at least not on Steam).  I have been playing it for some while now, and I enjoy it.

I am not obsessed with it as I was with Diablo II, even though the two games have similar game play and goals (fight monsters, get loot).  The 3D graphics are gorgeous, and the interface is simple.  I don't quite see the point of pets, but I find it entertaining to teach them spells.  There are plenty of quests to do, but it did not take long for me to grow bored by their repetitiveness ("kill a boss", and "return an item" are the two more common quests types).  A little more variety in quests would have been nice.

However it has been the randomized dungeons which has me thinking back to a project which I had started over two years ago: random instances, which would allow multiple groups to enter the same dungeon and not encounter each other.  I have given this subject a little thought, and want to apply it to my current major project.  Or should I say projects.

With our player base shrinking, instances are becoming less necessary.  But for me, it's a challenge in making it happen.  And making it happen – or making any of my projects happen – is a challenge!

02 August 2013

Day Away

I was away for most of the day today, so very little Clan Lord development got accomplished on my end.  And tonight is the submissions update deadline, and there is still a lot to do.

I can double down tomorrow and try to bang out some new monsters.

01 August 2013

Signs on Top of Signs

In another post, K'vynn commented:
Suddenly i'm envisioning a signpost forest springing up... signs on top of signs on top of...
I gave that some thought.  Well, at least from a technical standpoint.

In the first draft of the new signpost script, it was possible to have signs on top of signs.  Because the new signposts have no mask – one may not bump into them, nor could one sign collide into another – it was easy to dogpile signposts on top of each other.  In solving one problem, I had created another.  A player could move freely through a sea of signpost spam.

I have wedged a little bit of ugly code in to curtail this from happening (ugly in that it is not elegant scripting).  Now should the signpost detect another signpost nearby, then the player is prohibited from planting the signpost at that location.

A little more testing and this updated tool should be ready for prime time!