Can someone explain me the 'modern' structure ?

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

Moderator: Forum Moderators

Post Reply
User avatar
Eagle_11
Posts: 759
Joined: November 20th, 2013, 12:20 pm

Can someone explain me the 'modern' structure ?

Post by Eagle_11 »

I did probably wrong and the tutorial here:
http://wiki.wesnoth.org/BuildingFactions
seem to be severely outdated since i looked into other era's and everyone uses a _main.cfg
This is what ive put inside the _main.cfg
Spoiler:
era_testerz.cfg contains a single line, is this file even necessary?

Code: Select all

{~add-ons/TesterZ/factions.cfg}
This is what stands in factions.cfg:
Spoiler:
Now the TesterZ Era shows up on list. When in lobby the assigned faction image and names appear in the faction picker, however all units appear as ? and imageless. When try starting says unknown unit type: unitsnamehere and returns to main menu.
What must i do so it reads the units, is it the binarypath= or [+units] not functioning ? How can i fix ? help please
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Re: Can someone explain me the 'modern' structure ?

Post by Velensk »

You can organize things in nearly any way you want just as long as the computer gets all the information it needs.

Having a file for the eras makes more sense when you want an add-on with multiple eras.

But in any case, look at how other eras that work do it and see what they're doing. I don't see anything wrong with what you've done but we don't have enough information to give you every eventuality. You might have a problem if say your units in TesterZ/units are organized into folders instead of just being dumped into that folder.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Can someone explain me the 'modern' structure ?

Post by zookeeper »

Well, one possibility of what you might be doing wrong is this:

Code: Select all

{~add-ons/testerz/units/}
If you really have all your unit .cfg's right there then that's fine, but if you've organized them into subdirectories then it won't; you'd have to include each subdirectory individually.

You're also using both "testerz" and "TesterZ" in your paths, which probably works at least in Windows but likely not on all systems, so you should treat paths like those as if they were case-sensitive.
User avatar
Eagle_11
Posts: 759
Joined: November 20th, 2013, 12:20 pm

Re: Can someone explain me the 'modern' structure ?

Post by Eagle_11 »

They are in subdirectories, after individually pointing out functioned, guess i have to do same for images ? now that you warned ive made sure all are lower-case. im at windows.
Now im at debugging, is there a faster way than firing up, hitting multiplayer>local game and let it cache for each unit ?
in the error message unexpected characters after variable name at unitsname.cfg:number <- what means the :number at the end, is it of any help to me ?

One of the error message mentions unexpected characters at line start value +, there is only 2 + in the cfg both at line +{SPECIAL_NOTES}+{SPECIAL_NOTES_MARKSMAN}. Related cfg below:
Spoiler:
User avatar
firefox
Posts: 121
Joined: September 7th, 2009, 6:26 am
Location: Berlin

Re: Can someone explain me the 'modern' structure ?

Post by firefox »

in the error message unexpected characters after variable name at unitsname.cfg:number <- what means the :number at the end, is it of any help to me ?
mostly it is helpful.

:eng: the number you see is the number of the line in wich the bug was detected.
however, sometimes the number is not correct, e.g. when the bug is related to more than on line.
so you always should look carefully to find all typos or whatever is causing the bug.
is there a faster way than firing up, hitting multiplayer>local game and let it cache for each unit ?
often the message displays the path of the bug.
something like this: unexpected value in xyz:8 included in abc:5 included in pqr:2
this helps you to quickly navigate to the bug,
then you should check all files mentioned in the error message and also check if they are linked correctly.
this way debugging may be faster, because you can solve multiple issues in one try.

especially when you copied code from one file into another, because it was easier/faster,
and in one of theese files is a bug, it will also be in all the other files.
may the source be with you
=(^.^)= nyan~
User avatar
Paulomat4
Moderator Emeritus
Posts: 730
Joined: October 16th, 2012, 3:32 pm
Location: Wesmere library, probably summoning Zhangor

Re: Can someone explain me the 'modern' structure ?

Post by Paulomat4 »

instead of starting wesnoth new, you can also hit F5 drom the mainscreen to refresh it.
Creator of Dawn of Thunder and Global Unitmarkers

"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
User avatar
Eagle_11
Posts: 759
Joined: November 20th, 2013, 12:20 pm

Re: Can someone explain me the 'modern' structure ?

Post by Eagle_11 »

Thanks, now that ive checked considerably faster.
What to do when unexpected characters after variable name is a blank '' value ?
Im editing an copy of Orcish Sovereign, the error i mentioned appears, checked the line there stays the profile=, above is image and below {LEADING_ANIM lines, all non-touched by me. Went on to check the [portrait] tags further below theyr ok too, i changed nothing besides {ABILITY_LEADERSHIP_LEVEL} to LEVEL_4} on that unit anyways, so im baffled as what is bugged.

Is there a way to let the machine check the .cfgs via one of the /tools ?

EDIT: Just wanted to let you know that it was the complex unit id's im using was bugging the .cfgs making them readable with errors only. switching back to simpler ids like GruntvII,ElfshamanvII etc. fixed most of them besides the occasional typo, which then got manually fixen by me too.
Post Reply