WML question: Adding a new unit type in mp scenario

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderator: Forum Moderators

Post Reply
Hieronymus
Posts: 41
Joined: February 24th, 2005, 2:10 pm

WML question: Adding a new unit type in mp scenario

Post by Hieronymus »

I would like to add a new unit type to a multiplayer scenario by defining it it the scenario WML itself (so not having to add a WML file to the data/units dir). But I cannot get the game to find my unit type, it keeps sayin "Unit not found:'Treasure Guard'.

This is like what I currently have:

Code: Select all

[+units]
	[unit]
		id=Treasure Guard
		name= _ "Treasure Guard"
                ...
	[/unit]
[/units]

[unit]
   	side=1
   	x,y=10,10
   	type=Treasure Guard
[/unit]
Am I doing something wrong or is there no way to define new unit types in the scenario WML itself, except in campaigns, so I would have to add a file to the units directory?
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Try putting it outside the scenario WML (before [scenario])
Hope springs eternal.
Wesnoth acronym guide.
Invisible Philosopher
Posts: 873
Joined: July 4th, 2004, 9:14 pm
Location: My imagination
Contact:

Post by Invisible Philosopher »

Other players on the internet would get unit-not-found errors even when you succeed at defining them. They are not transferred. You can work around it somewhat with various modifications to existing units ([effect], [unit_overlay], etc).
Play a Silver Mage in the Wesvoid campaign.
User avatar
Tomsik
Posts: 1401
Joined: February 7th, 2005, 7:04 am
Location: Poland

Post by Tomsik »

for example look to my war scenario, in 3 last units i modified parameters.
Post Reply