|
|
#1 | |
|
WAR Soldier
|
PlanB - Swordmaster/BlackOrc Hotbar Page Swapper
Well, after much screwing around, I've got a working mod that updates the main hotbar page whenever your balance/plan state changes. I called it Planned Balance, or PlanB for short. You can download it here:
http://war.curse.com/downloads/details/13638/ You must also download and install the LibSlash mod (version 2.1 or later), which you can get here: http://war.curse.com/downloads/details/13510/ INSTALLATION INSTRUCTIONS
Slash commands:
Edit: Version 2.1 changes. Last edited by FuriousGuy; 10-11-2008 at 02:57 AM.. |
|
|
|
|
|
|
#2 | |
|
WAR Veteran
|
Definitely will try this when I get to working on a Black Orc. Thanks.
|
|
|
|
|
|
|
#3 | |
|
WAR Soldier
|
First of all, great work, there is great need for a mod like this!
I was actually looking to code a mod like this myself, so I was looking at different functions, so let me comment a bit after looking at your code. Please do not take offense, just trying to help. I notice that you are using CareerResourceData:GetCurrent() to tell what "stance" you are in. As you say in your post, the problem with this is that this function also will detect you in stances when using other classes. For example, on BW it would use your combustion as this number. However, looking at the WarWiki Api there is a function called... Swordmaster_GetPointsString(self) which you can compare to StringTables.Default.LABEL_SWORD_MASTER_IMPROVED_B ALANCE and StringTables.Default.LABEL_SWORD_MASTER_PERFECT_BA LANCE to see what stance you are in. No idea if this works for Black Orcs, but if it did, that would be a way to not get it to mess with other classes. Though looking at your code, probably would be alot easier just to turn it off if you arent on a SM or BO. At least no string comparisons that way. |
|
|
|
|
|
|
#4 | |
|
WAR Soldier
|
If I can't find a function that gives the career directly, I might end up doing just what you suggest. There is a function called CareerResource.GetActiveCareerLine which might give me what I want; I won't know until I play around with it tonight. I figured out what I needed to do with the current version of the mod mostly by trial and error, and combing through other functions on the API wiki to see what functions they were calling.
I don't mind constructive criticism at all by the way; I need all the help I can get with this stuff! |
|
|
|
|
|
|
#5 | |
|
Alliance Champion
|
Btw FuriousGuy, the event handler for the career_resource_updated event actually gets passed two arguments - the first is the old value for the resource and the second is the new value. You could just accept those arguments with your handler function and then not have to poll the CareerResource object to get the value.
(See my Mechanic mod for an example of accepting the arguments if you want.)
__________________
#waruidev @ irc.freenode.net | WAR Addon FAQ | WAR API Reference (on TheWarWiki) | WAR Addons @ Curse.com |
|
|
|
|
|
|
#6 | |
|
WAR Soldier
|
Ahh, I did not know that! When I get down to business tonight, I'll make that change (no sense calling more stuff than I need).
Say Aiiane, since I have you in my thread, do you know if there is a function to tell you what class the player is playing? |
|
|
|
|
|
|
#7 | ||
|
Alliance Champion
|
It's not a function, it's just a subproperty in the GameData table:
GameData.Player.career.name However, that value has certain control characters in it, so if you just want the actual name w/o any invisible control characters, use this: Quote:
That'll give you a regular string (instead of a wstring) that's just the career name, nothing else.
__________________
#waruidev @ irc.freenode.net | WAR Addon FAQ | WAR API Reference (on TheWarWiki) | WAR Addons @ Curse.com |
||
|
|
|
|
|
#9 | |
|
Alliance Champion
|
Haven't had a chance but at some point I'll try to get a full dump up.
__________________
#waruidev @ irc.freenode.net | WAR Addon FAQ | WAR API Reference (on TheWarWiki) | WAR Addons @ Curse.com |
|
|
|
|
|
|
#10 | |
|
WAR Soldier
|
Version 1.1 is up. Now the mod doesn't activate unless you are playing SM / BO. Also cleaned up the code to get rid of that unecessary call! Thanks for the help all!
|
|
|
|
|
|
|
#11 | |
|
WAR Recruit
|
what i was searching for
you're awesome man |
|
|
|
|
|
|
#12 | ||
|
WAR Soldier
|
I changed the "function PlanB_SetHotbarPage" based on your entry in the comments on Cursed. What it does now is, it uses the hotbars 1, 5 & 6. Which means you will still be able to use hotbars 2-4 as normal.
BTW: What does i have to change to start PlanB automatically? Or is there any reason why you did not do that? Quote:
|
||
|
|
|
|
|
#13 | |
|
WAR Soldier
|
Version 1.2 is up. Now the user can edit the file PlanBSettings.lua to set which hotbar to flip, and which page to go to for each balance state. Hopefully that should make it a bit easier for you guys to get it to do exactly what you want.
For example, you could have some Normal and Improved Balance moves on hotbar page 1, and some Normal and Perfect Balance moves on page 2. Then, edit the settings file to use page 1 for both Normal and Improved Balance, and page 2 for Perfect. This way, you can have access to your Normal Balance moves at all times, but still re-use some keys for multiple moves. @Fischer: PlanB should start automatically if you are playing a Swordmaster or a Black Orc. You should see a message in your chat window when you log in that says, "PlanB is now enabled." If you are playing another class, it won't turn on. If you have modified the lua file, you might want to turn on the debugging window (/debug) to see if you are getting any errors, which will cause the mod not to run. It is probably best if you get version 1.2 and just edit the settings file for the pages you want. Let me know if you are still having trouble. |
|
|
|
|
|
|
#14 | |
|
WAR Soldier
|
Doesnt work for me. I installed it as explained. Logged in. Nothing.
__________________
|
|
|
|
|
|
|
#15 | |
|
WAR Soldier
|
Using a level 7 Black Orc nothing happened. Trying to force PlanB by /PlanB gets the following message:
"PlanB is not compatible with your current career; not enabled!" |
|
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -7. The time now is 10:09 AM.











Linear Mode
