Guestion about campaign coding

General feedback and discussion of the game.

Moderator: Forum Moderators

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

Guestion about campaign coding

Post by woodmouse »

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 »

Use my skeleton. ;) Should explain alot.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Guestion about campaign coding

Post by zookeeper »

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 »

@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: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Guestion about campaign coding

Post by zookeeper »

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 »

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: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Guestion about campaign coding

Post by zookeeper »

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 »

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 »

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 »

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 »

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 »

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 »

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

Re: Guestion about campaign coding

Post by woodmouse »

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 »

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