Scenario - Beyond the Dark Sun

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
feanarosurion
Posts: 8
Joined: November 26th, 2007, 7:31 am

Scenario - Beyond the Dark Sun

Post by feanarosurion »

I'm working on a campaign called Wintersun. It's based off the band, and each scenario will carry the name of one of their songs. I'm working on the first scenario, but I'm a complete n00b to programming, and I'd like some feedback on whether I'm doing this right. I haven't tested it yet, as I don't know how to do that. If anyone knows how I could test this, then I would appreciate it very much. Oh, and it currently lacks events, as I haven't had the time to think up much of a storyline yet. Any form of feedback would be appreciated, especially in improving this. Anyway, here's the scenario:

[scenario]
id=00001_wintersun1
name=_ "Beyond the Dark Sun"
map_data="{/Users/-/Library/Preferences/Wesnoth/editor/maps/Wintersun1}"
turns=40
next_scenario=null



[music]
name=gameplay01.ogg
ms_before=500
append=yes
[/music]



{MORNING}

[event]
name=prestart
[objectives]
side=1
[objective]
description= _ "Slay the Dark Adept"
condition=win
[/objective]
[objective]
description= _ "Death of Jari"
condition=lose
[/objective]
[objective]
description= _ "Turns run out"
condition=lose
[/objective]
[/objectives]
[/event]

[side]
#ifdef EASY
gold=150
#endif
#ifdef NORMAL
gold=100
#endif
#ifdef HARD
gold = 50
type=General
description=Jari
user_description= _ "Jari"
unrenamable=yes
{IS_HERO}
side=1
canrecruit=1
x=7
y=37
controller=human
recruit=Peasant,Spearman,Bowman,Horseman,Cavalryman,Fencer,Heavy Infantryman
[unit]
description=Jukka
user_description= _ "Jukka"
type=Lieutenant
side=1
{IS_HERO}
unrenamable=yes
x=9
y=37
[modifications]
{TRAIT_QUICK}
{TRAIT_LOYAL}
[/modifications]
[/unit]
[unit]
description=Teemu
user_description= _ "Teemu"
type=Sergeant
side=1
unrenamable=yes
x=5
y=37
[modifications]
{TRAIT_STRONG}
{TRAIT_LOYAL}
[/modifications]
[/unit]
[unit]
description=Kai
user_description= _ "Kai"
type=Sergeant
side=1
unrenamable=yes
x=9
y=38
[modifications]
{TRAIT_STRONG}
{TRAIT_LOYAL}
[/modifications]
[/unit]
[unit]
description=Väinö
user_description= _ "Väinö"
type=Spearman
side=1
x=8
y=37
[modifications]
{TRAIT_INTELLIGENT}
{TRAIT_LOYAL}
[/modifications]
[/unit]
[unit]
description=Juuso
user_description= _ "Juuso"
type=Spearman
side=1
x=6
y=37
[modifications]
{TRAIT_STRONG}
{TRAIT_LOYAL}
[/modifications]
[/unit]
[unit]
description=Urho
user_description= _ "Urho"
type=Bowman
side=1
x=6
y=36
[modifications]
{TRAIT_QUICK}
{TRAIT_LOYAL}
[/modifications]
[/unit]
[unit]
description=Luukas
user_description= _ "Luukas"
type=Horseman
side=1
x=8
y=36
[modifications]
{TRAIT_RESILIENT}
{TRAIT_LOYAL}
[/modifications]
[/unit]
[unit]
description=Aimo
user_description= _ "Aimo"
type=Cavalryman
side=1
x=7
y=36
[modifications]
{TRAIT_QUICK}
{TRAIT_LOYAL}
[/modifications]
[/unit]
[unit]
description=Armas
user_description= _ "Armas"
type=Fencer
side=1
x=7
y=38
[modifications]
{TRAIT_QUICK}
{TRAIT_LOYAL}
[/modifications]
[/unit]
[unit]
description=Eino
user_description= _ "Eino"
type=Heavy Infantryman
side=1
x=7
y=39
[modifications]
{TRAIT_RESILIENT}
{TRAIT_LOYAL}
[/modifications]
[/unit]

team_name=good
[/side]

[side]
#ifdef HARD
gold=100
#else
gold=30
#endif
type=Dark Adept
description=Joakim Ahti
user_description= _ "Dark Adept Joakim Ahti"
side=2
canrecruit=1
#ifdef HARD
recruit=Skeleton,Skeleton Archer,Walking Corpse,Vampire Bat,Ghost
#else
recruit=Skeleton,Skeleton Archer,Walking Corpse,Vampire Bat
#endif
[ai]
recruitment_ignore_bad_movement=yes
grouping=no
[/ai]
team_name=evil
[/side]

[event]
name=die
[filter]
description=Jari
[/filter]
[message]
description=Jari
message= _ "All is lost!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]

[/scenario]
Attachments
01 Beyond the Dark Sun.cfg
If you'd like to see the source file.
(3.6 KiB) Downloaded 162 times
gabe
Posts: 180
Joined: December 15th, 2006, 1:15 am
Location: an island in the pacific

Post by gabe »

