Saturday, April 21, 2012

Advanced Guilding

I have a dream! ... and then I stop to think, and realised I don't know squat about LUA, and only a tiny bit about XML.

Playing with the idea of learning both, since I have got lots and lots of time on my hands nowadays anyway. But yeah... time seems to pass like a speeding train nonetheless, so I can atleast share my idea, and hope someone other than me actually likes it.



Onwards to the idea(s)

We can start with the basic guild permission structure.

Personally, I think the current system sucks, and defenetly not in a positive way. Every permissionsgroup is a rank, and people can get has to go trough aaaall the ranks to get to the one they want, and ofcourse this is shown to the rest of the guild. I want to have special ranks, that people can just get! without being demoted or premoted. And I don't really want to use the public note for that.

(and really, why does a new rank you make always have to end up on the bottom of the ranklist?! )

My idea is pretty much to make a new rank system, layered ontop of the real one, since you ofcourse can't change the whole engine. You need to work around it. If possible.

So my first question is this: Is it possible to make the console *not* tell everyone when a person is demoted or promoted?

You could give a user seperate permissions, and it'd make a seperate rank in the games system for that user, shuffle around on the other ranks. Or assign a rank with the specified specs, and have it hide the real rank. And show the rank given by the Advanced Guilding interface. it *should* be doable. it's just take a good bit of decent programming.



Another thing, is the newly arrived guildbanks. Awesome as they are, they are also a little limited in their features. Since not all can withdraw items, I want a request item interface. Where people without withdrawing rights from e.g a equipmentstab, can request an item. And where people with the right permissions, can approve of this request. And then manually take it out of the bank, and send it to the person who requested it. Or deny the request.

Maybe also enable the guild to put prices on the guildbank items. Some guild operate with free stuff, some don't.



The addon also handle sharing of tradeskills of the guilds crafters. So you can assign people as crafters, and the addon would register what they could make, and transfer the information. And you'd be able to request that a crafter makes this and that item for you. And if your guild doesn't do crafting for free, the crafters could edit the tradeskill and say how much they'd want for that item, with and without materials.

The addon would also handle event planning, signups, and so on.



I'd love it, if this Addon cooperated with a downloadable website suite.

Maybe then you could also make the addon handle guild recruiting, if someone wrote an application in the guild websuite, it'd alert people with the right permissions ingame, and they could accept/deny the application, ingame. And if the application was accepted, check if the user is online, and invite. If the user wasn't online, the addon would check on intervals, and invite when the user who needs the invite is online, and a person who *can* invite is online.



-------

Another thing I'd personally want, is a voluntary guild"tax" addon, which lets you specify that a % of whatever you make after you enable the addon, goes into a guilddonation "piggybank". and it'll deposit the amount when a member visits a guildbank, and empties the "piggybank" to restart the moneycount.

^ I'm thinking of making that last bit my first LUA / XML project...



And I'm hoping whatever I wrote here made sense to most of you.

Feel free to add comments, and more ideas. I'd love to hear it all.|||Quote:




So my first question is this: Is it possible to make the console *not* tell everyone when a person is demoted or promoted?




no - its possible to make it not show for your self but for the rest of the guild not to see would require the whole guild using the same addon


Quote:




You could give a user seperate permissions, and it'd make a seperate rank in the games system for that user, shuffle around on the other ranks. Or assign a rank with the specified specs, and have it hide the real rank. And show the rank given by the Advanced Guilding interface. it *should* be doable. it's just take a good bit of decent programming.




again not possible , you cant affect other guild members UI (inc what they see in chat from system messages ) so to hide a rank and show a different one in its place the whole guild would have to have the addon. same for the rest of your requests.


Quote:




I'd love it, if this Addon cooperated with a downloadable website suite.

Maybe then you could also make the addon handle guild recruiting, if someone wrote an application in the guild websuite, it'd alert people with the right permissions ingame, and they could accept/deny the application, ingame. And if the application was accepted, check if the user is online, and invite. If the user wasn't online, the addon would check on intervals, and invite when the user who needs the invite is online, and a person who *can* invite is online.




