Page 5 of 9 FirstFirst 123456789 LastLast
Results 81 to 100 of 177

Thread: Lesson 1

  1. #81

    Default Re: Lesson 1

    We will be taking screen shots for when historic_events fire. You really need a working mod folder.
    Alright, I will instal the game.
    Developer of Rising Sumer
    Beta-tester for ChC; Mapper of Colonialism-TW;

  2. #82
    Pendragon's Avatar Protector Domesticus
    Join Date
    Sep 2008
    Location
    Rome
    Posts
    4,758

    Default Re: Lesson 1

    I have a problem: My PC has crashed, it's the only Computer I have that will run TW. It should be fixed soon, but I'll be behind on the lessons.

    In the beginning, Prometheus brought fire to man. Wrong move.

  3. #83
    ★Bandiera Rossa☭'s Avatar The Red Menace
    Join Date
    Feb 2007
    Location
    California, USA
    Posts
    6,237

    Default Re: Lesson 1

    well here is my try.. I copied it from my campaign script in N++ so I do not know if formating is 100%

    ;Campaign Script
    ;Slurricane-for class (money scripts)
    ;script=

    ;add money to timurids if under 10k
    monitor_event FactionTurnEnd FactionType timurids
    and not FactionIsLocal
    and Treasury > 10000
    console_command add_money timurids, 10000
    end_monitor

    ;event money base for hre conflict
    monitor_event FactionTurnEnd FactionType hre
    and not FactionIsLocal
    and Treasury < 100000
    console_command add_money hre, -10000
    console_command add_money hre, -10000
    console_command add_money hre, -15000
    end_monitor

    ;Add money england
    monitor_event FactionTurnEnd FactionType england
    and not FactionIsLocal
    and Treasury < 2000
    console_command add_money england, 10000
    console_command add_money england, 10000
    console_command add_money england, 10000
    console_command add_money england, 10000
    console_command add_money england, 10000
    end_monitor

    ;mongol reduction
    monitor_event FactionTurnEnd FactionType mongols
    and not FactionIsLocal
    and Treasury > 3000000
    console_command add_money mongols, -100000
    console_command add_money mongols, -100000
    console_command add_money mongols, -100000
    console_command add_money mongols, -100000
    console_command add_money mongols, -100000
    end_monitor

    ;mongol optimization
    monitor_event FactionTurnEnd FactionType mongols
    and not FactionIsLocal
    and Treasury < 30000
    console_command add_money mongols, 100000
    console_command add_money mongols, 100000
    console_command add_money mongols, 100000
    console_command add_money mongols, 100000
    console_command add_money mongols, 100000
    end_monitor
    end_script


  4. #84
    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

    In the first two monitors your > and < are backwards, other than that it looks good.

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

    Default Re: Lesson 1

    Quote Originally Posted by Augustus Lucifer View Post
    Looks fine. It works in-game I assume?



    Nope, but I don't see why it wouldn't work as specified. You will need to tailor an easily observable situation and do something like fire an event to see if it works as intended. For instance load a faction, check their expenditures in Turn 1. Recruit some units and see how much goes to it. Then do the math and use a number a bit lower than that as the condition parameter. Have it fire a historic event as the command so you know it worked.



    I don't see a problem with the script itself. Are you saying that the script fires and you get the money but then the next turn when you hit end turn it crashes?



    As Bucket of Lithium said, the event and first condition need to be on the same line as the monitor. In the economic boom monitor you need to capitalize Treasury and should only have one and before FactionIncome. In the useless monitor you should have FactionIncome instead of faction income and console_command instead of console command.



    Relatively. add_money is a Kingdoms command so it should be said that anyone running M2 needs to use the console_command variety. I'm not sure if that's an actual script intended to be in TLK, if it is I'd recommend you look into the possibility of locking the console as I seem to recall a command for that, as opposed to that method which could hurt a player not cheating(keep in mind it also won't stop cheating, since the player can keep adding money and spend it that turn or just out-add the subtraction). I don't frown at cheating though, but that's up to the people making the mod.
    the stop the cheater thing isn't going in the mod it was only a trial script which worked for this lesson, so i added it in. It is a kingdoms mod so i used a kingdoms command, i don't see whats the problem
    Oh no the picture of my dog disappeared!

  6. #86
    Romanos IV's Avatar The 120th Article, § 4
    Join Date
    Jun 2008
    Location
    the hell outta here (Athens, European Client State of Greece)
    Posts
    3,882

    Default Re: Lesson 1

    Spoiler Alert, click show to read: 
    Code:
    ;
    ; Campaign script
    ;
    script
    
    monitor_event  FactionTurnEnd FactionType france
     and not FactionIsLocal
     console_command add_money france, 4500
     end_monitor
     monitor_event FactionTurnEnd FactionType france
     and FactionIsLocal
     and Treasury < 9500
     console_command add_money france, 3500
     end_monitor
    monitor_event FactionTurnEnd FactionType france
     and FactionIsLocal
     and Treasury < 1000
     and LosingMoney
     console_command add_money france, 2000
    monitor_event FactionTurnEnd FactionType france
     and not FactionIsLocal
     and Treasury > 20000
     and not LosingMoney 
     console_command add_money france, -19000 
     
     ;script ends here
     wait_monitors
     
     end_script
    Here's mine!
    how does it look this evening?
    Under the noble patronage of Jimkatalanos

  7. #87

    Default Re: Lesson 1

    It looks good , shouldn't give any errors or stuff Only 1 note :

    When you have 20.001 coins , you'll lose 19K , and all that rest is 1.001 coins

  8. #88
    Romanos IV's Avatar The 120th Article, § 4
    Join Date
    Jun 2008
    Location
    the hell outta here (Athens, European Client State of Greece)
    Posts
    3,882

    Default Re: Lesson 1

    Cool, isn't it?
    Under the noble patronage of Jimkatalanos

  9. #89

    Default Re: Lesson 1

    Sure is

  10. #90
    Lü Bu's Avatar "Mightyest Man Alive"
    Join Date
    May 2008
    Location
    Split,Croatia
    Posts
    5,332

    Default Re: Lesson 1

    Indeed
    Proud patron of Wlesmana
    Assyria Total War
    Check update thread for new HQ models
    My Workshop™


  11. #91
    Hector Barbossa's Avatar Avast Ye Lubbers
    Join Date
    Apr 2008
    Location
    England
    Posts
    20,888

    Default Re: Lesson 1

    Here is mine


    Spoiler Alert, click show to read: 
    script

    monitor_event FactionTurnEnd FactionType hre
    and not FactionIsLocal
    and Treasury < 1000
    console_command add_money hre, 1500
    end_monitor

    monitor_event FactionTurnEnd FactionType russia
    console_command add_monney russia, -2000
    end_monitor

    monitor_event FactionTurnEnd FactionType england
    and not FactionIsLocal
    console_command add_money england, 2000
    end_monitor

    monitor_event FactionTurnEnd FactionType spain
    and not FactionIsLocal
    console_command add_money spain, -2500
    end_monitor

    wait_monitors

    end_script
    Last edited by Hector Barbossa; June 22, 2009 at 08:34 AM.

  12. #92
    Stephan's Avatar Campidoctor
    Join Date
    Jun 2008
    Location
    Wien
    Posts
    1,575

    Default Re: Lesson 1

    is it possible to have a port blocked event?

    Edit: sorry just say the right tread for this question
    Last edited by Stephan; June 22, 2009 at 08:30 AM.

    Yes, I know that Ishtar is spelled wrong

  13. #93
    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 Legio Caesar View Post
    Here is mine, this is the first time I am touching a text file in M2 so it might be.....um
    It's a little small but I hope it's good.
    Code:
    ;
    ;campaign script
    ;script
    
    monitor_event FactionTurnEnd FactionType france
     and FactionIsLocal
     and Treasury >1000
     console_command add_money england 10000
    end_monitor
    
    monitor_event FactionTurnEnd Faction Type poland
     and not FactionIsLocal
     and Treasury >100
     console_command add_money hre 2500
    end_monitor
    
    monitor-event FactionTurnStart FactionType hre
     and FactionIsLocal
     console_command add_money venice 900
    
    end_script
    There's a few issues with this one besides the one GED mentioned:

    1) You commented out(with ; ) script at the top. That's a command that needs to run so the script is initialized, so the script in current form should never initialize.

    2) You don't have the command wait_monitors above end_script.

    3) In the second monitor you have Faction Type which should be FactionType (without spaces). Scripting is very particular about capitals and spaces and underscores. It's also very particular about exactly using the wording of the DocuDemon, you will find a few with mis-spelled words(like Seige), but you must use Seige as that's what it is registered as.

    4) The conditions utilizing an operator(>, <, >=, <=, ==) should be separated on either side by a space, or it's possible the game will not parse it properly. So Treasury >100 should be Treasury > 100 and so on.

    Quote Originally Posted by Slurricane View Post
    well here is my try.. I copied it from my campaign script in N++ so I do not know if formating is 100%
    Spoiler Alert, click show to read: 

    ;Campaign Script
    ;Slurricane-for class (money scripts)
    ;script=

    ;add money to timurids if under 10k
    monitor_event FactionTurnEnd FactionType timurids
    and not FactionIsLocal
    and Treasury > 10000
    console_command add_money timurids, 10000
    end_monitor

    ;event money base for hre conflict
    monitor_event FactionTurnEnd FactionType hre
    and not FactionIsLocal
    and Treasury < 100000
    console_command add_money hre, -10000
    console_command add_money hre, -10000
    console_command add_money hre, -15000
    end_monitor

    ;Add money england
    monitor_event FactionTurnEnd FactionType england
    and not FactionIsLocal
    and Treasury < 2000
    console_command add_money england, 10000
    console_command add_money england, 10000
    console_command add_money england, 10000
    console_command add_money england, 10000
    console_command add_money england, 10000
    end_monitor

    ;mongol reduction
    monitor_event FactionTurnEnd FactionType mongols
    and not FactionIsLocal
    and Treasury > 3000000
    console_command add_money mongols, -100000
    console_command add_money mongols, -100000
    console_command add_money mongols, -100000
    console_command add_money mongols, -100000
    console_command add_money mongols, -100000
    end_monitor

    ;mongol optimization
    monitor_event FactionTurnEnd FactionType mongols
    and not FactionIsLocal
    and Treasury < 30000
    console_command add_money mongols, 100000
    console_command add_money mongols, 100000
    console_command add_money mongols, 100000
    console_command add_money mongols, 100000
    console_command add_money mongols, 100000
    end_monitor
    end_script
    You also commented out script at the top of the file, and need to add wait_monitors between end_monitor and end_script at the end of the file.

    Quote Originally Posted by Dewy View Post
    the stop the cheater thing isn't going in the mod it was only a trial script which worked for this lesson, so i added it in. It is a kingdoms mod so i used a kingdoms command, i don't see whats the problem
    There's no problem with using a Kingdoms command, I noted it for the benefit of other users who, if they don't use Kingdoms, should not be using that command in place of the console command.

    Quote Originally Posted by Romanos IV View Post
    Spoiler Alert, click show to read: 
    Code:
    ;
    ; Campaign script
    ;
    script
    
    monitor_event  FactionTurnEnd FactionType france
     and not FactionIsLocal
     console_command add_money france, 4500
     end_monitor
     monitor_event FactionTurnEnd FactionType france
     and FactionIsLocal
     and Treasury < 9500
     console_command add_money france, 3500
     end_monitor
    monitor_event FactionTurnEnd FactionType france
     and FactionIsLocal
     and Treasury < 1000
     and LosingMoney
     console_command add_money france, 2000
    monitor_event FactionTurnEnd FactionType france
     and not FactionIsLocal
     and Treasury > 20000
     and not LosingMoney 
     console_command add_money france, -19000 
     
     ;script ends here
     wait_monitors
     
     end_script
    Here's mine!
    how does it look this evening?
    Good except for two things, you're missing end_monitor on the last two monitors.

    Quote Originally Posted by Glen Quagmire View Post
    Here is mine


    Spoiler Alert, click show to read: 
    monitor_event FactionTurnEnd FactionType hre
    and not FactionIsLocal
    and Treasury < 1000
    console_command add_money hre, 1500
    end_monitor

    monitor_event FactionTurnEnd FactionType russia
    console_command add_monney russia, -2000
    end monitor

    monitor_event FactionTurnEnd FactionType england
    and not FactionIsLocal
    console_command add_money england, 2000
    end_monitor

    monitor_event FactionTurnEnd FactionType spain
    and not FactionIsLocal
    console_command add_money spain, -2500
    end_monitor

    wait_monitors

    end_script
    Good except you have an extra n(add_monney) on the second monitor.

    -------------------------------------------------------

    As an aside, I encourage all users to make sure their scripts work in-game. If they don't work, before telling us they don't work, go back through your scripts and see if you can find what's wrong with them. 9 times out of 10 your problem will be having misspelled an event, condition, or command. Double-check the DocuDemons for the exact spelling(including capitalization and underscores), insure you start and close off all your monitors, insure you start and end the script including wait_monitors, and insure that if you tried to play with a new condition the exports/requirements match up. We can keep pointing out the problems most of the time, but learning to be tolerable to debugging your own scripts after finding they don't work as intended, perhaps multiple times, is integral to being a good scripter.

    After Lesson 1 I'm not going to point out these types of mistakes but will instead say how many mistakes there are, potentially where, and ask you to debug it. I'll still point out any issues that are of an advanced nature.
    Last edited by Augustus Lucifer; June 22, 2009 at 08:41 AM.

  14. #94

    Default Re: Lesson 1

    - Whoops , misunderstood something you said AL -

    Sorry for (accidental) spamming
    Last edited by Killerbee; June 22, 2009 at 08:41 AM. Reason: Misunderstood

  15. #95
    Legio's Avatar EMPRESS OF ALL THINGS
    Content Emeritus

    Join Date
    Mar 2008
    Location
    Chlοėtopia
    Posts
    43,774

    Default Re: Lesson 1

    Quote Originally Posted by Augustus Lucifer View Post
    There's a few issues with this one besides the one GED mentioned:

    1) You commented out(with ; ) script at the top. That's a command that needs to run so the script is initialized, so the script in current form should never initialize.

    2) You don't have the command wait_monitors above end_script.

    3) In the second monitor you have Faction Type which should be FactionType (without spaces). Scripting is very particular about capitals and spaces and underscores. It's also very particular about exactly using the wording of the DocuDemon, you will find a few with mis-spelled words(like Seige), but you must use Seige as that's what it is registered as.

    4) The conditions utilizing an operator(>, <, >=, <=, ==) should be separated on either side by a space, or it's possible the game will not parse it properly. So Treasury >100 should be Treasury > 100 and so on.


    Code:
    ;
    ;campaign script
    ;
    script
    
    monitor_event FactionTurnEnd FactionType france
     and FactionIsLocal
     and Treasury > 1000
     console_command add_money england 10000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType poland
     and not FactionIsLocal
     and Treasury > 100
     console_command add_money hre 2500
    end_monitor
    
    monitor-event FactionTurnStart FactionType hre
     and FactionIsLocal
     console_command add_money venice 900
    end_monitor
    
    ;script ends here
    wait_monitors
    
    end_script
    How does it look now?

  16. #96

    Default Re: Lesson 1

    Too late AL

    There's a monitor-event , wich shiould be :

    monitor_event
    Last edited by Killerbee; June 22, 2009 at 08:54 AM. Reason: Lol :P

  17. #97
    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 Legio Caesar View Post
    Code:
    ;
    ;campaign script
    ;
    script
    
    monitor_event FactionTurnEnd FactionType france
     and FactionIsLocal
     and Treasury > 1000
     console_command add_money england 10000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType poland
     and not FactionIsLocal
     and Treasury > 100
     console_command add_money hre 2500
    end_monitor
    
    monitor-event FactionTurnStart FactionType hre
     and FactionIsLocal
     console_command add_money venice 900
    end_monitor
    
    ;script ends here
    wait_monitors
    
    end_script
    How does it look now?
    Still the issue that GED mentioned, last monitor should be monitor_event rather than monitor-event. Otherwise I don't see any problems.

  18. #98
    Legio's Avatar EMPRESS OF ALL THINGS
    Content Emeritus

    Join Date
    Mar 2008
    Location
    Chlοėtopia
    Posts
    43,774

    Default Re: Lesson 1

    Code:
    ;
    ;campaign script
    ;
    script
    
    monitor_event FactionTurnEnd FactionType france
     and FactionIsLocal
     and Treasury > 1000
     console_command add_money england 10000
    end_monitor
    
    monitor_event FactionTurnEnd FactionType poland
     and not FactionIsLocal
     and Treasury > 100
     console_command add_money hre 2500
    end_monitor
    
    monitor_event FactionTurnStart FactionType hre
     and FactionIsLocal
     console_command add_money venice 900
    end_monitor
    
    ;script ends here
    wait_monitors
    end_script
    Fixed, and sorry for being so slow today
    Last edited by Legio; June 22, 2009 at 09:37 AM.

  19. #99

    Default Re: Lesson 1

    Lol , still no good

    You have :

    wait_monitorsend_script

    while it should be :

    wait_monitors
    end_script

    On seperate lines

  20. #100
    Legio's Avatar EMPRESS OF ALL THINGS
    Content Emeritus

    Join Date
    Mar 2008
    Location
    Chlοėtopia
    Posts
    43,774

    Default Re: Lesson 1

    grrrrr, i need a cup of coffe. Done

Posting Permissions

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