Results 1 to 18 of 18

Thread: Changing General's/Captain's battle model after a certain event.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Changing General's/Captain's battle model after a certain event.

    I've tried to change the campaign_script.txt so that when a certain event occurs, the battle models of the generals and captains will change.For example, when a byzantine family member becomes faction leader, the battle model will change.And after the mongols invasion, the generals and captains of the european factions will get plate mail armor.I saw a sub mod for Stainless Steel which did exactly that, so I thought if it could be possible to do it in my own game.So this is what I added to the campaign_script:


    monitor_event BecomesFactionLeader FactionType byzantium
    change_battle_model byzantium leader byzantine_general
    end_monitor

    that is for the byzantine leader's battle model.

    monitor_event I_EventCounter mongols_invasion_warn = 1 FactionType england
    change_battle_model england leader northern_general_new
    and change_battle_model england heir northern_general_new
    and change_battle_model england northern_general_new
    and change_battle_model england general armored_northern_captain
    end_monitor

    and this is for england's general and captain after the mongols invasion.
    I started a new campaign with the byzantines but the leader's model is unchanged.
    Any suggestions?

  2. #2
    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: Changing General's/Captain's battle model after a certain event.

    I don't think your script has fired at all:

    monitor_event I_EventCounter mongols_invasion_warn = 1 FactionType england
    change_battle_model england leader northern_general_new
    and change_battle_model england heir northern_general_new
    and change_battle_model england northern_general_new
    and change_battle_model england general armored_northern_captain
    end_monitor

    I am going to move this to Q&A anyhow, this is the tutorials section.










  3. #3

    Default Re: Changing General's/Captain's battle model after a certain event.

    Try this:

    monitor_event EventCounter EventCounterType mongols_invasion_warn
    and EventCounter > 0
    change_battle_model england leader northern_general_new
    change_battle_model england heir northern_general_new
    end_monitor

    One bad monitor and the whole script doesn't work so as your other one seemed fine, it is probably this one causing the problem.

    Matt
    Proud member of the Patria Libera team.

  4. #4

    Default Re: Changing General's/Captain's battle model after a certain event.

    No result.I even deleted the monitors for the upgraded generals/captains and kept just that of the byzantine faction leader, but I saw no change.

    So this is what I added to the campaign_script.txt:

    monitor_event BecomesFactionLeader FactionType byzantium
    change_battle_model byzantium leader byzantine_general
    end_monitor

    ;;(when a byzantine family member becomes emperor the generals battle model changes);;


    monitor_event EventCounter EventCounterType mongols_invasion_warn
    and EventCounter > 0
    change_battle_model england leader Northern_General_new
    change_battle_model england heir Northern_General_new
    change_battle_model england Northern_General_new
    change_battle_model england general armored_northern_captain
    end_monitor

    ;;;(when the mongols invasion occurs the generals and captains will get a plate armor);;

    Also, in the descr_strat, I added battle_model byzantine_general in the character of the byzantine leader
    (so that the 1st leader would have that model too...still, no results).
    Or do I have to modify another file....?

  5. #5

    Default Re: Changing General's/Captain's battle model after a certain event.

    Okay,

    Remove the reference from descr_strat and remove the monitor for the england models, just leave in the Byzantine one. Does this work now?

    If not, check that the model you are referencing to exists, and also that it is different to the normal one, not just a renamed copy

    If all this is okay, try this:

    monitor_event BecomesFactionLeader FactionIsLocal
    change_battle_model byzantium leader byzantine_general
    end_monitor

    If this doesn't work, add the following lines to your config file

    [log]
    to = logs/system.log.txt
    level = * trace

    and run the game until a new faction leader is chosen, then exit and upload the file in the folder:

    Medieval II Total War/logs

    Matt
    Proud member of the Patria Libera team.

  6. #6

    Default Re: Changing General's/Captain's battle model after a certain event.

    Ok.....testing now...

  7. #7

    Default Re: Changing General's/Captain's battle model after a certain event.

    So far nothing.....leader is still the same..I will wait until the next one comes up.
    All models are OK, I've checked them.I think I will try the config file...

  8. #8
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Changing General's/Captain's battle model after a certain event.

    I would do this. It's lazy but it's probably not going to cause any problems, or affect perfomance.

    monitor_event FactionTurnStart FactionType byzantium
    change_battle_model byzantium leader byzantine_general
    end_monitor

    It at least prevents a misfire when byz is dead. But check to make sure there are no other monitors which are exactly the same. If there are then you can combine them to avoid a conflict. Duplicate monitors can cause problems.
    Last edited by Taiji; June 04, 2010 at 06:56 PM.

  9. #9

    Default Re: Changing General's/Captain's battle model after a certain event.

    monitor_event I_EventCounter mongols_invasion_warn = 1 FactionType england
    change_battle_model england leader northern_general_new
    and change_battle_model england heir northern_general_new
    and change_battle_model england northern_general_new
    and change_battle_model england general armored_northern_captain
    end_monitor
    Well i saw this in the first post. Just to tell u that you can't change "generals" battle model in no way. Only for leader and heir.
    Also first test this model in a custom battle. If it's ok then put the model through a campaign_script only.

    monitor_event BecomesFactionLeader FactionType byzantium
    change_battle_model byzantium leader Byzantium_General
    end_monitor

  10. #10

    Default Re: Changing General's/Captain's battle model after a certain event.

    So it is not possible to add a script to change a family member/captain battle model during a campaign?

  11. #11

    Default Re: Changing General's/Captain's battle model after a certain event.

    Quote Originally Posted by JStavCR View Post
    So it is not possible to add a script to change a family member/captain battle model during a campaign?
    The way u just put it bro i got to say i am charmed.
    Well you have to put this command given below in the config file so that the modded files can be read by the game.
    [io]
    file_first = true

    Paste this command in the .cfg file which you can open via notepad and then save changes and launch the game to see the miracle.
    Good luck.

  12. #12

    Default Re: Changing General's/Captain's battle model after a certain event.

    Quote Originally Posted by Ishan View Post
    The way u just put it bro i got to say i am charmed.
    Well you have to put this command given below in the config file so that the modded files can be read by the game.
    [io]
    file_first = true

    Paste this command in the .cfg file which you can open via notepad and then save changes and launch the game to see the miracle.
    Good luck.
    I've done that-first thing.What I can't do is adding a correct script...I also didn't know if the changes in the script would work during a campaign.I wanted to try to do that because I saw a mod for stainless steel in wich the generals models change in the late period.Here I must add that I play the version 1.3(not a kingdoms campaign).

  13. #13
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Changing General's/Captain's battle model after a certain event.

    Quote Originally Posted by JStavCR View Post
    So it is not possible to add a script to change a family member/captain battle model during a campaign?
    Nope, I don't think that is possible. I don't think you can do that with a showme script. The campaign script is only read at the start of a campaign, and then stored in the savegame, so that's a definite no.

  14. #14
    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: Changing General's/Captain's battle model after a certain event.

    Then i would suggest to have a look for some scripting tutorials.

    Might find some good ones in here: Index of Tutorials, Guides, and Modding Tools










  15. #15

    Default Re: Changing General's/Captain's battle model after a certain event.

    Thanks.I will try it and I will post any successful results.

Posting Permissions

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