Page 1 of 1

How to make a custom unit?

Posted: Sat Apr 19, 2025 5:39 pm
by Sova173
What I really mean is that I'm having trouble creating a custom unit icon, specifically with the string graphic = "[NAME HERE]"

Who can help with this line?

Re: How to make a custom unit?

Posted: Sat Apr 19, 2025 6:46 pm
by Elefant
The tileset will need to provide the specified graphic. If it is not present, the alt graphic will be used.

Re: How to make a custom unit?

Posted: Sat Apr 19, 2025 6:50 pm
by cazfi
Graphics are provided by the tilesets. The tileset defines tags for the sprites in it. See .spec files.

That ruleset "graphics" line just refers to a tag provided by the tileset.

Re: How to make a custom unit?

Posted: Sat Apr 19, 2025 7:43 pm
by Sova173
Thanks, but how do I make a custom tag? Since I'm just starting out, I need to figure it out.

Re: How to make a custom unit?

Posted: Sat Apr 19, 2025 8:04 pm
by cazfi
Sova173 wrote: Sat Apr 19, 2025 7:43 pm Thanks, but how do I make a custom tag? Since I'm just starting out, I need to figure it out.
The tags are defined in the .spec files of the tileset.

See also doc/README.graphics

Re: How to make a custom unit?

Posted: Sat Apr 19, 2025 8:33 pm
by Sova173
Error:
the “isophex” graphics set may not be compatible with the [NAME OF MY RULESET] ruleset There are no sprites for unit [MY UNIT] with the tag “[TAG]” and its alternatives “-” and “-”.


What am I supposed to do? I've been doing this shit for 20 minutes.

Re: How to make a custom unit?

Posted: Sat Apr 19, 2025 9:05 pm
by cazfi
If you just want to modify "isophex" tileset to be compatible with your custom ruleset with the new unit:

From isophex.tilespec "files" we see that it uses "trident/units.spec" and "trident/extra_units.spec" for units, so you should add your unit sprite to trident/extra_units.png and define the tag in trident/extra_units.spec.

Alternatively you could add completely new .png and .spec, and add it to isophex.tilespec "files" list.

Re: How to make a custom unit?

Posted: Sat Apr 19, 2025 9:11 pm
by Sova173
I'm using an alternative, I'll let you know how it goes.