Having trouble creating a campaign
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.
Having trouble creating a campaign
Hi, I have been following Wesnoth for a good few years, it's a great game I decided having done various bits for Oolite in the past to find something else creative to do, so here I am. Unfortunately I don't seem to be able to get the map editor to allow me to create starting positions, is this currently inoperative? I am using the latest version of Wesnoth V1.13.5. Am I doing something wrong? A lot of the buttons are greyed out and don't seem to do anything, help!
Re: Having trouble creating a campaign
The starting positions tool seems to work just fine for me.
Re: Having trouble creating a campaign
I've reloaded my scenario and it seems to work now, however, when I try and place a unit the editor crashes, do I have to define them in the .cfg first? Or does the editor define these in the .cfg for you?
Re: Having trouble creating a campaign
The scenario editor features in the map editor are very incomplete, and basically you're better off using it only to create the map and doing all the .cfg work by hand.
Re: Having trouble creating a campaign
Okay thank you, I thought it was going to be too easy to be true haha Guess I better get digging around for what I need then
Re: Having trouble creating a campaign
I've double and triple checked the beginners guide but the campaign just crashes when or straight after reading unit files, can anyone see what I've done wrong here..?
Thanks for any help!
Thanks for any help!
Code: Select all
#textdomain wesnoth-the_dream
[scenario]
id=the_dream
next_scenario=null
name=_"The Dream."
map_data="{~add-ons/the_prophecy/maps/the_dream.map}"
turns=80
name="the_dream.cfg"
random_start_time=no
victory_when_enemies_defeated=no
[side]
type= "Wolf Rider"
controller="human"
x,y=57,100
fog=no
gold=0
hidden=no
income=0
id=MyLeader
share_vision="all"
shroud=yes
side=1
team_name="Arlo's Spirits"
user_team_name="Arlo The Seer"
canrecruit=no
[/side]
[side]
controller="ai"
x,y=48,53
gold=200
hidden=no
income=0
id="EnemyLeader"
share_vision="all"
side=2
team_name="Malicious Spirits"
type= "Orcish Warrior"
canrecruit=yes
recruit="Orcish Grunt, Orcish Archer, Orcish Assassin, Wolf Rider"
user_team_name="Dark Forces"
[/side]
[time]
blue=-10
description=""
green=-35
id="second_watch"
image="misc/time-schedules/default/schedule-secondwatch.png"
lawful_bonus=0
mask=""
name=_"Second Watch"
red=-45
sound=""
[/time]
[event]
name=prestart
[objectives]
side=1
[objective]
description= _ "Find your way through the dream"
condition=win
[/objective]
[objective]
description= _ "Death of Arlo"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=0
[/gold_carryover]
[/objectives]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=49,10
[/filter]
[message]
speaker=unit
message= _ "The darkness before you lifts, and there before you is an unending citadel reaching as far as the eye could see in glorious splendour."
[/message]
[/event]
[event]
name=prestart
[objectives]
side=1
[objective]
description= _ "Find your way through the dream"
condition=win
[/objective]
[objective]
description= _ "Death of Arlo"
condition=lose
[/objective]
[/objectives]
[/event]
[/scenario]
Last edited by ZygoUgo on September 4th, 2016, 6:50 pm, edited 1 time in total.
Re: Having trouble creating a campaign
There's nothing like that wrong with that scenario.
Re: Having trouble creating a campaign
Thanks for you're help, the problem was elsewhere, however, I now have this scenario at the beginning, the map and UI come up, but with the message 'you are defeated', what is going wrong in my scripting..? Neither do the conditions of the game display before it cuts straight to defeat, any ideas?
Code: Select all
#textdomain wesnoth-a_fine_day
[scenario]
id=a_fine_day
next_scenario=the_dream
name=_"A Fine Day."
map_data="{~add-ons/the_prophecy/maps/a_fine_day.map}"
turns=10
victory_when_enemies_defeated=no
[side]
type= "Elf Ranger"
controller="human"
x,y=3,17
fog=no
gold=0
hidden=no
income=0
id=Arlo
share_vision="all"
shroud=no
side=1
team_name="Arlo"
user_team_name="Arlo"
canrecruit=no
[/side]
[side]
controller="ai"
x,y=12,2
gold=200
hidden=no
income=0
id=Cain
share_vision="all"
side=2
team_name="Cain"
type= "Elf Ranger"
canrecruit=no
user_team_name="Cain is busy"
[/side]
[event]
name=prestart
[objectives]
side=1
[objective]
description= _ "Find Cain to help him work"
condition=win
[/objective]
[objective]
description= _ "Hurry!"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=100
[/gold_carryover]
[/objectives]
[/event]
[event]
name=moveto
[filter]
id=Arlo
x,y=12.2
[/filter]
[message]
speaker=unit
message= _ "Damnit Arlo, where have you been all morning?! I'm sick of your day dreaming, I've had enough of you!"
[/message]
[/event]
[event]
[micro_ai]
side=2
ai_type=stationed_guardian
action=add
id=Cain
distance=10
station_x,station_y=12,3
guard_x,guard_y=8,5
[/micro_ai]
[/event]
[/scenario]
Last edited by ZygoUgo on September 4th, 2016, 6:50 pm, edited 1 time in total.
- skeptical_troll
- Posts: 500
- Joined: August 31st, 2015, 11:06 pm
Re: Having trouble creating a campaign
Shoulldn't it be 'Elvish Ranger' instead of 'Elf Ranger' . Although I'd expect him to complain about the unknown type before loading the scenario. But if it loads it, it finds that you have no leader and then thinks you lost?
Re: Having trouble creating a campaign
Thankyou friendly troll, amy many friends walk across your bridge. I shall have a look at that and return, hopefully joyously
- Flameslash
- Posts: 633
- Joined: December 21st, 2008, 12:29 pm
Re: Having trouble creating a campaign
I expect that this is it. I had a similar problem with a wrong unit type leader, there was no error message but he didn't spawn, giving the player instant victory.skeptical_troll wrote:Shoulldn't it be 'Elvish Ranger' instead of 'Elf Ranger' . Although I'd expect him to complain about the unknown type before loading the scenario. But if it loads it, it finds that you have no leader and then thinks you lost?
Re: Having trouble creating a campaign
You have no leader, which is why you instantly lose.
Re: Having trouble creating a campaign
Thanks all, having a few error messages in the log, not sure if these are stopping the game too..
Battle for Wesnoth v1.13.5
Started on Sat Sep 03 20:05:16 2016
Automatically found a possible data directory at F:\Program Files
Data directory: F:\Program Files
User configuration directory: C:\Users\NeilNoodle\Documents\My Games\Wesnoth1.13
User data directory: C:\Users\NeilNoodle\Documents\My Games\Wesnoth1.13
Cache directory: C:\Users\NeilNoodle\Documents\My Games\Wesnoth1.13\cache
Setting mode to 1707x961
20160903 20:05:17 warning config: add-on 'the_prophecy' has no _info.cfg; cannot read version info
Checking lua scripts... ok
20160903 20:05:19 error display: could not open image 'fangs.png'
20160903 20:05:20 error display: could not open image 'ghost.png'
20160903 20:05:22 warning gui/event: distributor mouse button left [campaign_selection]: . Mouse down on non focused widget and mouse not captured, we missed events.
20160903 20:05:25 warning wml: [campaign] difficulties,difficulty_descriptions= is deprecated. Use [difficulty] instead
20160903 20:05:29 error display: Tile at -999,-999 isn't on the map, can't scroll to the tile.
20160903 20:05:29 error display: Tile at -999,-999 isn't on the map, can't scroll to the tile.
20160903 20:05:33 warning gui/event: distributor mouse button left [transient_message]: . Mouse down on non focused widget and mouse not captured, we missed events.
Not sure how to define the leader, I'll have a look in someone else's cfg file. At least the sprites are appearing now, hoorah!
Battle for Wesnoth v1.13.5
Started on Sat Sep 03 20:05:16 2016
Automatically found a possible data directory at F:\Program Files
Data directory: F:\Program Files
User configuration directory: C:\Users\NeilNoodle\Documents\My Games\Wesnoth1.13
User data directory: C:\Users\NeilNoodle\Documents\My Games\Wesnoth1.13
Cache directory: C:\Users\NeilNoodle\Documents\My Games\Wesnoth1.13\cache
Setting mode to 1707x961
20160903 20:05:17 warning config: add-on 'the_prophecy' has no _info.cfg; cannot read version info
Checking lua scripts... ok
20160903 20:05:19 error display: could not open image 'fangs.png'
20160903 20:05:20 error display: could not open image 'ghost.png'
20160903 20:05:22 warning gui/event: distributor mouse button left [campaign_selection]: . Mouse down on non focused widget and mouse not captured, we missed events.
20160903 20:05:25 warning wml: [campaign] difficulties,difficulty_descriptions= is deprecated. Use [difficulty] instead
20160903 20:05:29 error display: Tile at -999,-999 isn't on the map, can't scroll to the tile.
20160903 20:05:29 error display: Tile at -999,-999 isn't on the map, can't scroll to the tile.
20160903 20:05:33 warning gui/event: distributor mouse button left [transient_message]: . Mouse down on non focused widget and mouse not captured, we missed events.
Not sure how to define the leader, I'll have a look in someone else's cfg file. At least the sprites are appearing now, hoorah!
Re: Having trouble creating a campaign
Thanks for the help guys, finally got the basics working, I hadn't defined recruits=yes, so he wasn't therefore defined as my leader. I should imagine I'll be stuck again soon haha
Re: Having trouble creating a campaign
Okay, latest problem...
A) How do I get a character to switch or refresh their AI during a scenario?
B) Having tried several different things I deleted my attempts and returned the script to it's original form (where an AI was defined in pre_start, this is the AI I want to update the co_ordinates of during the scenario) where upon the previously working AI has ceased to do anything, have I deleted something else along with my failed attempts?..
Thanks for any help!
EDIT: Added
A) How do I get a character to switch or refresh their AI during a scenario?
B) Having tried several different things I deleted my attempts and returned the script to it's original form (where an AI was defined in pre_start, this is the AI I want to update the co_ordinates of during the scenario) where upon the previously working AI has ceased to do anything, have I deleted something else along with my failed attempts?..
Code: Select all
#textdomain wesnoth-a_fine_day
[scenario]
id=a_fine_day
next_scenario=the_dream
name=_"A Fine Day."
map_data="{~add-ons/the_prophecy/maps/a_fine_day.map}"
turns=15
victory_when_enemies_defeated=no
[side]
type= "Peasant"
controller="human"
x,y=2,16
fog=no
gold=0
hidden=no
income=0
id=Arlo
name= _ "Arlo"
share_vision="all"
shroud=no
side=1
team_name="Arlo"
user_team_name="Arlo"
canrecruit=yes
[modifications]
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}
[abilities]
{ABILITY_LEADERSHIP_LEVEL_2}
[/abilities]
[/side]
[side]
controller="ai"
x,y=16,12
gold=20
hidden=no
income=0
id=Cain
name= _ "Cain"
share_vision="all"
side=2
team_name="Cain"
type= "Woodsman"
canrecruit=no
user_team_name="Cain is busy"
[/side]
[event]
name=prestart
[objectives]
side=1
[objective]
description= _ "You are late again! Find you're brother in the meadow..."
condition=win
[/objective]
[objective]
description= _ "Hurry!"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=no
carryover_percentage=100
[/gold_carryover]
[/objectives]
[micro_ai]
side=2
id=Cain
ai_type=stationed_guardian
action=add
distance=3
station_x,station_y=12,12
guard_x,guard_y=16,12
[/micro_ai]
[/event]
[event]
name=moveto
[filter]
id=Cain
x,y=12,12
[/filter]
[message]
speaker=Cain
message= _ "Damnit Arlo, where have you been all morning?! I'm sick of your day dreaming, I've had enough of you! Any way, this morning whilst you were dreaming as ever a pack of wolves came down from the mountains and drove away our sheep, we're going to hunt them down! Today is about revenge! Don't worry about you're bow, I'll do the shooting, you couldn't hit the out-house anyway, you'll only scare them away. I want you to protect my back. Come on, hurry up!"
[/message]
[/event]
[event]
name=moveto
[filter]
id=Cain
x,y=16,1
[/filter]
[message]
speaker=Cain
message= _ "Get over here! Follow me behind these boulders!"
[/message]
[/event]
[event]
name=die
[filter]
id=Arlo
[/filter]
[message]
speaker=Cain
message= _ "I never could stand you, you snivelling runt! Maria's hand will be mine at last!"
[/message]
[message]
speaker=Arlo
message= _ "Ugh...I'm dying...Help me!.."
[/message]
[message]
speaker=Cain
message= _ "I'll shove you in that ditch...gnnn! There, I'm sure the wolves will clear up this mess!"
[/message]
[message]
speaker=Arlo
message= _ "..I...feel so....faint....!"
[/message]
[move_unit]
side=2
canrecruit=no
to_x=2
to_y=16
[/move_unit]
[message]
speaker=Cain
message= _ "Father! Father! The wolves have taken Arlo!"
[/message]
[endlevel]
result=victory
bonus=no
{NEW_GOLD_CARRYOVER 0}
[/endlevel]
[/event]
[/scenario]
EDIT: Added
Code: Select all
tags. Use [code] tags. -zookeeper[/color]