Adding a Custom Unit into A Default Faction.

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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
User avatar
danman5550
Posts: 14
Joined: May 6th, 2012, 6:16 pm

Adding a Custom Unit into A Default Faction.

Post by danman5550 » May 8th, 2012, 12:45 am

I'm trying to copy a new unit into a default faction, and I don't know what I'm doing wrong.

The .cfg for the new unit (not for criticisms, it's just a test)
Spoiler:
The .cfg file for a unit that actually works.
Spoiler:
What else do I have to edit to allow this unit to be recruited by the Loyalist faction? I put the necessary graphics in the correct files, I think...


The actual image error I got.
Spoiler:
Last edited by artisticdude on May 8th, 2012, 1:46 am, edited 2 times in total.

User avatar
artisticdude
Moderator Emeritus
Posts: 2423
Joined: December 15th, 2009, 12:37 pm
Location: Somewhere in the middle of everything
Contact:

Re: Adding a Custom Unit into A Default Faction.

Post by artisticdude » May 8th, 2012, 1:50 am

Moved to the WML Workshop. Generally questions concerning how something can be done in WML should go here. Also:

Please do not use colored text unless absolutely necessary (which, in this case, it was not), as per point 1d of the Posting Guidelines. I've edited your post to remove the color.
I've edited the title of this thread, since it conflicted with point 1c of the Posting Guidelines.
• Don't forget to add BB [code] tags around your WML, it makes the code much more readable here on the forums. :wink: I've added them for you.


With regard to your question, in your edited .cfg file, you have the textdomain and the opening [unit_type] tag on the same line, so the WML parser doesn't notice the opening [unit_type] tag (it thinks it's part of the text domain). Move the [unit_type] tag down to its own line, and it should work. :)
"I'm never wrong. One time I thought I was wrong, but I was mistaken."

User avatar
danman5550
Posts: 14
Joined: May 6th, 2012, 6:16 pm

Re: Adding a Custom Unit into A Default Faction.

Post by danman5550 » May 8th, 2012, 2:16 am

Thanks for the edit, I didn't reread the rules for this post, it's my only major one I've made. I'll try your method too, I hope it works. Thanks for that.

Post Reply