Thread Tools Display Modes
01-15-05, 07:29 PM   #1
Cide
Swedeheart
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 96
Script Possibilities

Hi all. While browsing the WoW forums, I frequently see those "Can you do XYZ?" threads. So I figured, since I have quite a knowledge about WoW's interface and LUA, I could help you answer these questions if you have any. So, if you would like to know if something is possible, or if you want to know how to do it, feel free to ask and I'll do my best to answer .
__________________
CTMod Developer
  Reply With Quote
01-15-05, 09:58 PM   #2
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
Thank you very much Cide. Remmy and I are going to be working like crazy over the next while, trying to get this site up and going, so any and all help from such knowledgeable sources as yourself is greatly appreciated. It's just this sort of community assistance that made EQ Interface the site it became, and precisely what we are hoping to re-create with WoW Interface.
__________________
“Do what you feel in your heart to be right — for you’ll be criticized anyway.” ~ Eleanor Roosevelt
~~~~~~~~~~~~~~~~~~~
Co-Founder & Admin: MMOUI
FaceBook Profile, Page, Group
Avatar Image by RaffaeleMarinetti
  Reply With Quote
01-16-05, 12:01 AM   #3
Schrade
A Defias Bandit
Join Date: Jan 2005
Posts: 2
Yay Cide! Thanks so much.

Here's what I want:

I want a script for my healer friends that use CastParty.

Basically, I want them to be able to hit a script and that script will automatically figure out my pet and cast a heal on the pet.

So here's what I had in mind:

/script (Put whatever needs to go here to target my pet)
/script CastParty_DoTheRightThing();
/script TargetLastEnemy();

I know you can just do /target PetName but I want it to be able to target my pet no matter what name it has. So like some lua function to Target Schrade's pet only.
  Reply With Quote
01-16-05, 07:22 AM   #4
Cide
Swedeheart
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 96
Originally Posted by Schrade
Yay Cide! Thanks so much.

Here's what I want:

I want a script for my healer friends that use CastParty.

Basically, I want them to be able to hit a script and that script will automatically figure out my pet and cast a heal on the pet.

So here's what I had in mind:

/script (Put whatever needs to go here to target my pet)
/script CastParty_DoTheRightThing();
/script TargetLastEnemy();

I know you can just do /target PetName but I want it to be able to target my pet no matter what name it has. So like some lua function to Target Schrade's pet only.
Well, to target the player named "Schrade"'s pet:
/target Schrade
/script TargetUnitsPet("target")

That should be enough. As a little hint on what we're developing for CTMod right now; it's somewhat like what you asked, yet different . Things are going well, and if we're lucky, you might see version 1 in a matter of days. I can say that it's gonna help priests bigtime .

@ Cairenn: I'd love to see a good source for WoW interfaces, so I will do my best to support this site .
__________________
CTMod Developer
  Reply With Quote
01-16-05, 08:09 AM   #5
AldWulf
A Deviate Faerie Dragon
Join Date: Jan 2005
Posts: 13
Would it be Possible for a Total Conversion Such as we had in EQ no window looking the same or are we Limited in the graphics we can change?
  Reply With Quote
01-16-05, 08:39 AM   #6
Svarten
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 25
No limitations what so ever when it comes to graphics and window numbers.

/Svarten
  Reply With Quote
01-16-05, 10:17 AM   #7
Cide
Swedeheart
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 96
Originally Posted by AldWulf
Would it be Possible for a Total Conversion Such as we had in EQ no window looking the same or are we Limited in the graphics we can change?
What Svarten says is true. We can modify the original files in any way we wish(I believe cosmos does this to some extent).
__________________
CTMod Developer
  Reply With Quote
01-16-05, 11:00 AM   #8
AldWulf
A Deviate Faerie Dragon
Join Date: Jan 2005
Posts: 13
Ahh Sweet That is Great to hear was just wondering as we hadn't really seen any Major Graphic Changeing Mods as of yet
  Reply With Quote