try reading the post on how to by esr
http://www.wesnoth.org/forum/viewtopic.php?t=18522
happy timezone traveler
feanarosurion
Posts: 8
Joined: November 26th, 2007, 7:31 am

Post by feanarosurion »

I totally revamped the code, using campaign generator for some of it. However, I have a second level I'm testing, and whenever I move from the first level to the second, Wesnoth shuts down. I've checked the code to make sure all syntax is correct, and I've checked the campaign for errors. Is there any common cause/solution for this? If not, I'll include the code for both levels, plus the campaign as attachments. As for a smaller problem, I can't get the menu and difficulty icons to work. Made sure the code works for that as well. If anybody has a solution to that problem as well, I'd really appreciate it.
Attachments
Wintersun.cfg
The campaign file.
(2.52 KiB) Downloaded 146 times
1_The_Dark_Sun.cfg
The first level (everything is working out for this level)
(14.69 KiB) Downloaded 157 times
2_Beyond_the_Dark_Sun.cfg
The second level (can't get it to work.)
(9.38 KiB) Downloaded 157 times
mari
Posts: 2
Joined: November 26th, 2007, 4:37 pm

Post by mari »

Hi,

Is your directory structure correct? Maybe it would be easier to find mistakes if you attached a zip file with the directory structure. And check the wiki here to know what the folders should be like.

For the images outside the campaign, you should use binary_path. There's an explanation (with code) of how to do it in the forum:
http://www.wesnoth.org/forum/viewtopic.php?t=11990

Good luck!
feanarosurion
Posts: 8
Joined: November 26th, 2007, 7:31 am

Post by feanarosurion »

I checked out that other post, and I tried the code that was suggested. No such luck. My images still don't show. And my directory structure is correct. It's in the right place for OS X, which is my OS. Thanks for getting me to look into it, though. I might know what to look for in the campaign file to fix these things.
feanarosurion
Posts: 8
Joined: November 26th, 2007, 7:31 am

Post by feanarosurion »

I got the second level to work. I had something wrong with the sides. Still can't get the images to work, but that's not too important. I have a couple more questions. I know how to give an ai team a recruitment pattern, but does that make the team recruit more? If not, how can I do that. I need a huge amount of enemies for this one level. One final thing, I'm not that good at creating events or objectives. After the enemy is defeated, I need my leader to rendezvous with a mage to complete the level. How would I accomplish that? I've looked through the wiki for an answer to this last one, but I can't find anything. Anything is appreciated.
gabe
Posts: 180
Joined: December 15th, 2006, 1:15 am
Location: an island in the pacific

Post by gabe »

recruit=blah, blah == BAD
recruit=blah,blah == GOOD
same for recruitment pattern
spaces are evil in lists for the engine
in stuff I done had spaces between unit names and the leaders stunk at recruiting
removed the spaces and the level became a lot harder as he recruited units

victory_when_enemies_defeated=no
in the side tag

then have a [endlevel] tag in the mage event to end the level
happy timezone traveler
feanarosurion
Posts: 8
Joined: November 26th, 2007, 7:31 am

Post by feanarosurion »

So, if I have spaces, recruiting will be slower, and no spaces, there will be a lot more recruiting. I still want my player to attack the enemy, so I'll just have the objectives include the defeat of the enemy, and have the enemies between me and the mage. Thanks a bunch!
feanarosurion
Posts: 8
Joined: November 26th, 2007, 7:31 am

Post by feanarosurion »

I've finished my first two scenarios (sort of)! I still need to add a few more events, and add the story, but I might create the whole set of maps before creating the story. Anyway, if anyone wants to play it, here's everything you'll need.
Attachments
Wintersun Campaign.zip
Contains the campaign file, and the campaign folder. Put it into your user data campaign directory.
(17.7 KiB) Downloaded 121 times
mari
Posts: 2
Joined: November 26th, 2007, 4:37 pm

Post by mari »

Ok, append this to the end of your campaign file:

Code: Select all

[binary_path]
    path="data/campaigns/Wintersun"
[/binary_path]
That should get the images working. :)


feanarosurion wrote:but I might create the whole set of maps before creating the story.
Personally I think it would be best if you had the story first... not that I know much about making campaigns, but having a story can be much more engaging then just a sequence of scenarios...

As for playing, your maps are using wesnoth 1.2 layout and I only have 1.3 installed, so I can't help you there, sorry. Maybe you should put the maps on a file separate from the scenario file, though. It would make converting them a lot easier ^^
feanarosurion
Posts: 8
Joined: November 26th, 2007, 7:31 am

Post by feanarosurion »

I've already tried the binary path thing, but not in that format. As for the maps, I'll create a new zip with the maps in that folder. And with the story, I already know what the storyline is, but I don't have many specifics. After I have all the maps, I'll know how the story should progress, and I can decide where to put each story element. Anyway, here's the modified zip.
Attachments
Wintersun Campaign.zip
A modified zip file with the maps included, as well as the beginnings of a third level.
(20.19 KiB) Downloaded 124 times
Lord Of Weapons And Magic
Posts: 34
Joined: December 28th, 2007, 7:03 pm

Suggestion

Post by Lord Of Weapons And Magic »

Get Campgen and Wipyxton.
Post Reply