Page 2 of 9 FirstFirst 123456789 LastLast
Results 21 to 40 of 177

Thread: Lesson 1

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Lü Bu's Avatar "Mightyest Man Alive"
    Join Date
    May 2008
    Location
    Split,Croatia
    Posts
    5,332

    Default Re: Lesson 1

    Thanks for passing meand sry for spamming the thread
    Proud patron of Wlesmana
    Assyria Total War
    Check update thread for new HQ models
    My Workshop™


  2. #2
    Hesus de bodemloze's Avatar The Gaul
    Civitate Patrician Content Emeritus

    Join Date
    Aug 2006
    Location
    Belgium
    Posts
    12,317

    Default Re: Lesson 1

    I am not realy sure if i am doing this the right way so pleas shower me with tips on how it should be. Where do i save this text file? So that i am able to test it ingame.

    Code:
    ;
    ;Campaign script
    ;
    money script
    
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    console_command add_money england 30000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    Treasury< 60000
    console_command add_money england -20000
    end_monitor
    
    monitor_event ResourceIncome SettlementName London
    and BuildingType = barracks
    LosingMoney
    console_command add_money england - 2000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    Treasury< -500
    console_command add_money england 20000
    end_monitor
    
    ;keep script unfinished until last monitor termination
    wait_monitors
    
    end_script
    Last edited by Hesus de bodemloze; June 20, 2009 at 10:08 AM.
    Horum omnium fortissimi sunt Belgae :
    Hesus 's Photo Gallery
    The Writers Study|Ex-Global Moderator|Moderation Mentor| Ex - Librarian of the Scriptorium|PoTW|MAARC|ToTW
    SPQR Forum Moderator

  3. #3
    Nevada's Avatar Domesticus
    Join Date
    Jun 2007
    Location
    Bavaria
    Posts
    2,197

    Default Re: Lesson 1

    Quote Originally Posted by Augustus Lucifer
    Fine except for one thing, on the last monitor you have two conditions on the first line. You can only have on the first line 4 things: monitor_event / monitor_conditions, the event, the first condition, and any parameters of the first condition. All other conditions need to be on following separate lines after an and or and not statement.
    Thx for pointing this out, I'll change it.

    So it must be like this:

    Code:
        monitor_event BuildingCompleted SettlementName Vienna 
            and FactionType hre
            and SettlementBuildingFinished = market
             console_command add_money hre, 2000
        end_monitor
    Edit:

    I just read the thread about "Course materials".

    I wanted to get Notepad++ then and on the Website, I can download 2 Versions:

    Binary files and Source files.
    Do i need both?

    I use Windows Vista.
    Last edited by Nevada; June 20, 2009 at 09:48 AM.



  4. #4

    Default Re: Lesson 1

    @ hesus : There are some errors :

    this command doesn't have an 'end_monitor' line :

    Code:
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    Treasury< -500
    console_command add_money england 20000

  5. #5
    Hesus de bodemloze's Avatar The Gaul
    Civitate Patrician Content Emeritus

    Join Date
    Aug 2006
    Location
    Belgium
    Posts
    12,317

    Default Re: Lesson 1

    Quote Originally Posted by KingTheoden1 View Post
    @ hesus : There are some errors :

    this command doesn't have an 'end_monitor' line :

    Code:
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    Treasury< -500
    console_command add_money england 20000
    Thx for the help.
    Horum omnium fortissimi sunt Belgae :
    Hesus 's Photo Gallery
    The Writers Study|Ex-Global Moderator|Moderation Mentor| Ex - Librarian of the Scriptorium|PoTW|MAARC|ToTW
    SPQR Forum Moderator

  6. #6
    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 Nevada View Post
    Thx for pointing this out, I'll change it.

    So it must be like this:
    Spoiler Alert, click show to read: 

    Code:
        monitor_event BuildingCompleted SettlementName Vienna 
            and FactionType hre
            and SettlementBuildingFinished = market
             console_command add_money hre, 2000
        end_monitor

    Edit:

    I just read the thread about "Course materials".

    I wanted to get Notepad++ then and on the Website, I can download 2 Versions:

    Binary files and Source files.
    Do i need both?

    I use Windows Vista.
    You want the latest binary files, which is an executable installer. Source files are because it is an open source project they give you the non-compiled files for developers to expand upon. And yes the modified code is correct.

    Quote Originally Posted by Hesus de bodemloze View Post
    I am not realy sure if i am doing this the right way so pleas shower me with tips on how it should be. Where do i save this text file? So that i am able to test it ingame.
    Spoiler Alert, click show to read: 

    Code:
    ;
    ;Campaign script
    ;
    money script
    
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    console_command add_money england 30000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    Treasury< 60000
    console_command add_money england -20000
    end_monitor
    
    monitor_event ResourceIncome SettlementName London
    and BuildingType = barracks
    LosingMoney
    console_command add_money england - 2000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    Treasury< -500
    console_command add_money england 20000
    
    
    ;keep script unfinished until last monitor termination
    wait_monitors
    
    end_script
    1) The operators <, <=, >, >=, and == need to be separated by a space on either side from the condition and the integer. So Treasury< 60000 should be Treasury < 60000.

    2) To my knowledge ResourceIncome is not an event, as it isn't listed in any of the DocuDemons.

    3) There needs to be another and in front of every line besides the first that has an additional condition. The third line in each monitor is missing the leading and.
    Last edited by Augustus Lucifer; June 20, 2009 at 10:12 AM.

  7. #7
    Nevada's Avatar Domesticus
    Join Date
    Jun 2007
    Location
    Bavaria
    Posts
    2,197

    Default Re: Lesson 1

    Ok then, thx.



  8. #8
    Hesus de bodemloze's Avatar The Gaul
    Civitate Patrician Content Emeritus

    Join Date
    Aug 2006
    Location
    Belgium
    Posts
    12,317

    Default Re: Lesson 1

    Oke i tried some thing else.

    Spoiler Alert, click show to read: 
    Code:
    ;Campaign script
    ;money script
    
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    console_command add_money england 30000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    and Treasury > 60000
    console_command add_money england -20000
    end_monitor
    
    monitor_event FactionNewCapital FactionType england
    and FactionIsLocal
    and LosingMoney
    console_command add_money england - 2000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    and Treasury < -500
    console_command add_money england 20000
    end_monitor
    
    ;keep script unfinished until last monitor termination
    wait_monitors
    
    end_script
    Last edited by Hesus de bodemloze; June 21, 2009 at 11:49 AM.
    Horum omnium fortissimi sunt Belgae :
    Hesus 's Photo Gallery
    The Writers Study|Ex-Global Moderator|Moderation Mentor| Ex - Librarian of the Scriptorium|PoTW|MAARC|ToTW
    SPQR Forum Moderator

  9. #9

    Default Re: Lesson 1

    Alright , looks well , except for 3 notes :

    The script doesn't have a 'script' indicator at the top of the file .
    Dunno if 'LosingMoney' is a condition .
    And the money script stuff doesn't have a ";" in front of it . You have :

    Code:
    ;Campaign script
    ;
    money script
    While it should be

    Code:
    ;Campaign script
    ;money script

  10. #10
    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 Hesus de bodemloze View Post
    Oke i tried some thing else.

    Spoiler Alert, click show to read: 
    Code:
    ;Campaign script
    ;money script
    
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    console_command add_money england 30000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    and Treasury > 60000
    console_command add_money england -20000
    end_monitor
    
    monitor_event FactionNewCapital FactionType england
    and TargetSettlementIsLocal = settlement
    and LosingMoney
    console_command add_money england - 2000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
    and FactionIsLocal
    and Treasury < -500
    console_command add_money england 20000
    end_monitor
    
    ;keep script unfinished until last monitor termination
    wait_monitors
    
    end_script
    Sorry missed this one. It looks good except for the third one. The FactionNewCapital monitor only exports the faction, so it won't work with the TargetSettlementIsLocal condition. It is, to put it lightly, a useless event. It could be a wonderful event that lets you base things off what a faction's capital is, but no, it is very closed in terms of what you can use it for.

  11. #11
    Hesus de bodemloze's Avatar The Gaul
    Civitate Patrician Content Emeritus

    Join Date
    Aug 2006
    Location
    Belgium
    Posts
    12,317

    Default Re: Lesson 1

    Spoiler Alert, click show to read: 
    Code:
    docudemon_conditions Identifier:              LosingMoney
    Horum omnium fortissimi sunt Belgae :
    Hesus 's Photo Gallery
    The Writers Study|Ex-Global Moderator|Moderation Mentor| Ex - Librarian of the Scriptorium|PoTW|MAARC|ToTW
    SPQR Forum Moderator

  12. #12

    Default Re: Lesson 1

    Alright , that's good I'm used to scripting RTW (never scripted M2TW before), and afaik there's no such condition in Rome (could be though)

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

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

    Default Re: Lesson 1

    Attach the entire script as a text file please.

  14. #14

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

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

    Default Re: Lesson 1

    There is no end_script at the bottom of the file. Also put wait_monitors right above end_script.

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

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

    Default Re: Lesson 1

    Code:
    ;
    ; Campaign script
    ;
    script
     
    monitor_event FactionTurnEnd FactionType england
       and FactionIsLocal
       and Treasury < 500   
       console_command add_money england, 3500
    end_monitor
     
    monitor_event FactionTurnEnd FactionType england
       and FactionIsLocal
       and Treasury > 8000   
       console_command add_money england, -3000
    end_monitor
     
    monitor_event FactionTurnEnd FactionType france
       and FactionIsLocal
       and Treasury < 1000   
       console_command add_money england, 2000
    end_monitor
     
    monitor_event FactionTurnEnd FactionType france
       and FactionIsLocal
       and Treasury > 10000    
       console_command add_money england, -3000
    end_monitor
     
     
    wait_monitors
    end_script

  17. #17

    Default Re: Lesson 1

    Here's my script.

    Spoiler Alert, click show to read: 
    Code:
    ;
    ; Campaign script
    ;
    script
    
    monitor_event FactionTurnEnd FactionType england
       and not FactionIsLocal 
       console_command add_money england, 5000
    end_monitor
    
    monitor_event BuildingCompleted SettlementName London
       and FactionType england
       and FactionIsLocal
       and SettlementBuildingFinished = market
       console_command add_money england, -1000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
       and Treasury < 500
       console_command add_money england, 10000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
       and FactionIsLocal
       and FactionIncome > 50000
       console_command add_money england, -10000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType england
       and not FactionIsLocal
       and LosingMoney
       console_command add_money england, 2000
    end_monitor
            
            
            ; keep script unfinised until last monitor termination
        wait_monitors
    
    end_script
    Last edited by Astaroth; June 20, 2009 at 04:15 PM.

  18. #18

    Default Re: Lesson 1

    I tested them and they all work I believe, unless one's not firing and I didn't notice somehow,

    Code:
    ;
    ; Campaign script
    ;
    script
     
     monitor_event FactionTurnEnd FactionType england
      and FactionIsLocal
      and Treasury < 9000
      console_command add_money england, 10000
     end_monitor
     
     monitor_event FactionTurnEnd FactionType england
      and FactionIsLocal
      and FactionIncome <= 5000
      console_command add_money england, 2000
     end_monitor
     
     ;Tax on new merchants
     monitor_event AgentCreated FactionType england
      and AgentType = merchant
      console_command add_money england, 1000
     end_monitor
     
     ;Church donations
     monitor_event FactionTurnEnd FactionType england
      and FactionIsLocal
      and Treasury > 10000
      console_command add_money england, -1000
      console_command add_money papel_states, 1000 
     end_monitor
     
     wait_monitors
    end_script
    I was going to mess around some more with better conditions and events but i'm quite busy right now. Oh well I guess, twas' still incredibly interesting.


  19. #19

    Default Re: Lesson 1

    I have made my test , but it didn´t work what is wrong with it?
    Code:
    ;
    ; Campaign script
    ;
    script
    
    monitor_event FactionTurnEnd FactionType east_anglia
    and FactionIsLocal
    console_command add_money east_anglia, 15000
    end_monitor
    monitor_event FactionTurnEnd FactionType northumbria
    and FactionIsLocal
    console_command add_money northumbria, 15000
    end_monitor
    monitor_event FactionTurnEnd FactionType wessex
    and FactionIsLocal
    console_command add_money wessex, 20000
    end_monitor
    monitor_event FactionTurnEnd FactionType gwynedd
    and FactionIsLocal
    console_command add_money gwynedd, 15000
    end_monitor
    monitor_event FactionTurnEnd FactionType fortriu
    and FactionIsLocal
    console_command add_money fortriu, 15000
    end_monitor
    monitor_event FactionTurnEnd FactionType mumhan
    and FactionIsLocal
    console_command add_money mumhan, 15000
    end_monitor
    
    end_script
    I try to play with each one of them and non of them received any bonus.
    Contribuitor IBIICB-WOTN-Modeler-Scripter


  20. #20
    Dewy's Avatar Something Witty
    Join Date
    Jun 2008
    Location
    Australia
    Posts
    4,697

    Default Re: Lesson 1

    Quote Originally Posted by Icedie of South View Post
    I have made my test , but it didn´t work what is wrong with it?
    Code:
    ;
    ; Campaign script
    ;
    script
    
    monitor_event FactionTurnEnd FactionType east_anglia
    and FactionIsLocal
    console_command add_money east_anglia, 15000
    end_monitor
    monitor_event FactionTurnEnd FactionType northumbria
    and FactionIsLocal
    console_command add_money northumbria, 15000
    end_monitor
    monitor_event FactionTurnEnd FactionType wessex
    and FactionIsLocal
    console_command add_money wessex, 20000
    end_monitor
    monitor_event FactionTurnEnd FactionType gwynedd
    and FactionIsLocal
    console_command add_money gwynedd, 15000
    end_monitor
    monitor_event FactionTurnEnd FactionType fortriu
    and FactionIsLocal
    console_command add_money fortriu, 15000
    end_monitor
    monitor_event FactionTurnEnd FactionType mumhan
    and FactionIsLocal
    console_command add_money mumhan, 15000
    end_monitor
    
    end_script
    I try to play with each one of them and non of them received any bonus.
    try putting in the names of the vanilla version that you replaced
    Oh no the picture of my dog disappeared!

Posting Permissions

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