Unit Creator

It's not easy creating an entire faction or era. Post your work and collaborate in this forum.

Moderator: Forum Moderators

User avatar
Lolinder
Posts: 69
Joined: April 13th, 2011, 1:25 am

Unit Creator

Post by Lolinder »

I've been working on teaching myself PHP, and I thought this would be a good project to do for people new to WML. I've created a browser-based program which generates simple WML code for a unit. I hope to eventually create another interface for factions.

Link.

To Do:
  • Animations
    An explanation of all the items, what each of the options are, etc.
    AMLA (easy, just forgot to do it)
    Attacks
    Sounds
    Abilities
    Make description bigger
    Remove advance_from
    Parenthetical movement type examples
    Healer in usage
    Change URL to Path
    Image Upload
    Compile Zip
Obviously it's not usable in-game yet. But it does generate the first part of the unit, so I thought I'd post it for feedback while I work on the rest.
Last edited by Lolinder on August 17th, 2011, 8:35 pm, edited 6 times in total.
User avatar
Dunno
Posts: 773
Joined: January 17th, 2010, 4:06 pm
Location: Behind you

Re: Unit Creator

Post by Dunno »

It's pretty neat! I think it could use some build in help, though, like explanations that show on mouse over. You know, this kind of tool is most useful for beginners, and they might not understand e.g how the Image URL should look like. Just my two cents.
Oh, I'm sorry, did I break your concentration?
User avatar
Dixie
Posts: 1757
Joined: February 10th, 2010, 1:06 am
Location: $x1,$y1

Re: Unit Creator

Post by Dixie »

Some comments:

- The description box should be bigger. Also, when you do abilities and weapon specials, don,t forget to add the "mandatory" tags to description. (you can add them to the code, it's probably best if it doesn't show up in the text box). For exemple, un skirmishing unit with backstab would look like this: description=_ "something"+{SPECIAL_NOTES}+{SPECIAL_NOTES_SKIRMISHER}+{SPECIAL_NOTES_BACKSTAB}

- I'm not sure whether or not you should include advance_from. It is a useful tag for costum units in SP campaigns, but using it in MP eras will cause OOSes when playing mainline. Maybe it would be safer doing without it, since people using this will likely be WML noobs and not be aware of the issue?

- It would be cool if there could be another section for movement type, where you would have boxes for every terrain cost, terrain defense and resistances. At the top of the section, you would have the movetype dropdown menu, and when you select one, it autofills the corresponding values. If the player changes one of them, the dropdown is set to "custom". Not only so people can design their own resistance scheme etc., but also because most people which units use largefoot or gruefoot. Also adding an example of which unit is belongs to in parenthesis next to the movetype name can be cool, just as pointers for beginners.

- Usage lacks "healer" (or was it "support"?)

- About images: Is "URL" really a good idea? I mean, those will people who will use your page will likely take the code, copy it in some add-on, and expect it to work. But I'm not sure Wesnoth will search the images on the web... Although maybe you planned this so it is otherwise in the code (I dunno how it works out, really), I would suggest a "browse" button that allows you to browse your computer, and just copy the path in the code. Of course, images in unappropriate locations might not work either, though (like, on desktop or something). I dunno, it's a hard catch how to make this really simple to total neophites.
Jazz is not dead, it just smells funny - Frank Zappa
Current projects: Internet meme Era, The Settlers of Wesnoth
User avatar
Lolinder
Posts: 69
Joined: April 13th, 2011, 1:25 am

Re: Unit Creator

Post by Lolinder »

