Author Topic: Creation of Mobs, Players, Sprites?  (Read 7942 times)

clo

  • Posts: 8
  • Hello
    • View Profile
Creation of Mobs, Players, Sprites?
« on: May 27, 2014, 01:55:27 PM »
Hello everyone. :) I have been looking for a tutorial on what template I need to design and import my own mob. I don't know what they are formally called here, just know the universal name for in game AI are mobs. I have done some research, however I was not able to find anything that could help me. If no how to/tutorial exists on the topic. I will work until I can make my own. Here are some topics I have looked into that have also talk about the subject.
Code: [Select]
http://hammerwatch.com/forum/index.php?topic=1909.msg3710#msg3710
http://hammerwatch.com/forum/index.php?topic=1925.msg3820#msg3820
http://hammerwatch.com/forum/index.php?topic=50.msg2480#msg2480
http://hammerwatch.com/forum/index.php?topic=1800.msg3539#msg3539
In the last topic, I ran into this post:
Firstly, it depends on whether you just want to play the normal campaign with different character sprites, or if you want to create a custom campaign that makes use of different character sprites.

If you're just planning on using different sprites for the main campaign, you're going to run into issues. The sprites are a part of the campaign just as much as the level lay-out and game logic are. They're irreversibly intertwined with the campaign, and can't be changed without some serious work that I can't even comprehend accomplishing.

So let's just hope you're talking about custom campaigns (And the alternative to the above issue, that is sort of a work-around)!
Firstly, in your custom campaign, you have to unpack the assets using the ResourceExtractor.
(Copy assets.bin to your custom campaign folder, and then drag it from the custom campaign folder onto the ResourceExtractor. This will create a bunch of folders in your custom campaign folder that contain all of the HammerWatch assets. These assets will overwrite all of the native game assets when that custom campaign is run.)
Now it's only a matter of finding the Sprites within the assets (hammerwatch\editor\customCampaign\actors\player\) and modifying them.

Now, if you really just want to play through the main campaign with your custom sprites, you can download the editor files for the campaign, (Located in resources, courtesy of Hipshot), and go in and modify the sprites in that, re-pack it, and play. However, I'm pretty sure that would prevent you from getting any achievements.

If you have any further questions, or need anything I said explained, feel free to ask!
This may be what I am looking for, however, what the hell is a sprite!  ;D Thank you everyone!

Kashlavor

  • Posts: 79
  • Spike Dodger.
    • View Profile
Re: Creation of Mobs, Players, Sprites?
« Reply #1 on: May 27, 2014, 08:32:59 PM »
So you're just looking for some help about how to make new monsters? Sure, I was thinking of making a tutorial at some point....give me a bit and I can point out a few tips.  I know that it may not be abundantly clear at the beginning...

Most of the guides seem to expect you to just kinda....figure it out...
Starting work on the Lair of the Archnecromantrix, a Hammerwatch campaign!

Kashlavor

  • Posts: 79
  • Spike Dodger.
    • View Profile
Re: Creation of Mobs, Players, Sprites?
« Reply #2 on: May 27, 2014, 08:38:14 PM »
Disorganized version:

A sprite is just a name for the graphic which a monster uses, I'd recommended you google the term if you want to know more about it as its a pretty universal concept in game design (I know, I hate it too when the answer to your question is "L2GOOGLE bro," but there really is plenty of information out there).  A quick overview is that a sprite usually refers to a pixel graphic for a character/monster with a set number of frames (what Hammerwatch uses), as opposed to different styles of animation, such as tweens, 3d models with rigging, or anything else out there.

So to make a "new monster" you'll need to do the following.

Open up the HammerwatchEditor and make a new map, you will need a place to put your new monster once you have it, and a place to test it.  Here we have to ask, why are you making a new monster? Do you want to make your own custom level?  What are you looking to do?

Next you should take the assets.bin file from your Hammerwatch folder and drop it onto the resource_extractor.exe, this will unpack all the little bits that make up Hammerwatch and let you look at them.  From here you should go into the actors folder and poke around.  Every monster is defined by its xml.  When you go to make your own monster you will need to make a file for it (probably by copy/paste and editing one of the existing ones).

Decided to make a tutorial.  Here it is
« Last Edit: May 27, 2014, 09:08:10 PM by Kashlavor »
Starting work on the Lair of the Archnecromantrix, a Hammerwatch campaign!

clo

  • Posts: 8
  • Hello
    • View Profile
Re: Creation of Mobs, Players, Sprites?
« Reply #3 on: May 30, 2014, 01:58:19 PM »
Thank you very much Kashlavor. Really appreciate the work you put into this. Helped me a lot!

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: Creation of Mobs, Players, Sprites?
« Reply #4 on: June 10, 2014, 09:23:25 PM »
As Kash says the best way to get an idea of what they are is to unload that assets.bin folder, go to the "characters" folder and open one of the images to see the "Sprite Sheet".

After that you can also open one of the .xmls to see exactly how the options are set up in the XML code. XML for HW is very easy, but if you've never coded anything before I can understand how confusing it will be. There is currently a tutorial going on by Linaru that I believe is addressing some of the basics for the XML, but I'd be happy to help you out with any of your questions.

The first step will be to draw a sprite sheet for your new mob (and yes, mob is short for mobile which is short for mobile-ai-object I believe).
Take a look at the Tick sprite sheet, and maybe draw your mob using that as a reference. You will need:

8 directions of movement, and 8 directions of attacking. Idle and death animations are optional, but you can do those as well. Once you have that sprite sheet you can open the tick.xml and just replace the info for the animations there with the info for yours (replace tick.png with newmob.png, and change the coordinates and sizes to your sprite)

If you need help with that, let me know!


Once RW Act 1 is released, I'll be making some videos on some basic spriting and animating and such, with pointers and tips to the best of my ability. I'm happy to help however I can!