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.