Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Monday, January 30, 2012

My Macros and Me: Useful macros for all classes

R Code
As a general rule, I don't like addons. I'll use them if they're particularly warranted, but otherwise I try to stay away from them. Generally, the only thing that I'll use will be recount (if I'm DPS), a bag addon that tracks items across my characters, and nothing else. For this very reason, I love macros. I like being able to modify my interface to make it cleaner, more powerful, and more intuitive. This is some of the macros that I use and how they can be modified to suit your needs.

The general purpose shift macro
#showtooltip
/cast [mod:shift] Inner Will; Inner Fire

This macro will cast Inner Will if you're holding down shift and it will cast Inner Fire if you aren't holding down shift. This is, by far, one of the most useful macros there is. Inner Will and Inner Fire could easily replaced with any other two spells to achieve the same effect. I also have one of these for Power Word: Fortitude and Shadow Protection. My shaman has one for Astral Recall and his hearthstone. This macro is really good for just cutting down on bar space and combining similar things that can't be used simultaneously. It can also be expanded, such as

#showtooltip
/cast [mod:shift] spell1; [mod:ctrl] spell2; [mod:alt] spell3; spell4

This macro would cast each spell if its corresponding modifier key was held down, and would cast spell4 if no modifier key was held down. These are also fun to put different mounts and pets on, so you don't have to go digging through your menus to find your favorites.
LaTeX code
Stance/Form Macros
#showtooltip
/cast [stance:1] Enrage; [stance:3] Tiger's Fury; [stance:5] Nature's Swiftness; Hibernate

This macro will show something different depending upon which form the Druid is in. Stance 1 is bear, 2 is aquatic, 3 is car, 4 is travel, 5 is moonkin or tree of life form, and in this case Hibernate would be shown in caster form. This one is currently very useful for feral druids in PVP because they tend to do a large amount of form changing. This macro is really great for cutting down on how much bar space is taken up on your screen. Now, this macro won't work on your main bar, because that bar changes every time you change form. This one can also be used for warriors and death knights, although it's probably far less useful for them.


The Atonement Macro
#showtooltip
/cast [@targettarget,harm] Smite; Smite

Every discipline priest who uses Atonement should have this macro. If I'm targeting a party member, then I will Smite their target. If I'm targeting and enemy, then I will Smite them. The macro would fail if a party member wasn't targeting and enemy. I use this macro so that I can keep my tank targeted but still use my Atonement healing. This way I don't have to change targets to switch from direct heals to Atonement heals. I actually have two of these, the other one has Holy Fire as the spell.
Java Code
Crowd Control
#showtooltip
/stopcasting
/cast [mod:shift, @mouseover] CCspell; CCspell

This macro will cast your crowd control spell at your mouseover target if you're holding down shift. If you aren't holding down shift, it will cast your crowd control at your regular target. The '/stopcasting' at the front will cause you to stop casting whatever spell you're already casting so you can crowd control faster, since it can be a time-sensitive action.

There are tons of things that can be done with macros, and wowpedia is a great place to start learning how. Their Making a macro page really helped me.

All code in the images comes from projects that I've worked on. Now, enjoy this opening from a 90s show!


Thursday, September 29, 2011

Initiative Revision: Turns Out There Were Problems, Adventures in Amateur Game Design, Part 14

It turns out there was a significant problem with the initiative system that I had devised. I know, I'm disappointed too. The original system had every player with a speed attribute. Every turn their speed would be added to their initiative and the player (or NPC) with the highest initiative takes their turn and their initiative is set to zero.

When I coded up an implementation to work this system, things didn't work out the way I wanted them to. I'll illustrate the problem with an example. Say you have to players with speeds 5 and 9. You would think the player with 9 speed to go almost twice as often as the player with 5, right? Nope.

Player 1: 5. Player 2: 9. Player 2 goes, and is set to zero.
Player 1: 10. Player 2: 9. Player 1 goes, and is set to zero.
Player 1: 5. Player 2: 18. Player 2 goes, and is set to zero.
Player 1: 10. Player 2: 9. Player 1 goes, and is set to zero.
Player 1: 5. Player 2: 18. Player 2 goes, and is set to zero.
Player 1: 10. Player 2: 9. Player 1 goes, and is set to zero.
Player 1: 5. Player 2: 18. Player 2 goes, and is set to zero.
Player 1: 10. Player 2: 9. Player 1 goes, and is set to zero.

So they actually get the same number of turns. In a multiple player situation, the system better approximates the expected number of turns, but there are still some very serious inconsistencies. So I had to revise the system. It is now an old-type Final Fantasy system. Everyone's speed still adds to their initiative, but now a player gets a turn whenever their initiative reaches 100. After they take their turn, 100 is subtracted from their initiative. Naturally, if nobody had an initiative over 100, their speeds are added again.

I modified my code to use this system and the actual results produced were consistent with my expectations and desires for how it should work.

Wednesday, May 12, 2010

Summer Projects

Summer is nearly upon us, and I've decided that I should take upon myself some summer projects.  These will vary in scope and in discipline and will hopefully give me something to do while I'm not taking any classes.

Project the first:  Statistics Project
I don't know what the topic of the project will be, it's scope, or what.  But I feel that I should do some sort of statistics research this summer.  I could expand upon my WoW project, or the 'Cars of Little Rock' project that I did for last semester, or I could do something entirely new.

Project the second:  Finish/Update This

Project the third: Program a mathematical drawing program
The program would empower the user to create mathematically defined shapes/pictures.  Plotting points, connecting them with lines, drawing circles of defined radii, etc.  The program should automatically detect where lines and circles intercept each other, and allow the user to place a point there.

It's basically a program that I've wanted in the past, and I feel that I could program.  It would also do me well to help retain why programming skills.

Images should be exportable to either an image format, or offer a text interpretation that would be usable in TeX.

Project the fourth: A gaming marathon for charity
You see lots of people doing gaming marathons to collect donations for charity (specifically Child's Play).  I'd like to do one of these, but instead of playing several games from the same series.  I would play several 2D platformers from different series.  Some of the games could be newer releases, some of them older releases.  I think it could be really fun. 

Project the fifth: Viking RPG
After I saw "How to Train Your Dragon" I was inspired to create a simple RPG system that was suited around Vikings and Dragons.  Since having the original idea, it has deviated quite a bit from "How to Train Your Dragon," so thinking of it as being related to the movie isn't the best analogy.

Outline:
  • Vikings
  • Dragons
  • d10 system
  • 4 classes
    • Defender - a brute force warrior.  Hearty, and skilled with shields.  Can even use them as weapons.  Has defensive and shield related magic.
    • Fighter - skilled with all manner and configuration of weapons.  Can use special attacks and buff type magic.
    • Archer - especially skilled with ranged weapons.  Can use special attacks and debuff type magic.
    • Mage - skilled in a wide array of magical abilities.  Most vulnerable when unprotected, but most deadly when left alone.
Undetermined:
  • Stat/Combat System details
  • Spell details
  • etc.
 Project the sixh: Algebra Book
I've spent the better part of a few years now teaching Algebra to all types of people.  This one is a big maybe, but I might work on an Algebra book typeset in TeX.  None of this pretty pictures and fancy schmancy charts and graph stuff.  I feel that much of what they put in Algebra books these days is a distraction, and only serves to increase the cost and size of the books.

Project the seventh: Secure employment
Pretty straightforward. 

Project the eigth: Find some way to make money from the internet
Also self explanatory

I bet all of this could easily keep me busy.  I'll clearly not get all of it done, but it's nice to have goals.