Scenario won't load

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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
SkyRZ5
Posts: 30
Joined: December 18th, 2015, 9:53 pm
Location: Arkan-thoria

Scenario won't load

Post by SkyRZ5 »

Guys, need little help here. So I'm new to the WML and was trying to follow the WML for Beginner tutorial, I follow every step and do a little moddification too at my Scenario, yet after i finish the scenario and main cfg, the game can't load my campaign. After that, i try to follow the tutorial exactly like what's written there, and it work perfectly, i try replace my code (all except the map and id) to the exactly like tutorial scenario cfg and then it work properly. I try some of the code (again, except the id) to the tutorial main cfg and its work perfectly too. I'm really confused right now.

Here's my code :

Code: Select all

[textdomain]
    name="wesnoth-poem_of_the_eastern_empire"
    path="data/add-ons/poem_of_the_eastern_empire/translations"
[/textdomain]

#textdomain wesnoth-poem_of_the_eastern_empire

[campaign]
    #wesnoth-Poem_of_the_Eastern_Empire
    id=poem_of_the_eastern_empire
    name= _ "Poem of the Eastern Empire"
    abbrev= _ "PotEE"
    define=CAMPAIGN_POEM_OF_THE_EASTERN_EMPIRE
    icon=
    image=
    first_scenario=01_devil_rite
    description= _ "After the long Civil War, Wesnoth finally enter the silver age, where civilization being builded again. Little by little, from boulder back to scratch. Yet the sound of warcry and swords clanking never came to rest, this time from faraway land that never thought of the Wesnothian would rise in Power, Horde of Hundred to Million ancient Human, march through a land full of devil, through an eternal dream of cruel ambition, yet magnificent thinking.

Here come, the poet said, the bard sing, celebrate the arrival of the Civilization of God, hail the Eastern Empire, Saviour of Humanity.

(Expert level, 18 scenarios.)"
    {CAMPAIGN_DIFFICULTY EASY   "units/undead-necromancers/adept.png~RC(magenta>black)" ( _ "Potato") ( _ "Normal")}
    {CAMPAIGN_DIFFICULTY NORMAL "units/undead-necromancers/dark-sorcerer.png~RC(magenta>black)" ( _ "Peasant") ( _ "Challenging")} {DEFAULT_DIFFICULTY}
    {CAMPAIGN_DIFFICULTY HARD   "units/undead-necromancers/lich.png~RC(magenta>black)" ( _ "Lieutenant") ( _ "Difficult")}
    {CAMPAIGN_DIFFICULTY EXPERT   "units/undead-necromancers/ancient-lich.png~RC(magenta>black)" ( _ "Emperor") ( _ "Nightmare")}
[/campaign]

#ifdef CAMPAIGN_POEM_OF_THE_EASTERN_EMPIRE

[binary_path]
    path=data/add-ons/poem_of_the_eastern_empire
[/binary_path]

{~add-ons/my_first_campaign/macros}
{~add-ons/my_first_campaign/utils}

{~add-ons/my_first_campaign/scenarios}
#endif
And here's the turtorial main code as a comparison :

Code: Select all

[textdomain]
    name="wesnoth-my_first_campaign"
    path="data/add-ons/my_first_campaign/translations"
[/textdomain]

#textdomain wesnoth-my_first_campaign

[campaign]
    #wesnoth-My_First_Campaign
    id=my_first_campaign
    name= _ "My First Campaign"
    abbrev= _ "MFC"
    define=CAMPAIGN_MY_FIRST_CAMPAIGN
#need icon and image (take from core files, don't include external files for sake of simplicity)
    icon=
    image=
    first_scenario=my_first_scenario
    description= _ "This is my first campaign."

    {CAMPAIGN_DIFFICULTY EASY   "units/undead-necromancers/adept.png~RC(magenta>black)" ( _ "Potato") ( _ "Normal")}
    {CAMPAIGN_DIFFICULTY NORMAL "units/undead-necromancers/dark-sorcerer.png~RC(magenta>black)" ( _ "Peasant") ( _ "Challenging")} {DEFAULT_DIFFICULTY}
    {CAMPAIGN_DIFFICULTY HARD   "units/undead-necromancers/lich.png~RC(magenta>black)" ( _ "Lieutenant") ( _ "Difficult")}
    {CAMPAIGN_DIFFICULTY EXPERT   "units/undead-necromancers/ancient-lich.png~RC(magenta>black)" ( _ "Emperor") ( _ "Nightmare")}

[/campaign]

#ifdef CAMPAIGN_MY_FIRST_CAMPAIGN

