Custom Unit Sprite Problems

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
Viminyr
Posts: 4
Joined: February 11th, 2020, 1:00 am
Location: Your Mom's House

Custom Unit Sprite Problems

Post by Viminyr »

I'm trying to learn how to make a campaign, so I'm very new to coding, I made a custom unit named apprentice paladin and he works in game, but has no image, I haven't tried adding a portrait yet but I assume I will run into the same problem. Is there something wrong with the path? I coppied the sergeant file if that helps

Code: Select all

#textdomain wesnoth-my_first_campaign
[unit_type]
    id=Apprentice_Paladin
    name= _ "Apprentice Paladin"
    race=human
    image="units/apprentice_paladin.png"
    hitpoints=20
    movement_type=smallfoot
    movement=5
    level=1
    alignment=lawful
    advances_to=null
    cost=16
    usage=fighter
    description= _ "Becoming a paladin is no easy feat, it takes many years of training and dedication. most do not make it, their hearts were not true."
    [abilities]
        {ABILITY_LEADERSHIP}
    [/abilities]
    [attack]
        name=sword
        description=_"sword"
        icon=attacks/sword-human.png
        type=blade
        range=melee
        damage=4
        number=3
    [/attack]
    [attack]
        name="divine light"
        icon=attacks/lightbeam.png
        type=arcane
        range=ranged
	[specials]
		[chance_to_hit]
			name= _ "magical"
			description= _ "magical attacks always have a 70% chance to hit"
			value=70
		[/chance_to_hit]
	[/specials]
        damage=7
        number=2
    [/attack]
 [/unit_type]
User avatar
Ravana
Forum Moderator
Posts: 2995
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Custom Unit Sprite Problems

Post by Ravana »

Make sure you updated binary_path to have your addon folder.
Viminyr
Posts: 4
Joined: February 11th, 2020, 1:00 am
Location: Your Mom's House

Re: Custom Unit Sprite Problems

Post by Viminyr »

Yup, I feel rather foolish now
Post Reply