Custom movetypes and campaigns

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
cobretti
Posts: 466
Joined: February 19th, 2004, 4:38 pm

Custom movetypes and campaigns

Post by cobretti »

I've started to write my own campaign, using new units, and I want to give them their own characteristics (names, movement type, etc). I tried including the appropiate data inside the campaign .cfg file, as the following code shows, but it doesn't work at all. The new values aren't recognized, and I end with units unable to move, because the game doesn't know how much is the movement cost of each terrain.

Code: Select all

[race]
name=northernhuman
num_traits=2
[/race]

[movetype]
name=barbarianfoot

       [movement costs]
       deep water=100
       shallow water=3
       swamp water=3
       grassland=1
       sand=2
       forest=1
       hills=1
       mountains=3
       village=1
       castle=1
       cave=2
       tundra=2
       cavewall=100
       [/movement costs]

       [defense]
       deep water=80
       shallow water=80
       swamp water=80
       grassland=60
       sand=70
       forest=40
       hills=40
       mountains=40
       village=40
       castle=40
       cave=60
       tundra=70
       cavewall=10
       [/defense]

       [resistance]
       blade=110
       pierce=110
       impact=100
       fire=90
       cold=70
       holy=80
       [/resistance]
[/movetype]
My question is: Is there any way to include new movement types for campaign units? How?
Invisible Philosopher
Posts: 873
Joined: July 4th, 2004, 9:14 pm
Location: My imagination
Contact:

Post by Invisible Philosopher »

Put all that inside a [+units] tag, the same way you put your units:

Code: Select all

[+units]
[race]
...
[/race]
[movetype]
...
[/movetype]
[/units]
Play a Silver Mage in the Wesvoid campaign.
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

Hmmmm... reminds me of Saurians' movetype.

(and the Philosopher is right)
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
cobretti
Posts: 466
Joined: February 19th, 2004, 4:38 pm

Post by cobretti »

Thanks. I was using them at first level, outside of the +units.

EP: The movetype is still experimental, I want to test its values before selecting the more appropiate ones.
cobretti
Posts: 466
Joined: February 19th, 2004, 4:38 pm

Post by cobretti »

Just another question, so I don't start new topics each time:

I have a galleon as an item in one scenario, and want to do the following on the time over event:

make the galleon item disappear.
make a move_unit_fake with a galleon image.
make the hero speak something.

Now, I can do the second and third, but I can't find how to do the first. I tried [removeitem], but with no luck. Somebody knows how to do it? (examples of removeitem in HttT are inside [moveto], didn't found any on time over)
Shade
Posts: 1111
Joined: April 18th, 2004, 11:17 pm

Post by Shade »

[removeitem]
[/removeitem]
Note to forum users: You are in a maze of twisty little passages
cobretti
Posts: 466
Joined: February 19th, 2004, 4:38 pm

Post by cobretti »

Shade wrote:[removeitem]
[/removeitem]
I know :wink: . But where?. Putting it just before the [move_unit_fake] doesn't look to work. Do I have to use [filter]?

A quick example would be appreciated :)
Shade
Posts: 1111
Joined: April 18th, 2004, 11:17 pm

Post by Shade »

Sorry, that's what I get for skimming :) The wiki says you should be able to specify an x,y inside of the removeitem tag... if that doesn't work there might be a bug...

so

[removeitem]
x,y=X1,Y1
[/removeitem]

should work...

http://wesnoth.slack.it/?InterfaceActionsWML
Note to forum users: You are in a maze of twisty little passages
cobretti
Posts: 466
Joined: February 19th, 2004, 4:38 pm

Post by cobretti »

It works :D Thanks, Shade.
Post Reply