Scenario Development Question

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

samuel15313
Posts: 8
Joined: April 27th, 2019, 1:30 am

Scenario Development Question

Post by samuel15313 » April 27th, 2019, 1:33 am

So, if in my story, a vital part requires the protagonists to lose, but this is the area that needs to be in a scenario. How do I make a scenario that requires the player to lose?

Edit: I am doing the campaign based on the War of the Jewels from the Silmarillion, and it is Dagor Bragollach
Last edited by samuel15313 on April 27th, 2019, 6:24 pm, edited 2 times in total.

User avatar
EarthCake
Posts: 354
Joined: March 29th, 2019, 1:57 pm
Location: Braavosi

Re: Scenario Development Question

Post by EarthCake » April 27th, 2019, 7:25 am

Hello!
Maybe player can kill enemy leader(s), and then some assasin kills him.

Maybe you could give enemy(if one) and player same gold or little more to AI, so player needs to use his leader in battle, and when player reaches 2-3 hexes next to enemy leader, enemy gets a lot of gold. And maybe another enemy leader comes and they surround player.

Third idea is that you make siege which is impossible to win, and in objectives just put 'survive'.

I can help you with code.

User avatar
octalot
Developer
Posts: 403
Joined: July 17th, 2010, 7:40 pm

Re: Scenario Development Question

Post by octalot » April 27th, 2019, 12:46 pm

