This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Model's sound  (Read 6412 times)

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Model's sound
« Reply #45 on: June 04, 2015, 05:48:55 pm »
Quote from: "Skarn"
ladiszlai, there is a tool called pymodeleditor which is able to edit lots of various m2 related stuff.

In the pymodeleditor i can add sounds?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Model's sound
« Reply #46 on: June 04, 2015, 06:34:04 pm »
Ok now i installed the pymodeleditor , here where can i add the sound ? :



Because i not found any events section.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Model's sound
« Reply #47 on: June 04, 2015, 09:00:17 pm »
A
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Model's sound
« Reply #48 on: June 07, 2015, 10:29:48 pm »
Not solved yet any ideas how can i add a sound to a model 's anim?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Model's sound
« Reply #49 on: June 07, 2015, 10:54:08 pm »
The reason nobody is giving a new answer is that the answer already exists in the thread, and that there is no easier way than that because no tools exist for it, at all. The only way you can solve this is by trying to understand how stuff works. There is an easy way to do so: take something existing and look how it is there. Then gradually change things (like, different event type and data, then timestamp, then animation, until you understand it and can create an event from scratch in your model.

The only other way for someone to help you with this is either writing a tool for it, which is huge work for something that apparently only one person ever tried to do in 10 years, or doing it for you, which I doubt people will do.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Model's sound
« Reply #50 on: June 08, 2015, 09:12:05 am »
Quote from: "schlumpf"
The reason nobody is giving a new answer is that the answer already exists in the thread, and that there is no easier way than that because no tools exist for it, at all. The only way you can solve this is by trying to understand how stuff works. There is an easy way to do so: take something existing and look how it is there. Then gradually change things (like, different event type and data, then timestamp, then animation, until you understand it and can create an event from scratch in your model.

The only other way for someone to help you with this is either writing a tool for it, which is huge work for something that apparently only one person ever tried to do in 10 years, or doing it for you, which I doubt people will do.

Or i need a tutorial.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

spik96

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 275
    • View Profile
Re: Model's sound
« Reply #51 on: June 08, 2015, 05:04:18 pm »
Quote from: "ladiszlai"
Or i need a tutorial.
You sounds condescending.
Schlumpf will loose his patience and wield the Banhammer if you continue. Never act like if people were at your service. Never.

If you search a bit and try to understand, you'll never need a tutorial. Let's take a look at the M2 page on the Wiki.
Maybe you don't understand how to understand these data. That's fine, we all have to learn some day.

There are basic steps :
First, do you know the difference between a binary and a text file ? If you open a text file with an editor, you'll see it's rather readable. Like the code of a program. If you open a binary file, you'll only see garbage, Chinese symbols everywhere.

The models in WoW, as m2 files, are binary.
But don't panic, cause there is a way to understand them. The WoW client read these models, so we should be able to, it's just a program after all, it can't be smarter than us ;)

We will view them not with a simple text editor, but with an Hex editor (numbers and letters will show up instead of the garbage). You have to know what hexadecimal is, just look on Wikipedia.

So the wiki tells us at which offset in the model a number is and what it represents. Be sure to understand what an offset is. The header is at the beginning of the file, so the base value is 0. If an address says 0x60, then you have to look at 0+0x60, which is 0x60. Handy.
Note that the"0x" part just means this number is hexadecimal.

In the header, you'll find number of elements and offsets to the first elements.
And that's all the client (and us) needs to read a model and understand its data ;)
You go to the offset, and to the corresponding section in the wiki, and the offsets specified in this section of the wiki will have where you are as a basis value.

It is basic, but I don't think it is common sense for people not versed in computer science and that's why I'm explaining this to you.

If you were to already know what I just wrote and don't want to explore data yourself, then you would be actually lazy and I would ask you to leave this board and come back with a stronger will.
But I'm still confident in the Internet community (maybe I'm too young x) ) and I think sometimes people don't ask for a tutorial because they're lazy but because of their lack of general CS knowledge. And as they don't find this general knowledge here, they just assume it's too hard for them and ask.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Github ]https://github.com/Koward[/url]    Skype : koward723 =)

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Model's sound
« Reply #52 on: June 08, 2015, 07:07:40 pm »
Quote from: "spik96"
Quote from: "ladiszlai"
Or i need a tutorial.
You sounds condescending.
Schlumpf will loose his patience and wield the Banhammer if you continue. Don't act like people are at your service. Never.
If you search a bit and try to understand, you'll never need a tutorial. Let's take a look at the M2 page on the Wiki.
Maybe you don't understand how to understand these data. That's fine, we all have to learn some day.

