Dad of newbies..help!

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

Post Reply
danj
Posts: 21
Joined: May 1st, 2009, 3:50 am

Dad of newbies..help!

Post by danj » May 1st, 2009, 4:13 am

Full disclosure: My boys, 14 and 11, have been dying to make scenarios and campaigns for a while. I'm not a huge gamer, but would like to help fulfill their dreams....

I saw the THoT "how-to" on the forum and will show them that, which I'm sure they will enjoy. I've also looked at a lot of the documentation in the Wesnoth "Create" area, but am hoping to find an even easier hand-hold to start programming and learning WML. Any ideas? Should I just start wading through the template? Gotta admit, it's a bit daunting. We're all newbies, but willing to learn....

I am running an imac with OSX.
Many thanks in advance for your wisdom and guidance!

Velensk
Multiplayer Contributor
Posts: 3987
Joined: January 24th, 2007, 12:56 am

Re: Dad of newbies..help!

Post by Velensk » May 1st, 2009, 10:55 am

Your computer should have a program called text edit on it. Open this program.
Download some User-made campaign of the add-ons server (this can be done from within Wesnoth. I would reckomend something simple like the Unstoppable Legion).
Find your Wesnoth folder in library/prefrences.
Go to the data/campaigns section.
Copy the folder for the campaign you downloaded and rename it.
Look at some of the files (most specificaly the _main.cfg, some of the scenario .cfgs and some of the unit.cfgs) by dragging them into text edit.
At this point you will have a fairly easy to modify template, a bunch of examples, and know how to look at files so you can find more.

If you need to get info from the units/campaigns that come with the game, right click on you Wesnoth folder and go to show package contents, from there you should be able to acsess all the default files.
"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
Mist
Inactive Developer
Posts: 753
Joined: February 15th, 2007, 8:44 am
Location: Milton Keynes, UK

Re: Dad of newbies..help!

Post by Mist » May 1st, 2009, 11:35 am

I'm afraid there's no easier WML tutorial (or at least I know none) than the one in Create section of the wiki. Things written there are generally tought to be laid out in as clear and simple way as a person proficient in WML can manage. So that's the bad news, there's probably no easier hand-hold to start learning WML.

Ideas... If you really want to get a hold of basic programing/scripting concepts google the web for some simple XML and C tutorials. These are not required to learn WML, but share enough similarities to make learning and using it easier. Get a good text editor, preferably one with syntax higlighting, and then start looking at how existing campaigns and add-ons do stuff. Don't be afraid to copy code a lot, whatever you think of, if it's possible to implement it's been probably already written by someone. Don't be afraid to ask questions and ask for help, nobody here will write the code for you, but if you show effort quite a lot of people will be willing to point you into a right direction and correct mistakes. Bookmark WML Reference, you will use it a lot. Read old threads in WML Workshop, people came there with all kind of questions from very basic to pretty complex, most of these got an answer. And don't get discouraged early ;) WML might seem daunting, but it's actually pretty simple once you start using it.
Somewhere, between the sacred silence and sleep.
Disorder.

User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: Dad of newbies..help!

Post by Gambit » May 1st, 2009, 2:58 pm

Programming as a family. 8)
That is so... freaking... cool! Beats game night let me tell you.

Velensk
Multiplayer Contributor
Posts: 3987
Joined: January 24th, 2007, 12:56 am

Re: Dad of newbies..help!

Post by Velensk » May 2nd, 2009, 10:59 am

I think that depends on what games you have. I wouldn't classify programing as a good multi-person activity (or at least for me it isn't), however I think that what the OP is trying to do is a very good thing.
"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."

Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: Dad of newbies..help!

Post by Max » May 2nd, 2009, 12:38 pm

the usual approach i take if i want to "teach" someone the basics of programming:

i use java (e.g. using eclipse, it's easy to install and you're ready to go within 5 minutes), we implement a simple program that actually does something interesting (abstract things are rather boring), e.g. a number guessing program. start with some helper functions/classes for getting a random number, get input from the console. first an implementation where a human has to guess the number. next step would be to teach the computer to guess a number.

along that path they'll get a glimpse of OOP. there's also an opportunity for lots of small improvements you can have them implement (e.g. some kind of feedback at the end - "you needed only 5 guesses - you're really good"). you can teach them how to use the debugger to understand why something doesn't work as intended.

