Help for create survival map

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

User avatar
Ruzel
Posts: 20
Joined: April 17th, 2012, 6:59 pm

Help for create survival map

Post by Ruzel »

Hi, I'm from Brazil! I am using google translator sorry for english ...

I want to know how to create a map similar the Dark Forecast (Survival) map of survival with two players, that appear monsters with changes of turns, this is complicated? or anyone can make your own map of survival?
How to make the monsters arise on the map in turn x selected? That's all it takes to make a survival map as the Dark Forecast (Survival)?

Thanks.
User avatar
Dugi
Posts: 4960
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Help for create survival map

Post by Dugi »

I suggest you to to look at data/multiplayer/scenarios/2p_Dark_Forecast.cfg , if you want to make something similar. But the problem there is that there is too many macros and similar stuff so that it is hard to learn from it for a starter (try some other files in that folder to learn what is it about).

Technically, all you need is to make the monsters appear. And something that will make the player win if he was lucky enough.
It can be done with events, if you specify what monsters appear, and where they appear, it is easy. But if you want them to appear at random locations and random types, it is not so easy.

Sorry that I cannot help you with your language problem, I can't speak Portuguese.
User avatar
Ruzel
Posts: 20
Joined: April 17th, 2012, 6:59 pm

Re: Help for create survival map

Post by Ruzel »

So I'd have to know to make macros in order to make the monsters appear?
User avatar
Dugi
Posts: 4960
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Help for create survival map

Post by Dugi »

No, macros are just to simplify things. Without them, making a campaign where the monsters spawn randomly would be extremely time-consuming (that is why is Dark Forecast done with a large quantity of macros). I think that if you are a beginner, you should try to do it without randomly spawned units, you just decide what appears where when writing.
User avatar
Ruzel
Posts: 20
Joined: April 17th, 2012, 6:59 pm

Re: Help for create survival map

Post by Ruzel »

The map I create with the creator of the wesnoth and monsters? how do I Appear? In this case, the macro, I would have to make monsters born in one place forever? And how do I create an objective of victory?
tribes45
Posts: 123
Joined: June 24th, 2010, 12:40 am

Re: Help for create survival map

Post by tribes45 »

Ruzel wrote: And how do I create an objective of victory?
Hmm, what you mean by this is the winning objective I believe. (I'm a new coder, just as you, so please correct me if I'm wrong,)

Code: Select all

[event]
name= #Event name
###(What ever else depending on what you want to take place)
###and then at the end, you would write
[endlevel]
result=victory
[/endlevel]
[/event] ##If there's multiple objectives, make a nested event. This is done by placing two events inside each other, and can be found here. [spoiler]http://wiki.wesnoth.org/EventWML#Nested_Events[/spoiler]




Sorry if I'm incorrect, as I've said, I'm a new coder aswell.
"In peace, sons bury their fathers. In war, fathers bury their sons." -Herodotus
"Two things are infinite, the universe and Human stupidity. Although, I'm not sure about the universe. -Albert Einstein
User avatar
Ruzel
Posts: 20
Joined: April 17th, 2012, 6:59 pm

Re: Help for create survival map

Post by Ruzel »

tribes45 Could give me an example of how this would be? which would on the spaces shown.
User avatar
Dugi
Posts: 4960
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Help for create survival map

Post by Dugi »

This should contain all structures necessary to make it. There is no support for random spawns nor weather changes, but if you add all the spawn waves (an example of a wave-spawn structure is contained), set the coordinates to suit your needs and place it correctly, it should be playable.

Code: Select all

[multiplayer]
    id=ruzels_awesome_survival
    name= _ "2p — Ruzel's Awesome Survival"
    map_data="{your_maps_name.map}"     #link it to your map
    description= _ "A really awesome survival scenario for two players."
    random_start_time="no"

    {DEFAULT_SCHEDULE}
    {DEFAULT_MUSIC_PLAYLIST}

    [side]
        side=1
        canrecruit=yes
        team_name="human"
        user_team_name= _ "teamname^Good"
        controller="good"
        save_id="Player1"
        village_gold=1
        gold=75
        income=0
        gold_lock="true"
        income_lock="true"
        team_lock="true"
        fog="yes"
        share_view="yes"
    [/side]

    [side]
        side=2
        canrecruit=yes
        team_name="human"
        user_team_name= _ "teamname^Good"
        controller="good"
        save_id="Player2"
        village_gold=1
        gold=75
        income=0
        gold_lock="true"
        income_lock="true"
        team_lock="true"
        fog="yes"
        share_view="yes"
    [/side]

    [side]
        side=3
        color=red
        canrecruit=no
        team_name="Wicked Perverted Evil"
        user_team_name= _ "teamname^Wicked Perverted Evil"
        allow_player=no
        disallow_observers=yes
        no_leader=yes
        controller="ai"
        village_gold=1
        [ai]
            aggression=-4.0
            caution=0.99
            grouping=defensive
            village_value=12
            attack_depth=1
        [/ai]
    [/side]
    [event]
        name=prestart
        [objectives]
            [objective]
                description= _ "Survive and defeat all enemy waves, kill the dragon at the end"
                condition=win
            [/objective]
            [objective]
                description=$lose_condition_string
                condition=lose
            [/objective]
    [/event]
    [event]
        name=turn 2       #This happens at turn 2, change it in each copy
        {GENERIC_UNIT 3 "Orcish Grunt" 23 4}          # The first number is the side of the units, I have set the enemy side to 3, so leave it be.
        {GENERIC_UNIT 3 "Orcish Archer" 25 3}        # It is followed by the type of the spawned enemy.
        {GENERIC_UNIT 3 "Troll Whelp" 22 5}            #The latter two numbers are the coordinates of the units
    [/event]                   # This macro is from the core game, so it does not need to be defined
                                      # Add more events like this to make them spawn more frequently, not just once at turn 2

    [event]        #at turn 40, you will win (if you survive so far)
        name=turn 40
     [endlevel]
       result=victory
     [/endlevel]
   [/event]
[/multiplayer]
Last edited by Dugi on April 18th, 2012, 6:53 pm, edited 2 times in total.
User avatar
Ruzel
Posts: 20
Joined: April 17th, 2012, 6:59 pm

Re: Help for create survival map

Post by Ruzel »

I have to modify to suit my need? marked the areas that i need to modify? you help me? say where change I have to paste this code? in what location?
User avatar
Dugi
Posts: 4960
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Help for create survival map

Post by Dugi »

Please have a look here, it should help you to comprehend the basic things.

I have slightly edited it to make it easier to comprehend.

All you need to do is to add more events like this:

Code: Select all

    [event]
        name=turn 2       #This happens at turn 2, change it in each copy
        {GENERIC_UNIT 3 "Orcish Grunt" 23 4}          # The first number is the side of the units, I have set the enemy side to 3, so leave it be.
        {GENERIC_UNIT 3 "Orcish Archer" 25 3}        # It is followed by the type of the spawned enemy.
        {GENERIC_UNIT 3 "Troll Whelp" 22 5}            #The latter two numbers are the coordinates of the units
    [/event]
to make the enemies spawn like you want (and change them slightly to make them appear where you want and the type of enemies you want)
User avatar
Ruzel
Posts: 20
Joined: April 17th, 2012, 6:59 pm

Re: Help for create survival map

Post by Ruzel »

Can you Indicate a specific section to read According to my needs?
I think I understand this code, let's assume I want to put the "goblin", ... would GENERIC_UNIT 3 {"Goblin" 22 5} right?
User avatar
Dugi
Posts: 4960
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Help for create survival map

Post by Dugi »

No. It should be {GENERIC_UNIT 3 "Goblin Spearman" 22 5} to create a goblin spearman on a field with coordinates 22,5 (there is also not unit called 'Goblin').

I cannot locate that thing either. Read this to now where is the add-ons folder. Then create a folder there (with the name of your survival). and put a file containing the text above into it, and name it _main.cfg . Put also the map into the folder, and on the line that I marked with '#link your map here', replace the 'your_maps_name.map' with your map's actual name.
User avatar
Ruzel
Posts: 20
Joined: April 17th, 2012, 6:59 pm

Re: Help for create survival map

Post by Ruzel »

I put the map and text in a folder called add-ons map appears in the list in multiplayer?
did not appear ...
User avatar
Dugi
Posts: 4960
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Help for create survival map

Post by Dugi »

Wrong. There already is a folder named 'add-ons'. You have to find it, and make a folder for your campaign inside of it, and place the _main.cfg file inside it, together with the map. The folder structure should look like something like this:

Code: Select all

/data/add-ons/             -You will see a list of add-ons you have already installed
/data/add-ons/My_Awesome_Survival/_main.cfg               -Create this folder and place that file inside
/data/add-ons/My_Awesome_Survival/the_map.map           -Put your map file inside it too
I cannot tell you where will the data/add-ons folder be, it will be somewhere around My Documents if you are using Windows. You can use the search tool to find it.
User avatar
Ruzel
Posts: 20
Joined: April 17th, 2012, 6:59 pm

Re: Help for create survival map

Post by Ruzel »

I located the folder and put the main.cfg the map but did not Appear in the multiplayer map, do not have to put anything else?
Post Reply