01-16-05, 01:19 PM   #9
guice
A Cobalt Mageweaver
Join Date: Jan 2005
Posts: 236
Originally Posted by AldWulf
Ahh Sweet That is Great to hear was just wondering as we hadn't really seen any Major Graphic Changeing Mods as of yet
I think it's due to two factors; The compexity of the UI has a high learning curve and most designers aren't very programming savy to be able to make a real appealing UI.

EQ's UI was simple XML file changes. Naturally it had some big limitations. With WoW's excessive fexability comes added complexity.
  Reply With Quote
01-16-05, 01:54 PM   #10
mondinga
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 66
You could simply do as in EverQuest and make direct replacements of WoW's graphics. This is somewhat less desirable though as most of WoW's graphics are quite specifically tailored to their purposes, and there is little in standard window display graphics. To effectively skin the interface would require a massive number of graphic changes, and without changing code, you will still end up with something that looks fundamentally the same as the default.

Besides that, it is difficult to keep track of graphic use from patch to patch as things are added or tweaked. There are so many files and SO many instances where they are used in the code, it would be a true job of work to keep a skin pack usable.

And thirdly, many current mods change things which are reliant on existing screen elements. Often times you would have to choose between wanting to use a nifty looking skin or an incredibly helpful utility mod.

I dabble in graphics work a bit, and have thought on skinning the interface. Skinning certainly lends itself to being distributed side by side with a suite of scripts, as you have a more cohesive and dependable package of changes. But this again somewhat discourages the practice of mixing and matching mods, which is what makes the way WoW mods work so great.
  Reply With Quote
01-16-05, 06:15 PM   #11
Grumdor
A Defias Bandit
Join Date: Jan 2005
Posts: 2
As far as graphic changes, Ive been extremely happy with WoWs defaults. GypsyMod to give me more buttons and flexibility in my windows is really all I needed to make it about perfect for me. I think with WoW we'll see more functionality based improvements rather than cosmetic, but thats just a guess.
  Reply With Quote
01-17-05, 10:43 AM   #12
bahzeel
A Deviate Faerie Dragon
Join Date: Jan 2005
Posts: 10
DPS Received mod

I've got a request.

I'm hunting for a DPS mod that works in reverse. I've got one I'm currently using that reports the DPS I've delivered during a fight, and I'm finding that quite handy to keep an eye on my character's effectiveness.


There are some defensive related changes and testing that I would like to do. Ultimately, they all boil down to DPS done to me by the mob, and I'm looking for a mod that will report that. When I say all boil down, blocks, parries, misses - anything that increases those reduces DPS taken. And I feel that any other measure except DPS taken can too easily leave something out of the analysis that counter balances what's been done.


Do you know of a mod that can report DPS taken?

Would it be difficult to collect and report DPS taken?


I'm currently using the COSMOS DPSTracker, but will willingly and easily change to any other DPS mod if it will get me the DPS Taken effect.

Thanks!
  Reply With Quote
01-17-05, 12:27 PM   #13
Cide
Swedeheart
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 96
Originally Posted by bahzeel
I've got a request.

I'm hunting for a DPS mod that works in reverse. I've got one I'm currently using that reports the DPS I've delivered during a fight, and I'm finding that quite handy to keep an eye on my character's effectiveness.


There are some defensive related changes and testing that I would like to do. Ultimately, they all boil down to DPS done to me by the mob, and I'm looking for a mod that will report that. When I say all boil down, blocks, parries, misses - anything that increases those reduces DPS taken. And I feel that any other measure except DPS taken can too easily leave something out of the analysis that counter balances what's been done.


Do you know of a mod that can report DPS taken?

Would it be difficult to collect and report DPS taken?


I'm currently using the COSMOS DPSTracker, but will willingly and easily change to any other DPS mod if it will get me the DPS Taken effect.

Thanks!
It's pretty easy to make a mod that monitors damage taken. I'm unfortunately not going to do one in the nearest future, but we have something along those lines coming up. However, I can say that you won't get any help from that, since it's from a different perspective . You only need 5 or so regular expressions and you've got yourself a damage taken monitor. Just need an interface for that and you're set.
__________________
CTMod Developer
  Reply With Quote
01-17-05, 12:52 PM   #14
bahzeel
A Deviate Faerie Dragon
Join Date: Jan 2005
Posts: 10
Thanks for the quick response Cide. Not the response I wanted to hear you understand