The scenario Pebbles in the Flood (from The South Guard's bandit branch) has nice clean WML, and a good feedback thread.

Note: the most recent replay in the feedback thread doesn't work with the latest version of 1.14, and there are several actions (#4050) needed to skip forward through the campaign to that point.

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

Re: Scenario Development Question

Post by gnombat » April 27th, 2019, 3:15 pm

Another possibility is to give the player control of the other side in that one scenario.

User avatar
nemaara
Discord Moderator
Posts: 255
Joined: May 31st, 2015, 2:13 am

Re: Scenario Development Question

Post by nemaara » April 27th, 2019, 3:33 pm

octalot wrote:
April 27th, 2019, 12:46 pm
The scenario Pebbles in the Flood (from The South Guard's bandit branch) has nice clean WML, and a good feedback thread.

Note: the most recent replay in the feedback thread doesn't work with the latest version of 1.14, and there are several actions (#4050) needed to skip forward through the campaign to that point.
Should be fixed now, I made some commits that should let you use :n and :cl to get there.

samuel15313
Posts: 8
Joined: April 27th, 2019, 1:30 am

Re: Scenario Development Question

Post by samuel15313 » April 29th, 2019, 4:19 am

EarthCake wrote:
April 27th, 2019, 7:25 am
Third idea is that you make siege which is impossible to win, and in objectives just put 'survive'.
I like the idea of that, but what would the code for that look like? (New to coding and I use the scenario map editor)

User avatar
EarthCake
Posts: 354
Joined: March 29th, 2019, 1:57 pm
Location: Braavosi

Re: Scenario Development Question

Post by EarthCake » April 29th, 2019, 7:57 pm

Hello! I am glad that you are interested in coding! First of all you need to have any text editor. Then you need to go in your Wesnoth 1.14, and to click on blue i in your bottom left corner. Then click on one arrow that leads to add ons. There, you have files of all add ons you have. You need to create your own folder and name it how you want your scenario/campaign to be named. Then if you go in campaigns you should see your campaign without picture or everything.

You need to go in your campaign folder and make file named '_main.cfg'. You can take look here if you need more explanations, but this is _main.cfg example.

Code: Select all

#textdomain wesnoth-(textdomain)

[textdomain]
	name="wesnoth-(textdomain)"
	path="data/add-ons/(your campaign name)/translations"
[/textdomain]

[campaign]
    
	id=(campaign id)
	icon="(whatever you want, here is example)  units/human-loyalists/general-idle-2.png~RC(magenta>red)"
	image="data/add-ons/(campaign name)/images/campaign_image.png"
	name= _ "(campaign name)"
	abbrev= _ "(this is shortened name, which you see in load game menu, like HttT, SotA, OI...)"
	define=(define; usually just name of your campaign)
	
	first_scenario="(first scenario name)"
	difficulties=EASY,NORMAL,HARD
	
	[difficulty]
		define=EASY	
		image="(shows when you choose difficulty, whatever you want, example)  units/human-loyalists/sergeant-idle-5.png~RC(magenta>red)"
		label= _"(label)"
		description= _ "(difficulty)"
		default=yes
	[/difficulty]
	[difficulty]
		define=NORMAL
		image="(shows when you choose difficulty, whatever you want, example)  units/human-loyalists/lieutenant-idle-4.png~RC(magenta>red)"
		label= _"(label)"
		description= _ "(difficulty)"
	[/difficulty]
	[difficulty]
		define=HARD
		image="(shows when you choose difficulty, whatever you want, example)  units/human-loyalists/general-idle-3.png~RC(magenta>red)"
		label= _"(label)"
		description= _ "(difficulty)"
	[/difficulty]

    description= _ "(description)

" + _"((campaign level, example)  Intermediate level)"

#this are credits
	[about]
		title= _ "Campaign Design and Programming"
		[entry]
			name="(well...)"
		[/entry]
	[/about]

[/campaign]

#ifdef (campaign name, must be same as define up)

	[binary_path]
		path=data/add-ons/(campaign name)
	[/binary_path]
	
	{~add-ons/(campaign name)/utils}
	{~add-ons/(campaign name)/maps}
	{~add-ons/(campaign name)/scenarios}
#If you have special units in your campaign.
	[units]
		{~add-ons/(campaign name)/units}
	[/units]
#endif
Everything in brackets is of your own value.

When you have created _main.cfg, you should create 'maps', 'images' and 'scenarios' folders. Then you create map and put it in maps folder. You also should choose campaign image and put it in images folder. About scenario, you can look at this page, or you can take look at some other scenario (in example you can take look to "WML Guide", or you can take look at my campaign, which, at least I hope, has some clean and readily WML).

Finally, when you have made your campaign and think it is ready to publish, you need to create '_server.pbl' file. You can look at this page, but this is an example:

Code: Select all

title="(campaign name)"
type="(this is where you decide if it is map pack, scenario, campaign...)"
icon="(icon, should be same as in _main.cfg file)  units/human-loyalists/general-idle-2.png~RC(magenta>red)"
version="(version of campaign. With every publish to correct some bugs, you need to larger numbers, in example) 0.0.1 -> 0.0.2"
author="(...)"
passphrase="(this is your password to this campaign. It should be known only to you, so some guy doesn't change your campaign and publish it,)"
description="(description, can be same as in _main.cfg but doesn't have to)

((difficulty, an example)  Single Player - Intermediate level)"
email="(well, I don't know what is this for)"
[feedback]
	topic_id=(this is your topic id. In example, id for this topic is:)  49772
[/feedback]
Note that this file only you as author can see.

About utils folder, there you can make file about storing and restoring units, also you can make map after all text where you put how your party has been moving.

Here are more informations and links about WML and events, sides and all stuff.

I hope this was helpful!

User avatar
Lord-Knightmare
Forum Regular
Posts: 1137
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Scenario Development Question

Post by Lord-Knightmare » April 29th, 2019, 8:17 pm

So, if in my story, a vital part requires the protagonists to lose, but this is the area that needs to be in a scenario. How do I make a scenario that requires the player to lose?
This is achievable with the victory_when_enemies_defeated=no and, a customised time over event (turns run out). You can then define the scenario conditions which allow you pass on to the next level.
You can store/unstore the hero units and leaders if you want to carry them over to a future scenario.
I am doing the campaign based on the War of the Jewels from the Silmarillion, and it is Dagor Bragollach
I don't know if you can distribute that kind of content but I will definitely play it.

samuel15313
Posts: 8
Joined: April 27th, 2019, 1:30 am

Re: Scenario Development Question

Post by samuel15313 » April 30th, 2019, 1:42 am

Lord-Knightmare wrote:
April 29th, 2019, 8:17 pm
I don't know if you can distribute that kind of content but I will definitely play it.
i know i cannot post it, but the Silmarillion is my favorite book and a *relatively* simple story to start learning how to code and design maps

samuel15313
Posts: 8
Joined: April 27th, 2019, 1:30 am

Re: Scenario Development Question

Post by samuel15313 » April 30th, 2019, 1:44 am

in reply to EarthCake, if I use the in-game scenario stuff in the map editor, how much does it change

User avatar
EarthCake
Posts: 354
Joined: March 29th, 2019, 1:57 pm
Location: Braavosi

Re: Scenario Development Question

Post by EarthCake » April 30th, 2019, 9:20 am

Ok, if you use that, you do not need to put coordinates in side tag, you don't need to make units by coding (but in special cases you need to make tags for units, because ie. you want them to not move...).

samuel15313
Posts: 8
Joined: April 27th, 2019, 1:30 am

Re: Scenario Development Question

Post by samuel15313 » May 2nd, 2019, 4:52 am

okay, so I got everything done, and I am going to playtest my campaign, and then when I try to click on it in the campaign menu, nothing happens. What do I do?

User avatar
EarthCake
Posts: 354
Joined: March 29th, 2019, 1:57 pm
Location: Braavosi

Re: Scenario Development Question

Post by EarthCake » May 2nd, 2019, 6:36 am

Do you mean that it pops out "Failed to load scenario" or something else?

samuel15313
Posts: 8
Joined: April 27th, 2019, 1:30 am

Re: Scenario Development Question

Post by samuel15313 » May 2nd, 2019, 1:20 pm

No, when I am going to pick it in the campaign menu, it refuses to select, and if I double click, then it acts as though I double click another campaign.

User avatar
EarthCake
Posts: 354
Joined: March 29th, 2019, 1:57 pm
Location: Braavosi

Re: Scenario Development Question

Post by EarthCake » May 2nd, 2019, 6:09 pm

Hah, I haven't seen anything like that. Can you give me your _main.cfg? I believe error is there.

Post Reply