MP Scenario questions

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
User avatar
Magical_Noob
Posts: 50
Joined: May 24th, 2009, 2:46 pm
Location: UK

MP Scenario questions

Post by Magical_Noob »

Hello, I finished my era not too long ago and now I'm making the map to go with it. My map is pretty much finished now, but I still need to add a few more functions which I do not know how to do... So, here are my questions:

Question 1: How do I add signposts and put messages on them?

Question 2: How do I set ai controlled units onto the map?

Question 3: How do I set teams? (Make it so that players could not change the teams around?)

Question 4: How do I make it so that ai ally does not clear fog or shroud for players.

Thanks
User avatar
Heindal
Posts: 1353
Joined: August 11th, 2011, 9:25 pm
Location: Germany, Karlsruhe
Contact:

Re: MP Scenario questions

Post by Heindal »

You should proably post this under WML Workshop but I will try to answer your questions.


Question 1

You can place a signpost on the map by first placing the image and than placing a event on the same coordinate.

This place the signpost image:

Code: Select all

{PLACE_IMAGE scenery/signpost.png 35 35}
This places the event: note that I set first_time_only=no that means each time a unit of side 1 get to this point, the message will be shown.
Delete it or change it to yes if you just want it to appear one time.

Code: Select all

[event]
name=moveto
first_time_only=no
[filter]
x=35
y=35
side=1
[/filter]

[message]
speaker=unit
message= "(Place the text of the signpost between the quotes)"
[/message]

[/event]


Question 2

Use the following macro to place a unit:

Code: Select all

{GENERIC_UNIT SIDE TYPE X Y}
Example:

Code: Select all

{GENERIC_UNIT 3 Bandit 35 35}
You can find more macros like that at "Battle for Wesnoth 1.10.0\data\core\macros\unit-utils.cfg".
Or you could use:

Code: Select all

[unit]
        side=3
        type=Bandit
        x=35
        y=35
        generate_name=yes
        random_traits=yes
        random_gender=yes
        upkeep=full
[/unit]
which is exactly the same.


Question 3

Teams are set by your sidedefinition by giving them they same teamname.
Example:

Code: Select all

[side]
type=Peasant
id=Myhero
name= _ "Peasant the Peasant"
profile="portraits/humans/peasant.png~RIGHT()"
canrecruit=yes
side=1
x=46
y=41
controller=human
team_name=player
[/side]

[side]
type=Peasant
id=Myfriend
name= _ "The Ally"
profile="portraits/humans/peasant.png~RIGHT()"
canrecruit=yes
side=2
x=44
y=41
controller=ai
[b]team_name=player[/b]
[/side]

4. Question

Sorry, I don't know how to do this or if its possible.
The future belongs to those, who believe in the beauty of their dreams.
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
User avatar
Into-Jesus
Posts: 40
Joined: June 17th, 2012, 8:03 pm

Re: MP Scenario questions

Post by Into-Jesus »

It's possible. IIRC, under the [side] tag, just place:

Code: Select all

share_maps=yes
if you want the sides to share shroud updates, or:

Code: Select all

share_maps=no
if you don't.

For fog, do likewise but instead:

Code: Select all

share_view=yes
or:

Code: Select all

share_view=no
"The problem with Internet quotes is that you can never tell when they're true." - Ben Franklin

On Wesbreak
User avatar
Magical_Noob
Posts: 50
Joined: May 24th, 2009, 2:46 pm
Location: UK

Re: MP Scenario questions

Post by Magical_Noob »

Thank you Heindal and Into-Jesus, I will try them out right away :)
User avatar
Celtic_Minstrel
Developer
Posts: 2207
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: MP Scenario questions

Post by Celtic_Minstrel »

Heindal wrote:

Code: Select all

[unit]
        side=3
        type=Bandit
        x=35
        y=35
        generate_name=yes
        random_traits=yes
        random_gender=yes
        upkeep=full
[/unit]
Three of the last four attributes are being set to their defaults here, so the following would also be equivalent:

Code: Select all

[unit]
        side=3
        type=Bandit
        x=35
        y=35
        random_gender=yes
[/unit]
If you leave out random_gender (or set it to no), the default gender will be used, which can be either male or female. For core units it's always male unless the unit has no male variation.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
Post Reply