There are basic steps :
First, do you know the difference between a binary and a text file ? If you open a text file with an editor, you'll see it's rather readable. Like the code of a program. If you open a binary file, you'll only see garbage, Chinese symbols everywhere.

The models in WoW, as m2 files, are binary.
But don't panic, cause there is a way to understand them. The WoW client read these models, so we should be able to, it's just a program after all, it can't be smarter than us ;)

We will view them not with a simple text editor, but with an Hex editor (numbers and letters will show up instead of the garbage). You have to know what hexadecimal is, just look on Wikipedia.

So the wiki tells us at which offset in the model a number is and what it represents. Be sure to understand what an offset is. The header is at the beginning of the file, so the base value is 0. If an address says 0x60, then you have to look at 0+0x60, which is 0x60. Handy.
Note that the"0x" part just means this number is hexadecimal.

In the header, you'll find number of elements and offsets to the first elements.
And that's all the client (and us) needs to read a model and understand its data ;)
You go to the offset, and to the corresponding section in the wiki, and the offsets specified in this section of the wiki will have where you are as a basis value.

It is basic, but I don't think it is common sense for people not versed in computer science and that's why I'm explaining this to you.

If you were to already know what I just wrote and don't want to explore data yourself, then you would be actually lazy and I would ask you to leave this board and come back with a stronger will.
But I'm still confident in the Internet community (maybe I'm too young x) ) and I think sometimes people don't ask for a tutorial because they're lazy but because of their lack of general CS knowledge. And as they don't find this general knowledge here, they just assume it's too hard for them and ask.


Sorry,but This post was unnecessary...

I know what is the Hex edit ....

My problem this :

So i would like to make an SND event for my model, so i added the $SND to the "struct sEvents _Events" line
and i put the SoundID (which is in the SoundEntries.dbc) to the "uint32 Data". Ok that's fine.
Now come the hard part , how can i add the AnimID, Schlumpf send me a link for this : http://wowdev.wiki/index.php?tit ... animations , I spend a lot of time for read this ,
Here i founded this : "Some timestamps/values.elements entries may have number/elements = 0, if for that animation id no animation is given." Then i think  i need to add The AnimID to the Timestamp entry (which is in the "struct SubAnimBlock_T substruct" line), so i added the 5 number ( this is the "Run" AnimationID). And i tryed this ingame but the sound is not played for me.

If anybody can give me more instructions i will thanks this.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

spik96

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 275
    • View Profile
Re: Model's sound
« Reply #53 on: June 08, 2015, 07:26:41 pm »
Quote from: "ladiszlai"
Sorry,but This post was unnecessary...

I know what is the Hex edit ....

My problem this :

So i would like to make an SND event for my model, so i added the $SND to the "struct sEvents _Events" line
and i put the SoundID (which is in the SoundEntries.dbc) to the "uint32 Data". Ok that's fine.
Now come the hard part , how can i add the AnimID, Schlumpf send me a link for this : http://wowdev.wiki/index.php?tit ... animations , I spend a lot of time for read this ,
Here i founded this : "Some timestamps/values.elements entries may have number/elements = 0, if for that animation id no animation is given." Then i think  i need to add The AnimID to the Timestamp entry (which is in the "struct SubAnimBlock_T substruct" line), so i added the 5 number ( this is the "Run" AnimationID). And i tryed this ingame but the sound is not played for me.

If anybody can give me more instructions i will thanks this.

He sent you on this page because on this page there is an explanation on how it works.
So, you made an event. You give it the &SND identifier, and put the SoundID. Fine. Now what the client wants is "when the hell am I going to play that ?"
That's when the timestamps arrives. They are points in time. For each point in time reference in your event, what you said to do in the event will be done.

The animations in Wotlk work this way : each animation has its little timeline, from 0 to X, depending of the length of the animation.
---Supposition---
The n+ofs might not refer directly to the timestamps. Like for animations, they could refer to other array refs (n+ofs), one per animation. So if you want your event to happen, you make as much timestamp array_refs as animations, and in each of these animations you put a 0 to their n. Except the run one, where you put like n=1 and ofs=somewhere where you put a timestamp (uint32 value) like 0.