Dixie wrote: - The description box should be bigger. Also, when you do abilities and weapon specials, don,t forget to add the "mandatory" tags to description. (you can add them to the code, it's probably best if it doesn't show up in the text box). For exemple, un skirmishing unit with backstab would look like this: description=_ "something"+{SPECIAL_NOTES}+{SPECIAL_NOTES_SKIRMISHER}+{SPECIAL_NOTES_BACKSTAB}
Yeah, the description box is tiny. I was typing quickly, and forgot that there's another input type for large boxes. And thanks for the reminder, I may have forgotten the tags.
Dixie wrote: - I'm not sure whether or not you should include advance_from. It is a useful tag for costum units in SP campaigns, but using it in MP eras will cause OOSes when playing mainline. Maybe it would be safer doing without it, since people using this will likely be WML noobs and not be aware of the issue?
I'll take it out.
Dixie wrote: - It would be cool if there could be another section for movement type, where you would have boxes for every terrain cost, terrain defense and resistances. At the top of the section, you would have the movetype dropdown menu, and when you select one, it autofills the corresponding values. If the player changes one of them, the dropdown is set to "custom". Not only so people can design their own resistance scheme etc., but also because most people which units use largefoot or gruefoot. Also adding an example of which unit is belongs to in parenthesis next to the movetype name can be cool, just as pointers for beginners.
I was planning on putting the parenthesis in, but I didn't have a list of which unit had what right off the top of my head. The custom movetype would be cool, but I wonder if it would be too complicated for new people? I'll experiment with it.
Dixie wrote: - Usage lacks "healer" (or was it "support"?)
Whoops... thanks for that. I was typing it quickly, and forgot.
Dixie wrote: - About images: Is "URL" really a good idea? I mean, those will people who will use your page will likely take the code, copy it in some add-on, and expect it to work. But I'm not sure Wesnoth will search the images on the web... Although maybe you planned this so it is otherwise in the code (I dunno how it works out, really), I would suggest a "browse" button that allows you to browse your computer, and just copy the path in the code. Of course, images in unappropriate locations might not work either, though (like, on desktop or something). I dunno, it's a hard catch how to make this really simple to total neophites.
URL was the wrong phrase. That indicates internet, I meant within the folder. At some point I'm planning on having it compile a zip file, which would allow me to do image uploads. The image paths (that's the right word!), at the moment, aren't really workable for people who don't know what to do with them. I need to learn more before I can set up the zip, though.
User avatar
powershot
Posts: 1193
Joined: May 7th, 2011, 3:03 am
Location: Central America
Contact:

Re: Unit Creator

Post by powershot »

Do you need help? I can make a example unit. :)
My new account is: Power_Pixel_Wannabe. Yea. Yea.... Why are you still reading this? What the heck m8? You have some kind of problem? Yea. I draw. NO I'M NOT 5 ANYMORE!!! Little brats.
The heck m8? I thought you left... No seriously... go... serious...
ok bye m8. I'm serious.
User avatar
Lolinder
Posts: 69
Joined: April 13th, 2011, 1:25 am

Re: Unit Creator

Post by Lolinder »

For my use, or the users'? Either way, sure. Though I've just been using the game units as examples.

To-do list updated. Didn't do much today, will work more tomorrow.
User avatar
powershot
Posts: 1193
Joined: May 7th, 2011, 3:03 am
Location: Central America
Contact:

Re: Unit Creator

Post by powershot »

It would be useful for filling in Values.
My new account is: Power_Pixel_Wannabe. Yea. Yea.... Why are you still reading this? What the heck m8? You have some kind of problem? Yea. I draw. NO I'M NOT 5 ANYMORE!!! Little brats.
The heck m8? I thought you left... No seriously... go... serious...
ok bye m8. I'm serious.
User avatar
Lolinder
Posts: 69
Joined: April 13th, 2011, 1:25 am

Re: Unit Creator

Post by Lolinder »

I've started working on zip files, the program will now create a file archive.zip containing the file generated. Next up: image uploads (png format only).

EDIT: To-do updated.
User avatar
powershot
Posts: 1193
Joined: May 7th, 2011, 3:03 am
Location: Central America
Contact:

Re: Unit Creator

Post by powershot »