I'm not really planning to try and build one of these things myself - my development skills aren't all that grand, but if a person were going to attempt such a thing, is there an existing script/mod that you'd point them to as a good start?


(thinking out loud now )
I'm reasonably confident that I can work out the logic for such a thing (need to keep track of time and dmg taken, and convert them to DPS). What more is there to track?

H'mm - some way of noticing the start and stop of a fight. Fight ending at mob death is probably pretty easy. I bet there's an event of some kind when character transitions out of combat mode.

Fight starting - I'm thinking this is best started when I dish out some damage (which will lower the reported DPS taken, but better represents those situations where I control the start of things and what I can do as a result of that control).

Heck - I bet there's an event for character transitioning into combat mode. That's probably the height of easy - report on DPS taken from beginning to end of combat mode....

With start and stop of a fight, in time, seconds elapsed can be calculated. With a counter that increments damage taken, you'd have total damage taken. And damage / elapsed time (sec) would be DPS.

And it shouldn't be too hard to use end of the fight as <current time> if the end of the fight hasn't been reached yet to provide numbers for constant updating.


I bet there's a DPS mod already in existence that tracks start and end of a fight. Is it a good bet that all that a DPS Taken mod would need is to change the guts of such a thing to track dmg done to the player, instead of damage they do? Then apply all the same math after that?