[binary_path]
    path=data/add-ons/my_first_campaign
[/binary_path]

{~add-ons/my_first_campaign/macros}
{~add-ons/my_first_campaign/utils}

{~add-ons/my_first_campaign/scenarios}
#endif
(Notice i change the difficult code just for testing, i'm using "Descent into Darkness" Difficult code as reference

Here's my scenario code :

Code: Select all

#textdomain wesnoth-poem_of_the_eastern_empire
[scenario]
    id=01_devil_rite
    next_scenario=null
    name= _ "Devil Rite"
    map_data="{~add-ons/poem_of_the_eastern_empire/maps/ritual.map}"
    turns=15
    [side]
        side=1
        controller=human
        team_name="empire"
        user_team_name= _ "Heir"
        id=UserLeader
        name= _ "Soxelo"
        type="Peasant"
        unrenameable=yes
        canrecruit=yes
        recruit="Peasant"
        gold=0
    [/side]
    [side]
        side=2
        controller=ai
        team_name="tribe"
        user_team_name= _ "Chief"
        id="EnemyLeader"
        name= _ "Xanthone"
        type="Peasant"
        unrenameable=yes
        recruit="Peasant"
        canrecruit=yes
        gold=0
    [/side]
    [event]
        name=start
        [message]
            speaker=UserLeader
            message= _ "Father! I don't want to fight you!"
        [/message]
        [message]
            speaker=EnemyLeader
            message= _ "No matter what you said, you have to end this rite, because my very own self won't hestitate to take off your head right from your neck."
        [/message]
        [message]
            speaker=UserLeader
            message= _ "I thought we were family, i thought you said mom died by your hand was for the greater good! I thought you love her but why?!"
        [/message]
        [message]
            speaker=EnemyLeader
            message= _ "Soxelo, enough... its either you or me, I'll cut your head anyway."
        [/message]
        [objectives]
            [objective]
                description= _ "Complete the Rite"
                condition="win"
            [/objective]
            [objective]
                description= _ "Defeat your Father"
                condition="win"
            [/objective]
            [objective]
                description= _ "Lose the fight"
                condition="lose"
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition="lose"
            [/objective]
        [/objectives]
    [/event]
    [event]
        name=moveto
        first_time_only="no"
        [filter]
            side=1
            x,y=20,14
        [/filter]
        [message]
            speaker=UserLeader
            message= _ "Fine! If you so badly want to die, I take off that flesh of yours, I give you a hellish death, I will avenge mother and I make sure your death reaches deepest of hell! I WILL KILL YOU, AND I WILL NOT LET YOU GO TO HEAVEN TO SEE MOTHER!!!"
        [/message]
        [message]
            speaker=EnemyLeader
            message= _ "Hehe... good, that's my son, now enough talk! Lets settle this!"
        [/message]
    [/event]
    [event]
        name=die
        [filter]
            id=EnemyLeader
        [/filter]
        [message]
            speaker=UserLeader
            message= _ "Go to Hell..."
        [/message]
        [endlevel]
            result=victory
        [/endlevel]
    [/event]
    [event]
        name="last breath"
        [filter]
            id=UserLeader
        [/filter]
        [filter_second]
            id=EnemyLeader
        [/filter_second]
        [message]
            speaker=UserLeader
            message= _ "Arrrgghh..."
        [/message]
        [message]
            speaker=EnemyLeader
            message= _ "Die for me to live!"
        [/message]
        [message]
            speaker=UserLeader
            message= _ "Fa..Father..."
        [/message]
    [/event]
    [event]
        name=die
        [filter]
            id=UserLeader
        [/filter]
        [message]
            speaker=EnemyLeader
            message= _ "We have no need of the weak..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
    [event]
        name=time over
        [message]
            speaker=EnemyLeader
            message= _ "You're too slow, enough... I'm taking your head"
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
[/scenario]
and here's the tutorial scenario code :

Code: Select all

#textdomain wesnoth-my_first_campaign
[scenario]
    id=my_first_scenario
    next_scenario=null
    name=_"My First Scenario."
    map_data="{~add-ons/my_first_campaign/maps/my_first_map.map}"
    turns=30
    [side]
        side=1
        controller=human
        team_name="good"
        user_team_name= _ "My Team"
        id=MyLeader
        name= _ "My Leader's Name"
        type="Elvish Ranger"
        unrenameable=yes
        canrecruit=yes
        recruit="Elvish Fighter, Elvish Archer, Elvish Shaman"
        gold=100
    [/side]
    [side]
       side=2
       controller=ai
       team_name="bad"
       user_team_name= _ "Bad Guys"
       id="EnemyLeader"
       name= _ "My Villain"
       type= "Orcish Warrior"
       unrenameable=yes
       canrecruit=yes
       recruit="Orcish Grunt, Orcish Archer, Orcish Assassin, Wolf Rider"
       gold=100
    [/side]
    [event]
        name=start
        [message]
            speaker=MyLeader
            message= _ "I see the orcs!"
        [/message]
        [message]
            speaker=EnemyLeader
            message= _ "Grrrr!"
        [/message]
        [objectives]
            [objective]
                description= _ "Defeat the enemy leader"
                condition="win"
            [/objective]
            [objective]
                description= _ "Death of your leader"
                condition="lose"
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition="lose"
            [/objective]
        [/objectives]
    [/event]
    [event]
        name=moveto
        first_time_only="no"
        [filter]
            side=1
            x,y=1,1
        [/filter]
        [message]
            speaker=unit #unit means the unit triggering this event--in this case the guy who just moved
            message= _ "Look at me!  I'm on hex 1,1!"
        [/message]
    [/event]
    [event]
        name="last breath"
        first_time_only=no
        [filter]
            side=2
        [/filter]
        [filter_second]
            side=1
        [/filter_second]
        [message]
            speaker=second_unit
            message= _ "Take that!"
        [/message]
        [message]
            speaker=unit
            message= _ "Hah! You missed!"
        [/message]
    [/event]
    [event]
        name=die
        first_time_only=no
        [filter]
            side=2
        [/filter]
        [filter_second]
            side=1
        [/filter_second]
        [message]
            speaker=second_unit
            message= _ "Wrong!"
        [/message]
    [/event]
    [event]
        name=die
        [filter]
            id=EnemyLeader
        [/filter]
        [message]
            speaker=second_unit
            message= _ "Yeah! I killed him!"
        [/message]
        [endlevel]
            result=victory
        [/endlevel]
    [/event]
    [event]
        name=time over
        [message]
            speaker=MyLeader
            message= _ "I give up.  This is taking too long..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
 [/scenario]
I'm out of clue, no idea, i try to moddify the map a little in hope that it will work but nothing really happen, still got the error
here's the map if you curious :
error1_report.png
Please help, Thanks in the advance!
What should i write down here? ¯\_(ツ)_/¯
Sky Sprite Art Thread!
Sky Story Art Thread!

User avatar
Pentarctagon
Forum Administrator
Posts: 4130
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Scenario won't load

Post by Pentarctagon »

What is the exact error you're getting? Also, is there anything in Wesnoth's log file?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
SkyRZ5
Posts: 30
Joined: December 18th, 2015, 9:53 pm
Location: Arkan-thoria

Re: Scenario won't load

Post by SkyRZ5 »

All I got was the Error : Failed to load the Scenario
The error occur right when the loading screen said "reading..."

The log only said :
20190601 08:41:18 warning general: no location found for 'data/add-ons/WML_Guide/translations', skipping textdomain
20190601 08:41:18 warning config: add-on 'my_first_campaign' has no _info.cfg; cannot read version info (i'm sure this is not the problem, this is the WML tutorial Campaign)
20190610 08:41:18 warning config: add-on "poem_of_the_eastern_empire' has no _info.cfg; cannot read version info
Checking lua scripts... Ok

20190610 08:41:25 error general: Failed to load the scenario

I didn't know what exactly wrong with my campaign too, that's why i'm asking here
What should i write down here? ¯\_(ツ)_/¯
Sky Sprite Art Thread!
Sky Story Art Thread!

gnombat
Posts: 254
Joined: June 10th, 2010, 8:49 pm
Contact:

Re: Scenario won't load

Post by gnombat »

It looks like you need to change {~add-ons/my_first_campaign/scenarios} to {~add-ons/poem_of_the_eastern_empire/scenarios}. (And a few other lines still mention to my_first_campaign too.)

User avatar
SkyRZ5
Posts: 30
Joined: December 18th, 2015, 9:53 pm
Location: Arkan-thoria

Re: Scenario won't load

Post by SkyRZ5 »

gnombat wrote:
June 10th, 2019, 2:44 am
It looks like you need to change {~add-ons/my_first_campaign/scenarios} to {~add-ons/poem_of_the_eastern_empire/scenarios}. (And a few other lines still mention to my_first_campaign too.)
why am i so dumb...

Thank you so much for that! Now it's working properly, sorry for the problem
What should i write down here? ¯\_(ツ)_/¯
Sky Sprite Art Thread!
Sky Story Art Thread!

User avatar
josteph
Developer
Posts: 740
Joined: August 19th, 2017, 6:58 pm

Re: Scenario won't load

Post by josteph »

That should have caused an error message Macro/file '~add-ons/my_first_campaign/scenarios' is missing. Not sure why it didn't.

User avatar
EarthCake
Posts: 360
Joined: March 29th, 2019, 1:57 pm
Location: Meereen

Re: Scenario won't load

Post by EarthCake »

I think that is because of the binary path.

EDIT: Ooh, I read shouldn't...
Last edited by EarthCake on June 10th, 2019, 4:24 pm, edited 1 time in total.

gnombat
Posts: 254
Joined: June 10th, 2010, 8:49 pm
Contact:

Re: Scenario won't load

Post by gnombat »

josteph wrote:
June 10th, 2019, 9:15 am
That should have caused an error message Macro/file '~add-ons/my_first_campaign/scenarios' is missing. Not sure why it didn't.
But what if there actually is a campaign my_first_campaign installed? Then ~add-ons/my_first_campaign/scenarios really does exist.

User avatar
EarthCake
Posts: 360
Joined: March 29th, 2019, 1:57 pm
Location: Meereen

Re: Scenario won't load

Post by EarthCake »

gnombat wrote:
June 10th, 2019, 11:23 am
josteph wrote:
June 10th, 2019, 9:15 am
That should have caused an error message Macro/file '~add-ons/my_first_campaign/scenarios' is missing. Not sure why it didn't.
But what if there actually is a campaign my_first_campaign installed? Then ~add-ons/my_first_campaign/scenarios really does exist.
Yes, that would cause the error, and if he has this code, he must have the campaign my_first_campaign.
Last edited by EarthCake on June 10th, 2019, 4:26 pm, edited 2 times in total.

User avatar
SkyRZ5
Posts: 30
Joined: December 18th, 2015, 9:53 pm
Location: Arkan-thoria

Re: Scenario won't load

Post by SkyRZ5 »

EarthCake wrote:
June 10th, 2019, 10:15 am
I think that is because of the binary path.
Well there's nothing wrong with the binary path actually, the problem was the macros and utility adress
What should i write down here? ¯\_(ツ)_/¯
Sky Sprite Art Thread!
Sky Story Art Thread!

User avatar
EarthCake
Posts: 360
Joined: March 29th, 2019, 1:57 pm
Location: Meereen

Re: Scenario won't load

Post by EarthCake »

SkyRZ5 wrote:
June 10th, 2019, 4:19 pm
EarthCake wrote:
June 10th, 2019, 10:15 am
I think that is because of the binary path.
Well there's nothing wrong with the binary path actually, the problem was the macros and utility adress
Yes, but look at the post @josteph made before that mine.
That should have caused an error message Macro/file '~add-ons/my_first_campaign/scenarios' is missing. Not sure why it didn't.
I actually answered to him.

User avatar
SkyRZ5
Posts: 30
Joined: December 18th, 2015, 9:53 pm
Location: Arkan-thoria

Re: Scenario won't load

Post by SkyRZ5 »

gnombat wrote:
June 10th, 2019, 11:23 am
josteph wrote:
June 10th, 2019, 9:15 am
That should have caused an error message Macro/file '~add-ons/my_first_campaign/scenarios' is missing. Not sure why it didn't.
But what if there actually is a campaign my_first_campaign installed? Then ~add-ons/my_first_campaign/scenarios really does exist.
There is a campaign named my first campaign
it's a wlm for beginner tutorial campaign, but the data has nothing to do with my Poem of the eastern empire campaign since both had different main.cfg and located at different folder and i never setup a code that link the both campaign so it has nothing to do with my campaign code
EarthCake wrote:
June 10th, 2019, 4:21 pm
SkyRZ5 wrote:
June 10th, 2019, 4:19 pm
EarthCake wrote:
June 10th, 2019, 10:15 am
I think that is because of the binary path.
Well there's nothing wrong with the binary path actually, the problem was the macros and utility adress
Yes, but look at the post @josteph made before that mine.
That should have caused an error message Macro/file '~add-ons/my_first_campaign/scenarios' is missing. Not sure why it didn't.
I actually answered to him.
ah i see, well, the scenario actually exist, that's why there's no error, what funny is, the first time i copy the code, all i got was "macros utils" error, died at the first turn, and then the scenario work properly, not sure why

Very weird huh
Last edited by Pentarctagon on June 11th, 2019, 12:25 am, edited 1 time in total.
Reason: Merge doublepost
What should i write down here? ¯\_(ツ)_/¯
Sky Sprite Art Thread!
Sky Story Art Thread!

Post Reply