A nice list of M2TW commands:

Command Shell Codes

Use 'logon to enable with an administrator password.

add_money : adds an amount of money to a faction's coffers, can be negative, default is player faction

add_population : adds an amount of population to a settlement, can be negative

move_character , : moves named character to position on campaign map

auto_win : the attacker or defender wins the next autoresolved battle

create_unit : creates one or more units of the specified type

toggle_fow : toggles the fog of war on or off

toggle_restrictcam : toggles camera restrictions on or off

save_battle_replay : saves battle replay in file replays/.rpy

save_battle_replay : saves replay

give_ancillary : gives the character an ancillary

remove_ancillary : removes ancillary from the character an ancillary (default = all)

give_trait : gives the character a trait at level (default = level 1)

remove_trait : removes a specified trait from the character (default = all)

disable_vnvs : toggles whether to disable game applying traits and attributes

process_cq : Completes all (possible) construction pending in queue

character_reset : resets the character back to it's start of turn settings

show_cursorstat : shows the cursor position and region id

toggle_terrain : toggles the terrain to display various data sets, no param resets to normal

bestbuy : sells units cheaper

oliphaunt : the biggest around

jericho : and the walls came a-tumblin' down

write_ui_cache : writes out the ui texture cache to disk

give_trait_points : gives the character points for trait

list_traits : lists all the available traits

list_ancillaries : lists all the available ancillaries

mp : gives the character movement points

list_characters : lists all the characters in the world or those belonging to a faction

show_landings : shows the landing positions available to the ai from a given region, default hides them

filter_coastlines : applies filter to world map coastlines

toggle_coastlines : toggles strategy map coastline display

set_building_health : sets health of a building of the specified type (eg core_building) in a settlement, so that the final health percentage is as specified; for building chains see export_descr_building.txt

ai_turn_speed : sets the maximum speed of turn processing during the ai round maximum supported speed is 255x

amdb_min : sets aerial map overlay depth bias for min zoom

amdb_max : sets aerial map overlay depth bias for max zoom

amdb_offset : sets aerial map overlay offset towards camera

zoom : zooms to specified aerial map zoom (only valid during a view of the strategy map)

set_ranking_interval : sets the denominator of the faction ranking graph interval which is calculated as (number_of_turns / denominator). If set to 0, then the denominator will be set to number_of_turns, giving an interval of 1

regenerate_radar : Does what it says on the tin

adjust_sea_bed : adjusts whole sea bed to specified height

reload_shaders : reloads all vertex shaders

reload_textures : reloads all textures

toggle_game_update : unknown

toggle_perfect_spy : toggles everyone's spying ability to perfect and infinite range, and off again

reset_display : Forces a display_close(); display_open() display reset cycle

process_rq : Completes all (possible) recruitment pending in queue

force_diplomacy : Forces the negotiator to accept or decline a proposition

diplomatic_stance : Set the diplomatic stance between the two factions (factions must be different)

invulnerable_general : makes that named general invulnerable in battle

test_ancillary_localisation : adds all ancillary to the character info display

perf_times : Toggle display of simple performance times of game update vs display

burn_piggies_burn : ignite all the piggy winks

test_message : Test the event message specified in descr_event_enums.txt

test_movie : test_movie

reload_movie_db : Reloads movie db

show_terrain_lines : display defensive terrain features

message_collation_set : Set the message collation on or off (sets all factions)

show_all_messages : Show all messages to all factions (on/off)

clear_messages : Clear all the current stacked messages

upgrade_settlement : upgrade settlement level

toggle_wireframe : Toggle wireframe rendering

reapply_rigid_model_influence : unkown

toggle_flowing_water : toggles display of campaign map flowing water

nw_stats : toggles display of network stats.

toggle_pr: toggles pr mode.

list_units : lists all of the units in an army, with details.

army units (total strength: %i) : unknown

victory : show victory message for faction for short or long campaign.

trigger_advice [] : - triggers an advice thread

damage_wall : Damage wall of settlement. Forces 40% damage to a random gatehouse and a nearby straight section. Destroys gatehouse if 'gate' parameter present; breaches wall if 'breach' present

test_victory_scroll : Opens up the victory scroll declaring that the given faction is the victor

date : changes the campaign date to the given year

season : changes the campaign season to the given season

force_battle_victory : forces the local player's alliance to win the battle, completely destroying the enemy alliance or optionally capturing a percentage of the enemy alliance

force_battle_defeat : forces the local player's alliance to lose the battle, completely destroying the local alliance or optionally capturing a percentage of the local alliance

output_unit_positions : output the positions of all units in the battle to the specified file

Format: - alliance_index, army_index, unit_index, formation_origin_x, formation_origin_y, rotation_in_degrees, unit_width_in_metres, unit_width_in_men

zoom_to_unit : zoom the camera to a unit of a specific id

show_battle_marker : display a marker at (x, y) for t seconds of height h

show_battle_line : display a line from (x1, y1) to (x2, y2) for t seconds

show_battle_circle : display a circle at (x, y) of r radius for t seconds

kill_faction : removes the faction from the game

diplomacy_mission : creates a diplomacy mission

event [ ] : creates an event

kill_character : kills a character with the given name

control : switches player control to specified faction; old faction may not act correctly as ai faction

create_building : creates a building of the specified type in a settlement; for building level id's see export_descr_building.txt

capture_settlement : evicts any resident characters and armies and gives the settlement to the local player

disable_ai [opt: tac | sub | dip | name | priest]: disables all (default) or part of the ai for all factions

halt_ai : halts the turn sequence just before the start of the specified faction's turn, or the current faction if no faction given

run_ai [opt:x]: re-starts an ai turn sequence after disableai or haltai has been triggered; (use x to also re-enable all parts of the ai which have been individually disabled)

surrender_regions : gives all this faction's regions to the slaves. "horde" surrenders regions for all factions that can be hordes

toggle_chat_log : shows or hides the multiplayer chat window

bounds : toggle display of bounding objects

lights :

set_option : Set new value for specified option (use 1 and 0 for boolean options)

capabilities : list details of the recruitment capabilities of a settlement

recruitment_pool : list details of the current recruitment pool of a settlement

diplomacy_costs : displays a list of raw and perceived diplomacy items costs from the perspective of the receiving faction.

create_mission : Attempt to create and add a mission to the specified faction

toggle_HUD_mode: switches between full and minimal HUD during a battle.

print_shortcuts: prints all the keyboard shortcuts for the current handler to documentation/current_handler_shortcuts.txt

logon : enables console with an admin password

logoff: logs out administrator to disable console

clear_password : clears the current password for a specified faction

set_password : sets a new password for a specified faction

set_email : sets a new email address for a specified faction

Taken from this article, credit to IGN/Paranoidx2