Guestion about campaign coding

General feedback and discussion of the game.

Moderators: Forum Moderators, Developers

User avatar
woodmouse
Posts: 1435
Joined: August 9th, 2008, 6:26 pm
Location: Finland
Contact:

Guestion about campaign coding

Post by woodmouse » October 5th, 2008, 9:31 am

So, is it possible to code campaigns the way that multi player scenarios are made? I mean, like

Code: Select all

row
row
row
row
and not like

Code: Select all

row row row
Is it possible? I mean, I am not good at coding like normally campaign scenarios are... :(
Check out my sprites!

User avatar
Unnheulu
Posts: 738
Joined: November 25th, 2007, 4:50 pm
Location: Cymru
Contact:

Re: Guestion about campaign coding

Post by Unnheulu » October 5th, 2008, 9:38 am

Use my skeleton. ;) Should explain alot.

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

Re: Guestion about campaign coding

Post by zookeeper » October 5th, 2008, 9:44 am

woodmouse wrote:So, is it possible to code campaigns the way that multi player scenarios are made? I mean, like

Code: Select all

row
row
row
row
and not like

Code: Select all

row row row
Uh...what?

User avatar
woodmouse
Posts: 1435
Joined: August 9th, 2008, 6:26 pm
Location: Finland
Contact:

Re: Guestion about campaign coding

Post by woodmouse » October 5th, 2008, 9:55 am

@xer: I am using your skeleton as a base for the Gryphon campaign.
@Zookeeper: I mean... Not like campaign scenarios are coded, but like multiplayer scenarios are. I mean... Umm... Campaign scenarios are coded like everything in few rows, but multiplayer scenarios (at least usually) are like millions of rows.

You understand what I mean?
Check out my sprites!

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

Re: Guestion about campaign coding

Post by zookeeper » October 5th, 2008, 10:02 am

woodmouse wrote:You understand what I mean?
I have absolutely no idea.

User avatar
woodmouse
Posts: 1435
Joined: August 9th, 2008, 6:26 pm
Location: Finland
Contact:

Re: Guestion about campaign coding

Post by woodmouse » October 5th, 2008, 10:08 am

Hmmmm... Example:
Is it possible to code campaign scenarios like this:

Code: Select all

[event]
name=start
[/event]
Not like this how they normally are:

Code: Select all

[event]name=start[/event]
You understand now?
Check out my sprites!

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

Re: Guestion about campaign coding

Post by zookeeper » October 5th, 2008, 10:27 am

woodmouse wrote:Hmmmm... Example:
Is it possible to code campaign scenarios like this:

Code: Select all

[event]
name=start
[/event]
Not like this how they normally are:

Code: Select all

[event]name=start[/event]
You understand now?
That's definitely not how they normally are. You're probably using a text editor which doesn't understand the linebreaks or something. No one puts stuff on one line like that.

User avatar
woodmouse
Posts: 1435
Joined: August 9th, 2008, 6:26 pm
Location: Finland
Contact:

Re: Guestion about campaign coding

Post by woodmouse » October 5th, 2008, 10:35 am

zookeeper wrote:That's definitely not how they normally are. You're probably using a text editor which doesn't understand the linebreaks or something. No one puts stuff on one line like that.
Hmmm weird. I'm using notepad to code WML things, and every campaign is like that, but multiplayer things aren't... :?
Check out my sprites!

ilor
Inactive Developer
Posts: 129
Joined: March 24th, 2008, 9:05 pm

Re: Guestion about campaign coding

Post by ilor » October 5th, 2008, 11:26 am

sadly, windows notepad is [censored] with regards to newline chars. Use a text editor that is not, like notepad++ or scite, to name a few.

User avatar
woodmouse
Posts: 1435
Joined: August 9th, 2008, 6:26 pm
Location: Finland
Contact:

Re: Guestion about campaign coding

Post by woodmouse » October 5th, 2008, 11:30 am

Ok, but I thought the font thing causes evertything not to work, but if it doesn't then I could use something like that.
Check out my sprites!

User avatar
Unnheulu
Posts: 738
Joined: November 25th, 2007, 4:50 pm
Location: Cymru
Contact:

Re: Guestion about campaign coding

Post by Unnheulu » October 5th, 2008, 12:00 pm

AFAICT Wesnoth uses Unix linebreaks (\r\n) by default, which notepad can't handle.
If I am wrong then o course correct me.

PingPangQui
Posts: 267
Joined: July 18th, 2006, 11:52 am

Re: Guestion about campaign coding

Post by PingPangQui » October 5th, 2008, 12:04 pm

A good editor for MS-Windows is codepad.

Edit: I actually meant textpad (codepad might also be nice, though I've never tried it). Anyway, as xer already indicated, it is never too late to switch to a free operating system.
Last edited by PingPangQui on October 5th, 2008, 12:15 pm, edited 1 time in total.
The Clan Antagonist.

"Larry the Cow was a bit frustrated at the current state of Linux distributions (...) until he tried Gentoo Linux" - Free Software for free people.

User avatar
Unnheulu
Posts: 738
Joined: November 25th, 2007, 4:50 pm
Location: Cymru
Contact:

Re: Guestion about campaign coding

Post by Unnheulu » October 5th, 2008, 12:07 pm


User avatar
woodmouse
Posts: 1435
Joined: August 9th, 2008, 6:26 pm
Location: Finland
Contact:

Re: Guestion about campaign coding

Post by woodmouse » October 5th, 2008, 12:17 pm

Well, I tested using WordPad and it works goodly for that. :)
Check out my sprites!

User avatar
Unnheulu
Posts: 738
Joined: November 25th, 2007, 4:50 pm
Location: Cymru
Contact:

Re: Guestion about campaign coding

Post by Unnheulu » October 5th, 2008, 12:18 pm

Wordpad uses wierd formatting stuff, make sure you save as an ASCII.

Post Reply