I'm specifically interested in 1:1 fights that are player initiated for my defensive testing. So a mod that's more tuned for these situations, and not as robust for those long running / many mob battles are not as important to me (though that wouldn't stop me from using it in those situations just to see what happens).

I think COSMOS gets around this problem with a simple window type of control that sets the time window within which to track damage dealt. So it has a way to roll old damage off the end of the stack while adding new damage dealt to the top of the stack. I think I'd rather have something that relies on quiescence / out of combat as an end, and then reports everything over an entire fight.


Anyway, if I could trouble you for your thoughts on how to go about this Cide, as well as advice on any mods you know of that are pretty close already, I'd appreciate it. If I'm as close as I think I am, then I think it might be time to learn some .lua
  Reply With Quote
01-17-05, 01:34 PM   #15
Cide
Swedeheart
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 96
Originally Posted by bahzeel
Thanks for the quick response Cide. Not the response I wanted to hear you understand

I'm not really planning to try and build one of these things myself - my development skills aren't all that grand, but if a person were going to attempt such a thing, is there an existing script/mod that you'd point them to as a good start?


(thinking out loud now )
I'm reasonably confident that I can work out the logic for such a thing (need to keep track of time and dmg taken, and convert them to DPS). What more is there to track?

H'mm - some way of noticing the start and stop of a fight. Fight ending at mob death is probably pretty easy. I bet there's an event of some kind when character transitions out of combat mode.

Fight starting - I'm thinking this is best started when I dish out some damage (which will lower the reported DPS taken, but better represents those situations where I control the start of things and what I can do as a result of that control).

Heck - I bet there's an event for character transitioning into combat mode. That's probably the height of easy - report on DPS taken from beginning to end of combat mode....

With start and stop of a fight, in time, seconds elapsed can be calculated. With a counter that increments damage taken, you'd have total damage taken. And damage / elapsed time (sec) would be DPS.

And it shouldn't be too hard to use end of the fight as <current time> if the end of the fight hasn't been reached yet to provide numbers for constant updating.


I bet there's a DPS mod already in existence that tracks start and end of a fight. Is it a good bet that all that a DPS Taken mod would need is to change the guts of such a thing to track dmg done to the player, instead of damage they do? Then apply all the same math after that?


I'm specifically interested in 1:1 fights that are player initiated for my defensive testing. So a mod that's more tuned for these situations, and not as robust for those long running / many mob battles are not as important to me (though that wouldn't stop me from using it in those situations just to see what happens).

I think COSMOS gets around this problem with a simple window type of control that sets the time window within which to track damage dealt. So it has a way to roll old damage off the end of the stack while adding new damage dealt to the top of the stack. I think I'd rather have something that relies on quiescence / out of combat as an end, and then reports everything over an entire fight.


Anyway, if I could trouble you for your thoughts on how to go about this Cide, as well as advice on any mods you know of that are pretty close already, I'd appreciate it. If I'm as close as I think I am, then I think it might be time to learn some .lua
Well, I don't know if there's an event for especially entering combat, but I've always used PLAYER_REGEN_DISABLED/PLAYER_REGEN_ENABLED, and it seems to work out good(can't think of any other time when the player's regen would be disabled?). Other than that, what you said sounds good. You just need some regular expressions for getting damage done.

Some code to log the combatlog and check for some messages(directly from our upcoming mod):

Code:
DamageTaken = 0;

CT_OldChatFrame_OnEvent = ChatFrame_OnEvent;

local function CT_ChatFrame_OnEvent(event)
	if ( strsub(event, 1, 8) == "CHAT_MSG" ) then
		local type = strsub(event, 10);
		if ( strsub(type,1,7) == "COMBAT_" or strsub(type,1,6) == "SPELL_" ) then
			CT_CheckLine(arg1);
		end
	end
	CT_OldChatFrame_OnEvent(event);
end

ChatFrame_OnEvent = CT_ChatFrame_OnEvent;

function CT_CheckLine(line)
	local iStart, iEnd, damage = string.find(line, ".+ hits you for (%d+).*");
	if ( damage ) then
		DamageTaken = DamageTaken + tonumber(damage);
	end
	iStart, iEnd, damage = string.find(line, ".+ crits you for (%d+).*");
	if ( damage ) then
		DamageTaken = DamageTaken + tonumber(damage);
	end
	iStart, iEnd, damage = string.find(line, "You suffer (%d+) .+ from .+%.");
	if ( damage ) then
		DamageTaken = DamageTaken + tonumber(damage);
	end
end
This logs the combatlog, and then increments the DamageTaken variable with the amount of damage taken. If you want me to explain something in the code, please ask .
__________________
CTMod Developer
  Reply With Quote
01-17-05, 02:29 PM   #16
guice
A Cobalt Mageweaver
Join Date: Jan 2005
Posts: 236
Can a mod split this post? The question really blonged in another thread.


In responce to Grumdor; You're most likely right. The default interface and graphics are very down to earth, you might say. It's nothing like EQ or EQII where you're so distracted by the gody-arse borders you're ready to puke (And I don't know who the hell made the EQII interface, but they need to be SHOT TO H*. It's gotta be one of *THE* worse UI appearences I've ever seen.)

WoW's is nice, clean and really fits the game environment.
  Reply With Quote
01-17-05, 02:43 PM   #17
deca prime
A Defias Bandit
 
deca prime's Avatar
Join Date: Jan 2005
Posts: 3
Thanks for making this thread cide... I have a question...

What could you use to determine a negative effect on a mob, what I mean by this is... When you cast a spell like a DOT or any non permanant effect, how could you determine when that spell would be up...
__________________

Arcus of Avathar Corda on Blackhand
  Reply With Quote
01-17-05, 03:15 PM   #18
bahzeel
A Deviate Faerie Dragon
Join Date: Jan 2005
Posts: 10
I don't think player_regen_enabled/disabled will do the job here. Assuming those refer to mana regeneration, mana regeneration is occuring anytime it's been 5 seconds since your last spell.

Time to go do some reading and research - see if I can find a .lua that is already doing approximately what I'm looking to do, and then adjust it a bit.


I think that code fragment will be quite useful to me Cide. That looks like the core of what I need to accumulate damage taken. The rest all maps out in my mind - translating it into a new language is where this is going to get interesting.

Thanks again Cide.

EDIT:

Ahh! Here we go. There are a couple of game events that seem to be exactly what I'm looking for. PLAYER_ENTER_COMBAT and PLAYER_LEAVES_COMBAT.

Now I need to find the .lua for an existing DPS tool to see if I can adjust it for what I want


EDIT 2:
Looks like there are two game events that I might be able to take advantage of. There is CHAT_MSG_COMBAT_LOG_ENEMY and CHAT_MSG_COMBAT_LOG_SELF. Since damage taken goes into the personal log also, I think I'll use the _SELF log. I can think of all sorts of possible problems with peeking in the bad guys log for this data (how many will I be peeking into when I'm beset by multiple bad guys).

It looks to me like there are functions built up around parsing these entries in ctMod and Cosmos that I can use, or I can build around these 2 game events from scratch.


The CtMod and Cosmos DPS tracker both seem to be built around a concept of reporting DPS over a given time window. This causes them to add and remove individual damage events to a stack with a timestamp. I can see the benefits of the feature, but my preference is DPS for a fight - so using the time from enter combat to exiting combat (which will at times be a long time - those pulls and fights that never ends as bad guys run away and return with friends :P). It also seems simpler for the data handling (simple accumulation of dmg).

Still very daunting to me - getting the data reported and some of that GUI stuff is truly a mystery to me - we'll see how far this little project gets.

Last edited by bahzeel : 01-17-05 at 03:49 PM.
  Reply With Quote
01-17-05, 03:58 PM   #19
bahzeel
A Deviate Faerie Dragon
Join Date: Jan 2005
Posts: 10
Quice - sorry to steer the thread down a new path. You're right about needing a new thread here.

Cide,

I do have some questions about the code fragment, but I need to go do some more background / reading on .lua first. I think 19/20 of those questions are the very basics (string manipulation, GUI interactions - that sort of thing).

So I'll save them for now. Heck - probably start a new thread (if I remember) when I have them ready.

--Bahz
35th Undead Priest
Cenarion Circle

(also 36th Shaman)
  Reply With Quote
01-17-05, 04:02 PM   #20
Cide
Swedeheart
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 96
Originally Posted by bahzeel
I don't think player_regen_enabled/disabled will do the job here. Assuming those refer to mana regeneration, mana regeneration is occuring anytime it's been 5 seconds since your last spell.

Time to go do some reading and research - see if I can find a .lua that is already doing approximately what I'm looking to do, and then adjust it a bit.


I think that code fragment will be quite useful to me Cide. That looks like the core of what I need to accumulate damage taken. The rest all maps out in my mind - translating it into a new language is where this is going to get interesting.

Thanks again Cide.

EDIT:

Ahh! Here we go. There are a couple of game events that seem to be exactly what I'm looking for. PLAYER_ENTER_COMBAT and PLAYER_LEAVES_COMBAT.

Now I need to find the .lua for an existing DPS tool to see if I can adjust it for what I want


EDIT 2:
Looks like there are two game events that I might be able to take advantage of. There is CHAT_MSG_COMBAT_LOG_ENEMY and CHAT_MSG_COMBAT_LOG_SELF. Since damage taken goes into the personal log also, I think I'll use the _SELF log. I can think of all sorts of possible problems with peeking in the bad guys log for this data (how many will I be peeking into when I'm beset by multiple bad guys).

It looks to me like there are functions built up around parsing these entries in ctMod and Cosmos that I can use, or I can build around these 2 game events from scratch.


The CtMod and Cosmos DPS tracker both seem to be built around a concept of reporting DPS over a given time window. This causes them to add and remove individual damage events to a stack with a timestamp. I can see the benefits of the feature, but my preference is DPS for a fight - so using the time from enter combat to exiting combat (which will at times be a long time - those pulls and fights that never ends as bad guys run away and return with friends :P). It also seems simpler for the data handling (simple accumulation of dmg).

Still very daunting to me - getting the data reported and some of that GUI stuff is truly a mystery to me - we'll see how far this little project gets.
Pretty sure they refer to health regen, but you seem to have found to find specific events for combat .

Originally Posted by deca prime
What could you use to determine a negative effect on a mob, what I mean by this is... When you cast a spell like a DOT or any non permanant effect, how could you determine when that spell would be up...
Well, you can only get info about debuffs from your current target. If you want to log such a thing for a mob that isn't targeted, you have to check the combat log for when the DoT stops ticking(not sure if it prints "<Spell> has faded from <Mob>", but if it does, it should be somewhat easy). To check the target, you'd have to store the debuffs in a table, and then check UnitDebuff("target", n) periodically(where n is the debuff number).
__________________
CTMod Developer
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Script Possibilities

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off