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

Thread: Yes/No Event Tutorial

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Yes/No Event Tutorial

    Script looks fine. You probably don't have the kingdoms descr_event_images file in your data folder. It's needed just for this yes\no event.










  2. #2

    Default Re: Yes/No Event Tutorial

    Brilliant! Thanks Gigantus! You are a fount of knowledge!

    Edit: Well, still no-go. I added the descr_event_images file to my data folder, then ran it again. It is supposed to fire the yes/no at the beginning of the turn after an alliance is made with sicily (local faction is scotland). The historic_event fires (I get the message) but it is a regular scroll.

    Bollocks.
    Last edited by AETelcontar; August 21, 2012 at 01:26 PM.

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Yes/No Event Tutorial

    Try this one. Unzip into the data folder of your mod.

    Does the BAT file in the root of your mod mention 'kingdoms.exe' or 'medieval2.exe'? Simply right click the BAT file and then choose 'edit' from the mini menu to open the BAT file.










  4. #4

    Default Re: Yes/No Event Tutorial

    Behold! Success!

    Was it just that I was using a M2TW descr_event_images file when I should have been using Kingdoms?

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Yes/No Event Tutorial

    I think that was the case, mine was certainly the kingdoms one - courtesy of my Bare Geomod installation.










  6. #6

    Default Re: Yes/No Event Tutorial

    Excellent, thank you!

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Yes/No Event Tutorial

    One is glad to be of service










  8. #8
    UndyingNephalim's Avatar Primicerius
    Patrician Artifex

    Join Date
    Jan 2011
    Posts
    3,967

    Default Re: Yes/No Event Tutorial

    The script and everything works fine, but for some reason the event's image appears as a big blank black box, not even the default historic event image. How do you get a specific image to show up for the Yes/No event?

  9. #9
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Yes/No Event Tutorial

    You will need the descr_event_images file from one of the kingdoms campaigns (post #43)
    The picture has to be in TGA format (32bit, no grey shade - RGB only). It needs to be in the ...\data\ui\southern_european\eventpics folder (if used as default, else in the respective culture's folder if different pics are used). It has to have the name of the event as written in the script.










  10. #10
    UndyingNephalim's Avatar Primicerius
    Patrician Artifex

    Join Date
    Jan 2011
    Posts
    3,967

    Default Re: Yes/No Event Tutorial

    Quote Originally Posted by Gigantus View Post
    You will need the descr_event_images file from one of the kingdoms campaigns (post #43)
    The picture has to be in TGA format (32bit, no grey shade - RGB only). It needs to be in the ...\data\ui\southern_european\eventpics folder (if used as default, else in the respective culture's folder if different pics are used). It has to have the name of the event as written in the script.
    That's what I did and it works for all normal historical events:

    Spoiler Alert, click show to read: 


    But not this one for some reason:

    Spoiler Alert, click show to read: 


    If I were to guess it's actually trying to load a video since the dimensions are much larger then the historical event images.

  11. #11
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Yes/No Event Tutorial

    You are correct with your assumption about the video, can you post the script part here?

    A line like this will trigger a video yes\no event:

    historic_event 1618_01a true event\fenstersturz.bik
    Last edited by Gigantus; November 16, 2012 at 06:56 AM.










  12. #12
    UndyingNephalim's Avatar Primicerius
    Patrician Artifex

    Join Date
    Jan 2011
    Posts
    3,967

    Default Re: Yes/No Event Tutorial

    Quote Originally Posted by Gigantus View Post
    You are correct with your assumption about the video, can you post the script part here?

    A line like this will trigger a video yes\no event:

    historic_event 1618_01a true event\fenstersturz.bik
    That's the type of line I have as it's the only one that brings up the yes/no option. Will simply changing event\fenstersturz.bik to ui\southern_european\eventpics\whatever.tga work?

  13. #13
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Yes/No Event Tutorial

    Remove whatever is after 'true' in the sample - it's the part that calls the video.
    And the picture in this sample would be named 1618_01.tga and be in the culture folder as discussed earlier.
    Note: the picture will be called automatically and replaced by the generic picture if not present. Only the movies need to be specified.










  14. #14
    UndyingNephalim's Avatar Primicerius
    Patrician Artifex

    Join Date
    Jan 2011
    Posts
    3,967

    Default Re: Yes/No Event Tutorial

    Quote Originally Posted by Gigantus View Post
    Remove whatever is after 'true' in the sample - it's the part that calls the video.
    And the picture in this sample would be named 1618_01.tga and be in the culture folder as discussed earlier.
    Note: the picture will be called automatically and replaced by the generic picture if not present. Only the movies need to be specified.
    That solved it.

  15. #15
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Yes/No Event Tutorial

    One is glad to be of service










  16. #16

    Default Re: Yes/No Event Tutorial

    Hi i'm trying to add a yes/no event in hyruke total war and I'm having real problems and I can't work out what it is, here is the script

    Spoiler Alert, click show to read: 

    monitor_event FactionTurnStart FactionType sheikah
    and I_TurnNumber = 3
    and not IsFactionAIControlled
    ;add_events
    set_event_counter bongo_ask_accepted 0
    set_event_counter bongo_ask_declined 0
    ;end_add_events

    historic_event bongo_ask true

    end_monitor
    ;##########Accept#########
    monitor_conditions I_EventCounter bongo_ask_accepted = 1
    add_events
    event historic bongo_ask_accepted
    date 0
    end_add_events
    set_event_counter sheikah_under_agahnim 1
    set_event_counter disable_stance 1
    end_monitor
    ;##########Decline#########
    monitor_conditions I_EventCounter bongo_ask_declined = 1
    add_events
    event historic bongo_ask_declined
    date 0
    end_add_events
    end_monitor


    Any ideas whats wrong there are other yes/no in the game and im 100% the names are right in the events file.

  17. #17
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Yes/No Event Tutorial

    What is the "problem" exactly? CTD? Event messages not appearing?

    Any errors in the log?

    One issue I can see is that as soon as you Accept the bongo_ask message your Accept monitor goes into a loop for the rest of the game, firing off that bongo_ask_accepted event message 20 times per second. Similarly for the Decline monitor. You need to terminate those monitors to stop that from happening, assuming that they are no longer needed, i.e. that bongo_ask will only be asked once.

    Another problem might be that you have historic events named the same thing as some event counters: bongo_ask_accepted & bongo_ask_declined. I don't know if that causes issues.

    Although, this line...

    event historic bongo_ask_accepted

    ...should increment the bongo_ask_accepted counter which means that "I_EventCounter bongo_ask_accepted = 1" is no longer true (it is 2) and the loop should be broken, avoiding the first issue I mentioned. Unless your mod is 12tpy in which case "event historic bongo_ask_accepted" won't work.

    Anyway, this is exactly the same thing but avoiding the dreaded monitor_conditions, adding termination, etc....

    Code:
    monitor_event FactionTurnStart FactionType sheikah
      and I_TurnNumber = 3
      and not IsFactionAIControlled
    
      historic_event bongo_ask true
    
    terminate_monitor
    end_monitor
    
    monitor_event EventCounter EventCounterType bongo_ask_accepted
      and EventCounter = 1
      
      historic_event bongo_ask_accepted
    
      set_event_counter sheikah_under_agahnim 1
      set_event_counter disable_stance 1
      
    terminate_monitor
    end_monitor
    
    monitor_event EventCounter EventCounterType bongo_ask_declined
      and EventCounter = 1
      
      historic_event bongo_ask_declined
    
    terminate_monitor
    end_monitor
    Try that. If still no good then rename bongo_ask_accepted & bongo_ask_declined in historic_events.txt (e.g. bongo_ask_yes & bongo_ask_no) and use those new names in those two historic_event calls...


    Code:
    monitor_event FactionTurnStart FactionType sheikah
      and I_TurnNumber = 3
      and not IsFactionAIControlled
    
      historic_event bongo_ask true
    
    terminate_monitor
    end_monitor
    
    monitor_event EventCounter EventCounterType bongo_ask_accepted
      and EventCounter = 1
      
      historic_event bongo_ask_yes
    
      set_event_counter sheikah_under_agahnim 1
      set_event_counter disable_stance 1
      
    terminate_monitor
    end_monitor
    
    monitor_event EventCounter EventCounterType bongo_ask_declined
      and EventCounter = 1
      
      historic_event bongo_ask_no
    
    terminate_monitor
    end_monitor
    Personally I would avoid ever using xxx_accepted and xxx_declined as historic event names.

    While we're at it, this would be better for the first monitor...

    Code:
    monitor_event FactionTurnStart FactionType sheikah
      and I_TurnNumber = 3
    
      if not I_IsFactionAIControlled sheikah
        historic_event bongo_ask true
      end_if
    
    terminate_monitor
    end_monitor
    ...because this monitor is no longer needed after sheikah's turn 3 and should be terminated whether they are the player or the AI.

  18. #18

    Default Re: Yes/No Event Tutorial

    Okay i'm just getting crash after crash after crash with this and all i'm getting from the logs is two lines

    here's the script
    Code:
    monitor_event FactionTurnStart FactionType sheikah
      and I_TurnNumber = 3
      and not IsFactionAIControlled
     ;add_events
      set_event_counter bongo_ask_accepted 0 
      set_event_counter bongo_ask_declined 0
     ;end_add_events
      
      historic_event bongo_ask true
    terminate_monitor
    end_monitor
    ;##### Accept #####
    monitor_event I_EventCounter bongo_ask_accepted = 1
      
      historic_event bongo_ask_accepted
      set_event_counter bongo_ask_accepted 0
      set_event_counter disable_stance 1
      
    terminate_monitor
    end_monitor
    ;####### Decline ######
    monitor_event I_EventCounter bongo_ask_declined = 1
      
      historic_event bongo_ask_declined
      set_event_counter bongo_ask_declined 0
      set_event_counter offer_rejected 1
    terminate_monitor
    end_monitor
    heres the log
    Code:
    19:50:03.085 [game.script] [error] Condition parsing error in mods/Hyrule/data/world/maps/campaign/imperial_campaign/campaign_script.txt, at line 124284, column 30
    Condition parser doesn't recognise this token: bongo_ask_accepted
    19:50:03.085 [game.script] [error] Condition parsing error in mods/Hyrule/data/world/maps/campaign/imperial_campaign/campaign_script.txt, at line 124296, column 30
    Condition parser doesn't recognise this token: bongo_ask_declined
    the location of both of them is right below the :### accept ### and ;### decline ###. But with another yes/no event ive looked in historic_events file and I can't find it's descriptions anywhere, could it be possible that I need to put this events info somewhere else?
    Last edited by tedster1995; August 19, 2014 at 06:37 PM.

  19. #19

    Default Re: Yes/No Event Tutorial

    No that didn't work, 9 times out of 10 it crashes when you choose that faction and the logs don't say why the other one time it doesn't create a script from it. This particular faction already has a yes/no event every turn could that be why it doesn't work, and if so is there a way to disable it on turn 3 to allow this one to take place?
    Last edited by tedster1995; August 19, 2014 at 10:07 AM.

  20. #20
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Yes/No Event Tutorial

    Nvm - Reminder to self: Reading the whole post before starting to respond saves time.
    Last edited by Gigantus; August 19, 2014 at 11:47 AM.










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
  •