an addon cannot communicate with with 3rd party software i.e. anything not world of warcraft. and vice versa an external program cannot communicate with an addon, this is a ban able offense.

some great idea, as a guild leader myself i wish they were possible esp the ranks idea, best thing go on wow sugestions forum and post there.|||Quote:




an addon cannot communicate with with 3rd party software i.e. anything not world of warcraft. and vice versa an external program cannot communicate with an addon, this is a ban able offense.




I don't see how this is not possible? we have thottbot, wowhead, and profiler addons that work with 3rd party programs, and I don't see any of those being banned :)



Also, the point of the guildaddon would ofcourse be to have all the guildmembers in the guild use it. But in theory, it is all possible, you just need everyone to use the addon.

But yes, I will go to the WoW suggestions forum, and post about a change in the Guild management interface^^



Thanks :)|||the profiler addons store what ever informations they gather in their sv's and the programs simply read whats in there and upload it where ever it is told to upload them. there is no direct interaction between the addon and its profiler part.|||Quote:




the profiler addons store what ever informations they gather in their sv's and the programs simply read whats in there and upload it where ever it is told to upload them. there is no direct interaction between the addon and its profiler part.




Ah, did not know. But it's still possible to do I guess, just not as perfectly as I had first imagined. You'd get updates everytime someone logged in though, if they had the client that operates with the site running.|||Skimming through your post, your ideas are very possible.

For custom permissions: It would require the guild leader to be online, but you can have the members addon send a message to the leaders addon asking to do xxx, and the leaders addon could do the action for them if they are allowed.

About professions: Heh, I already have an addon out that does that (and gear, talents, etc) - check the site for "Twilight Member" (not updated since 2.3 because I'm planning a big update)

About the guild bank: Very tricky... Can't think of any ideas from the top of my head.

And finally, recruiting: You answered that one in your last post =D|||Quote:




About the guild bank: Very tricky... Can't think of any ideas from the top of my head.




Shouldn't be much different than the functionality of DuckieBank. Where you have alternate characters as bankers, and they send off information about what is in the bank to other people with the DuckieBank addon, who can then request items. And the banker character gets the requests, and then the banker char takes the item and mails it to the person who requested it.

Just need to make it work with the new guildbank instead, and not the alternate character bankers.

I just need to learn lua and XML first! =D|||Quote:








Just need to make it work with the new guildbank instead, and not the alternate character bankers.




That's the tricky part. You can have it read every item in the bank and send that data easily enough, you can even have it take out certain items on request, but it would be an ugly system.|||Quote:








That's the tricky part. You can have it read every item in the bank and send that data easily enough, you can even have it take out certain items on request, but it would be an ugly system.




It doesn't really need to read what items are in the bank, if requesting of items is done on a visit to the actual guildbank, does it?

But it would be neat if you always knew when there was new items in the bank and stuff, and could do the requesting on the run though.



Please note I have no idea how things actually work yet, I'm just throwing ideas into the air. :)|||Hmm, not sure what I was thinking when I said about having it read items in the bank, I must have misread your post.

It is possible to have an addon that sends a request to the leader of the guild (its really the easiest way to have addons request to the leader/GM, it avoids complex problems) if the person doesn't have sufficient privileges to withdraw an item from the guild bank, and the GM could handle it from there.

Oh, your other idea about guild banks and putting prices on items - you could write an addon to ask the person for a *voluntary* donation whenever he/she withdraws from the bank, but there would be no way to force them to pay up as they could just disable the addon and withdraw as normal.

XML and LUA

Quick question, is it possible to make a table of references to XML fontstrings, sliders, text-boxes in lua?|||http://home.blarg.net/~tyroney/wow/uitutorial/

is this what your looking for?|||Quote:








http://home.blarg.net/~tyroney/wow/uitutorial/

is this what your looking for?






Not really, I've made my whole addon using XML for the graphics, and don't want to convert it all to LUA if I don't have to. I'm trying to condense code in my add-on, and it requires me to use tables and in turn put XML elements in a table. For instance if CustomOneInput, CustomTwoInput, and CustomThreeInput were all XML textboxes, I'm trying to do something like this:


Code:
CustomInputs={CustomOneInput, CustomTwoInput, CustomThreeInput}
CustomNums={CustomOneNum,CustomTwoNum, CustomThreeNum};

--assume that these are in an Options GUI and CustomInputs have been collected from the GUI and inserted into the table.

function getInfo()
for i=1,#RR_CustomInputs do
if(RR_CustomInputs[i]~="") then
RR_CustomNums[i]=RR_CustomNums[i]:GetValue();
else
RR_CustomNums[i]=RR_DEFAULT_CUSTOM; --default value
end
end
end

The Problem occurs when I try to use an XML method with my table. Any help would be appreciated, I hope that's clear.|||Anyone have an idea?|||I have no idea. But you say the problem occurs and don't say what the problem is or what happens.|||Oh sorry, I get a syntax error when I try to save my Options GUI (when the method is called) for the line:


Code:
RR_CustomNums[i]=RR_CustomNums[i]:GetValue();

The actual error says: "attempt to index field '?' (a nil value)"|||3 ideas off the top of my head :

1.) You've defined CustomInputs as a Table, but then refer to RR_CustomInputs ?

