Console Commands

General feedback and discussion of the game.

Moderator: Forum Moderators

Post Reply
anl93
Posts: 22
Joined: August 27th, 2012, 5:18 pm

Console Commands

Post by anl93 »

I didnt know where to open this topic so here we are:
can someone please post all possible console commands for example:
1-changing unit attributes
2-:unit attribute=value
3-modifying both sides money and other things
4-for example giving a ability to unit such as healing
5-:set_var attribute=value
6-:show_var attribute
7-changing sides income
8-letting ai to play human game (this dosnt work )
9-for example unit max_moves=n works but i cannot change defence settings and attack details
thanx
i hope i explained well
Last edited by Iris on December 8th, 2013, 9:45 pm, edited 1 time in total.
Reason: Moved from Ideas to Users’ Forum.
User avatar
Paulomat4
Moderator Emeritus
Posts: 730
Joined: October 16th, 2012, 3:32 pm
Location: Wesmere library, probably summoning Zhangor

Re: Console Commands

Post by Paulomat4 »

Creator of Dawn of Thunder and Global Unitmarkers

"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
anl93
Posts: 22
Joined: August 27th, 2012, 5:18 pm

Re: Console Commands

Post by anl93 »

i know that page of course but i want details
User avatar
beetlenaut
Developer
Posts: 2822
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Console Commands

Post by beetlenaut »

1-changing unit attributes: You answered your own question in #2
2-:unit attribute=value: All possible attributes are listed here: http://wiki.wesnoth.org/SingleUnitWML
3-modifying both sides money and other things: ":gold 100" adds to the current side's money for example (On the page Paulomat4 linked.)
4-for example giving a ability to unit such as healing: Impossible with a single command. You need to modify the unit's WML code.
5-:set_var attribute=value: Any variable, any value. No way to list all possibilities.
6-:show_var attribute: Same as above.
7-changing sides income: You need to modify the WML code.
8-letting ai to play human game: ":droid 1" or whatever number the human side is.
9-for example unit max_moves=n works but i cannot change defence settings and attack details: Correct. You can't. You need to modify the unit's WML code.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Console Commands

Post by Dugi »

4-for example giving a ability to unit such as healing: Impossible with a single command. You need to modify the unit's WML code.
7-changing sides income: You need to modify the WML code.
9-for example unit max_moves=n works but i cannot change defence settings and attack details: Correct. You can't. You need to modify the unit's WML code.
Wrong. There is an almost omnipotent console command that can do that. It is lua. It's very impractical, but possible.

For example this might add regeneration to a unit (standing on 12,23):

Code: Select all

:lua wesnoth.wml_actions.object( {  { "filter" , { x=12, y=23 }} , silent=true, { "effect",  { apply_to="new_ability" , { "abilities" ,  { { "regenerates" , { value=8, id="regenerates" , name="regenerates", poison="cured" , description="This unit heals 8 hp per turn, blablabla" } } } } } } } )
Note: It should be better avoided because it's too complicated, but it isn't impossible.
User avatar
beetlenaut
Developer
Posts: 2822
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Console Commands

Post by beetlenaut »

Oops. I stand corrected. (Though I don't think anyone would actually do that.)
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
anl93
Posts: 22
Joined: August 27th, 2012, 5:18 pm

Re: Console Commands

Post by anl93 »

well i gave up.thanks anyway.i didnt know droid 1 before.useful for large battles.
JaMiT
Inactive Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: Console Commands

Post by JaMiT »

anl93 wrote:i didnt know droid 1 before.
One could learn about the "droid" command by reading that page you "of course" know (CommandMode)...
anl93
Posts: 22
Joined: August 27th, 2012, 5:18 pm

Re: Console Commands

Post by anl93 »

but it says :droid [side] [on|off] now i understand what it is means.
JaMiT
Inactive Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: Console Commands

Post by JaMiT »

What did you think it meant?
alluton
Posts: 420
Joined: June 26th, 2010, 6:49 pm
Location: Finland

Re: Console Commands

Post by alluton »

He might not just have understood what it meant at all.
"This game cured me of my real life addiction."
-Flameslash
Post Reply