To know which one is the run, you can check in the animations, they have an ID. So look for the animations with the Run ID, note which one it is (0,1,2...) and you'll change this one in the event.
« Last Edit: June 08, 2015, 08:37:09 pm by Admin »
Github ]https://github.com/Koward[/url]    Skype : koward723 =)

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Model's sound
« Reply #54 on: June 08, 2015, 08:21:39 pm »
Ok thank you for the information , If i Send you my m2 could you please add the Animation to the $SND ? (To the Run animation AnimID=5)

I uploaded for you : http://www.mediafire.com/download/et6jz ... mymodel.m2

The Sound id is already in.

Very,very thanks if you can.

I think the only way is this.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

phantomx

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 615
    • View Profile
Re: Model's sound
« Reply #55 on: June 08, 2015, 11:49:29 pm »
Quote from: "ladiszlai"
Ok thank you for the information , If i Send you my m2 could you please add the Animation to the $SND ? (To the Run animation AnimID=5)

I uploaded for you : http://www.mediafire.com/download/et6jz ... mymodel.m2

The Sound id is already in.

Very,very thanks if you can.

I think the only way is this.

If you don't do it yourself you will never learn.

Obviously you're either lying or not reading what has been posted on this thread your question has already been answered and it's been explained how to be done.

One thing is asking people for information on a subject and another is expecting free labor.

Just take your time and actually do some R&D and you will get the results you want, expecting people to do the work for you and make tutorials for you doesn't teach you anything.

P.S.

Sorry for this little rant but you're not the first to come around expecting things to be handed to you, it's not hard to do some R&D.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
[wimg]http://i.imgur.com/6fxUQL1.gif[/wimg]

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Model's sound
« Reply #56 on: June 09, 2015, 07:04:29 am »
Yes,but if anybody can this is good for example , so in the next time when i do a snd event i will copy from this model.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Model's sound
« Reply #57 on: June 09, 2015, 08:11:40 am »
Any model with an event is fine to understand how it works or to copy from.

Also, copying needs so much adjustments that just doing it from scratch is easier.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Model's sound
« Reply #58 on: June 09, 2015, 05:48:12 pm »
Quote from: "spik96"
Quote from: "ladiszlai"
Sorry,but This post was unnecessary...

I know what is the Hex edit ....

My problem this :

So i would like to make an SND event for my model, so i added the $SND to the "struct sEvents _Events" line
and i put the SoundID (which is in the SoundEntries.dbc) to the "uint32 Data". Ok that's fine.
Now come the hard part , how can i add the AnimID, Schlumpf send me a link for this : http://wowdev.wiki/index.php?tit ... animations , I spend a lot of time for read this ,
Here i founded this : "Some timestamps/values.elements entries may have number/elements = 0, if for that animation id no animation is given." Then i think  i need to add The AnimID to the Timestamp entry (which is in the "struct SubAnimBlock_T substruct" line), so i added the 5 number ( this is the "Run" AnimationID). And i tryed this ingame but the sound is not played for me.

If anybody can give me more instructions i will thanks this.

He sent you on this page because on this page there is an explanation on how it works.
So, you made an event. You give it the &SND identifier, and put the SoundID. Fine. Now what the client wants is "when the hell am I going to play that ?"
That's when the timestamps arrives. They are points in time. For each point in time reference in your event, what you said to do in the event will be done.

The animations in Wotlk work this way : each animation has its little timeline, from 0 to X, depending of the length of the animation.
---Supposition---
The n+ofs might not refer directly to the timestamps. Like for animations, they could refer to other array refs (n+ofs), one per animation. So if you want your event to happen, you make as much timestamp array_refs as animations, and in each of these animations you put a 0 to their n. Except the run one, where you put like n=1 and ofs=somewhere where you put a timestamp (uint32 value) like 0.

To know which one is the run, you can check in the animations, they have an ID. So look for the animations with the Run ID, note which one it is (0,1,2...) and you'll change this one in the event.

Ok , I put the 1 to the Run's Anim block (n) but ingame the sound is not played for me too , i don't know what is the problem now because the same I did what you said. :

« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Model's sound
« Reply #59 on: June 09, 2015, 06:41:01 pm »
ofsValues is wrong
« Last Edit: January 01, 1970, 01:00:00 am by Admin »