for someone who has no idea about programming WML can be rather confusing. it takes some time to understand that WML is rather used to store data and that it's events that allow for interactivity/programming. questions like "how does it work" are IMO harder to answer (wesnoth is reading your files, units/events "live" as instances in the game).

what helps in regard to events is a simple scenario where you create different events and just output some debug messages when they are triggered. next step would be to explain that every event is associated with a different context you can query/access (e.g. first, second unit).

danj
Posts: 21
Joined: May 1st, 2009, 3:50 am

Re: Dad of newbies..help!

Post by danj » May 2nd, 2009, 1:39 pm

Thanks so much, everybody for these great tips! I downloaded an alternate text editor - TextWrangler - and am starting to cut, paste, and dissect.... I saw the Campaign Tutorial in the "Create" area, downloaded "A Simple Campaign", but when moving on to the next step in the tutorial, I saw it had not been created yet....! Any takers out there?

As far as collaborating, I have high hopes, as the boys are very into the storytelling, so plots and details is where they live. I enjoy the puzzle-solving part of the computer language issue (though I'm a bit wide-eyed at the moment). As they get more familiar with it, I'm sure the boys will want to "hold the remote"....

Again, many thanks for the generous support - nice to know I'm not alone out here.

-DJ

User avatar
Matthi205
Posts: 75
Joined: March 7th, 2009, 8:32 pm
Location: Neptune

Re: Dad of newbies..help!

Post by Matthi205 » May 18th, 2009, 1:45 pm

The way I learned WML was trough manipulating things and lurking into nearly all files in the folders inside BfW. :) Maybe it'll work out for you?
"And on his tomb,
an eptitaph:
'Always John,
now always off.'"

danj
Posts: 21
Joined: May 1st, 2009, 3:50 am

Re: Dad of newbies..help!

Post by danj » May 18th, 2009, 2:13 pm

Matthi205 -
Is that "Between the Worlds" you referenced? I've been looking at a number of campaigns to get ideas - they are all very different...! Does it matter much between Wesnoth versions? Should I stick with one from the 1.6 version? I'm really after the simplest solution for the moment.
Right now, I'm not having luck getting images to appear - on the campaign list in Wesnoth, the levels list, etc. Do I need to put all images into my campaign's image folder? If so, that doesn't seem to be working either... :augh:
Thanks for your advice - I'll check out Between the Worlds.
-DJ

danj
Posts: 21
Joined: May 1st, 2009, 3:50 am

Re: Dad of newbies..help!

Post by danj » May 18th, 2009, 2:37 pm

Okay - cool. I'm successfully using the "../" and leading the path to the images in the "package Contents" of the Wesnoth app. Woo-hoo! Is there a way to point to images not in the application's contents? Add-ons, other campaigns, etc?
Thanks!!

User avatar
Matthi205
Posts: 75
Joined: March 7th, 2009, 8:32 pm
Location: Neptune

Re: Dad of newbies..help!

Post by Matthi205 » May 18th, 2009, 3:30 pm

i'm having problems making a campaign too.Take an abondoned campaign and update it to 1.5(which is the same like 1.6)and make a server.pbl.The wiki info han't helped out fully,so take other campaigns to check your WML.Look at ImagesWML.
"And on his tomb,
an eptitaph:
'Always John,
now always off.'"

Jozrael
Posts: 1034
Joined: June 2nd, 2006, 1:39 pm
Location: NJ, USA.

Re: Dad of newbies..help!

Post by Jozrael » May 18th, 2009, 5:47 pm

Small note: BfW references Battle for Wesnoth.

Good luck!

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Dad of newbies..help!

Post by zookeeper » May 18th, 2009, 7:25 pm

A good approach is always to just download some existing add-on and start tinkering with it, changing whatever you can understand. Keep the WML reference open so you can check what each tag and key does. The Dark Hordes and Dead Water should be good example campaigns, with pretty clean code and mostly relatively simple scenarios.

For example, you can just delete each scenario except the first one, and then change everything in the first one in whatever way you want. That way you at least have something which works right away and don't have to worry about understanding every part of the code immediately.

Post Reply