Results 1 to 12 of 12

Thread: some questions

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default some questions

    OK I have some things i'm using, but i'm completly ignorant abut them:
    1. what means
    Code:
    date 4
    and what means
    Code:
    date 4 8
    2. i have line (from mongol_invasion script)
    Code:
    if I_CharacterTypeNearTile mongols named_character, 30 258, 134
    I know what "if" means (what briliant am i ), but i completly don't understand what means all of conditions connected with character and roofes
    i know what mongols means (faction), i know what means "named_character (kind of character) but i have no idea what means 30?
    I also suppose "258, 134" means the coordinates of point of invasions start

    May i ask someone for explaining me all of things i mentioned? First i need to know what "30" means

  2. #2
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: some questions

    Quote Originally Posted by attyla View Post
    OK I have some things i'm using, but i'm completly ignorant abut them:
    1. what means
    Code:
    date 4
    and what means
    The event will happen on turn or year 4, can't remember which

    Code:
    date 4 8
    The event will happen between year/turn 4 and 8 inclusive (i.e. either 4,5,6,7 or 8)

    2. i have line (from mongol_invasion script)
    Code:
    if I_CharacterTypeNearTile mongols named_character, 30 258, 134
    I know what "if" means (what briliant am i ), but i completly don't understand what means all of conditions connected with character and roofes
    i know what mongols means (faction), i know what means "named_character (kind of character) but i have no idea what means 30?
    30 is the distance that the character type (in this case named_character) must be within of the target co-ordiantes.

    I also suppose "258, 134" means the coordinates of point of invasions start
    No its any point on the map.

    The condition will return true when the specified faction has a character of the specified type within the given distance of the specified co-ordinates. So in the example you've given the condition will only be true if the mongs have a named_character within 30 squares of map co-ordinates 258,134. What happens when that condition is true is entirely up whatever script/trigger uses the condition.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  3. #3

    Default Re: some questions

    Squid
    Thank you for you information. You made me worry. I tought i can use mongol invasion script for my purposes connected with plan of creation crusaders state in Palestina. I wantet to do it because i all the time have problem with maintaing conquered cities by crusaders. They spawning and siegind the cities. They also taking cities, but they all the time immediately leave cities and faction cannot take root of its existence.
    The targets of crusades attack are Antioch and Jerusalem.
    This is my entry:
    Code:
    declare_counter siege_jerusalem
    declare_counter siege_antioch
    
    monitor_event FactionTurnStart FactionIsLocal
    and I_CompareCounter siege_jerusalem = 1
    siege_settlement Baldwin, Jerusalem, attack
    terminate_monitor
    end_monitor
    
    monitor_event FactionTurnStart FactionIsLocal
    and I_CompareCounter siege_antioch = 1
    siege_settlement Boemund, Antioch, attack
    terminate_monitor
    end_monitor
    ;______________________________________________________________________________
    monitor_event FactionTurnStart FactionIsLocal
              and I_TurnNumber = 2
    
        spawn_army
            faction jerusalem
    character	Baldwin, named character, age 24, x 435, y 92 
    traits Factionleader 1 , GoodCommander 3 , BattleDread 3 , ReligionStarter 1 , LoyaltyStarter 1 , Austere 1 
    unit		NE Bodyguard				exp 4 armour 0 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Dismounted Mailed Knights		exp 4 armour 0 weapon_lvl 0
    unit		Dismounted Mailed Knights		exp 4 armour 0 weapon_lvl 0
    unit		Dismounted Mailed Knights		exp 4 armour 2 weapon_lvl 0
    unit		Dismounted Mailed Knights		exp 4 armour 2 weapon_lvl 0
    unit		Sicilian Muslim Archers			exp 4 armour 0 weapon_lvl 0
    unit		Sicilian Muslim Archers			exp 4 armour 0 weapon_lvl 0
    unit		Mailed Knights				exp 4 armour 0 weapon_lvl 0
    unit		Mailed Knights				exp 4 armour 0 weapon_lvl 0
    unit		Mailed Knights				exp 4 armour 0 weapon_lvl 0
    unit		Mailed Knights				exp 4 armour 0 weapon_lvl 0
    end
    
    siege_settlement Baldwin, Jerusalem, maintain
    set_counter siege_jerusalem 1
    
        spawn_army
            faction jerusalem
    character	Boemund, named character, age 20, x 436, y 133 
    traits Factionheir 1 , GoodCommander 3 , PublicFaith 1 , BattleDread 2 , ReligionStarter 1 , HaleAndHearty 1 
    unit		NE Bodyguard				exp 4 armour 0 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Sergeant Spearmen			exp 4 armour 2 weapon_lvl 0
    unit		Dismounted Mailed Knights		exp 4 armour 0 weapon_lvl 0
    unit		Dismounted Mailed Knights		exp 4 armour 0 weapon_lvl 0
    unit		Dismounted Mailed Knights		exp 4 armour 2 weapon_lvl 0
    unit		Dismounted Mailed Knights		exp 4 armour 2 weapon_lvl 0
    unit		Sicilian Muslim Archers			exp 4 armour 0 weapon_lvl 0
    unit		Sicilian Muslim Archers			exp 4 armour 0 weapon_lvl 0
    unit		Mailed Knights				exp 4 armour 0 weapon_lvl 0
    unit		Mailed Knights				exp 4 armour 0 weapon_lvl 0
    unit		Mailed Knights				exp 4 armour 0 weapon_lvl 0
    unit		Mailed Knights				exp 4 armour 0 weapon_lvl 0
    end
    siege_settlement Boemund, Antioch, maintain
    set_counter siege_antioch 1
    
        terminate_monitor
    end_monitor
    Can you look at it and tell me what's whong? Those two provinces have horde_target.

  4. #4

    Default Re: some questions

    i could be completely wrong, but i have been doing alot of changes to desc_strat lately and on the character lines you have to have "male" between "named character" and their age, which you dont have, so maybe that could be the problem

  5. #5

    Default Re: some questions

    Male argument in spawning character line? I've never met something like this. But i'm not expert. I've checked it. you've misst. script with "male" argument doesn't spawning characters
    Last edited by attyla; May 25, 2011 at 05:05 PM.

  6. #6

    Icon1 Re: some questions

    Though character lines in the ‘descr_strat’ and ‘campaign_script’ file do look similar they are in fact different:

    descr_strat:
    Code:
    character	Faramir, named character, male, age 18, x 249, y 127, portrait Faramir, battle_model faramir
    campaign_script:
    Code:
    character	Faramir, named character, age 18, x 249, y 127, portrait Faramir, battle_model faramir
    attyla: It's not the campaign script that is causing the problem. What you are actually describing is how a hoard faction behaves. They're pretty much uncontrollable via script, no matter what you do.
    But it is possible to emerge a faction without it being a hoard faction. Here are the three steps you need to achieve this:

    Step one the ‘descr_strat’ file:
    Spoiler Alert, click show to read: 
    Code:
    ;#################################################################
    ;##########################  DALE  ##############################
    ;################################################################# 
    faction	scotland, balanced smith
    ai_label		 islam
    dead_until_resurrected
    denari 9000
    denari_kings_purse	2200

    Step two the ‘campaign_script’ file. Now it's important to note that the spawned army has two Catapult units, and that they are instructed immediately to attack the settlement, instead of maintaining a siege:
    Spoiler Alert, click show to read: 
    Code:
    	monitor_event FactionTurnEnd FactionIsLocal
    		and I_TurnNumber = 2
    	spawn_army
    		faction scotland
    		character	random_name, named character, age 35, x 289, y 264, family, label Invade_Dale
    		traits Factionleader 1 , GoodCommander 2 , NaturalMilitarySkill 1 , PublicFaith 2 , GoodAdministrator 2 , BattleChivalry 2 , StrategyChivalry 2 , ReligionStarter 1 , Brave 1
    		unit		Bardian Archers				exp 1 armour 0 weapon_lvl 0
    		unit		Athala Rangers				exp 1 armour 0 weapon_lvl 0
    		unit		Dale Longbowmen				exp 1 armour 0 weapon_lvl 0
    		unit		Dale Longbowmen				exp 1 armour 0 weapon_lvl 0
    		unit		Dale Longbowmen				exp 1 armour 0 weapon_lvl 0
    		unit		Watchmen				exp 1 armour 0 weapon_lvl 0
    		unit		Watchmen				exp 1 armour 0 weapon_lvl 0
    		unit		Watchmen				exp 1 armour 0 weapon_lvl 0
    		unit		Watchmen				exp 1 armour 0 weapon_lvl 0
    		unit		Watchmen				exp 1 armour 0 weapon_lvl 0
    		unit		Watchmen				exp 1 armour 0 weapon_lvl 0
    		unit		Dalesmen				exp 1 armour 0 weapon_lvl 0
    		unit		Dalesmen				exp 1 armour 0 weapon_lvl 0
    		unit		Dalesmen				exp 1 armour 0 weapon_lvl 0
    		unit		Dale Catapult				exp 1 armour 0 weapon_lvl 0
    		unit		Dale Catapult				exp 1 armour 0 weapon_lvl 0
    	end
    		siege_settlement Invade_Dale, Dale, attack
    	terminate_monitor
    	end_monitor

    Step three the ‘descr_sm_factions’ file. Now this is where the real difference becomes apparent. You need to remove all the horde lines:
    Spoiler Alert, click show to read: 
    Code:
    faction						scotland, spawned_on_event
    culture						northern_european
    religion					northmen
    symbol						models_strat/symbol_scotland.CAS
    rebel_symbol				models_strat/symbol_rebels.CAS
    primary_colour				red 14, green 60, blue 120;red 80, green 135, blue 200
    secondary_colour			red 254, green 253, blue 243;red 36, green 160, blue 110
    loading_logo				loading_screen/symbols/symbol128_scotland.tga
    standard_index				6
    logo_index					FACTION_LOGO_SCOTLAND
    small_logo_index			SMALL_FACTION_LOGO_SCOTLAND
    triumph_value				5
    intro_movie					faction/faction_intro_dale.bik
    victory_movie				faction/minor_win.bik
    defeat_movie				faction/minor_lose.bik
    death_movie					faction/minor_lose.bik
    custom_battle_availability	yes
    can_sap						no
    prefers_naval_invasions		no
    can_have_princess			no
    has_family_tree				yes

    It is important to remember that a faction set up in this way will be destroyed if it fails to capture the settlement, unlike a horde faction which can survive without a settlement.

  7. #7

    Default Re: some questions

    it's amasing! you've removed my problem by one siply step! Thak you!

  8. #8

    Default Re: some questions

    the next dump question: is there possibility to repleace in line:
    Code:
    and I_SettlementOwner Jerusalem = hre
    the name of specific faction by another condition checking faction religion? I've tried line
    Code:
    and I_SettlementOwner FactionReligion catholic
    but it doesn't work.

  9. #9
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: some questions

    Of course not, you can't use one condition as a parameter to another. Its one of the most annoying features of the M2TW scripting language. Technically what you've written would be written as follows:

    I_SettlementOwner (FactionReligion catholic)

    Now all conditions evaluate to true/false, so FactionReligion catholic would evaluate to true or false making the condition you've written be:

    I_SettlementOwner (true/false) which makes no sense and doesn't provide either the proper number or types of parameters.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  10. #10

    Default Re: some questions

    So there only is a way of making singly scripts for all of factions?

  11. #11
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: some questions

    Yes have X copies of the same script where X is the number of factions you want the script to apply to and where each copy of the script is customized to the faction is question.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  12. #12

    Default Re: some questions

    Nice... So i only can make simple or huge scrpt...
    Thanx for taking my illusions

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •