How do I add custom graphics to CEs?
Moderators: Flumminator, Zomis
How do I add custom graphics to CEs?
There must be some documentation to this that I can't find. All I know is that it involves some .pcx extension.
Re: How do I add custom graphics to CEs?
1. First you need to create new folder "graphics" in the level set you want to add new graphics to. Then open Notepad and click "File>Save as", change file type from "Text file (.TXT)" to "Any file", save the file to that new "graphics" folder as "graphicsinfo.conf" (yes, .CONF, not .TXT).
Here're these "animation modes" shown as the frames order:
Here're two examples:
You can also do different animations for moving, pushing, collecting, exploding, turning, falling or just standing still for different directions, you just need to add few new rows with the needed element, needed action and direction ([element].[action].[direction]).
For example:
Then you need to have at least one file with width and height that can be divided by 32 (for example, 256x128, 160x64 or 640x354) and any supportable image file (for example PCX or PNG). I'll have the PNG image 192x64 as example. Each frame in it must be aligned on 32x32 pix. grid.
Open the "graphicsinfo.conf" file you created if you closed Notepad after creating it. Type this in there:
Code: Select all
custom_1: [name of image file you need]
custom_1.xpos: [X-position of the needed frame counting from 0]
custom_1.ypos: [Y-position of the needed frame counting from 0]
custom_1.frames: [the frames count for animation]
custom_1.delay: [delay between frames (1=0.02 second=20 milliseconds, not neccessary if frames count is '1')]
custom_1.anim_mode: [animation mode: none, loop, pingpong, pingpong2, linear, random, reverse (can be combined with other anim modes), and some other "special" ones, not neccessary if you just want it to be normally looping]
Code: Select all
custom_1.left:player.png
custom_1.left.xpos:4
custom_1.left.ypos:0
custom_1.left.frames:1
custom_1.right:player.png
custom_1.right.xpos:1
custom_1.right.ypos:1
custom_1.right.frames:1
custom_1.down:player.png
custom_1.down.xpos:1
custom_1.down.ypos:0
custom_1.down.frames:1
custom_1.up:player.png
custom_1.up.xpos:4
custom_1.up.ypos:1
custom_1.up.frames:1
custom_1.moving.left:player.png
custom_1.moving.left.xpos:3
custom_1.moving.left.ypos:0
custom_1.moving.left.frames:3
custom_1.moving.left.delay:4
custom_1.moving.left.anim_mode:pingpong
custom_1.moving.right:player.png
custom_1.moving.right.xpos:0
custom_1.moving.right.ypos:1
custom_1.moving.right.frames:3
custom_1.moving.right.delay:4
custom_1.moving.right.anim_mode:pingpong,reverse
custom_1.moving.down:player.png
custom_1.moving.down.xpos:0
custom_1.moving.down.ypos:0
custom_1.moving.down.frames:3
custom_1.moving.down.delay:4
custom_1.moving.down.anim_mode:pingpong
custom_1.moving.up:player.png
custom_1.moving.up.xpos:3
custom_1.moving.up.ypos:1
custom_1.moving.up.frames:3
custom_1.moving.up.delay:4
custom_1.moving.up.anim_mode:pingpong,reverse
𒈟
Re: How do I add custom graphics to CEs?
That explains everything, thank you!
Re: How do I add custom graphics to CEs?
Thanks a lot, Eizzoux, for this comprehensive and very detailed explanation of how to define custom graphics for custom elements in R'n'D! You did it *much* better than I could have done it myself, and added great illustrations to show how it works!
This post should be part of a larger "custom artwork" documentation yet to be written, but it's really the basics most people will probably want to start with!
Thanks again!![Smile :)](./images/smilies/icon_smile.gif)
This post should be part of a larger "custom artwork" documentation yet to be written, but it's really the basics most people will probably want to start with!
Thanks again!
![Smile :)](./images/smilies/icon_smile.gif)