Is there some kind of meta-reference or something ? Or am I drunk ? Yes, you're drunk.

2.) You've defined CustomInputs in your LUA outside of any function.

Assuming that your AddOn is loading the LUA file BEFORE the XML file, then the variables you are adding to the CustomInputs Table will be nil values, because the XML elements haven't been defined yet.

I would define the table after the VARIABLES_LOADED event, so you know the XML has been parsed and loaded and all the elements exist.

3.) Just off the top of my head, does :GetValue() work with TextBoxes ? I've always used :GetText()

Maybe I'm just being too literal and you're saying :GetValue() as an example :)



It's late - sorry if I've misunderstood you, and my ideas are just plain silly ;)



Feel free to post an actual XML and LUA code example :)|||Quote:








2.) You've defined CustomInputs in your LUA outside of any function.

Assuming that your AddOn is loading the LUA file BEFORE the XML file, then the variables you are adding to the CustomInputs Table will be nil values, because the XML elements haven't been defined yet.

I would define the table after the VARIABLES_LOADED event, so you know the XML has been parsed and loaded and all the elements exist.




Pretty sure that was the problem, I think I've fixed it now. Thank you very much.

Socket colors

How can I find out what SOCKETS are available, based on a certain item (item id and so on obtained via GetItem())?

For example, I am not interested in what gems are socketed, I want to know what sockets are available, i.e. 2 red sockets and 1 blue socket.

Sort of like this:

local r,y,b,m = GetSocketColors( ItemLink )

Variables r,y,b,m would contain a number, in the example above 2,0,1,0 for 2 red socket slots, 0 yellow, 1 blue and 0 meta slot.

Is this possible? I mean, it is possible to read the string "Red socket" if the item has no gems socketed, but that is not sufficient for what I had in mind.

Hope someone can help with this. Thanks in advance!|||I don't know if what you exactly want is here but check out these pages to give you a place to start looking.

itemlink @ http://www.wowwiki.com/ItemString

"itemLink" = GetInventoryItemLink("unit", slotId) @ http://www.wowwiki.com/API_GetInventoryItemLink|||The only way of checking what sockets are available that I know of is to scan the tooltip of an item.

Read through http://wowwiki.com/UIOBJECT_GameTooltip to get a basic idea of how to scan tooltips.|||I don't know if you misunderstood me, of if I was unclear about the issue.

