Faction Generator!

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
thenotoriousmrbaker
Posts: 15
Joined: August 17th, 2012, 10:59 pm

Faction Generator!

Post by thenotoriousmrbaker »

entirely true i suppose. And your right, i do sound like quite the moocher at the moment :hmm:.

Ok here goes. I have done 5-6 attempts previously. I have deleted all by my latest one due to a large amount of error messages on attempt number 4 and 5. I remember number 5 said i had a multiple missing Macro faction... things. This happened where when I tried to combine two different era's together into a new era called test 4 and test 5, respectively (two different attempts).

My newest era is one which is incredibly simple, just to try to handle the basic building blocks of the game. Taken almost directly from the Forum's "Create" instructions for faction building, I am only creating one faction with one unit (Outlaws, which can recruit Outlaw). In this case I run into a different sort of problem. I see no error messages, but my Era also doesn't show up on a list of eras. I'm not really sure what i'm doing wrong in this case, as I followed the instructions pretty much word for word.

I can't seem to upload myera, (name taken from the 'create' area of wesnoth). because it is a file folder, and attachments wont let me select the whole thing, so here it is in bits and peices. Outlaw is in wesnoth1.10/data/addons/myera/units. The others (including server which wouldn't upload for some reason) are in wesnoth1.10/data/addons/myera
Attachments
Outlaw.cfg
(7.31 KiB) Downloaded 134 times
MyEra.cfg
(552 Bytes) Downloaded 146 times
MyEra_MP_era.cfg
(241 Bytes) Downloaded 115 times
User avatar
Ravana
Forum Moderator
Posts: 3322
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Faction Generator!

Post by Ravana »

Addon_name.cfg is for single file addons, else use _main.cfg

Code: Select all

[+units]
    {~add-ons/MyEra_MP_era/units}
	Outlaw #what is this doing here?
[/units]

Code: Select all

name={MENU_IMG_TXT "any image file in the game's ./images directory" (_"faction name")}
Here this specified image isnt found so it is likely to show error.
Also if you have key then dont leave it empty, like you did with type=
User avatar
Dixie
Posts: 1757
Joined: February 10th, 2010, 1:06 am
Location: $x1,$y1

Re: Faction Generator!

Post by Dixie »

The macro thing:

In WML, a macro is identified by it being between braces (is this the right word?). For example: {THIS_IS A MACRO variable1 variable2} What a macro does is take the braces thing and replace it with a predefined block of text. For macros from mainline, there are no problems, since they are defined in the main code. But taking pieces of UMCs might have you take user-defined macros without their definitions, hence the engine cannot find them. Usually, user-made eras will have a file named either something like "macros.cfg", "abilities.cfg", "specials.cfg" or something like that, where the needed macros are defined.
Jazz is not dead, it just smells funny - Frank Zappa
Current projects: Internet meme Era, The Settlers of Wesnoth
thenotoriousmrbaker
Posts: 15
Joined: August 17th, 2012, 10:59 pm

Re: Faction Generator!

Post by thenotoriousmrbaker »

Ravana wrote:Addon_name.cfg is for single file addons, else use _main.cfg
Could you explain a bit more, I'm confused.
Ravana wrote:

Code: Select all

[+units]
    {~add-ons/MyEra_MP_era/units}
	Outlaw #what is this doing here?
[/units]
Thought I had to list units i wanted here? I'll remove it then.
Ravana wrote:

Code: Select all

name={MENU_IMG_TXT "any image file in the game's ./images directory" (_"faction name")}
Here this specified image isnt found so it is likely to show error.
Also if you have key then dont leave it empty, like you did with type=
There are quite a few empty spaces, such as with the type= example. I'm not quite sure what I should put here. Should I just leave them empty?

Also When it asks for recruitment pattern, what should I put in.

Sorry man, might have to explain a bit more.
thenotoriousmrbaker
Posts: 15
Joined: August 17th, 2012, 10:59 pm

Re: Faction Generator!

Post by thenotoriousmrbaker »

Also with the eclipse generator "Wesnoth UMC Dev. Its asking me to imput settings i think, such as the "Wesnoth executable path" "working Directory" "User Data Directory" WML tools directory" and "Python executable Path"

