Main.cfg what goes in it?
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.
-
- Posts: 252
- Joined: March 30th, 2011, 8:38 pm
- Location: The UK
Re: Main.cfg what goes in it?
is this what you meant?
Because this doesn't gets an error message saying the game can't load the add-on.
Because this doesn't gets an error message saying the game can't load the add-on.
- Attachments
-
_main.cfg
- (516 Bytes) Downloaded 148 times
Last edited by blueknight1758 on June 25th, 2011, 7:26 pm, edited 1 time in total.
Re: Main.cfg what goes in it?
The engine probably reads it as a very long textdomain, which is syntactically correct, so no error message.
And yes, you should really put every key/tag on a new line.
And yes, you should really put every key/tag on a new line.
Co-Creator of The Fellowship of the Clay (BfW 1.10) ~~ Maintainer of the German Code of Conduct
How to isolate problematic WML code ~~ WML error messages and their reasons
How to isolate problematic WML code ~~ WML error messages and their reasons
Re: Main.cfg what goes in it?
blueknight: No.
This time, you've got 3 lines:
Either you didn't understand me or you're using a bad text editor (in which case I would second the suggestion from above to use Notepad++).
It should look like this:
However, I don't think that including "
Crend
This time, you've got 3 lines:
Code: Select all
#textdomain wesnoth-Apocylyptic_Era[binary_path] path=data/add-ons/Apocylyptic_Era/
[/binary_path][textdomain] name="wesnoth-Apocylyptic_Era" path="data/add-ons/Apocylyptic_Era/translations"
[/textdomain] #ifdef MULTIPLAYER #define APOCYLYPTIC_ERA #enddef #endif #ifdef APOCYLYPTIC_ERA#Macros{~add-ons/Apocylyptic_Era/macros/}{~add-ons/Apocylyptic_Era/macros/abilities.cfg}{~add-ons/Apocylyptic_Era/era.cfg}[+units]{~add-ons/Apocylyptic_Era/units/}{~add-ons/Apocylyptic_Era/images/units/tribals}[/units]#enddef
It should look like this:
Code: Select all
#textdomain wesnoth-Apocylyptic_Era
[binary_path]
path=data/add-ons/Apocylyptic_Era/
[/binary_path]
[textdomain]
name="wesnoth-Apocylyptic_Era"
path="data/add-ons/Apocylyptic_Era/translations"
[/textdomain]
#ifdef MULTIPLAYER
#define APOCYLYPTIC_ERA
#enddef
#endif
#ifdef APOCYLYPTIC_ERA
# Macros
{~add-ons/Apocylyptic_Era/macros/}
{~add-ons/Apocylyptic_Era/macros/abilities.cfg}
{~add-ons/Apocylyptic_Era/era.cfg}
[+units]
{~add-ons/Apocylyptic_Era/units/}
{~add-ons/Apocylyptic_Era/images/units/tribals}
[/units]
#enddef
~add-ons/Apocylyptic_Era/images/units/tribals
" is useful, because I don't suppose there are any .cfg
s. You only need to include all directories which contain these files (you may have meant to include ~add-ons/Apocylyptic_era/units/tribals
instead).Crend
UMC Story Images — Story images for your campaign!
- Pentarctagon
- Project Manager
- Posts: 5730
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Main.cfg what goes in it?
Moved to the WML Workshop.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
-
- Posts: 252
- Joined: March 30th, 2011, 8:38 pm
- Location: The UK
Re: Main.cfg what goes in it?
With the first one i get an unexpected #enddef#ifdef
but the second i getor #ifndef not terminated error
can someone tell me where this #enddef should go?
but the second i getor #ifndef not terminated error
can someone tell me where this #enddef should go?
- Attachments
-
__main.cfg
- unexpected #enddef
- (514 Bytes) Downloaded 128 times
-
_main.cfg
- #ifdef or #ifndef not terminated
- (505 Bytes) Downloaded 145 times
Re: Main.cfg what goes in it?
#ifdef is terminated with #endif.
#define is terminated with #enddef.
You mixed up those on the first one.
The problem with the second one is exactly what it says. You didn't terminate #ifdef (both of 'em).
#define is terminated with #enddef.
You mixed up those on the first one.
The problem with the second one is exactly what it says. You didn't terminate #ifdef (both of 'em).
Co-Creator of The Fellowship of the Clay (BfW 1.10) ~~ Maintainer of the German Code of Conduct
How to isolate problematic WML code ~~ WML error messages and their reasons
How to isolate problematic WML code ~~ WML error messages and their reasons
-
- Posts: 252
- Joined: March 30th, 2011, 8:38 pm
- Location: The UK
Re: Main.cfg what goes in it?
Ah thanks that should help.
-
- Posts: 252
- Joined: March 30th, 2011, 8:38 pm
- Location: The UK
Re: Main.cfg what goes in it?
With this version the game boots up normally but i don't get the option to choose the era in the multiplayer screen.
Is there anything wrong with my main file or is something wrong with my era file?
Is there anything wrong with my main file or is something wrong with my era file?
Re: Main.cfg what goes in it?
You have an #ifdef APOCYLYPTIC_ERA but APOCYLYPTIC_ERA is never defined anywhere.
Also, the word is "apocalyptic".
Also, the word is "apocalyptic".
-
- Posts: 252
- Joined: March 30th, 2011, 8:38 pm
- Location: The UK
Re: Main.cfg what goes in it?
So to fix it i would define APOCYLYPTIC_ERA? How do i do this if it is what i should be doing?
:EDIT I deleted #ifdef APOCYLYPTIC_ERA and one #endif and it works now thanks guys.
:EDIT I deleted #ifdef APOCYLYPTIC_ERA and one #endif and it works now thanks guys.
-
- Posts: 252
- Joined: March 30th, 2011, 8:38 pm
- Location: The UK
Re: Main.cfg what goes in it?
when i try and upload my add-on with this _server.pbl i get an #error you didn't specify a type when i have specified "era" can anyone see a problem?
- Attachments
-
_server.pbl
- (349 Bytes) Downloaded 141 times
Re: Main.cfg what goes in it?
Don't do this. Then your units will be loaded always, no matter which era is selected (IIRC).blueknight1758 wrote:So to fix it i would define APOCYLYPTIC_ERA? How do i do this if it is what i should be doing?
:EDIT I deleted #ifdef APOCYLYPTIC_ERA and one #endif and it works now thanks guys.
Better use the
define=
key of the [campaign]
tag: CampaignWMLAnd regarding the
.pbl
file, it says exactly what is wrong: You didn't specify a type=
argument: PblWML#typeCrend
UMC Story Images — Story images for your campaign!
Re: Main.cfg what goes in it?
Wrong; that's the only way to do it and how every era does it.Crendgrim wrote:Don't do this. Then your units will be loaded always, no matter which era is selected (IIRC).blueknight1758 wrote:So to fix it i would define APOCYLYPTIC_ERA? How do i do this if it is what i should be doing?
:EDIT I deleted #ifdef APOCYLYPTIC_ERA and one #endif and it works now thanks guys.
-
- Posts: 252
- Joined: March 30th, 2011, 8:38 pm
- Location: The UK
Re: Main.cfg what goes in it?
I've sorted the .pbl and it's now on the 1.9 add-on server as apocylyptic era
And in the next version Ill of fixed the spelling error in apocalyptic thanks zookeeper.
And in the next version Ill of fixed the spelling error in apocalyptic thanks zookeeper.
Re: Main.cfg what goes in it?
Ah, right, sorry. I mixed up campaign and era WML. My fault.zookeeper wrote: Wrong; that's the only way to do it and how every era does it.

Then please disregard my post.
Crend
UMC Story Images — Story images for your campaign!