Wesnoth Unit Creator! Updated!

Discussion of all aspects of the game engine, including development of new and existing features.

Moderators: Forum Moderators, Developers

Wesnoth Unit Creator! Updated!

Postby Hellfire » May 4th, 2014, 4:37 pm

Since this seems like the most appropriate place to post this, here you go!
Here's some screenshots:
Original:

V1.2:

A nearly full unit creation tool for windows (missing animation and image input I'm afraid, may be added later)
Since i literally just finished making this, There are still a few bugs, as can be read in the readme i've put into the .rar file. Any help solving these would be appreciated.
Enjoy!

Original:
V1 : http://www.mediafire.com/download/db6bj ... llfire.zip

V1.1 :
I fixed diesound not being added to the cfg file, and fixed a small bug where the skirmisher ability wasn't being added.
V1.1 : http://www.mediafire.com/download/9fi9b2mhzmznmct/WUC_V1.1_By_Hellfire.rar

V1.2:
-Added cold and fire resistance
-Added ability to use your own file paths for attack icons
-Changed the layout a little
-Added more options in the usage box
-Added More abilities
-Added more attack properties
-Made the "Used?" checkbox more understandable
-Added Liminal alignment
V1.2: http://www.mediafire.com/download/q7ru2tnw7n82eo1/WUC_V1.2_By_Hellfire.rar
Last edited by Hellfire on May 7th, 2014, 6:44 pm, edited 2 times in total.
Hellfire
 
Posts: 8
Joined: May 4th, 2014, 4:32 pm

Re: Wesnoth Unit Creator! Updated!

Postby Hellfire » May 7th, 2014, 6:05 am

Come on guys, what can i do to improve it? I know some of you have downloaded it, since i have 37 downloads.
Hellfire
 
Posts: 8
Joined: May 4th, 2014, 4:32 pm

Re: Wesnoth Unit Creator! Updated!

Postby Heindal » May 7th, 2014, 8:02 am

Hi Hellfire,

I've had the same idea for a unit creator, but fortunately never pulled it off.
You did a good job so far. Did you use perl?

Here some suggestions:

- Usage just contains fighter - add the others forms such as healer, archer, scout
- what is the checkboxed used? for?
- concerning range - as far as I know you can create an attack that works on all ranges - you should add this option
- maybe a dropdownmenu to choose from existing weapon names (like races)
- you might add more abilities, which work with the existing abilities such as darken and so on
- add a textbox so the creators can place own code or Image pathes: abilities, weaponicons and weaponsspecials
- a "save pattern" button or load unit definition would be nice to see: so you can edit an existing unit

Last but not least. Simply changing units is realitvely easy and even so your tool might save time, it still lacks one of the most important things. Changing images and animations takes most the time, when creating a new unit. Adding idle, defense, attack and movement to your generator would defininetly help.
The future belongs to those, who believe in the beauty of their dreams.
Developer of: Trapped, Five Fates, Strange Legacy, Epical
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses
User avatar
Heindal
 
Posts: 838
Joined: August 11th, 2011, 9:25 pm
Location: Germany

Re: Wesnoth Unit Creator! Updated!

Postby Battlecruiser_Venca » May 7th, 2014, 8:54 am

Missing:
fire/cold resist override
several mainline movetypes
Liminal alignment
support for not to overriding movetype's resistances
Battlecruiser_Venca
 
Posts: 196
Joined: June 3rd, 2009, 11:37 am

Re: Wesnoth Unit Creator! Updated!

Postby Hellfire » May 7th, 2014, 5:33 pm

Thanks for the replies both of you, I'll add as many of those changes as i can soon.

Heindal, i made this in visual studio, using visual basic.
The "Used?" checkbox is there to indicate whether that attack is created or not. If you were to check it but leave all the boxes blank, it would just leave you with a blank attack pattern.

As for the images and animations, I don't understand that part of the WML, so i can't add it unless i could have a explanation :/
I'm bit of a noob when it comes to both playing and modding BfW, so you'll have to forgive me. If you could help me out by giving me examples of what you want me to do, that would be great.

Edit: Check the OP for another update to it. All additions to it are listed.
In regards to Heindal's requests:
What is the name of the code used for a all range attack? I can't seem to find it.
Dropdown for existing attacks: would be a lot of work, and premade attacks can be easily replicated with the program already. If i do add this, it will be when there isn't much left to add.
For the abilities added, I've added all those that have macros that were mentioned on the wiki, i'm not aware of any others. If you could link me to a page with them i would be grateful, since it's a easy change to add.
I've added a textbox for image paths, i will add them for abilities and specials soon.
What do you mean by a save pattern button?
Loading existing units is difficult for me, since the only way i can think to do it would be to store the entire file in a string, loop to find the wml tags, then read what comes after the tags, until a space is found. It would take a while.

For Venca's requests:
Which move types am i missing? I can't find them on the wiki :/
What do you mean by "support for not to overriding movetype's resistances"?
Hellfire
 
Posts: 8
Joined: May 4th, 2014, 4:32 pm

Re: Wesnoth Unit Creator! Updated!

Postby Battlecruiser_Venca » May 8th, 2014, 9:18 am

I haven't found dor example any of the drake's movetypes (drakefoot, drakefly)

The support to not overriding resistnces is that a movetype provides a resistance, but you don't provide an option to use movetype's instead of yours provided value. So the movetype's value is always overriden
Battlecruiser_Venca
 
Posts: 196
Joined: June 3rd, 2009, 11:37 am

Re: Wesnoth Unit Creator! Updated!

Postby Hellfire » May 8th, 2014, 2:27 pm

Battlecruiser_Venca wrote:I haven't found dor example any of the drake's movetypes (drakefoot, drakefly)

The support to not overriding resistnces is that a movetype provides a resistance, but you don't provide an option to use movetype's instead of yours provided value. So the movetype's value is always overriden


Could you give me an example of a unit that has the movetype that gives resistance? I'm still a little confused and i'd like to look at the WML for it....
Hellfire
 
Posts: 8
Joined: May 4th, 2014, 4:32 pm

Re: Wesnoth Unit Creator! Updated!

Postby AI » May 8th, 2014, 3:05 pm

All of them? Look at core/units.cfg
AI
Developer
 
Posts: 2394
Joined: January 31st, 2008, 8:38 pm

Re: Wesnoth Unit Creator! Updated!

Postby Hellfire » May 8th, 2014, 5:09 pm

AI wrote:All of them? Look at core/units.cfg


Huh, there's a file i haven't seen before! I'll be sure to add everything i find in there to the creator.
Seeing the file, the movetype resistance thing just clicked. I'll add a checkbox for the resistances as well :)
Hellfire
 
Posts: 8
Joined: May 4th, 2014, 4:32 pm

Re: Wesnoth Unit Creator! Updated!

Postby Heindal » May 9th, 2014, 3:51 pm

My bad :(. Strike what I said about range. You can define own ranges, for example to create an attack that can't be countered. These ranges however have to be defined first, otherwise this attack will look odd. You could change the range setting like you did it with the race, to let the creator define an own range if required.

Units also have a portrait and a basic unit picture which is missing in your definition.

example:

image="units/orcs/champion.png"
profile="portraits/orcs/warlord.png"

Information about the animation can be found here: http://wiki.wesnoth.org/AnimationWML
Types of animations can be found under: "Events triggering animations and default animations"

You should concentrate on the following animations: standing, movement, idle, death, defend, attack which imho are the most important kinds of animation.
I will provide an example unit definition with these six animations later, but maybe something like this already exists.
The future belongs to those, who believe in the beauty of their dreams.
Developer of: Trapped, Five Fates, Strange Legacy, Epical
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses
User avatar
Heindal
 
Posts: 838
Joined: August 11th, 2011, 9:25 pm
Location: Germany

Re: Wesnoth Unit Creator! Updated!

Postby Heindal » May 10th, 2014, 10:33 am

Here you go, I've made an example for the most common kinds of animations.


Code: Select all
#textdomain wesnoth-units
[unit_type]
    id=Angel
    name= _ "Angel"
    race=magical
    generate_name=no
    image="units/heavenorhell/angel.png"
    profile=portraits/angel.png
    ellipse="misc/ellipse"
    hitpoints=150
    movement_type=smallfly
    movement=10
    experience=800
    {AMLA_DEFAULT}
    level=5
    alignment=neutral
    advances_to=null
    cost=150
    usage=healer
    description=_ "Angels sometimes appear changing the fates of the world. Some people believe that they are messenger send by a higher being - the one god - and that they appear to those who are peaceful and even fight by the side of those who are worthy. Even if that should be true, an angel is a fearsome, powerful being and should be approached with respect and carefulness. An angel is always surrounded by loyal minions. Separated from his minions a demon assassin might have chance to beat even this powerful entity. Angels however feel its their duty to protect the innocent, so their defence on a village is remarkable and an angel in such a defensive position is almost undefeatable."
    die_sound=magic-holy-1.ogg
    [defense]
        village=90
    [/defense]   
    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/angel.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/angel.png"
    [/portrait]   
   [defend]
        start_time=-126
        [frame]
            duration=1
            image=units/heavenorhell/angel.png
        [/frame]
        [frame]
            duration=100
            image=units/heavenorhell/angel-defend.png
        [/frame]
        [if]
            hits=hit
            [frame]
                duration=150
                image=units/heavenorhell/angel-defend.png
                sound=human-female-die-3.ogg
            [/frame]
        [/if]
        [else]
            hits=miss,kill
            [frame]
                duration=150
                image=units/heavenorhell/angel-defend.png
            [/frame]
        [/else]
        [frame]
            duration=1
            image=units/heavenorhell/angel.png
        [/frame]
    [/defend]
   
   #{DEFENSE_ANIM "units/heavenorhell/angel.png" "units/heavenorhell/angel-defend.png" human-female-die-3.ogg}
    # this is the macro for this kind of defense animation and can be found under data\core\macros\animation-utils.cfg

   
    [movement_anim]
      # this will displayed when the angel is moving
        [frame]
            begin=0
            end=150
            image="units/heavenorhell/angel-moving.png"
        [/frame]
    [/movement_anim]
    [standing_anim]
   # angel will start to fly as soon as he is over water, other creatures might swim
        start_time=-50
        terrain_type=!,*^B*,!,Chs^*,Chw^*,W*^*,S*^*,*^Vm
        [frame]
            image="units/heavenorhell/angel-moving.png"
            duration=50
        [/frame]
    [/standing_anim]
    [standing_anim]
   # the standing animation will make the angel move his wings a little and turn his head
        start_time=-50
        [frame]
            image="units/heavenorhell/angel.png"
            duration=200
        [/frame]
        [frame]
            image="units/heavenorhell/angel1.png"
            duration=500
        [/frame]
        [frame]
            image="units/heavenorhell/angel.png"
            duration=500
        [/frame]
    [/standing_anim]

    [idle_anim]
        {STANDARD_IDLE_FILTER}
        start_time=0
      # angel makes test strike
        [frame]
            duration=100
            image="units/heavenorhell/angel.png"
        [/frame]
        [frame]
            duration=100
            image="units/heavenorhell/angel-defend.png"
        [/frame]
        [frame]
            duration=100
            image="units/heavenorhell/angel-attack1.png"
        [/frame]
    [/idle_anim]
    [death]
   # the angel fades away
        start_time=0
        [frame]
            duration=50
            image=units/heavenorhell/angel-ranged.png
         sound=human-female-die-3.ogg
        [/frame]
        [frame]
            duration=100
            image=units/heavenorhell/angel-death1.png
        [/frame]
        [frame]
            duration=100
            image=units/heavenorhell/angel-death2.png
        [/frame]
    [/death]
    [abilities]
        {ABILITY_CURES}
        {ABILITY_REGENERATES}
        {ABILITY_STEADFAST}
        {ABILITY_LEADERSHIP_LEVEL_5}
        {ABILITY_ILLUMINATES}
    [/abilities]
    [attack]
        name=dualblade
        description=_"dualblade"
        icon=attacks/sword-holy.png
        type=blade
        range=melee
        damage=15
        number=4
    [/attack]
    [attack]
        name=holyfury
        description=_"holyfury"
        icon=attacks/lightbeam.png
        type=arcane
        range=ranged
        damage=15
        number=2
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]

       [attack_anim]
        [filter_attack]
            name=dualblade
        [/filter_attack]
        start_time=-400
        [frame]
            duration=25
            image="units/heavenorhell/angel.png"
        [/frame]
        [frame]
            duration=150
            image="units/heavenorhell/angel-defend.png"
        [/frame]
        [frame]
         duration=150
         image="units/heavenorhell/angel-attack1.png"
         sound=sword-1.ogg
        [/frame]

        [frame]
            duration=150
            image="units/heavenorhell/angel-attack2.png"
        [/frame]
        [frame]
            duration=100
            image="units/heavenorhell/angel-attack1.png"
        [/frame]
        [frame]
            duration=25
            image="units/heavenorhell/angel-defend.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=holyfury
        [/filter_attack]
        {MISSILE_FRAME_LIGHT_BEAM}
        start_time=-325
        [frame]
            duration=25
            image="units/heavenorhell/angel.png"
        [/frame]
        [frame]
            duration=150
            image="units/heavenorhell/angel1.png"
        [/frame]
            [frame]
                duration=150
                image="units/heavenorhell/angel-ranged.png"
                sound=magic-holy-3.ogg
            [/frame]
    [/attack_anim]
[/unit_type]
Attachments
angelexample.png
This contains all pictures used in the example. I just made them for my campaign Strange Legacy.
The future belongs to those, who believe in the beauty of their dreams.
Developer of: Trapped, Five Fates, Strange Legacy, Epical
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses
User avatar
Heindal
 
Posts: 838
Joined: August 11th, 2011, 9:25 pm
Location: Germany

Re: Wesnoth Unit Creator! Updated!

Postby Hellfire » May 10th, 2014, 11:37 am

Thanks for the example! I'll do my best to add animations, but no promises.

Edit: Tests are coming up so i won't be able to update anytime soon, sorry :(
Hellfire
 
Posts: 8
Joined: May 4th, 2014, 4:32 pm

Re: Wesnoth Unit Creator! Updated!

Postby aqwed16 » December 22nd, 2017, 3:12 am

Hey I had a quick question, I don't know if anyone will see this, but I'm trying to get a Special Weapon I made work, but I cant seem to get it to work. maybe I'm missing a step in making it. I put it into the abilities and in the special notes, is there anything else I need to do to get it to work?
thanks!
aqwed16
 
Posts: 1
Joined: December 22nd, 2017, 3:07 am

Re: Wesnoth Unit Creator! Updated!

Postby ForestDragon » December 22nd, 2017, 7:55 am

aqwed16 wrote:Hey I had a quick question, I don't know if anyone will see this, but I'm trying to get a Special Weapon I made work, but I cant seem to get it to work. maybe I'm missing a step in making it. I put it into the abilities and in the special notes, is there anything else I need to do to get it to work?
thanks!
the special notes are only meant for notes about the ability to appear in unit descriptions. to make them actually work, but them in [abilities]/[specials] tags respectively (the latter should be put inside [attack] tag, btw). btw, idea: instead of just selecting the movetype, add an option to choose defenses/movement costs for the unit, with a "as in movetype" default option.
User avatar
ForestDragon
 
Posts: 1335
Joined: March 6th, 2014, 1:32 pm


Return to Coder’s Corner

Who is online

Users browsing this forum: No registered users and 3 guests