I have no problems getting the ItemLink or scan the tooltips (as you suggested). What I don't know how to do, either while scanning the tooltip or in some other way based on an item id or an ItemLink, is to find out what SOCKETS are available. Please note: I have no interest at all what gems are socketed, I want to know the color of the actual socket - for example, you can put a red gem in a blue socket - I want to check the color of the socket (blue), not the gem (red).

When a gem is socketed, scanning the tooltip doesn't seem to return any information about the socket color, which is why I am here, asking you for help|||I understood what you meant, and there's no blizzard API to do it (that I know of, I could easily be wrong.)

You can scan the tooltip to get available sockets, but remember that tooltips don't just contain text, you have to look at the images too.

Basically, as well as GameTooltipText, theres GameTooltipTexture1 (2, 3, 4, etc)

Try this:

Set the tooltip to the item ID only of whatever item you want to scan (just the ID means it clears any sockets the item has, so you will only get the sockets as if it were never socketed). For example, GameTooltip:SetHyperlink("item:32006")

Scan GameTooltipTexture1, GameTooltipTexture2, etc up to 10 to see if their GetTexture() returns these strings:

"Interface\\ItemSocketingFrame\\UI-EmptySocket-Meta"

"Interface\\ItemSocketingFrame\\UI-EmptySocket-Blue"

"Interface\\ItemSocketingFrame\\UI-EmptySocket-Red"

"Interface\\ItemSocketingFrame\\UI-EmptySocket-Yellow"|||Quote:








What I don't know how to do, either while scanning the tooltip or in some other way based on an item id or an ItemLink, is to find out what SOCKETS are available.




You can't get the socket colors of an item purely by sniffing its itemlink. Plain and simple. What you can (reliably) get from an itemlink is the itemID, enchantID, suffix (if any), instance, and the the ID's of any gems socketed.


Quote:




When a gem is socketed, scanning the tooltip doesn't seem to return any information about the socket color, which is why I am here, asking you for help




Correct. It only returns the id of the gem or gems as I noted above. To the best of my knowledge as well there is no API to get the gem colors, so you either have to scan the itemlink and search for plain strings like "<Color> Socket" or "Meta Socket" (you still have to set the hyperlink to that of the original, unsocketed item) or use dinnerbone's approach and possibly check for the texture.|||Quote:








search for plain strings like "<Color> Socket" or "Meta Socket" (you still have to set the hyperlink to that of the original, unsocketed item)




I would not recomend this method unless the addon is going to be a private one, as "Meta Socket" would change in each language, but textures do not.|||Correct, if you mix with strings, there is always localization to consider.|||Tristanian, Dinnerbone... Many thanks!

Haven't had the time to test this yet (currently at work), but GetTexture() was a new one for me (yes, I am a noob when it comes to addons). And although the addon is a private one, so far, it is always better to try to stay away from localized strings, I know

I will post back in this thread if I come up with anything whether it is a solution or a new question/problem|||Here's what I did, no time to go further, have raiding to do

XML:

<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/">

<GameTooltip name="MyScanningTooltip" inherits="GameTooltipTemplate">

<Scripts>

<Onload>

this:SetOwner(UIParent, "ANCHOR_NONE");

</Onload>

</Scripts>

</GameTooltip>

</Ui>



LUA:

MyScanningTooltip:ClearLines();

MyScanningTooltip:SetHyperlink("item:"..id)

local tmp = getglobal("MyScanningTooltipTexture1"):GetTexture();

Result: tmp contains for example "Interface\ItemSocketingFrame\UI-EmptySocket-Blue"

For now, this result is exactly in the direction I wanted to go

Thanks for pointing me in the right direction!

Macro; Counterattack or Mongoose

Would it be possible to create a macro that would either use counterattack if it's ready, or Mongoose if that is ready.

If someone could help me with this, I would be greatly appreciative.|||No, macros cannot check cooldowns in combat.|||Thanks for the reply.

But isn't it possible to make it so that it doesn't check for cooldowns, just make it either use counterattack or mongoose, and let wow decide if any of those are ready to use?|||No, since you can only cast one spell per macro, so WoW hits the first one, tries to cast it, fails due to cooldown, and then stops.|||Quote:








