Results 1 to 20 of 23

Thread: how to create one immortal character

Hybrid View

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

    Default how to create one immortal character

    So, is there a way to make just one character immortal? I'm thinking about maybe a script so when my character dies the same guy will rise in some place in the campaign map. Cause that would be cool

  2. #2

    Default Re: how to create one immortal character

    Wouldn't be the "same" guy when it comes to traits, age, position and such but you can spawn a character with the same name indefinitly.

    Let's see, something like (not tested so might be wrong)
    Code:
    monitor_event FactionTurnStart FactionType FactionIsLocal
    if I_LocalFaction france
    and not I_CharacterExists Thibaut Pastforeire
    spawn_army
    faction france
    character    Thibaut Pastforeire, named character, age 25, x 24 y 249 
    traits NaturalMilitarySkill 3 , GoodCommander 1 , BattleDread 2 , Genocide 2
    unit        NE Bodyguard                exp 5 armour 0 weapon_lvl 0
    end
    end_if
    end_monitor
    If I didn't screw up this should spawn the character as general (not family memeber) indefinitly through the campaign at a fixed location (must be outside settlement else he will spawn "on top" of that settlement, or fort)

    Edit: kicked out some mod specific traits
    Last edited by Furin; August 10, 2008 at 08:06 AM.

    Under the benevolent guidance of jimkatalanos

  3. #3

    Default Re: how to create one immortal character

    Now all I need to do is change the name and faction right?
    Is is save compatible or do i have to restart the game?
    I need to put this in campaign_script.txt right?

  4. #4

    Default Re: how to create one immortal character

    As a rule of thumb everything inside the campaign folder, like the campaign script, needs you to start a new campaign. Name, faction, coordinates, traits (possibly unit type of bodyguard unit) needs to be changed to your liking, and I wrote this out of my head so it might not work at all

    Look's like it would work though. And it only spawns this character for the player.

    Edit: You can find valid names in descr_names.txt
    Last edited by Furin; August 10, 2008 at 07:59 AM.

    Under the benevolent guidance of jimkatalanos

  5. #5

    Default Re: how to create one immortal character

    so in descr_strat
    character Zhen Jin, named character, male, age 21, x 504, y 154 command 7, dread 7, loyalty 7, piety 1
    traits GoodCommander 5, MilitaryInclination 1 , EasternWarlord 3 , Disciplinarian 1 , Anger 2 , BattleDread 3 , StrategyDread 3 , PublicFaith 2, TouchedByTheGods 1 , Loyal 2, ContentGeneral 3 , ReligionStarter 1
    unit Mongol Bodyguard exp 9 armour 1 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Elephants exp 9 armour 0 weapon_lvl 1
    unit Elephants exp 9 armour 0 weapon_lvl 1
    unit Elephant Firethrowers exp 9 armour 0 weapon_lvl 1
    unit Elephant Firethrowers exp 9 armour 0 weapon_lvl 1



    in custom_script.txt(stainless steel 6.1 late era campaign)
    monitor_event FactionTurnStart FactionType FactionIsLocal
    if I_LocalFaction mongols
    and not I_CharacterExists Zhen Jin
    spawn_army
    faction mongols
    character Zhen Jin, named character, age 25, x 498, y 155
    traits NaturalMilitarySkill 3 , EasternWarlord 3 GoodCommander 5 , BattleDread 3, MilitaryInclination 1, Genocide 2, Disciplinarian 1, TouchedByTheGods 1, CharacterAges 1, TurnsAlive 1, StrategyDread 3, ContentGeneral 3, Loyal 2
    unit Mongol Bodyguard exp 9 armour 1 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Elephants exp 9 armour 0 weapon_lvl 1
    unit Elephants exp 9 armour 0 weapon_lvl 1
    unit Elephant Firethrowers exp 9 armour 0 weapon_lvl 1
    unit Elephant Firethrowers exp 9 armour 0 weapon_lvl 1
    end
    end_if
    end_monitor

    Ctd 21:18:56.027 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit. Can you find out why?
    Last edited by LordN00KE; August 10, 2008 at 08:18 AM.

  6. #6

    Default Re: how to create one immortal character

    What does the logfile say?

    You know what, I'll be back. I check the script in a campaign here.

    Under the benevolent guidance of jimkatalanos

  7. #7

    Default Re: how to create one immortal character

    log says this
    21:36:37.356 [system.rpt] [always] CPU: SSE2
    21:36:37.356 [system.rpt] [always] ==== system log start, build date: Feb 25 2008 version development ===
    21:36:37.371 [system.io] [always] mounted pack packs/data_0.pack
    21:36:37.371 [system.io] [always] mounted pack packs/data_1.pack
    21:36:37.371 [system.io] [always] mounted pack packs/data_2.pack
    21:36:37.371 [system.io] [always] mounted pack packs/data_3.pack
    21:36:37.371 [system.io] [always] mounted pack packs/data_4.pack
    21:36:37.371 [system.io] [always] mounted pack packs/localized.pack
    21:36:40.121 [script.err] [error] Script Error in mods/Stainless_Steel_6/data/descr_mount.txt, at line 583, column 1
    Could not find battle model for mount 'Mount_Barded_Horse_Kiev'.
    21:37:48.027 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.

    ignore the Mount_Barded_Horse_Kiev it's a won't crash the game
    Last edited by LordN00KE; August 10, 2008 at 08:37 AM.

  8. #8
    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: how to create one immortal character

    It will crash when you start a battle.










  9. #9

    Default Re: how to create one immortal character

    No actually it won't. That's why they ignore it (the sub mode author)

  10. #10

    Default Re: how to create one immortal character

    declare_counter immortal
    monitor_event FactionTurnStart FactionIsLocal
    if I_LocalFaction mongols
    set_counter immortal 1
    end_if
    if not I_CharacterExists Thibaut Pastforeire
    and I_CompareCounter immortal = 1
    spawn_army
    faction mongols
    character Zhen Jin, named character, age 25, x 24 y 249
    traits LoyaltyStarter 1 , NaturalMilitarySkill 3 , GoodCommander 1 , BattleDread 2 , Genocide 2 , CharacterAges 1, TurnsAlive 1
    unit Mongol Bodyguard exp 9 armour 1 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Elephants exp 9 armour 0 weapon_lvl 1
    unit Elephants exp 9 armour 0 weapon_lvl 1
    unit Elephant Firethrowers exp 9 armour 0 weapon_lvl 1
    unit Elephant Firethrowers exp 9 armour 0 weapon_lvl 1

    end
    end_if
    end_monitor

    there's nothing wrong with my dercs_start right?

  11. #11

    Default Re: how to create one immortal character

    Quote Originally Posted by LordN00KE View Post
    declare_counter immortal
    monitor_event FactionTurnStart FactionIsLocal
    if I_LocalFaction mongols
    set_counter immortal 1
    end_if
    if not I_CharacterExists Thibaut Pastforeire
    and I_CompareCounter immortal = 1
    spawn_army
    faction mongols
    character Zhen Jin, named character, age 25, x 24 y 249
    traits LoyaltyStarter 1 , NaturalMilitarySkill 3 , GoodCommander 1 , BattleDread 2 , Genocide 2 , CharacterAges 1, TurnsAlive 1
    unit Mongol Bodyguard exp 9 armour 1 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Elephants exp 9 armour 0 weapon_lvl 1
    unit Elephants exp 9 armour 0 weapon_lvl 1
    unit Elephant Firethrowers exp 9 armour 0 weapon_lvl 1
    unit Elephant Firethrowers exp 9 armour 0 weapon_lvl 1

    end
    end_if
    end_monitor

    there's nothing wrong with my dercs_start right?
    watch the bold parts, name, traits, coordinates (has nothing at all to do with strat file, unless the Zhen Jin guy is present at gamestart, then it will only spawn him as soon as he dies. Better to remove him from strat file for the time being to see if the script works for you.

    Also, Zhen Jin is not family! If the strat file Zhen Jin IS family, you need to redo the whole family tree when testing. Just choose a different name in that case to save you the hassle...
    Last edited by Furin; August 10, 2008 at 09:43 AM.

    Under the benevolent guidance of jimkatalanos

  12. #12
    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: how to create one immortal character

    You are going to have a problem there I think. You are checking for one character and are spawning a different one. (Check for John, spawn Tim) And why not keeping him a general? You might otherwise run into all sorts of problems as Furin pointed out.










  13. #13

    Default Re: how to create one immortal character

    Zhen jin doesn't exist in the game I change the coordinate so that he'll spawn near another character. Still I have ctd with nothing on the log file. Any Ideas I copied the traits from another character. The name Zhen jin and Khan is in the descr_names.txt.

    declare_counter immortal
    monitor_event FactionTurnStart FactionIsLocal
    if I_LocalFaction mongols
    set_counter immortal 1
    end_if
    if not I_CharacterExists Zhen Jin Khan
    and I_CompareCounter immortal = 1
    spawn_army
    faction mongols
    character Zhen Jin Khan, named character, age 25, x 494, y 162
    traits EasternWarlord 3 , Disciplinarian 1 , BattleDread 3 , StrategyDread 3 , PublicFaith 2, TouchedByTheGods 1 , Loyal 2, ContentGeneral 3 , GoodCommander 5 , FactionKiller 4
    unit Mongol Bodyguard exp 9 armour 1 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Mongol Heavy Archers exp 9 armour 3 weapon_lvl 1
    unit Elephants exp 9 armour 0 weapon_lvl 1
    unit Elephants exp 9 armour 0 weapon_lvl 1
    unit Elephants exp 9 armour 0 weapon_lvl 1
    unit Elephants exp 9 armour 0 weapon_lvl 1

    end
    end_if
    end_monitor

    I put this in custom_script.txt just before
    end_script
    Last edited by LordN00KE; August 10, 2008 at 10:23 AM.

  14. #14

    Default Re: how to create one immortal character

    Well, it's weird that you get a CTD, if there was an error in the script, it would usually say "couldn't create script" but the game would still start. If the name was not correct it would say "couldn't create character" and still run.

    So, nope, I am out of ideas, I know that the second script i posted works, at least in my campaign. (Zhen Jin Khan can't work like that because it's three words, should prolly be Zhen Jin_Khan or just Zhen Jin, but like I said, this wouldn't make it crash)

    The army is from the strat file right? So it cannot be because of a non existing unit or something like that?

    Under the benevolent guidance of jimkatalanos

  15. #15

    Default Re: how to create one immortal character


    LOL it worked. Is there a way so that I can add a new name? Do I add the new name in descr_names.txt? I think I'm gonna name the character Furin.

  16. #16

    Default Re: how to create one immortal character

    Pfew, I'd suggest you first check if the script is really working as intended. Aka get the guy killed and see if he respawns. When that works like it should we can talk about changing names (Furin the Merciless XD)

    Under the benevolent guidance of jimkatalanos

  17. #17

    Default Re: how to create one immortal character

    It worked he spawned back a turn later. Now, about Furin the Merciless how do I do that? I know how to add the Merciless but to add Furin I don't really know.

  18. #18

    Default Re: how to create one immortal character

    To add a name to a faction you need to add it in descr_names.txt (/data) and names.txt (/data/text), then delete the bin files in /text and restart a campaign. If the name isn't shown in the character sheet you got a typo somewhere, this isn't good because the game will crash as soon as it wants to assign a trait to that character. The name can be taken by any slave character, also heretics.

    So I'd suggest just staying with what is working, use a surname in the script to lower the chance for duplicate characters and have fun with your "immortal" general

    Under the benevolent guidance of jimkatalanos

  19. #19

    Default Re: how to create one immortal character

    How do I make 2 Immortals? Do I use the same script?
    [edit] I already found a way]
    Last edited by LordN00KE; August 11, 2008 at 12:02 AM.

  20. #20

    Default Re: how to create one immortal character

    good job

    Under the benevolent guidance of jimkatalanos

Posting Permissions

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