Hi all,
I wonder if someone can give me a nudge in the right direction. There are two things that I am looking through here and cant quite grasp.
The first is mob skin changes. I can see looking through the PW script what is being called to change the mobs skin, I can also see the table in the sql database that it is trying to work with.
What I cant currently follow is how it knows from that table what skin to use. For example in mob_change_skin skinid 30 has skinname Diablos, a blank skin model and a animation of 0.
My question is, when changeSkin(30) or whatever its called, is executed, how does it know from that database entry what skin to use? Is it based on the name Diablos? Meaning that in another table there is an entry under Diablos with a skin to use? I have tried to track back through the code and cant see how this would be linked up.
My other question was regarding mob_spell_lists. How would I go about creating a new one? I have tried copying in lines from other existing lists and giving it a unique id, but when i set that spell_list against a mob, the mob just never casts (where as if the same spell is in an existing list and I set that to the mob it will cast it).
Hope that made sense! Also sorry if this isnt quite the right place
Need a boot in the right direction
Re: Need a boot in the right direction
1 - i have no idea what mob_change_skin is for anymore, and probably should get the boot eventually
2 - there's a max spell list defined in the source files, you have to bump that up one if you add a new one (mob_spell_list.h or... something..)
edit: oh, i haven't updated my change skin table in forever...
very very likely it joins to mob_pools on name, and uses mob_pools.modelid as the model
2 - there's a max spell list defined in the source files, you have to bump that up one if you add a new one (mob_spell_list.h or... something..)
edit: oh, i haven't updated my change skin table in forever...
very very likely it joins to mob_pools on name, and uses mob_pools.modelid as the model
Re: Need a boot in the right direction
Cheers for that! Massive help! The max spell list certainly makes sense.
I thought it probably did something like that for the ID, but when I ran a test it didnt seem to (however I only ran one test, it was early this morning, so it is highly likely I spelt a name wrong so it used a default skin or something!)
I thought it probably did something like that for the ID, but when I ran a test it didnt seem to (however I only ran one test, it was early this morning, so it is highly likely I spelt a name wrong so it used a default skin or something!)
-
- Developer
- Posts: 539
- Joined: Sun Jul 22, 2012 12:17 am
Re: Need a boot in the right direction
The appearance is defined in that skin_model column. The names are just arbitrary names for readability. The appearance is stored in hex, so if you're using Navicat it doesn't look very impressive unless you do something like SELECT skinid, skin_name, hex(skin_model) FROM mob_change_skin; And then you're going to ask about what all those numbers mean, so I'll just direct you toward my signature and continue.
As far as joining, it doesn't really. You have to specifically script the NPC/mob to change appearance to the skinid you want it to. There haven't been many real uses for it so far, except for Pandemonium Warden, and changing the appearance of elementals (used in ZM4 only) and astral flow avatars (not used at all.)
Pandemonium Warden's going to need a good total rebuild one of these days, after the rest of ZNM has been fleshed out. For now he's... well, he's not completely inaccurate.
Edit:
Thought of another use. Empties in Promyvion, and possibly Aerns in Sea (different job = different look data)
As far as joining, it doesn't really. You have to specifically script the NPC/mob to change appearance to the skinid you want it to. There haven't been many real uses for it so far, except for Pandemonium Warden, and changing the appearance of elementals (used in ZM4 only) and astral flow avatars (not used at all.)
Pandemonium Warden's going to need a good total rebuild one of these days, after the rest of ZNM has been fleshed out. For now he's... well, he's not completely inaccurate.
Edit:
Thought of another use. Empties in Promyvion, and possibly Aerns in Sea (different job = different look data)
Test Server: Hanekawa | Fantasy World: Naito
An occasionally updated list of what works
Bugs reports go here. | Project chat here.
Things I've found, but don't plan to work on.
An occasionally updated list of what works
Bugs reports go here. | Project chat here.
Things I've found, but don't plan to work on.