No, since you can only cast one spell per macro, so WoW hits the first one, tries to cast it, fails due to cooldown, and then stops.




/castrandom Counterattack, Mongoose Bite|||Quote:








/castrandom Counterattack, Mongoose Bite




That still won't quite do what's wanted, though... if one's on cooldown, then hitting it has a 50% chance of doing nothing.

Cancel Autotarget CC for melee?

Does anyone know of, of be willing to make, a mod that removes the ability for melee to auto target a mob that is crowd controlled?

l

We've all been there, your killing a mob and as the mob dies you click another attack and instead of attacking the dying mob, you automaticly target and hit the sheep that was right in front of you.

So is there a mod that can help prevent this? Being able to manually click on the crowd controlled mob to target it is fine, I just don't want to have to stop doing everything but white damage when the mob gets to 10% out of fear of breaking a sheep right in front of me.

I don't even know if this is possible or not, but if it is, if someone could point me in it's direction, I'd be very thankful.

SabellaReborn Co-Developer

Hey there! I'm Isognomy (as you can tell I'm sure hehe). I'm looking for someone to help me with developing SabellaReborn. I'm using Henge as a base and going from there. So far the main things that I need assistance with is:

Adding Item Class to possible buttons

Adding Itemization/Bag Scanning via PeriodicTables

And anything else another can help with. Basically Henge is great as it is but it doesnt use PeriodicTables, instead it can use items by calling the individual Item ID's. The main reason I'm asking for another developer to come on board, is because it would greatly speed up the process, providing beta's much quicker to the masses. Anyways, I appreciate you taking the time to read this, and hope someone will have something to contribute to SabellaReborn. Take care!

<FontString>

I am trying to change a font in an xml file.

Here is my code:


Quote:




<FontString name="Simple_Text" inherits="ChatFontNormal" font="./Fonts/Impact.TTF" text="Type in something:" justifyV="TOP" justifyH="LEFT">




For some reason it is NOT using my font. who is this? I have "Impact.TTF" in:

C:\Program Files\World of Warcraft\Interface\AddOns\wow_compass\Fonts\

Why does it not work?|||Try


Code:
<FontString name="Simple_Text" inherits="ChatFontNormal" font="Interface\AddOns\wow_compass\Fonts\Impact.TTF" text="Type in something:" justifyV="TOP" justifyH="LEFT">

The XML doesn't use the addon folder as the base directory, it uses the folder for WoW itself.|||For some reason, it still does not work. Please take a look at my code. If you could PLEASE help me out, it would meat the work to me.

http://www.redcrusher.com/wow_compass.zip

THANKS|||I don't know if you can use a font other than those Blizzard provides. I just use the ones that Blizzard provides.|||http://wowui.incgamers.com/?p=mod&m=1424

are you so sure about that?

I know for a fact, that a LOT of addons use other fonts. Take SCT, casting bart and others. They do, i ust don't know ine is not working. Take a look at the file , and please help me.

thanks|||Take a look at their code and see what they are doing.|||Quote:








Take a look at their code and see what they are doing.




I have, and i can not find that i am doing anything differently...|||When you change the font of a font string, you need to specify a FontHeight; So to change the font file in XML, you will also need the following :


Code:

<FontString name="Simple_Text" inherits="ChatFontNormal" font="Interface\AddOns\wow_compass\Fonts\Impact.TTF" text="Type in something:" justifyV="TOP" justifyH="LEFT">; -- Set Font String
<FontHeight>
<AbsValue val="15"/>
</FontHeight>

( Not necessarily a height of 15 obviously )

You will have had XML errors reported in your FrameXML.log file explaining why the font wasn't applied. ( I mention this in the tutorial thread )

See also, the SetFont(font, fontHeight, [optional attributes]) API at WoWWiki, where the font height is mandatory.



For some useful dev tips :

http://wow.incgamers.com/forums/show...t=FrameXML.log