Time Travel Scenario Problem

The place to post your WML questions and answers.

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.
Post Reply
User avatar
someone
Posts: 188
Joined: March 13th, 2009, 9:03 pm

Time Travel Scenario Problem

Post by someone »

I am trying to make my own scenario, but it says "INVALID BECAUSE SCENARIO HAS NO SIDES" when I try to test it. Could some one help find the problem?

Scenario:

Code: Select all

#textdomain wesnoth-multiplayer

#define MPWILD_UNIT X Y TYPE
    [unit]
        type={TYPE}
        side=5
        x={X}
        y={Y}
        random_traits=no
    [/unit]
#enddef

[multiplayer]
    id=multiplayer_Time_Travel
    name= _ "3p - Travel Through Time"
    description= _ ""
    map_data="{multiplayer/maps/Time_Traveler}"

    {DEFAULT_SCHEDULE}
    {DEFAULT_MUSIC_PLAYLIST}

    [side]
        [ai]
            villages_per_scout=16
        [/ai]
        side=1
        canrecruit=yes
        controller=human
        village_gold=2
        fog=yes
    [/side]
    [side]
        [ai]
            villages_per_scout=16
        [/ai]
        side=2
        canrecruit=yes
        controller=human
        village_gold=2
        fog=yes
    [/side]
    [side]
        [ai]
            villages_per_scout=16
        [/ai]
        side=3
        canrecruit=yes
        controller=human
        village_gold=2
        fog=yes
    [/side]
    [side]
        [ai]
            villages_value=0
        [/ai]
        side=4
        canrecruit=yes
        controller=human
        village_gold=2
        fog=yes
    [/side]

    [event]
        name=prestart
        [if]
            [have_unit]
                side=5
            [/have_unit]
            [then]
                [kill]
                    animate=no
                    fire_event=no
                    side=5
                [/kill]
                {MPWILD_UNIT 9 13 (Fire Dragon)}
                {MPWILD_UNIT 31 33 (Ghost)}
                {MPWILD_UNIT 28 30 (Skeleton)}
                {MPWILD_UNIT 29 19 (Yeti)}
                {MPWILD_UNIT 13 14 (Giant Spider)}
                {MPWILD_UNIT 15 17 (Giant Spider)}

                [set_recruit]
                    side=5
                    type=""
                [/set_recruit]
                {MODIFY_UNIT x,y=38,36 canrecruit yes}
            [/then]
        [/if]
    [/event]

    [event]
        name=die
        first_time_only=no
        [filter]
            canrecruit=yes
            side=5
        [/filter]
        [store_unit]
            [filter]
                side=5
                canrecruit=no
            [/filter]
            variable=newleader
            kill=no
        [/store_unit]
        [if]
            [variable]
                name=newleader.length
                greater_than=0
            [/variable]
            [then]
                {VARIABLE newleader.canrecruit yes}
                [unstore_unit]
                    variable=newleader
                [/unstore_unit]
            [/then]
        [/if]
    [/event]
[/multiplayer]

Last edited by someone on July 31st, 2009, 5:01 pm, edited 3 times in total.
Expanding Wesnoth

You are an Arch Mage - You're definitely intelligent, but some people would say you spend too much time inside. The power you have learned, however, is simply unmatched.
Soliton
Site Administrator
Posts: 1685
Joined: April 5th, 2005, 3:25 pm
Location: #wesnoth-mp

Re: Scenario Codeing Problem

Post by Soliton »

Code: Select all

map_data="{multiplayer/maps/Time Traveler}"
That's unlikely to be the correct path. You want something like:

Code: Select all

map_data="{~campaigns/maps/Time Traveler}"
Also, conventionally, map filenames end in .map.

Btw, "it says problem when I try to test it" has pretty much zero information for anyone trying to help you. You need to describe the problem a lot better than that.
"If gameplay requires it, they can be made to live on Venus." -- scott
User avatar
someone
Posts: 188
Joined: March 13th, 2009, 9:03 pm

Re: Scenario Codeing Problem

Post by someone »

All it says is "error" I don't know what the problem is.

The location and name of the map are correct.
Expanding Wesnoth

You are an Arch Mage - You're definitely intelligent, but some people would say you spend too much time inside. The power you have learned, however, is simply unmatched.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Scenario Codeing Problem

Post by zookeeper »

someone wrote:All it says is "error" I don't know what the problem is.
Eh? That'd be worth taking a screenshot of, I think. I've never heard of that happening.
User avatar
melinath
Posts: 1298
Joined: May 20th, 2009, 7:42 am

Re: Scenario Codeing Problem

Post by melinath »

I always thought that Wesnoth can't handle spaces in names, but even if it can, what soliton was pointing out was not just the campaigns/multiplayer difference, but also the addition of a ~, which tells Wesnoth to look in userdata.
User avatar
someone
Posts: 188
Joined: March 13th, 2009, 9:03 pm

Re: Scenario Codeing Problem

Post by someone »

It's when your choosing your scenario, it says error beneath the map image.

I tried getting rid of the space with a "_" and it didn't work.
Expanding Wesnoth

You are an Arch Mage - You're definitely intelligent, but some people would say you spend too much time inside. The power you have learned, however, is simply unmatched.
Soliton
Site Administrator
Posts: 1685
Joined: April 5th, 2005, 3:25 pm
Location: #wesnoth-mp

Re: Scenario Codeing Problem

Post by Soliton »

someone wrote:I tried getting rid of the space with a "_" and it didn't work.
You can't just randomly replace characters. The filename has to be.. what you named the file.
"If gameplay requires it, they can be made to live on Venus." -- scott
User avatar
someone
Posts: 188
Joined: March 13th, 2009, 9:03 pm

Re: Scenario Codeing Problem

Post by someone »

I changed the file name too
EDIT: When I try to play anyways, it says: INVALID BECAUSE IT HAS NO SIDES. My map has starting positions.
Expanding Wesnoth

You are an Arch Mage - You're definitely intelligent, but some people would say you spend too much time inside. The power you have learned, however, is simply unmatched.
User avatar
StDrake
Posts: 996
Joined: July 21st, 2009, 6:50 am

Re: Time Travel Scenario Problem

Post by StDrake »

maybe check if the number of starting positions on the map agree with those declared in the cfg
there's probably no need for that #undef at the end, though that shouldnt be causing such a problem, maybe you could include the map file as well?
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
User avatar
someone
Posts: 188
Joined: March 13th, 2009, 9:03 pm

Re: Time Travel Scenario Problem

Post by someone »

I've discovered that none of my maps are working! Even without a scenario or any custom terrain! They all say the same thing-:(
Expanding Wesnoth

You are an Arch Mage - You're definitely intelligent, but some people would say you spend too much time inside. The power you have learned, however, is simply unmatched.
User avatar
melinath
Posts: 1298
Joined: May 20th, 2009, 7:42 am

Re: Time Travel Scenario Problem

Post by melinath »

Post the current version of the map and scenario file?
Post Reply