i'm not quite sure what exactly how I should fill these spaces in.
User avatar
Ravana
Forum Moderator
Posts: 3322
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Faction Generator!

Post by Ravana »

Addon_name.cfg is for single file addons, else use _main.cfg

Could you explain a bit more, I'm confused.
Rename MyEra_MP_era.cfg to _main.cfg and move it inside your addon folder.

Code: Select all

name={MENU_IMG_TXT "any image file in the game's ./images directory" (_"faction name")}
Here this specified image isnt found so it is likely to show error.
Also if you have key then dont leave it empty, like you did with type=

There are quite a few empty spaces, such as with the type= example. I'm not quite sure what I should put here. Should I just leave them empty?

Also When it asks for recruitment pattern, what should I put in.

Sorry man, might have to explain a bit more.
macro {MENU_IMG_TXT} expect valid image file and "any image file in the game's ./images directory" was not found.
For that file try

Code: Select all

[era]
    id=my_era
    name= _ "My Awesome Era"
    {RANDOM_SIDE}
    [multiplayer_side]
        id=Outlaw
        name=_"Outlaw"
	image="units/human-outlaws/outlaw.png"
        type=Outlaw
        leader=Outlaw
        recruit=Outlaw
    [/multiplayer_side]

[/era]

Not sure if key with empty value causes any problems but it is better to remove those that are not essential or useful.

I have tried that eclipse as well but imo it makes things only more confusing. I use notepad++ for that purpose.
thenotoriousmrbaker
Posts: 15
Joined: August 17th, 2012, 10:59 pm

Re: Faction Generator!

Post by thenotoriousmrbaker »

Ravana wrote:
Addon_name.cfg is for single file addons, else use _main.cfg

Could you explain a bit more, I'm confused.
Rename MyEra_MP_era.cfg to _main.cfg and move it inside your addon folder.

Code: Select all

name={MENU_IMG_TXT "any image file in the game's ./images directory" (_"faction name")}
Here this specified image isnt found so it is likely to show error.
Also if you have key then dont leave it empty, like you did with type=

There are quite a few empty spaces, such as with the type= example. I'm not quite sure what I should put here. Should I just leave them empty?

Also When it asks for recruitment pattern, what should I put in.

Sorry man, might have to explain a bit more.
macro {MENU_IMG_TXT} expect valid image file and "any image file in the game's ./images directory" was not found.
For that file try

Code: Select all

[era]
    id=my_era
    name= _ "My Awesome Era"
    {RANDOM_SIDE}
    [multiplayer_side]
        id=Outlaw
        name=_"Outlaw"
	image="units/human-outlaws/outlaw.png"
        type=Outlaw
        leader=Outlaw
        recruit=Outlaw
    [/multiplayer_side]

[/era]

Not sure if key with empty value causes any problems but it is better to remove those that are not essential or useful.

I have tried that eclipse as well but imo it makes things only more confusing. I use notepad++ for that purpose.
Ok. Thanks for taking the time to help me by the way. I tried your suggestion but i get this error message.

"The following add-on had errors and could not be loaded: C:users/___/documents/MyGames/Wesnoth1.10/data/addons/_main.cfg
ERROR DETAILS:
Macro/file '-add-ons/MyEra_MP_era/'is missing at -add-ons/_main.cfg."

Any idea what might be wrong?
User avatar
Ravana
Forum Moderator
Posts: 3322
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Faction Generator!

Post by Ravana »

You dont need that line in _main.cfg. As I dont know exact structure you use in your addon I cant help much, but format is {~add-ons/Colosseum_fast/macros} , this makes wesnoth look that folder.
thenotoriousmrbaker
Posts: 15
Joined: August 17th, 2012, 10:59 pm

Re: Faction Generator!

Post by thenotoriousmrbaker »

Ravana wrote:You dont need that line in _main.cfg. As I dont know exact structure you use in your addon I cant help much, but format is {~add-ons/Colosseum_fast/macros} , this makes wesnoth look that folder.
How do add colesseum_fast/macros?
User avatar
Ravana
Forum Moderator
Posts: 3322
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Faction Generator!

Post by Ravana »

You dont need that, it is just format to make wesnoth read .cfg files in certain directory.
Post Reply