Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Miscellaneous => Topic started by: Смердокрыл on July 09, 2015, 07:21:04 pm

Title: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 09, 2015, 07:21:04 pm
Hey everyone!
I wanna make an aura (basically a spell) which would not allow a player to sheathe his weapon even when he casts/uses animations/etc.
Could somebody help me?
Title: Re: [QUESTION] Unsheathe aura
Post by: schlumpf on July 09, 2015, 10:53:27 pm
Don't expect answers within seconds when asking things that nobody in the world may have tried before.
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 09, 2015, 10:55:33 pm
Quote from: "schlumpf"
Don't expect answers within seconds when asking things that nobody in the world may have tried before.
Okay((
Title: Re: [QUESTION] Unsheathe aura
Post by: Rochet2 on July 09, 2015, 10:59:47 pm
Maybe try messing with Player::SetSheath?
Could be that sheathing cant be forced from server.
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 09, 2015, 11:21:39 pm
Quote from: "Rochet2"
Maybe try messing with Player::SetSheath?
If this has to do with C++ then: 1)I have absolutely no knowledge of it 2) I didnt compile my server myself thus I dont have acces to .cpp files.

I know there are spells (e.g. 73220) which make an item appear in your hands (obviously, it cannot be sheathed). Is it possible to create a similar one with the item I need?
Title: Re: [QUESTION] Unsheathe aura
Post by: bizzlesnaff on July 10, 2015, 12:11:18 am
But if you play on a server, and for any reason lost the connection..you can still move, and I'm quit sure, that you can still "play with your weapon" :D

Without C++, how do you change anything? Just with database editing?
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 10, 2015, 12:48:20 am
Quote from: "bizzlesnaff"
Without C++, how do you change anything? Just with database editing?
Yeah. And custom patches.
Title: Re: [QUESTION] Unsheathe aura
Post by: Rochet2 on July 10, 2015, 12:52:22 am
Hmm, seems the item is a spell visual.
Its not even positioned right in the hand to be like an equipped weapon. And the model is different from the item model.

Found it with ID 6358 in spellvisualeffectname.dbc

WIth some understanding and client editing I guess it could be possible to for example edit this spell to use some other item model or something.
Never really modded myself though. And dont see how the visual and the spell link together at all ..
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 10, 2015, 01:12:41 am
I went to 73220th record in Spell.dbc. In the 18th column (which  according to wowdev is something called "VisualID2" and links to SpellVisual.dbc) I saw 15446.
The 15446th record in SpellVisual.dbc has a value 14290 in the 5th column, which should link to SpellVisualKit.dbc.
The 14290th record in SpellVisualKit.dbc is basically empty (contains only 0s and -1s) except for the last column, which contains 256 and should link to SpellVisualEffectName.dbc
Now the 256th record in SpellVisualEffectName.dbc has the 3rd column (location of the model according to wowdev) containing "SpellsDynamiteA_SpellObject.mdx", which actually exists in my cliend as an .M2 file rather than .MDX and looks like this (note that the 73220 aura I began with gives your character a frostmourne):
[attachment=0:1heo2lbz]scrin.jpg[/attachment:1heo2lbz]


