Tritian 0 Report post Posted February 5, 2011 I'm relatively new to HB sources but I was playing around just for some knowledge. I managed to add new spells in myself. It seemed pretty easy. Monster sprites on the other hand, I'm having problems with. Could anyone help and post as to which functions should be looked at? Also, can someone explain what these mean? MakeSprite( "GiantPlant", DEF_SPRID_MOB + 7*8*66, 40, TRUE);// Giant-Plant (Type: 76) I.e, the 7*8*66, 40 part Thanks a lot! Share this post Link to post Share on other sites
Tritian 0 Report post Posted February 6, 2011 Through some progression, I had managed to get the monsters to be accepted into the Client. Just as I summon the monster though, the client crashes. Any explanation? Share this post Link to post Share on other sites
MagicJoKer 0 Report post Posted February 7, 2011 ill ask whitefang to take a look in here Share this post Link to post Share on other sites
Tritian 0 Report post Posted February 9, 2011 Haha I was waiting on that. Thanks! Share this post Link to post Share on other sites
tbone 0 Report post Posted February 10, 2011 can you post the method for make sprite? maybe i can help. Share this post Link to post Share on other sites
Tritian 0 Report post Posted February 15, 2011 I searched in all files for the following: 'Slime' Where ever there was a case or anything related to a slime, I added the new NPC. The two main files were Game.cpp and Mapdata.cpp that contained sprites, sounds etc for the mob. Share this post Link to post Share on other sites
Audioslave 0 Report post Posted February 23, 2011 MakeSprite( "GiantPlant", DEF_SPRID_MOB + 7*8*66, 40, TRUE);// Giant-Plant (Type: 76) 1- "GiantPlant" is the name of the sprite. Slime is = Slm, Skeleton is = skel and so on. 2- DEF_SPRID_MOB + 7*8*66 are the index of the sprites. DEF_SPRID_MOB will be always the same for all the mobs, so if you want to add a new mob you must use DEF_SPRID_MOB. The only thing that will change is the 7*8*66. Use hbpak_editor to see these things that i'm going to explain you. 7 = amount of frames on the sprites 8 = amount of sprites for npc behavior. For example: NPC attacking has 8 sprites 66 = The "MONSTER ID". Really this isn't de monster id but it's an idea. For example. if your last monster on MakeSprite was 7*8*66 and you want to add another mob, you will have to do something like that: 7*8*67. For other monster: 7*8*68 and so on. Also you have a lot of methods that draw the mobs, you have to check on those methods too. Just see how the others mobs are drawn. methos like: DrawNpc_OnStop or something like that. Share this post Link to post Share on other sites
Tritian 0 Report post Posted February 26, 2011 MakeSprite( "GiantPlant", DEF_SPRID_MOB + 7*8*66, 40, TRUE);// Giant-Plant (Type: 76) 1- "GiantPlant" is the name of the sprite. Slime is = Slm, Skeleton is = skel and so on. 2- DEF_SPRID_MOB + 7*8*66 are the index of the sprites. DEF_SPRID_MOB will be always the same for all the mobs, so if you want to add a new mob you must use DEF_SPRID_MOB. The only thing that will change is the 7*8*66. Use hbpak_editor to see these things that i'm going to explain you. 7 = amount of frames on the sprites 8 = amount of sprites for npc behavior. For example: NPC attacking has 8 sprites 66 = The "MONSTER ID". Really this isn't de monster id but it's an idea. For example. if your last monster on MakeSprite was 7*8*66 and you want to add another mob, you will have to do something like that: 7*8*67. For other monster: 7*8*68 and so on. Also you have a lot of methods that draw the mobs, you have to check on those methods too. Just see how the others mobs are drawn. methos like: DrawNpc_OnStop or something like that. Thank you so much! Really appreciate the help. Share this post Link to post Share on other sites
Audioslave 0 Report post Posted February 26, 2011 You're welcome! Feel free to ask if you have another question! Share this post Link to post Share on other sites