Page 3 of 5 FirstFirst 12345 LastLast
Results 41 to 60 of 92

Thread: Lesson 2

  1. #41

    Default Re: Lesson 2

    Quote Originally Posted by GrnEyedDvl View Post
    PM me the entire script and I will try to sort this out for you. Anything I change will be well documented.
    You've got mail. Thanks, man.
    Son of PW

  2. #42
    Legio's Avatar EMPRESS OF ALL THINGS
    Content Emeritus

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

    Default Re: Lesson 2

    I cannot for the life of me find the historic_events file in my modfolder, I am using the BareBones mod folder. Or am I just being dull again?

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

    Default Re: Lesson 2

    For how long this lession is still ON?I wont be able to do homework for 2-3 days...
    Proud patron of Wlesmana
    Assyria Total War
    Check update thread for new HQ models
    My Workshop™


  4. #44
    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 2

    This one is good for another week and a half, no worries.

  5. #45
    aduellist's Avatar Push the button Max!
    Join Date
    Mar 2005
    Location
    Shenandoah Valley
    Posts
    1,822

    Default Re: Lesson 2

    Quote Originally Posted by Karlo'St View Post
    For how long this lession is still ON?I wont be able to do homework for 2-3 days...
    Quote Originally Posted by GrnEyedDvl View Post
    This one is good for another week and a half, no worries.
    Thanks for asking that question, Karlo'St. And good news on the answer, GED. RL has gotten a bit crazy, so probably won't get to this until the weekend.
    Under the patronage of TheFirstONeill
    Proud team member of
    THERA, A New Beginning


    "The trouble with fighting for human freedom is that one spends most of one's time defending scoundrels. For it is against scoundrels that oppressive laws are first aimed, and oppression must be stopped at the beginning if it is to be stopped at all." H. L. Mencken

    "Liberty is meaningless where the right to utter one’s thoughts and opinions has ceased to exist. That, of all rights, is the dread of tyrants. It is the right which they first of all strike down." Frederick Douglass

  6. #46

    Default Re: Lesson 2

    Quote Originally Posted by YMCA LEGO View Post
    I cannot for the life of me find the historic_events file in my modfolder, I am using the BareBones mod folder. Or am I just being dull again?
    The historic_events file can be found in Medieval 2's data folder: data/text/historic_events.

    Simply copy-paste the file and put the copy in Medieval 2: Total War/mods/YourMod/data/text. Afterwards, you have to convert it from a string.bin to a .txt file.
    Last edited by Astaroth; July 01, 2009 at 12:01 AM.
    Curious Curialist curing the Curia of all things Curial.

  7. #47
    ♔Jean-Luc Picard♔'s Avatar Domesticus
    Join Date
    Feb 2007
    Location
    North Carolina, USA
    Posts
    2,181

    Default Re: Lesson 2

    I can't get my reinforcement event to fire. Is there a flaw in my script I overlooked or something I messed up?

    Spoiler Alert, click show to read: 
    Code:
    declare_counter RebelFired
    set_counter RebelFired 0
    
    monitor_event FactionTurnEnd FactionIsLocal
     if I_SettlementUnderSiege = York
      if RandomPercent > 5
       and I_EventCounter RebelFired == 0
       historic_event rebel_rein
       create_unit York, Peasants, num 8, exp 2, arm 0, wep 0
       set_event_counter RebelFired 1
      end_if
     end_if
    end_monitor
    
    monitor_event FactionTurnEnd FactionIsLocal
     and not I_SettlementUnderSiege = York
     and I_EventCounter RebelFired == 1
     historic_event rebel_reset
     set_event_counter RebelFired 0
    end_monitor


    EDIT: I had an Archimedes moment and jumped from my shower shouting "Eureka!" while running about the house. I then deleted the '=' from my between 'I_SettlementUnderSiege' and 'York' and everything worked perfectly. Screenies shall be posted shortly.

    EDIT 2: And here are my screenies and code.
    Spoiler Alert, click show to read: 
    Original York
    Spoiler Alert, click show to read: 

    Reinforcement Event
    Spoiler Alert, click show to read: 

    Reinforced York
    Spoiler Alert, click show to read: 

    Counter Reset Message
    Spoiler Alert, click show to read: 

    And finally, my finished code.
    Spoiler Alert, click show to read: 
    Code:
    ;;;are these two lines necessary? just curious.
    declare_counter RebelFired
    set_counter RebelFired 0
    
    monitor_event FactionTurnEnd FactionIsLocal
     if I_SettlementUnderSiege York
      if RandomPercent > 5
       and I_EventCounter RebelFired == 0
       historic_event rebel_rein
       create_unit York, Peasants, num 8, exp 2, arm 0, wep 0
       set_event_counter RebelFired 1
      end_if
     end_if
    end_monitor
    
    monitor_event FactionTurnEnd FactionIsLocal
     and not I_SettlementUnderSiege York
     and I_EventCounter RebelFired == 1
     historic_event rebel_reset
     set_event_counter RebelFired 0
    end_monitor
    Last edited by ♔Jean-Luc Picard♔; July 01, 2009 at 01:24 AM.

    It is my great honour to have my poem Farmer in the Scriptorium here.

  8. #48

    Default Re: Lesson 2

    Afaik , you don't need to declare and set the counter for 'RebelFired' (because it's an event counter , and you also used 'set_counter' instead of 'set_event_counter' , while later , you used 'I_EventCounter' .. Doesn't matter anyway )

    In other words , i think you can jus delete these :

    Code:
    declare_counter RebelFired
    set_counter RebelFired 0
    Last edited by Killerbee; July 01, 2009 at 10:06 AM.

  9. #49
    ♔Jean-Luc Picard♔'s Avatar Domesticus
    Join Date
    Feb 2007
    Location
    North Carolina, USA
    Posts
    2,181

    Default Re: Lesson 2

    thanks for explaining that.

    It is my great honour to have my poem Farmer in the Scriptorium here.

  10. #50

    Default Re: Lesson 2

    No problem , but best to try it out , as I'm never sure about M2:TW scripting

  11. #51

    Default Re: Lesson 2

    Theoden's right--I made the exact same mistake. Still waiting for GED to figure out what is wrong with the rest of it, though. . .
    Son of PW

  12. #52
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

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

    Default Re: Lesson 2

    Skandranon's script looks fine now. Theoden I assume he's helping you via PM?

  13. #53

    Default Re: Lesson 2

    I'm not really getting helped at all Or do you mean i'm helping him ?

  14. #54
    ♔Jean-Luc Picard♔'s Avatar Domesticus
    Join Date
    Feb 2007
    Location
    North Carolina, USA
    Posts
    2,181

    Default Re: Lesson 2

    I think he meant Theodotos.

    It is my great honour to have my poem Farmer in the Scriptorium here.

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

    Default Re: Lesson 2

    Quote Originally Posted by GrnEyedDvl View Post
    This one is good for another week and a half, no worries.
    Thanks for answer
    Proud patron of Wlesmana
    Assyria Total War
    Check update thread for new HQ models
    My Workshop™


  16. #56
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

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

    Default Re: Lesson 2

    Quote Originally Posted by Skandranon Rakshae View Post
    I think he meant Theodotos.
    Yeah, I meant Theodotos I.

  17. #57
    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 2

    I have the script in my PM box but I got tied up with a few other things for the last two days. I will be going through it tonight.

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

    Default Re: Lesson 2

    Just wanted to say that I'm currently pretty busy.

    I should be able to post something this evening, if not, the next date will be saturday.



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

    Default Re: Lesson 2

    here is my

    Spoiler Alert, click show to read: 

    ;;;;;;;;;;;;Quick C&P And Edit From Work Done on EOR;;;;;;;;;;;;


    ;Campus Hepthalite
    declare_counter campusHepthaliteSiege
    set_counter campusHepthaliteSiege 0

    monitor_event FactionTurnEnd FactionIsLocal
    if I_SettlementUnderSiege Campus-Hepthalite
    if RandomPercent > 50
    and I_CompareCounter campusHepthaliteSiege == 0
    historic_event long_live_white_huns
    create_unit Campus-Hepthalite, Hepthalite_Infantry , num 8, exp 0, arm 0, wep 0
    set_counter campusHepthaliteSiege 1
    end_if
    end_if
    end_monitor

    monitor_event FactionTurnEnd FactionIsLocal
    and not I_SettlementUnderSiege Campus-Hepthalite
    and I_CompareCounter campusHepthaliteSiege == 1
    historic_event white_huns_reset
    set_counter campusHepthaliteSiege 0
    end_monitor
    Oh no the picture of my dog disappeared!

  20. #60

    Default Re: Lesson 2

    Quote Originally Posted by GrnEyedDvl View Post
    I have the script in my PM box but I got tied up with a few other things for the last two days. I will be going through it tonight.
    Don't worry. I've got it. I had a "eureka" moment of my own looking at Skandranon's script and everything cleared up.

    Here's my code.
    Code:
    create_unit York, English Knights, num 3, exp 1, arm 0, wep 0
    Original Garrison:
    Spoiler Alert, click show to read: 


    Reinforced Garrison:
    Spoiler Alert, click show to read: 


    Historic Event:
    Spoiler Alert, click show to read: 


    Counter Reset:
    Spoiler Alert, click show to read: 
    Son of PW

Page 3 of 5 FirstFirst 12345 LastLast

Posting Permissions

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