00 14/03/2011 10:36
QUALCHE ALTRA INFO UTILE SUL CODING...

tutorial originale by Archaeon
www.twcenter.net/forums/showthread.php?t=295610




- Sistemare unità dentro alle città (descr_strat)



...

level large_town
region London_Province

year_founded 0
population 4200
plan_set default_set
faction_creator england
garrisoned_army
unit Levy Spearmen exp 2 armour 0 weapon_lvl 0
unit Levy Spearmen exp 2 armour 0 weapon_lvl 0
unit Longbowmen exp 2 armour 0 weapon_lvl 0
unit Longbowmen exp 2 armour 0 weapon_lvl 0

building
{
type core_building huge_stone_wall
}

...





- Aggiungere un generale assediante (descr_strat)



...

character name, named character, male, age 23, x 239, y 127, direction E
traits GoodCommander 1 , NaturalMilitarySkill 1 , ReligionStarter 1
army
unit ... exp 0 armour 0 weapon_lvl 0
...
sieging
siege_equipment ram 1
siege_equipment tower 1
siege_equipment ladder 1


...

NOTA: le coordinate x,y devono riferirsi a una posizione adiacente all'insediamento, la "direction" deve essere quella verso l'insediamento assediato






- Aggiungere un generale assediante (campaign_script)



...

spawn_army
faction england
character random_name, named character, age 32, x 290, y 134, label Invade_London, direction N
unit unit_name exp 3 armour 1 weapon_lvl 0
unit unit_name exp 3 armour 1 weapon_lvl 0
unit unit_name exp 3 armour 1 weapon_lvl 0
unit unit_name exp 3 armour 1 weapon_lvl 0
sieging
siege_settlement Invade_London, London, maintain

...

NOTA: le coordinate x,y devono riferirsi a una posizione adiacente all'insediamento, la "direction" deve essere quella verso l'insediamento assediato
NOTA2: mettere "attack" anzichè "maintain" per far attaccare subito l'insediamento (ma assicuratevi che l'armata abbia almeno una unità d'assedio!)






- spawn agenti (campaign_script)


...

spawn_character faction, name, agent, age 18, x 397, y 339
console_command give_trait name trait 1

...

NOTA: al posto del nome potete anche mettere il "random_name", ma così facendo non potrete assegnare dei tratti o ancillari (la funzione label funziona solo con i named character)






- spawn ammiragli (campaign_script)


...

spawn_army
faction england
character random_name, admiral, age 49, x 199, y 97
unit "vessel name" exp 0 armour 0 weapon_lvl 0
unit "vessel name" exp 0 armour 0 weapon_lvl 0
unit "vessel name" exp 0 armour 0 weapon_lvl 0
end

...






[Modificato da The Housekeeper 14/03/2011 10:48]