Now I am lost.
Title: Re: [QUESTION] Unsheathe aura
Post by: Rochet2 on July 10, 2015, 01:20:04 am
And the one there should be is 6358.
Exactly why I said I couldnt find how they are linked : /
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 10, 2015, 01:59:38 am
Please help!
We need some hardcore modding professionals here!
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 12, 2015, 12:04:40 pm
FOR SARGERAS' SAKE, PEOPLE!
Its been three days already and yet no-one answered. Unbelievable!
Title: Re: [QUESTION] Unsheathe aura
Post by: schlumpf on July 12, 2015, 02:07:46 pm
This is about the tenth time you bump this post. Stop it, please.
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 12, 2015, 04:08:59 pm
Quote from: "schlumpf"
This is about the tenth time you bump this post. Stop it, please.
Ok(( Do you think anyone will answer?
Title: Re: [QUESTION] Unsheathe aura
Post by: stoneharry on July 13, 2015, 01:29:27 pm
You can make custom spell aura's, e.g:

(http://i.imgur.com/0N6Rc4I.png)

Here I added a new spell aura where if the player has it some death counter I implemented is not triggered.

You would need to implement it such that if player has this aura then do some combination of methods in order to see if you can make them sheath their weapon. It may be as simple as calling sheath from the server side.

No I cannot teach you C++ or how to compile.
Title: Re: [QUESTION] Unsheathe aura
Post by: Rochet2 on July 13, 2015, 02:46:05 pm
I tested the C++ option, but it doesnt work.
It is only used to send the sheath information to other players around. Your own client handles your character sheathing and its not controllable from server.
Disabling all the sheath code only resulted into players not seeing eachother sheath and unsheath weapons.

So unless this is needed for a creature, there is no way to control the player's sheathe without client modifications. And using a spell visual like on the frostmourne spell will not copy the currently equipped weapon model.
Title: Re: [QUESTION] Unsheathe aura
Post by: Alastor on July 13, 2015, 02:48:29 pm
Or you can try to set "Dont Affect sheath state" falg to every single spell that exists :D
so you can cast whatever you want and weapon will stay 4ever where right now is

but you know ...im not sure that is eexactly what you want
(http://i.imgur.com/BHZOJVa.jpg)
Title: Re: [QUESTION] Unsheathe aura
Post by: stoneharry on July 13, 2015, 04:09:14 pm
Quote from: "Alastor"
Or you can try to set "Dont Affect sheath state" falg to every single spell that exists :D
so you can cast whatever you want and weapon will stay 4ever where right now is

but you know ...im not sure that is eexactly what you want
(http://i.imgur.com/BHZOJVa.jpg)

I thought that attribute existed, I must have missed it when I looked for it. Yeah, it would be really simple to apply this flag to every spell, especially as you could use that open-source tool and just add a line of code that adds the flag when the save function is called.

https://github.com/stoneharry/Spell-Editor-GUI-V2 (https://github.com/stoneharry/Spell-Editor-GUI-V2" onclick="window.open(this.href);return false;)
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 13, 2015, 04:50:26 pm
Well... problem is that my server is pre-compiled, so I cant access c++ files.
Is there any way to achive what I need by dbc editing + custom patches?
Title: Re: [QUESTION] Unsheathe aura
Post by: stoneharry on July 13, 2015, 04:57:38 pm
Quote from: "Смердокрыл"
Well... problem is that my server is pre-compiled, so I cant access c++ files.
Is there any way to achive what I need by dbc editing + custom patches?

The last two replies talk about DBC editing, but you would need to add a couple of lines of code to change all spells automatically to have this flag.
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 13, 2015, 08:49:40 pm
Quote from: "stoneharry"
change all spells automatically to have this flag.

I dont have any problem with spells. The problem I do have is that when you morph into some models, you cannot unsheathe your weapon with the binded button. Of course, you can demorph, take the weapon out, and morph again, but whenever you use an animation (e.g. casting a spell, /talk, sitting), the weapon sheathes and you have to demorph again.
Title: Re: [QUESTION] Unsheathe aura
Post by: stoneharry on July 13, 2015, 09:07:25 pm
Quote from: "Смердокрыл"
Quote from: "stoneharry"
change all spells automatically to have this flag.

I dont have any problem with spells. The problem I do have is that when you morph into some models, you cannot unsheathe your weapon with the binded button. Of course, you can demorph, take the weapon out, and morph again, but whenever you use an animation (e.g. casting a spell, /talk, sitting), the weapon sheathes and you have to demorph again.

Why are you stating the problem again? The answer was posted here:

viewtopic.php?p=48108#p48108 (http://modcraft.io/viewtopic.php?p=48108#p48108" onclick="window.open(this.href);return false;)

This does not involve coding.
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 13, 2015, 09:11:03 pm
Quote from: "stoneharry"
Why are you stating the problem again? The answer was posted here:.
Thats not what I meant. I need to be able to freely sheathe/unsheathe weapons in any morph. I wanted to achieve this with a certain spell which would force my character to have his weapon unsheathed, but that isnt possible, as far as I now know.
Title: Re: [QUESTION] Unsheathe aura
Post by: stoneharry on July 13, 2015, 09:22:30 pm
Quote from: "Смердокрыл"
Quote from: "stoneharry"
Why are you stating the problem again? The answer was posted here:.
Thats not what I meant. I need to be able to freely sheathe/unsheathe weapons in any morph. I wanted to achieve this with a certain spell which would force my character to have his weapon unsheathed, but that isnt possible, as far as I now know.

In that case you could implement it yourself by finding some internal function that handles sheath state and setting that with a function that is activated upon receiving a custom packet. But this requires the implementation of a new module and a lot of coding/reverse engineering knowledge.
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 13, 2015, 10:12:40 pm
Quote from: "stoneharry"
this requires the implementation of a new module and a lot of coding/reverse engineering knowledge.
((

I remember that on my 3.3.5 server some spells (e.g. 38006) would unsheath your weapon, which is much easier than demorphing and morphing again. However, on my current 4.3.4 server, same spells only display the weapon during the cast duration, and it disappeares again when the spell is finished. Is there any way to change that?
Title: Re: [QUESTION] Unsheathe aura
Post by: schlumpf on July 13, 2015, 10:33:17 pm
Do you refer to `.morph x` which breaks the unsheathability, or to shape shifts (like druids)? If it is morph, there should not be a reason for that. If it is shifts, see SpellShapeshiftForm.dbc's m_flags.
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 13, 2015, 11:01:57 pm
I refer to
Quote from: "schlumpf"
`.morph x`
.

For example, when I morph into 35572, my unsheathe button just doesnt do anything.
Title: Re: [QUESTION] Unsheathe aura
Post by: Alastor on July 13, 2015, 11:26:42 pm
i have no idea what morph is it since my DBC says something about Avangeing Angel but morph is not working ingame since CreatureDisplayInfo is directing model to unknown ID
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on July 14, 2015, 02:20:04 am
Quote from: "Alastor"
i have no idea what morph is it since my DBC says something about Avangeing Angel but morph is not working ingame since CreatureDisplayInfo is directing model to unknown ID
CreatureDisplayInfo should direct to "3647"


Also: Ive found an interesting spell (97589) which makes Nozdormu hold his staff like that:
[attachment=0:4zs05u4a]WoWScrnShot_071415_031656.jpg[/attachment:4zs05u4a]

Maybe I could use that somehow?
Title: Re: [QUESTION] Unsheathe aura
Post by: Alastor on July 14, 2015, 03:46:17 am
No ? thats not character model its creature and creatures has in most of chases diferend anims etc ..............
Title: Re: [QUESTION] Unsheathe aura
Post by: schlumpf on July 14, 2015, 03:55:33 am
It probably triggers playing an anim kit.
Title: Re: [QUESTION] Unsheathe aura
Post by: Rochet2 on August 23, 2015, 01:43:48 am
I found a spell visual kit that forces weapon in hand: 43
Modifying some aura to use this as the aura state visual could possibly achieve what you want.
Title: Re: [QUESTION] Unsheathe aura
Post by: Смердокрыл on August 30, 2015, 03:47:54 pm
Quote from: "Rochet2"
I found a spell visual kit that forces weapon in hand: 43
Modifying some aura to use this as the aura state visual could possibly achieve what you want.

Sargeras bless you!