I can give you a big .zip of all the unti images, if that can help.
My new account is: Power_Pixel_Wannabe. Yea. Yea.... Why are you still reading this? What the heck m8? You have some kind of problem? Yea. I draw. NO I'M NOT 5 ANYMORE!!! Little brats.
The heck m8? I thought you left... No seriously... go... serious...
ok bye m8. I'm serious.
User avatar
Lolinder
Posts: 69
Joined: April 13th, 2011, 1:25 am

Re: Unit Creator

Post by Lolinder »

I'm going to have them upload the images, so that won't really be necessary. Thanks for the offer, though. :)

EDIT: Images and ZIP files are now live!
User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: Unit Creator

Post by Crendgrim »

What is the Archive Name?
Apart from that, I'm really missing the opportunity to give a special id without changing the name. This is especially useful for UMC add-ons.

Just a quick note: I tested your script with a new unit for which I needed a config (and was a bit too lazy to write it on myself :P ), but I was not able to actually download the zip your script created, but only to preview the file.

One very tiny bug: I created a Level-0-unit, but your script used ellipse="misc/ellipse" nevertheless (which is supposed to be ellipse="misc/ellipse-nozoc" for units without ZOC, thus Level 0 units)

Then, of course, it would be very nice to have abilities and weapons (the former should not be too hard to implement, actually). Let's see what your script becomes. :)


Crend
UMC Story Images — Story images for your campaign!
User avatar
powershot
Posts: 1193
Joined: May 7th, 2011, 3:03 am
Location: Central America
Contact:

Re: Unit Creator

Post by powershot »

Very cool. But I would like to give my unit a attack and can I make my own move type? :|
My new account is: Power_Pixel_Wannabe. Yea. Yea.... Why are you still reading this? What the heck m8? You have some kind of problem? Yea. I draw. NO I'M NOT 5 ANYMORE!!! Little brats.
The heck m8? I thought you left... No seriously... go... serious...
ok bye m8. I'm serious.
User avatar
Dixie
Posts: 1757
Joined: February 10th, 2010, 1:06 am
Location: $x1,$y1

Re: Unit Creator

Post by Dixie »

Give it time, powershot, this is still in deelopment. Refer to the to do list on the first post.
Jazz is not dead, it just smells funny - Frank Zappa
Current projects: Internet meme Era, The Settlers of Wesnoth
User avatar
Lolinder
Posts: 69
Joined: April 13th, 2011, 1:25 am

Re: Unit Creator

Post by Lolinder »

Crendgrim wrote:What is the Archive Name?
Apart from that, I'm really missing the opportunity to give a special id without changing the name. This is especially useful for UMC add-ons.
Archive Name is the name of the zip. That will be described once I get the documentation in.

Yeah, I thought about that a bit. I intended this to be for very basic units, for starting modders. But I think now it would be a good idea to include the option: maybe make it so if left blank it defaults to the unit name.
Crendgrim wrote: Just a quick note: I tested your script with a new unit for which I needed a config (and was a bit too lazy to write it on myself :P ), but I was not able to actually download the zip your script created, but only to preview the file.
Oh, it gave you the 404. I found the problem: there's a typo in the link. Fixed.
Crendgrim wrote: One very tiny bug: I created a Level-0-unit, but your script used ellipse="misc/ellipse" nevertheless (which is supposed to be ellipse="misc/ellipse-nozoc" for units without ZOC, thus Level 0 units)
Ah, I actually didn't know that. I'll put that in when I begin working.
Crendgrim wrote: Then, of course, it would be very nice to have abilities and weapons (the former should not be too hard to implement, actually). Let's see what your script becomes. :)
Yep, abilities are next on my to-do list. I'm pretty optimistic about this. :)
User avatar
Lolinder
Posts: 69
Joined: April 13th, 2011, 1:25 am

Re: Unit Creator

Post by Lolinder »

Abilities live!

Please report any problems you find with the WML. I'm not very good at either language (WML or PHP), so there are bound to be a few like the ellipse one above.
Post Reply