Creating a new Campaign | Help required! [solved]

The place to post your WML questions and answers.

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.
Post Reply
User avatar
Bitron
Developer
Posts: 453
Joined: October 19th, 2015, 9:23 am
Location: Germany

Creating a new Campaign | Help required! [solved]

Post by Bitron »

Hello Guys !

guess I need a little help with my first Campaign. I managed to let the Campaign show up in the campaignmenu. I also can choose the difficulty, but when i try to start it I always get back to the Mainmenu (immediately after loadingscreen)
I tried the example-campaign (http://wiki.wesnoth.org/BuildingScenariosSimple) to get into it but it doesnt work.

This is my Scenario-file:

Code: Select all

#textdomain wesnoth-Journey_of_Vaash

[scenario]

  id=01_home-1
  next_scenario=null
 
  name= _ "Home"
  map_data="{~add-ons/Journey_of_Vaash/maps/01_home-1.map}"
  turns=20
 
  {DAWN}
  {MORNING}
  {AFTERNOON}
  {DUSK}
  {FIRST_WATCH}
  {SECOND_WATCH}
 
  music=battle.ogg
 
  [event]
    name=prestart
    [objectives]
      side=1
      [objective]
        description= _ "Defeat Enemy Leader"
        condition=win
      [/objective]
      [objective]
        description= _ "Death of Vaash"
        condition=lose
      [/objective]
      [objective]
        description= _ "Turns run out"
        condition=lose
      [/objective]
    [/objectives]
  [/event]
  # PLAYER
  [side]
    side=1
    controller=human
    team_name=1
    user_team_name= _ "Vaash's forces"

    type=Commander
    id=Vaash
    name= _ "Vaash"
    canrecruit=yes

    recruit=Elvish Archer

    {GOLD 100 50 0}
    {INCOME 10 5 0}
  [/side]
  
  # ENEMY
  [side]
    side=2
    controller=ai
    team_name=2
    user_team_name= _ "Enemy's forces"

    type=Commander
    id=Maurgheth
    name= _ "Maurgheth"
    canrecruit=yes

    recruit=Elvish Fighter

    {GOLD 100 50 0}
    {INCOME 10 5 0}
  [/side]  
[/scenario]
I used a simple 1v1 generated map for testing it, but still not working.
I really hope you guys can help me :>


All the Best!

Bitron
Last edited by Bitron on November 29th, 2015, 8:53 am, edited 1 time in total.
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Creating a new Campaign | Help required! (german prefere

Post by beetlenaut »

The "Commander" type only exists in the Heir to the Throne campaign. Maybe your _main.cfg file loads it, but probably not. Try a different type.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Creating a new Campaign | Help required! (german prefere

Post by Iris »

Bitron wrote:I also can choose the difficulty, but when i try to start it I always get back to the Mainmenu (immediately after loadingscreen)
In general, it’s crucial to post any error messages the game displays (both on the game screen and the stderr log) when asking for help with WML. I assume you are getting the “Unknown unit type” error if beetlenaut’s suspicion is correct.

(By the way, you appear to have accidentally posted this topic in Art Workshop instead of the WML Workshop, so I’ve moved it for you.)
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
User avatar
Heindal
Posts: 1353
Joined: August 11th, 2011, 9:25 pm
Location: Germany, Karlsruhe
Contact:

Re: Creating a new Campaign | Help required! (german prefere

Post by Heindal »

Sorry for the german, I'm just trying to keep him developing ;).


Also wenn du wirklich noch Hilfe brauchst kann ich dir sicherlich helfen. Wenn du eine Einheit verwendest die nicht zuvor definiert ist, wird das Spiel nicht starten können. Das meinte auch beetlenaut bei seinem Post. Du verwendest den "Commander", der kein Teil vom Hauptspiel ist und damit von dir separat definiert werden müsste.

Schauen wir erst mal wo du die Sachen findest:

Die Standardeinheiten kannst du übrigens unter:

http://units.wesnoth.org/1.12/mainline/ ... nline.html

nachschauen. Wenn die einen davon verwendest macht das kein Problem. Bei type= müsstest du also eine von diesen Einheiten verwenden. Das ist sozusagen der "Einheitentyp", der durch einen eindeutigen Namen definiert wird. Dieser Typ ist halt wie eine ID und muss stimmen! Karten (wenn du welche braucht), kannst du dir gerne von meinen Szenarien runterladen. Ansonsten empfehle ich dir als einsteiger die Campaign-How-To (A Simple Campaign) von Anonymissimus, opensourcejunkie. Die müsste es auch in Deutsch geben.


An sich kannst du mit WML wirklich coole Sachen machen und mit ein bisschen Übung un der Abkürzung über erfahrene Coder, kannst du schnell deine gewünschten Geschichten realisieren. WML ist nicht wirklich schwer, hat aber seine Grenzen - leider ist das Wiki in den Detailfragen gerade was zum Beispiel arrays angeht, leider nicht genau genug. Aber es reicht ;). Also Alles Gute und viel Erfolg.
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
Bitron
Developer
Posts: 453
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Creating a new Campaign | Help required! (german prefere

Post by Bitron »

Danke für die Antwort!

Inzwischen hab ich das oben angesprochene Problem gelöst, der Thread kann also quasi als "geschlossen" behandelt werden (:
Post Reply