Page 9 of 9 FirstFirst 123456789
Results 161 to 177 of 177

Thread: Lesson 1

  1. #161

    Default Re: Lesson 1

    this is mind, and clearly it has been fired.

    Code:
    17:54:29.578 [game.script.exec] [trace] exec <declare_counter> at line 6 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.exec] [trace] exec <set_counter> at line 7 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.counter] [trace] counter <declarar_guerra> = 1
    17:54:29.578 [game.script.exec] [trace] exec <declare_counter> at line 9 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.exec] [trace] exec <set_counter> at line 10 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.counter] [trace] counter <bebbanburgh_siege> = 1
    17:54:29.578 [game.script.exec] [trace] exec <declare_counter> at line 12 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.exec] [trace] exec <set_counter> at line 13 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.counter] [trace] counter <TurnNumber> = 1
    17:54:29.578 [game.script.exec] [trace] exec <monitor_event> at line 31 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.exec] [trace] exec <monitor_event> at line 51 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.exec] [trace] exec <monitor_event> at line 72 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.exec] [trace] exec <monitor_event> at line 82 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.exec] [trace] exec <monitor_event> at line 103 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.exec] [trace] exec <monitor_event> at line 128 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.exec] [trace] exec <monitor_event> at line 135 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.exec] [trace] exec <monitor_event> at line 141 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    17:54:29.578 [game.script.exec] [trace] exec <wait_monitors> at line 160 in mods/VacuusLuxLucis/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    But make sure you have the right log in the cfg file
    Code:
    [log] 
    to = mods/your mod name/system.log.txt 
    level = game.script* trace
    file = game.script* mods/your mod name/logs/your mod name.script.log.txt
    you will have 2 options one in the mods/your mod/system.log.txt
    and another one in the mods/your mod/log sub folder.
    Contribuitor IBIICB-WOTN-Modeler-Scripter


  2. #162
    Subuatai de Bodemloze's Avatar No rest for the wicked
    Join Date
    Mar 2008
    Location
    50 degrees, 26.2 minutes North, 119 degrees, 12.4 minutes West
    Posts
    2,436

    Default Re: Lesson 1

    Thanks mate
    Code:
    don't recognise this token: and
    15:20:15.765 [game.script] [error] Script parsing error at line 25, column 1 in mods/scripting_101/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Couldn't create a script from file mods/scripting_101/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    This is extremely frustrating!!!
    Last edited by Subuatai de Bodemloze; July 05, 2009 at 05:28 PM.

  3. #163

    Default Re: Lesson 1

    Quote Originally Posted by KingTheoden1 View Post
    Should work !
    I suggest you add a "I_SettlementOwner" condition in the last monitor Why ? if Scotland owns Dublin , and engalnd owns edinburg , and builds a brothel in edinburgh , then scotland will get the money

    So , i suggest the last monitor looks like this :

    Code:
    monitor_event BuildingCompleted SettlementName Edinburgh
       and SettlementBuildingFinished = brothel
       and I_SettlementOwner Edinburgh = scotland
    
       console_command add_money scotland, 1000
    
    end_monitor
    Yes good point i need to be more spacific thanks.

  4. #164
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Lesson 1

    Quote Originally Posted by Sübü'ätäi View Post
    Thanks mate
    Code:
    don't recognise this token: and
    15:20:15.765 [game.script] [error] Script parsing error at line 25, column 1 in mods/scripting_101/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Couldn't create a script from file mods/scripting_101/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    This is extremely frustrating!!!
    Do you use an editor like Notepad++? If not you should, errors like that are going to come up all the time in scripting, you need to be able to see a line count in the txt file and skim to the line the error log indicates to check it for errors(and surrounding lines/monitors).

  5. #165

    Default Re: Lesson 1

    ZOMG , AL ! Your name turned from blue to some kind of orange i've never seen before Nice job !

  6. #166
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Lesson 1

    Quote Originally Posted by KingTheoden1 View Post
    ZOMG , AL ! Your name turned from blue to some kind of orange i've never seen before Nice job !
    It's supposed to be more of a gold. That's the (currently) new display color for Technical Staff.

  7. #167

    Default Re: Lesson 1

    Ah kk .. Yea it looks kinda gold , but also a little greenish , brownish , yellowish and orangish But it's nice to have a new colour

  8. #168
    Subuatai de Bodemloze's Avatar No rest for the wicked
    Join Date
    Mar 2008
    Location
    50 degrees, 26.2 minutes North, 119 degrees, 12.4 minutes West
    Posts
    2,436

    Default Re: Lesson 1

    yeah I use Notepad++ The code looks fine to me...?

  9. #169

    Default Re: Lesson 1

    Show the line pls

  10. #170
    Subuatai de Bodemloze's Avatar No rest for the wicked
    Join Date
    Mar 2008
    Location
    50 degrees, 26.2 minutes North, 119 degrees, 12.4 minutes West
    Posts
    2,436

    Default Re: Lesson 1

    Spoiler Alert, click show to read: 
    Code:
    ;----- Scripting 101 -----
    ; Campaign script
    ;
    ;monitor_event FactionTurnEnd FactionIsLocal
     ;commands go here
    ;end_monitor
        ;;;;;;;;;;;;;;;;;;;;;;;;
        ; -- England --
        ;;;;;;;;;;;;;;;;;;;;;;;;
    script
    
    monitor_event FactionTurnEnd FactionType england
     and FactionIsLocal
     and SettlementName London
     and GovernorInResidence
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     console_command add_money england 20000
    end_monitor
    monitor_event FactionTurnEnd FactionType england
      and FactionIsLocal
     and Treasury >15000
     console_command add_money england, -5000
    end_monitor
    monitor_event FactionTurnEnd
     and FactionIsLocal
     and LosingMoney
     console_command add_money england, 20000
    end_monitor
    monitor_event SettlementUpgraded SettlementName London
     and SettlementBuildingFinished = wooden_pallisade
     and SettlementLoyaltyLevel = loyalty_content
     create_unit London, English Knights, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     console_command add_money england 3000
    end_monitor
    monitor_event SettlementUpgraded SettlementName London
     and SettlementBuildingFinished = wooden_wall
     and GovernorInResidence
     and SettlementLoyaltyLevel = loyalty_content
     console_command add_money england 5000
    end_monitor
    monitor_event FactionTurnEnd FactionType england
      and FactionIsLocal
     and Treasury < 1000
     console_command add_money england, 3000
    end_monitor
    monitor_event FactionTurnEnd FactionType england
     and FactionIsLocal
     and Treasury < 500
     console_command add_money england, 4500 
    end_monitor
    monitor_event FactionTurnEnd FactionType england
     and FactionIsLocal
     and OnAWarFooting
     console_command add_money england, 15000
     create_unit London, English Knights, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
    end_monitor
    ; keep script unfinished until last monitor termination
    wait_monitors
    end_script

    Thanks for the assist Icedie...

  11. #171

    Default Re: Lesson 1

    Quote Originally Posted by Augustus Lucifer View Post
    It's supposed to be more of a gold. That's the (currently) new display color for Technical Staff.
    ZOMG , it's blue again .. but it's nicer than the brown err gold ..

  12. #172

    Default Re: Lesson 1

    Quote Originally Posted by Sübü'ätäi View Post
    Thanks for the assist Icedie...
    there are some " , " issue in the command, console_command add_maney faction, amount.

    fix that and you should run ok. i guess
    Contribuitor IBIICB-WOTN-Modeler-Scripter


  13. #173
    Subuatai de Bodemloze's Avatar No rest for the wicked
    Join Date
    Mar 2008
    Location
    50 degrees, 26.2 minutes North, 119 degrees, 12.4 minutes West
    Posts
    2,436

    Default Re: Lesson 1

    Got these errors again....
    Spoiler Alert, click show to read: 
    Code:
    21:31:12.609 [game.script] [error] Condition parsing error in mods/scripting_101/data/world/maps/campaign/imperial_campaign/campaign_script.txt, at line 25, column 15
    Value not declared
    
    21:31:12.609 [game.script] [error] Script parsing error at line 29, column 2 in mods/scripting_101/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    don't recognise this token: and
    21:31:12.609 [game.script] [error] Script parsing error at line 31, column 2 in mods/scripting_101/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Couldn't create a script from file mods/scripting_101/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Code:
    ;----- Scripting 101 -----
    ; Campaign script
    ;
    ;monitor_event FactionTurnEnd FactionIsLocal
     ;commands go here
    ;end_monitor
        ;;;;;;;;;;;;;;;;;;;;;;;;
        ; -- England --
        ;;;;;;;;;;;;;;;;;;;;;;;;
    script
    
    monitor_event FactionTurnEnd FactionType england
     and FactionIsLocal
     and SettlementName London
     and GovernorInResidence
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     console_command add_money england, 20000
    end_monitor
    monitor_event FactionTurnEnd FactionType england
     and FactionIsLocal
     and Treasury >15000
     console_command add_money england, -5000
    end_monitor
    monitor_event FactionTurnEnd FactionType england
     and FactionIsLocal ;;;LINE 29
     and LosingMoney
     console_command add_money england, 20000 ;;;LINE 31
    end_monitor
    monitor_event SettlementUpgraded SettlementName London
     and SettlementBuildingFinished = wooden_pallisade
     and SettlementLoyaltyLevel = loyalty_content
     create_unit London, English Knights, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     console_command add_money england, 3000
    end_monitor
    monitor_event SettlementUpgraded SettlementName London
     and SettlementBuildingFinished = wooden_wall
     and GovernorInResidence
     and SettlementLoyaltyLevel = loyalty_content
     console_command add_money england, 5000
    end_monitor
    monitor_event FactionTurnEnd FactionType england
     and FactionIsLocal
     and Treasury < 1000
     console_command add_money england, 3000
    end_monitor
    monitor_event FactionTurnEnd FactionType england
     and FactionIsLocal
     and Treasury < 500
     console_command add_money england, 4500 
    end_monitor
    monitor_event FactionTurnEnd FactionType england
     and FactionIsLocal
     and OnAWarFooting
     console_command add_money england, 15000
     create_unit London, English Knights, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
     create_unit London, Peasant Archers, num 5, exp 1, arm 1, wep 2
    end_monitor
    ; keep script unfinished until last monitor termination
    wait_monitors
    end_script
    But they seemed to have fired.. London is full of troops and I have mountains o cash... completed? I say for the most part.. Funny how a comma can screw things up so badly.. Lesson 2 tomorrow!

  14. #174
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Lesson 1

    You don't have a space after the > in and Treasury > 15000

  15. #175
    Subuatai de Bodemloze's Avatar No rest for the wicked
    Join Date
    Mar 2008
    Location
    50 degrees, 26.2 minutes North, 119 degrees, 12.4 minutes West
    Posts
    2,436

    Default Re: Lesson 1

    Maybe not but it did fire. I checked it in the console.

  16. #176
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,844
    Blog Entries
    10

    Default Re: Lesson 1

    21:31:12.609 [game.script] [error] Script parsing error at line 29, column 2 in mods/scripting_101/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    don't recognise this token: and
    Usually when this happens you have a bad condition or a typo just above it, and when it hits the next line in the script it fails.

    Example:
    Code:
    monitor_event FactionTurnEnd FactionIsLocal
         and FactionType
         and Treasury > 10000
             some_commands
    end_monitor
    As you can see I left out the faction name after FactionType, so the next thing it encounters is the word "and" when its looking for a faction name. this will throw one of two errors, it will either tell you invalid faction name or cant recognize the token AND.

    The best advice I can give is to write your scripts one portion at a time, get it working in sections.

    I really have to thank AL for helping out here as I have been buried with other stuff. I am going to try to catch up tonight on everyone.

  17. #177
    Subuatai de Bodemloze's Avatar No rest for the wicked
    Join Date
    Mar 2008
    Location
    50 degrees, 26.2 minutes North, 119 degrees, 12.4 minutes West
    Posts
    2,436

    Default Re: Lesson 1

    thanks for the info and tutorship you both! GED yeah I hear you about being burried...

Page 9 of 9 FirstFirst 123456789

Posting Permissions

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