lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > General Discussion & Support > Interface Help (L)

Reply
Thread Tools Display Modes
  #1  
Unread 08-25-2012, 02:51 AM
Delone's Avatar
Delone Delone is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2012
Posts: 21
Thoughts on toggling a toolbar when on a warsteed?

From the Rohan prelim notes posted here:
http://www.lotrointerface.com/forums...ead.php?t=1862

I see:
• Added GetMount to LocalPlayer.
• Added Mount, BasicMount, and CombatMount.

If I've been using this to toggle a UI quickslot bar on/off when in combat,

self.player = Turbine.Gameplay.LocalPlayer.GetInstance();
AddCallback(self.player, "InCombatChanged", function(sender, args)
self:SetVisible( self.player:IsInCombat() );
end);

What would be the correct structure for changing this to work to toggle the quickslot on whilst using a CombatMount given the above information?
On Bullroarer, replacing "InCombatChanged" with "MountChanged" works to trigger an event when I mount and dismount (either a normal mount or a warsteed), but can't work out what to use to get visiblility of the quickslot to change in place of (self.player:IsInCombat)
Any suggestions?

Last edited by Delone : 08-31-2012 at 08:35 AM.
Reply With Quote
  #2  
Unread 09-01-2012, 06:30 AM
MrJackdaw's Avatar
MrJackdaw MrJackdaw is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2009
Location: Lancaster, England
Posts: 249
Finally got on the beta - similar thoughts to yourself and nearly working. Can't work out how to figure out if it is a combat mount or not.
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta
Reply With Quote
  #3  
Unread 09-01-2012, 10:52 AM
Delone's Avatar
Delone Delone is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2012
Posts: 21
Weird thing is, if I put a writeline after using MountChanged to show when it triggers, it fires 3 times when mounting, and twice when dismounting.

/emote confused.
Reply With Quote
  #4  
Unread 09-01-2012, 12:11 PM
MrJackdaw's Avatar
MrJackdaw MrJackdaw is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2009
Location: Lancaster, England
Posts: 249
I have been testing this;

Code:
import "Turbine.Gameplay"

player = Turbine.Gameplay.LocalPlayer.GetInstance()

player.MountChanged=function(sender,args)

	Geoff=player:GetMount()
	

	--No mount? Then Geoff==nil else it points to an object for which we can get Morale, Power etc.

	if Geoff~=nil then
			Turbine.Shell.WriteLine(Geoff:GetName())
			--How to test if it is a combat mount or not?
			--How about calling a skill that ONYL WORKS FOR COMBAT MOUNTS?
			Turbine.Shell.WriteLine(Geoff:GetTurnRate())
	end

end
And it seems to work - throws an error of course if the mount is not a combat mount.

Now, and this is a big problem, I can't figure out how to get a combat mount without progressing the epic story - and I want to leave that until I get the expansion, not ruin it for myself.

Can anyone confirm that this throws an error if the mount is NOT a combat mount, but doesn't throw an error for a combat mount.

Oh! And the multiple trigger thing is quite common - don't worry about it. It's to do with the way buffs are handled.
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta
Reply With Quote
  #5  
Unread 09-01-2012, 12:26 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 340
Quote:
Originally Posted by MrJackdaw
Finally got on the beta - similar thoughts to yourself and nearly working. Can't work out how to figure out if it is a combat mount or not.
I haven't had a chance to check on war steeds yet, but you could try using GetMount() to get a mount instance and then check what methods are available for the mount. Regular steeds only have Constructor(), IsA(), GetName(), IsLocalPlayer(), GetMaxMorale() and GetMorale(). I believe the war steed instance will have additional methods since they have additional properties. You could then test for the existance of any additional method to determine if it is a war steed. You would also have to check into what it shows as available when the war steed is used for travelling outside Rhohan, I don't know if the methods will not be available as with a regular mount or if they will return nil or zero or their regular values. Hopefully I will be able to convince my game machine to stop spewing smoke long enough to check into this further.

EDIT: I see you posted a similar solution while I was busy checking the mount methods. In your case, you can assign a variable to the existance of the GetTurnRate method on the mount, Geoff:

isWarSteed=(Geoff.GetTurnRate==nil)


Of course, it would be better if Turbine implemented a MountInfo object that the mount instance could provide which could then have the MountType enumeration and any other info that is mount related. Unfortunately this does not exist, at least not yet.

Last edited by Garan : 09-01-2012 at 03:03 PM.
Reply With Quote
  #6  
Unread 09-01-2012, 02:19 PM
bsmorgan bsmorgan is offline
The Undefeated
 
Join Date: Apr 2007
Posts: 7
Quote:
Originally Posted by MrJackdaw
Now, and this is a big problem, I can't figure out how to get a combat mount without progressing the epic story - and I want to leave that until I get the expansion, not ruin it for myself.
You can get a combat mount by doing all the Langhold quests (the first quests in Rohan).
Reply With Quote
  #7  
Unread 09-01-2012, 06:49 PM
Delone's Avatar
Delone Delone is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2012
Posts: 21
Quote:
Originally Posted by MrJackdaw
I have been testing this;

Code:
import "Turbine.Gameplay"

player = Turbine.Gameplay.LocalPlayer.GetInstance()

player.MountChanged=function(sender,args)

	Geoff=player:GetMount()
	

	--No mount? Then Geoff==nil else it points to an object for which we can get Morale, Power etc.

	if Geoff~=nil then
			Turbine.Shell.WriteLine(Geoff:GetName())
			--How to test if it is a combat mount or not?
			--How about calling a skill that ONYL WORKS FOR COMBAT MOUNTS?
			Turbine.Shell.WriteLine(Geoff:GetTurnRate())
	end

end
And it seems to work - throws an error of course if the mount is not a combat mount.

Now, and this is a big problem, I can't figure out how to get a combat mount without progressing the epic story - and I want to leave that until I get the expansion, not ruin it for myself.

Can anyone confirm that this throws an error if the mount is NOT a combat mount, but doesn't throw an error for a combat mount.

Oh! And the multiple trigger thing is quite common - don't worry about it. It's to do with the way buffs are handled.
Confirmed for throwing error. Going out for Fathers day, should be able to test further later. Thanks
Reply With Quote
  #8  
Unread 09-02-2012, 12:05 AM
Delone's Avatar
Delone Delone is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2012
Posts: 21
Probably not at all an optimal way of doing things, but confirmed working method to show plugin "mountslots" only when on the Warsteed

Code:
self.player = Turbine.Gameplay.LocalPlayer.GetInstance()
self.player.MountChanged=function(sender,args)
     selfmount=self.player:GetMount()
     if selfmount==nil then 
     mountslots:SetVisible( false );
            else
	  if  selfmount.GetTurnRate~=nil then
	  mountslots:SetVisible( true );
	  else
	  mountslots:SetVisible( false );
           end
    end
end
Reply With Quote
  #9  
Unread 09-02-2012, 12:45 AM
MrJackdaw's Avatar
MrJackdaw MrJackdaw is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2009
Location: Lancaster, England
Posts: 249
Excellent!

Like you say, I am sure there will be a Mount:IsCombatMount() function or soemthing similar, but if this works we have a workaround!

EDIT:

Tried this, seems "Nicer";

Code:
import "Turbine.Gameplay"

player	= Turbine.Gameplay.LocalPlayer.GetInstance()


function player:IsCombatMount()
	local Mount	= self:GetMount()
	if Mount~=nil then
		return (Mount.GetTurnRate~=nil)
	end
end

function player:IsMounted()
	local Mount	= self:GetMount()
	return Mount~=nil 
end

player.MountChanged=function(sender,args)	

	if player:IsMounted() then
			local Mount	= player:GetMount()
			Turbine.Shell.WriteLine(Mount:GetName())
		if player:IsCombatMount() then
			Turbine.Shell.WriteLine("Combat Mount")
		else
			Turbine.Shell.WriteLine("Non Combat Mount")
		end
	else
			Turbine.Shell.WriteLine("No Mount")
	end

end
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta

Last edited by MrJackdaw : 09-02-2012 at 01:00 AM.
Reply With Quote
  #10  
Unread 09-02-2012, 12:54 AM
MrJackdaw's Avatar
MrJackdaw MrJackdaw is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2009
Location: Lancaster, England
Posts: 249
I have noticed some very interesting things happening when you get out your mount when you are in a stance - it disappears! *All* buffs appear to disappear when you mount now, making a "IsMounted" function really important.

Off topic, but has any information been released for the Toolbar so we can run off and fix our skins?
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta

Last edited by MrJackdaw : 09-02-2012 at 01:02 AM.
Reply With Quote
Reply


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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with toolbar modification Delone Interface Help (L) 4 06-09-2012 01:29 AM
thoughts on best way to count group kills K1R4D3L General Authoring Discussion (L) 3 05-18-2012 03:47 PM
Thoughts on external libraries. Digital_Utopia General Authoring Discussion (L) 3 11-06-2010 01:59 AM
New Toolbar Help Diabolos XML modification help (L) 1 07-23-2009 11:06 PM
Toolbar to bottom, XP Bar atached on Bottom of Toolbar and Transparency Steamstalker XML modification help (L) 1 02-17-2008 02:23 PM


All times are GMT -5. The time now is 12:48 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui