Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: My faction does not spawn

  1. #1
    AntonisTheGreek's Avatar Senator
    Join Date
    Dec 2013
    Location
    Athens, Greece
    Posts
    1,394

    Default My faction does not spawn

    I've been trying to make an Ent faction in Third Age TW,in order to enrich the Ent Spawn script in that mod.Since my faction is supposed to be emergent I added everything needed for an emerging faction,like appropriate entries in descr_sm_factions,descr_strat etc.
    But the problem is that the faction does not spawn when the script is supposed to spawn it.Here's the script:
    Code:
    declare_counter ents
    
    
    monitor_event FactionTurnStart FactionType france
    	and not IsFactionAIControlled
    	and I_SettlementOwner Fangorn = france
    	set_counter ents 1
    	terminate_monitor
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType hre
    	and not IsFactionAIControlled
    	and I_SettlementOwner Fangorn = hre
    	set_counter ents 1
    	terminate_monitor
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType england
    	and not IsFactionAIControlled
    	and I_SettlementOwner Fangorn = england
    	set_counter ents 1
    	terminate_monitor
    end_monitor
    
    monitor_event FactionTurnStart FactionType normans
    	and I_CompareCounter ents = 1
    	historic_event ent_march event/march_of_the_ents.bik
    	spawn_army 
    	faction normans
    	character	Treebeard, named character, age 62, x 183, y 193, battle_model ents, portrait treebeard
    	traits LoyaltyStarter 1 , Ents 1 , GoodCommander 2 , ReligionStarter 1
    		unit	Ents Elephants		exp 2 armour 0 weapon_lvl 0
    	end
    	move_strat_camera 183, 193
    	terminate_monitor
    end_monitor
    I painted red what I changed from the original script.Here's the original script,in case someone needs it:
    Code:
    declare_counter ents
    
    
    monitor_event FactionTurnStart FactionType france
    	and not IsFactionAIControlled
    	and I_SettlementOwner Fangorn = france
    	set_counter ents 1
    	terminate_monitor
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType hre
    	and not IsFactionAIControlled
    	and I_SettlementOwner Fangorn = hre
    	set_counter ents 1
    	terminate_monitor
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType england
    	and not IsFactionAIControlled
    	and I_SettlementOwner Fangorn = england
    	set_counter ents 1
    	terminate_monitor
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType slave
    	and I_CompareCounter ents = 1
    	historic_event ent_march event/march_of_the_ents.bik
    	spawn_army 
    	faction slave, sub_faction mongols
    	character	Treebeard, named character, age 62, x 183, y 193, battle_model ents, portrait treebeard
    	traits LoyaltyStarter 1 , Ents 1 , GoodCommander 2 , ReligionStarter 1
    		unit	Ents Elephants		exp 2 armour 0 weapon_lvl 0
    	end
    	move_strat_camera 183, 193
    	terminate_monitor
    end_monitor
    So what's going wrong with this?

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: My faction does not spawn

    Logic error: you are testing for the faction turn start of the faction while it hasn't spawned yet (doesn't exist yet).

    You will notice that the original uses the slave faction's turn start to spawn the mongol faction exactly because of this.










  3. #3
    AntonisTheGreek's Avatar Senator
    Join Date
    Dec 2013
    Location
    Athens, Greece
    Posts
    1,394

    Default Re: My faction does not spawn

    Changed the faction turn start check factions from normans to slave,nothing happens

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: My faction does not spawn

    Please copy the descr_sm_factions and descr_strat entries here.

    Way I see it you have to play france, hre or england and own the settlement Fangorn for this monitor to fire. Have you tested the monitor by commenting out the counter line?

    You may need to make the name (Treebeard) available to the norman faction in descr_names.










  5. #5
    AntonisTheGreek's Avatar Senator
    Join Date
    Dec 2013
    Location
    Athens, Greece
    Posts
    1,394

    Default Re: My faction does not spawn

    descr_sm_factions:
    Code:
    faction                        normans, spawned_on_event
    culture                        greek
    religion                    entish
    symbol                        models_strat/symbol_england.CAS
    rebel_symbol                models_strat/symbol_rebels.CAS
    primary_colour                red 0, green 113, blue 0
    secondary_colour            red 94, green 50, blue 0
    loading_logo                loading_screen/symbols/symbol128_england.tga
    standard_index                12
    logo_index                    FACTION_LOGO_SAXONS
    small_logo_index            SMALL_FACTION_LOGO_SAXONS
    triumph_value                5
    intro_movie                    faction/minor_intro.bik
    victory_movie                faction/prologue_win.bik
    defeat_movie                faction/minor_lose.bik
    death_movie                    faction/minor_lose.bik
    custom_battle_availability    yes
    horde_min_units                10
    horde_max_units                20
    horde_max_units_reduction_every_horde 10
    horde_unit_per_settlement_population    250
    horde_min_named_characters    1
    horde_max_percent_army_stack 80
    horde_disband_percent_on_settlement_capture    0
    horde_unit                    Ents Elephants
    can_sap                        no
    prefers_naval_invasions        no
    can_have_princess            no
    has_family_tree                teutonic
    descr_strat:
    Code:
    faction    normans, balanced smith
    ai_label        default
    dead_until_resurrected
    denari    10000
    denari_kings_purse    3000

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: My faction does not spawn

    The entries are fine.

    Have you tried to simplify the spawn to test it (and add a 'family' qualifier)?
    Code:
    monitor_event FactionTurnStart FactionType slave
        and I_CompareCounter ents = 1
        historic_event ent_march event/march_of_the_ents.bik
        spawn_army 
        faction normans
        character    Treebeard, named character, age 62, x 183, y 193, family, battle_model ents, portrait treebeard
        traits LoyaltyStarter 1 , Ents 1 , GoodCommander 2 , ReligionStarter 1
            unit    Ents Elephants        exp 2 armour 0 weapon_lvl 0
        end
        move_strat_camera 183, 193
        terminate_monitor
    end_monitor
    Also check how many factions are now entered in descr_sm_factions










  7. #7
    Medusa0's Avatar Artifex
    Join Date
    Apr 2009
    Location
    Nowhere
    Posts
    379

    Default Re: My faction does not spawn

    Code:
    monitor_event FactionTurnStart FactionType normans
        and I_CompareCounter ents = 1
        historic_event ent_march event/march_of_the_ents.bik
        spawn_army 
        faction normans
        character    Treebeard, named character, age 62, x 183, y 193, battle_model ents, portrait treebeard
        traits LoyaltyStarter 1 , Ents 1 , GoodCommander 2 , ReligionStarter 1
            unit    Ents Elephants        exp 2 armour 0 weapon_lvl 0
        end
        move_strat_camera 183, 193
        terminate_monitor
    end_monitor
    Do be mindful of using a custom model that is vastly different from the normal human one when assigning battle_model via scripts - since a character model adopts the animation set of the faction's default that is set in descr_character.txt, overriding the one set in the script. This only affects campaigns and not custom battles, and you may get a deformed Treebeard on the battlefield if the named character type in the descr_character.txt for normans is different from "ents" (this is why Gimli is taller than his Dwarven bodyguards in the Fellowship Campaign in battles).

  8. #8
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: My faction does not spawn

    I think there are some problems with the Normans ... They do not appear in my faction selection menu and some traits are bugged like the Combat_V_Faction_Normans ... Did anybody succeed in replacing the Normans correctly ?

  9. #9
    AntonisTheGreek's Avatar Senator
    Join Date
    Dec 2013
    Location
    Athens, Greece
    Posts
    1,394

    Default Re: My faction does not spawn

    @Gigantus:This worked.Now my faction appears.But I need the counter as well.With it,the faction does not appear,but without it,it appears.
    @Medusa0:Treebeard is fine in battle.Don't worry about him.
    @Titus le Chmakus:There's no such trait in TATW,and my faction is not supposed to be playable

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: My faction does not spawn

    If the counter is the problem then you have to find out why it doesn't get increased (set to 1). According to the script you posted in the OP the player will have to play france, england or hre (not sure which display names they have in TATW) and has to own the Fargorn settlement for the counter to be increased.

    In other words your Ent faction should spawn in the second round after the player occupies the settlement of Fargorn if he plays either of those three factions.

    Code:
    monitor_event FactionTurnStart FactionType hre   ; start of faction turn
         and not IsFactionAIControlled       ; the faction is player controlled
        and I_SettlementOwner Fangorn = hre   ; the faction owns this settlement
        set_counter ents 1                ; as a result this counter gets set
        terminate_monitor
    end_monitor
    The sequence would be:
    turn 1 - player occupies fargorn
    turn 2 - counter gets set (unless the monitor gets changed to FactionTurnEnd)
    turn 3 - spawn happens

    If you use FactionTurnEnd then the spawn happens one turn earlier
    Last edited by Gigantus; September 09, 2016 at 03:59 AM.










  11. #11
    AntonisTheGreek's Avatar Senator
    Join Date
    Dec 2013
    Location
    Athens, Greece
    Posts
    1,394

    Default Re: My faction does not spawn

    Now it works as intended.Thanks!

  12. #12
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: My faction does not spawn











  13. #13
    AntonisTheGreek's Avatar Senator
    Join Date
    Dec 2013
    Location
    Athens, Greece
    Posts
    1,394

    Default Re: My faction does not spawn

    I also tried to write a script for checking the percentage of a religion in a specific region,and then setting a counter if the percentage of the religion reaches or exceeds a defined value.There are also a few other parameters.Here's the script:
    Code:
    monitor_event FactionTurnEnd FactionIsLocal        
            and FactionType france
            and I_SettlementOwner Fangorn = france
            and PopulationOwnReligion >= 25
            set_counter ents_angry = 1
            terminate_monitor
    end_monitor
    I made the ents_angry counter a prerequisite for the ent spawn,but the ents didn't spawn,so I assume there's something wrong with the script.Is there truly something that's wrong with this?

  14. #14
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: My faction does not spawn

    PopulationOwnReligion requires a character record, eg CharacterTurnStart - FactionTurnStart will not export the necessary values.

    Code:
    monitor_event CharacterTurnEnd FactionType france
       and IsRegionOneOf [region ID number for Fargorn Region]
       and PopulationOwnReligion >= 25
       ; etc
    end_monitor
    Last edited by Gigantus; September 10, 2016 at 08:20 AM.










  15. #15
    AntonisTheGreek's Avatar Senator
    Join Date
    Dec 2013
    Location
    Athens, Greece
    Posts
    1,394

    Default Re: My faction does not spawn

    Very well...Would the following script work?
    Code:
    monitor_event CharacterTurnEnd FactionType france
          and FactionIsLocal
          and IsRegionOneOf [ID of fangorn]
          and PopulationOwnReligion >= 25
          set_counter ents_angry = 1
          terminate_monitor
    end_monitor

  16. #16
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: My faction does not spawn

    It should be - all you have to do is to get the ID number of the Fangorn region by placing your cursor into that region (or over the settlement), pull down the console and use the show_cursorstat command.

    Last edited by Gigantus; July 28, 2017 at 08:36 AM.










  17. #17

    Default Re: My faction does not spawn

    nonplayable ents

  18. #18

    Default Re: My faction does not spawn

    Gigantus help I want to play in the company of Ents Of Farngorn?

  19. #19
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: My faction does not spawn

    I am not sure they are suitable to be played, I remember some scripting that might give problems. Otherwise it's relatively easy: simply move the faction in descr_strat from the unplayable section to the playable section.










  20. #20
    AntonisTheGreek's Avatar Senator
    Join Date
    Dec 2013
    Location
    Athens, Greece
    Posts
    1,394

    Default Re: My faction does not spawn

    Indeed,I didn't intend them to be playable.Salavat99 messaged me about playing the ents,and I told him to install my TATW submod that includes the ents,delete the horde attributes from the ent faction in descr_sm_factions,delete the ent script in campaign_script,and give the ents a settlement and a couple of armies to start with(along with victory conditions and some recruitment).Are all of these enough to make them playable?

Page 1 of 2 12 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
  •