Import Sprite

Import Sprite

Postby GeraltRivia » Mon Jun 27, 2016 8:20 am

Hello, i wanted to make my own campaign and i wanted to import my own sprites to make new monsters and stuff like this but i don't find how ? i'm a noob please help :(
GeraltRivia
 
Posts: 3
Joined: Mon Jun 27, 2016 8:19 am

Re: Import Sprite

Postby lugdunon » Tue Jun 28, 2016 9:53 pm

How familiar are you with java (mainly for jar files) and json?

All of the current sprites are located in the clover art assets bitbucket repo: https://bitbucket.org/lugdunondev/clover-art-assets.git.
Feel free to clone that repo and take a look at how things are structured.

Alternatively you can unjar (or unzip) the assets from the "net.lugdunon.world.clover.sprite.jar" file located in your server's "lib/mods" directory.

The mod.json file serves as a mod's manifest, basically listing what is included in the mod and where to find it. For this mod, that means there are two main entries:

IMG - contains a key value list pointing to an image and a palette definition file*. The image is .png file and the palette def is a .json file.

and

SPR - contains a key value list pointing to a sprite definition file containing the data that defines a character's sprite (naming, portrait framing, frame sets, the base sprite^, and layers^).

* The palette definition contains a section that maps the indexed colors to a specific number, and each of the preset palettes contains a color list for each palette region map.
^ The base sprite and layer information keys back to an entry in the IMG section.

Once you have a grasp of that, you can head over to the etc/npcs.json file for a server world and take a look at how the npcs are defined.

If you take a look at an npc definition in that file, note that there is a list of appearances. An npc can have multiple so that an appearance can be chose from the list when an npc is instantiated in game to provide a varied look to a group of like npcs. For instance you may have a male townsfolk npc defined that when there are multiple instances, you don't want each townsperson to look exactly the same.

For each appearance, there is a spriteDef property. This keys back to the sprite definition listed in the mod's SPR list. You'll also notice that each appearance can override the default color palette information.

This is something that definitely needs a more formal writeup in the near future (along with a great deal of other things) and eventually there may be a gui editor for most of this process. There already exists a basic npc editor in game, but it only support the appearance and naming aspect of the process (no behaviour, advancements, or inventory info yet).

I hope this helps, and please feel free to let me know if you have any questions or have some points you wish clarified.

Cheers,
Chris
User avatar
lugdunon
Site Admin
 
Posts: 407
Joined: Tue Nov 05, 2013 5:53 pm

Re: Import Sprite

Postby GeraltRivia » Wed Jun 29, 2016 12:02 pm

Almost didn't understood anything, is there no way to drag and drop a sprite in a folder then use it in game just like Eclipse Engine or RPG maker ?
GeraltRivia
 
Posts: 3
Joined: Mon Jun 27, 2016 8:19 am

Re: Import Sprite

Postby lugdunon » Wed Jun 29, 2016 3:17 pm

Sadly, I don't have that simple a method at the moment. As I said in the previous post, it is something I hope to add in the future.

Adding a new sprite that has the same dimensions as a currently defined sprite (i.e. the male human, female human, and human skeleton all share the same dimensions). It would be a fairly simple process to add, and is something I wouldn't mind walking you through.

Cheers,
Chris
User avatar
lugdunon
Site Admin
 
Posts: 407
Joined: Tue Nov 05, 2013 5:53 pm

Re: Import Sprite

Postby GeraltRivia » Thu Jun 30, 2016 4:08 am

Could you make a video please ?
GeraltRivia
 
Posts: 3
Joined: Mon Jun 27, 2016 8:19 am

Re: Import Sprite

Postby lugdunon » Thu Jun 30, 2016 12:27 pm

I'll see what I can do, once this release it out. :)
User avatar
lugdunon
Site Admin
 
Posts: 407
Joined: Tue Nov 05, 2013 5:53 pm


Return to Modding Help!

Who is online

Users browsing this forum: No registered users and 1 guest

cron