[Idea] Extend the in-game editor

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
shevegen
Posts: 497
Joined: June 3rd, 2004, 4:35 pm

[Idea] Extend the in-game editor

Post by shevegen »

Wesnoth has an editor for, I believe, maps. I used to think it was poorly implemented; I think I may have it tried in 2008 or so. But then when I tried it again last year or two years ago, I was surprised that the editor was actually really good and useful.

Based on this I would like to propose an extension.

The idea here is to be able to CREATE new unit types. Specifically I have some unique monsters from my old pen and paper RPG group, and these are already specified and available in .yml files and other descriptions. So I have all the features available as-is; now I only need to transfer that to a format and variant wesnoth understands easily.

The idea is that we get all the tools to eventually yield the unit information into a XML file, or however else wesnoth stores this internally.

We should also be able to combine different abilities, ideally even in non-standard campaigns like Legend of the Invicinibles.

I could then create new unique monster types quite quickly. Perhaps also add an input field to use a specific image, that we have stored locally, and it is then automatically moved to where wesnoth may expect it. But the main idea is to be able to generate new unit types for campaigns.

This could also help newcomers who want to create their own unique campaigns.

This functionality could be made available as a separate tab from within the game editor. Or perhaps via some options or preferences on the top down area or so.
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2364
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: [Idea] Extend the in-game editor

Post by Lord-Knightmare »

Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: [Idea] Extend the in-game editor

Post by beetlenaut »

shevegen wrote: June 19th, 2022, 7:09 pm The idea is that we get all the tools to eventually yield the unit information into a XML file, or however else wesnoth stores this internally.
All you really need is a text editor because this is how it's stored:

Code: Select all

[unit_type]
    id=Troll
    name= _ "Troll"
    image="units/trolls/grunt.png"
    profile=portraits/trolls/troll.png
    hitpoints=55
    movement_type=largefoot
    movement=5
    experience=66
    level=2
    alignment=chaotic
    advances_to=Troll Warrior
    cost=27
    description= (...snip...)
    die_sound={SOUND_LIST:TROLL_DIE}
    [abilities]
        {ABILITY_REGENERATES}
    [/abilities]
    [attack]
        name=club
        description=_"club"
        type=impact
        range=melee
        damage=14
        number=2
    [/attack]
    (...animation frames skipped...)
[/unit_type]
Adding an ability that already exists is as simple as adding a new line that calls the ability's code. You can see an example above. If you want one from another add-on, you just need to copy and paste the code into your add-on first. You don't have to worry about how it works as long as you know its name.

You do also have to set up your folder structure correctly so you can use your unit in the game, but there is a big "Create" button at the top of this page where you can easily find an explanation of how to do that. You can also download WML Guide from the add-ons server, which can serve as a template and testing arena.

Starting from scratch, I bet you can be using a new creature in less than an hour. Nobody has wanted to spend weeks writing a full-fledged, graphical unit editor like you are talking about in order to cut down that time.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
Post Reply