Trying to play a self-made campaign?

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
Machaeus
Posts: 3
Joined: August 23rd, 2015, 5:42 am

Trying to play a self-made campaign?

Post by Machaeus »

Hello, I'm a complete newbie who wants to make sure his likely-not-so-good first attempt at a Wesnoth campaign even works. My question is, how do I do that without putting it on the chopping block just yet?

I'm REALLY sure I don't want to publicly upload this thing yet, since A: it's just one scenario/map so far; B: I don't have sprites and units and stuff for my "custom" race (read: ripped from a webcomic I read obsessively; and yes, I do plan on giving credit), so I'm using the humans as a stand-in currently; and C: it probably defiles canon for Wesnoth pretty badly. If it were just the last one, it might be forgivable, but as is? :P

I'm probably not gonna be able to see/reply for the next 8 hours, since it's WAY past time for me to fall unconscious for 8 hours and perhaps vividly hallucinate, then suffer amnesia about the whole experience, but please feel free to tell me if I derp'd anything up in my first post.
User avatar
WhiteWolf
Forum Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Trying to play a self-made campaign?

Post by WhiteWolf »

Hey,

If I get your meaning, you want to test if it runs at all, without uploading it to the add-on server, right?
That's the easiest thing to do. Put your campaign's directory to your add-ons folder, if it's not there already. (Should be inside your user directiory. user/.local/share/wesnoth for linux, and somewhere in AppData for windows. Maybe someone else can tell you about the windows location, I would have to look it up...) Then see if it is displayed in your in-game campaigns menu, and try to run it. If there are problems or crash-bugs, wesnoth will detail it for you, and the game will crash. If not, then it will start, and there's your answer: it works. It doesn't mean it's bug-free though.
If it's not even displayed, you have something wrong about your _main.cfg.

Hope this helps,
WhiteWolf
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Machaeus
Posts: 3
Joined: August 23rd, 2015, 5:42 am

Re: Trying to play a self-made campaign?

Post by Machaeus »

So I'm still awake, it turns out :P

Anyway, yes, that's what I want to do. I'll give it a whirl!

EDIT: Hmmm, frustrating. Here's the error; luckily I pressed the copypaste button :I
The following add-on had errors and could not be loaded:
D:/Wesnoth/userdata/data/add-ons/(campname)/_main.cfg

Please report this to the author or maintainer of this add-on.

Details:

Preprocessor symbol 'GOLD' expects 3 arguments, but has 1 arguments
at ~add-ons\\(campname)\\scenarios\\(scenarioname).cfg:39
included from ~add-ons\\(campname)\\_main.cfg:22
I understand where the errors are, just not WHAT they are...

RE-EDIT: Okay, I think I get it. I put starting gold in line 39, but I didn't have multiple difficulties. Which is weird, because I had a 4-argument version of this before, which I don't get how when I copypasted from the examples in the "Create" section...

Either way, I guess this means difficulty is required, for some reason?

EDIT ONCE MORE: Okay, I got it working! Now I just need to get the missing bits in. I'll do that tomorrow, when I'm not half-wired half-tired :P
User avatar
pe_em
Posts: 115
Joined: January 10th, 2015, 5:51 pm
Location: Poland

Re: Trying to play a self-made campaign?

Post by pe_em »

Either way, I guess this means difficulty is required, for some reason?
If you don't have exactly 3 difficulties, then you can use eg:

Code: Select all

gold=100 #here you cannot choose difficulties
or:

Code: Select all

#ifdef EASY
gold=200
#endif
#ifdef HARD
gold=100
#endif
#etc...
If you have exactly three difficulties, then you can use macro 'GOLD'

I think it may be useful for you:
difficulties: a comma(,) separated list of preprocessor symbols, exactly one of which will be stored depending on the difficulty setting chosen when the campaign is started. The symbols EASY, NORMAL, and HARD are usually used, and there are several macros in utils.cfg (see Macro Reference) which check for these values to set WML keys to different values depending on difficulty. If you use different difficulty symbols, you may need to define your own versions of these macros.

- from wiki - CampaignWML
User avatar
WhiteWolf
Forum Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Trying to play a self-made campaign?

Post by WhiteWolf »

Or, if you have four diffficulties, like you said:
I had a 4-argument version of this before
, and these are defined as EASY,NORMAL,HARD,NIGHTMARE, then you can apply the GOLD4 macro, which calls for 4 amounts.
Example:

Code: Select all

[side]
#side description here
{GOLD4 200 300 400 500}
[/side]
This is the same as this:

Code: Select all

[side]
#side description here
#ifdef EASY
gold=200
#endif
#ifdef NORMAL
gold=300
#endif
#ifdef HARD
gold=400
#endif
#ifdef NIGHTMARE
gold=500
#endif
[/side]
The same applies to the TURNS macro, and basically all macros that depend on difficulty definitions.

By the way, to get the working of each macro, here's their list for you: http://www.wesnoth.org/macro-reference.xhtml
And the WML tags: http://wiki.wesnoth.org/Referencewml

Best regards,
WhiteWolf
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Machaeus
Posts: 3
Joined: August 23rd, 2015, 5:42 am

Re: Trying to play a self-made campaign?

Post by Machaeus »

Hey, sorry for not replying XD Bit of a rough week.

Anyway, thank you for the help, I'll try and keep this up as a reference!
Post Reply