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

Thread: making a army apper in strat map i turn and message appears

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Clanish's Avatar Libertus
    Join Date
    Sep 2011
    Location
    the most beautiful country of the wourld
    Posts
    58

    Default making a army apper in strat map i turn and message appears

    Hello all moders, sorry my noob question but iīm a begginer in moding, i would like to make a rebel army appear in turn x, in x point of the map and a warning event message appears, but i donīt know how , is it possible?Can someone help me in this matter? i thank you all

  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,681
    Blog Entries
    35

    Default Re: making a army apper in strat map i turn and message appears

    I do hope you have some basic experience in scripting, else this might be a tad confusing:
    The entry in the world\maps\base\campaign\imperial_campaign\campaign_script.txt file, place it right below the line at the top that says 'script':
    Code:
    monitor_event FactionTurnStart FactionIsLocal
       and I_TurnNumber = [turn number]
       historic_event [message name]
            spawn_army
                faction slave, sub_faction [faction name]
                character    random_name, named character, age 38, x 191, y 52
                unit        [unit name]        exp 1 armour 0 weapon_lvl 0
            end
        terminate_monitor
    end_monitor
    Some explanations what to enter in the box brackets:
    [turn number] - a simple number (no decimals), turn numbers start with zero for the first turn
    [message name] - the title of your warning message, has to be one word, underscore is allowed, eg my_warning
    [faction name] - a faction's name as it appears in the descr_sm_factions.txt file. The spawn will still be a rebel spawn but requires a regular faction entry
    [unit name] - the name taken from the type entry in the unit's entry in the export_descr_units.txt file
    Blue are the co-ordinate numbers for the spawn. You can get those numbers during a game by placing your cursor on the spot you would like the spawn to happen. Then press the tilde button ( ~ ) and a console will appear. Here you type show_cursorstat and press enter (see pic). Write down the numbers and replace the x and y values with it.




    Now we need to take care of the message stuff: open the data\text\historic_events.txt file in your mod and enter the following at the bottom (you obviously have to replace the boxy bracket entry with your entry from the script):
    Code:
    {[message name in capital letters]_TITLE}Add a short title
    {[message name in capital letters]_BODY}Here you can type a good amount of text, if it is too much to fit into the game's message window then it can be scrolled
    Note: it is possible to add a locator button (the magnifying glass) to the message as explained here, but that might be a bit complex for the beginning.
    Last edited by Gigantus; February 12, 2016 at 06:43 AM.










  3. #3

    Default Re: making a army apper in strat map i turn and message appears

    Hello. For example, in "campaign_script.txt":

    Code:
    	monitor_event FactionTurnStart FactionType slave
    		and I_TurnNumber = 15
    
    		spawn_army 
    			faction slave
    			character	Isaac, named character, age 26, x 174, y 105
    			traits LoyaltyStarter 1 , NaturalMilitarySkill 1, GoodCommander 2
    			unit		NE Bodyguard		exp 1 armour 0 weapon_lvl 0
    			unit		Mailed Knights		exp 0 armour 0 weapon_lvl 0
    			unit		Mailed Knights		exp 0 armour 0 weapon_lvl 0
    			unit		Sergeant Spearmen		exp 0 armour 0 weapon_lvl 0
    			unit		Sergeant Spearmen		exp 0 armour 0 weapon_lvl 0
    			unit		Sergeant Spearmen		exp 0 armour 0 weapon_lvl 0
    			unit		Peasant Crossbowmen		exp 0 armour 0 weapon_lvl 0
    			unit		Peasant Crossbowmen		exp 0 armour 0 weapon_lvl 0
    		end
    
    		historic_event rebels_aparition
    
    		terminate_monitor
    	end_monitor
    In "historic_events.txt" file, add this:

    {REBELS_APARITION_BODY}Description...
    {REBELS_APARITION_TITLE}Title

  4. #4

    Default Re: making a army apper in strat map i turn and message appears

    Also note the name of the general is vitally important - either use random_name (safest) or one from the Rebel list in the descr_names.

  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,681
    Blog Entries
    35

    Default Re: making a army apper in strat map i turn and message appears

    You need the 'sub_faction' entry










  6. #6

    Default Re: making a army apper in strat map i turn and message appears

    Quote Originally Posted by Gigantus View Post
    You need the 'sub_faction' entry
    Doesn't work in the script, only serves to "descr_strat"

    Sample:

    Code:
    	monitor_event FactionTurnStart FactionType slave
    		and I_TurnNumber > 1
    
    		spawn_army 
    			faction slave, sub_faction spain
    			character	random_name, named character, age 26, x 174, y 105
    			traits LoyaltyStarter 1 , NaturalMilitarySkill 1, GoodCommander 2
    			unit		NE Bodyguard		exp 1 armour 0 weapon_lvl 0
    			unit		Mailed Knights		exp 0 armour 0 weapon_lvl 0
    			unit		Mailed Knights		exp 0 armour 0 weapon_lvl 0
    			unit		Sergeant Spearmen		exp 0 armour 0 weapon_lvl 0
    			unit		Sergeant Spearmen		exp 0 armour 0 weapon_lvl 0
    			unit		Sergeant Spearmen		exp 0 armour 0 weapon_lvl 0
    			unit		Peasant Crossbowmen		exp 0 armour 0 weapon_lvl 0
    			unit		Peasant Crossbowmen		exp 0 armour 0 weapon_lvl 0
    		end
    
    		historic_event rebels_aparition
    
    		terminate_monitor
    	end_monitor


    "descr_names.txt", in Spain faction doesn't exists this name, (Desakenthos)
    Code:
    faction: slave
    
    	characters
    		El_Cid
    		Fernan
    		Salvador
    		Primus
    		Secundus
    		Sextus
    		Spartacus	
    		Solomon
    		Pontius
    		Abraham
    		Isaac
    		Esau
    		Moses
    		Aaron
    		Nautius
    		Oxynta
    		Juva
    		Jubal
    		Abdimilki
    		Abascantus
    		Decemius
    		Posthumus
    		Dentupes
    		Deopus
    		Desakenthos
    		Diazelmis
    		Diazenis
    		Rhaskos
    		Rhaskuporis
    		Rescuturme
    		Rhesus
    		Satres
    		Sautes
    		Skaris
    		Skílas
    
    	women
    "names.txt"
    Code:
    ...
    {Dertosa}Dertosa
    {Dervis_e}Dervis'e
    {Derya}Derya
    {Desakenthos}Desaquento
    {Descriua}Descriua
    {Despenser}Despenser
    {Destefani}Destefani
    ...
    Last edited by Miguel_80; February 12, 2016 at 07:25 AM.

  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,681
    Blog Entries
    35

    Default Re: making a army apper in strat map i turn and message appears

    The random name will always be taken from the 'slave' section - no argument. If you have different rebel banners for each culture then the army will carry the banner of the culture the sub faction belongs to. It will also use the sub faction's accent in battle.

    I had a picture from the 1648 development where I spawned several slave armies next to each other, all with a different culture and hence with different banner symbols. Not sure if I can manage to recover it from imageshack.


    Edit: found it, now at photobucket



    rebel_standard 0 (descr_cultures) is the top left symbol in the data\banner\symbol7.tga graphics


    Last edited by Gigantus; February 12, 2016 at 08:38 AM.










  8. #8

    Default Re: making a army apper in strat map i turn and message appears

    Yes, but they are placed through by the "descr_strat.txt" file. By script, you can't choose sub-faction. The culture depends of the "descr_regions.txt" file.

    descr_strat.txt
    Code:
    character	sub_faction spain, Fernando, named character, male, age 26, x 170, y 105
    traits LoyaltyStarter 1 , NaturalMilitarySkill 1 , GoodCommander 2
    army
    unit		NE Bodyguard				exp 1 armour 0 weapon_lvl 0
    unit		Mailed Knights				exp 0 armour 0 weapon_lvl 0
    unit		Mailed Knights				exp 0 armour 0 weapon_lvl 0
    unit		Sergeant Spearmen				exp 0 armour 0 weapon_lvl 0
    unit		Sergeant Spearmen				exp 0 armour 0 weapon_lvl 0
    unit		Sergeant Spearmen				exp 0 armour 0 weapon_lvl 0
    unit		Peasant Crossbowmen				exp 0 armour 0 weapon_lvl 0
    unit		Peasant Crossbowmen				exp 0 armour 0 weapon_lvl 0

  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,681
    Blog Entries
    35

    Default Re: making a army apper in strat map i turn and message appears

    I'll do those script spawns once more and see what happens. Should be simple, I still got those banner graphics

    In descr_regions are you referring to the faction entry? That would be the 'loyalty' entry, the faction a region would revolt to unless it's the previous owner's faction. I'll check if that works with script spawns. If memory serves it works that way with descr_rebel_faction based spawns.










  10. #10

    Default Re: making a army apper in strat map i turn and message appears

    It should be as you mention, but doesn't work the sub-factions by script. Not even allows to appear captains of Slave faction.

  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,681
    Blog Entries
    35

    Default Re: making a army apper in strat map i turn and message appears

    I used faithful Bare Geomod and took the Vilnius Region, set the owner to Russia and the descr_region entry set to Russia. The region to the right got owned by Russai as well but I changed the descr_regions entry to Moors. I then spawned 4 slave armies into each region, one without sub faction the others with sub factions of various cultures. I used numbering (0-7) for the symbols.
    Code:
    ;
    ; Campaign script
    ;
    script
    
        restrict_strat_radar false
    
        monitor_event FactionTurnStart FactionIsLocal
    
            ; Vilnius - owner Russia, loyal Russia
    
            spawn_army
                faction slave
                character    random_name, named character, age 38, x 196, y 162
                unit    Billmen        exp 1 armour 0 weapon_lvl 0
            end
            spawn_army
                faction slave, sub_faction england
                character    random_name, named character, age 38, x 198, y 162
                unit    Billmen        exp 1 armour 0 weapon_lvl 0
            end
            spawn_army
                faction slave, sub_faction papal_states
                character    random_name, named character, age 38, x 200, y 162
                unit    Billmen        exp 1 armour 0 weapon_lvl 0
            end
            spawn_army
                faction slave, sub_faction aztecs
                character    random_name, named character, age 38, x 202, y 162
                unit    Billmen        exp 1 armour 0 weapon_lvl 0
            end
    
            ; Smolensk - owner Russia, loyal Moors
    
            spawn_army
                faction slave
                character    random_name, named character, age 38, x 206, y 162
                unit    Billmen        exp 1 armour 0 weapon_lvl 0
            end
            spawn_army
                faction slave, sub_faction england
                character    random_name, named character, age 38, x 208, y 162
                unit    Billmen        exp 1 armour 0 weapon_lvl 0
            end
            spawn_army
                faction slave, sub_faction papal_states
                character    random_name, named character, age 38, x 210, y 162
                unit    Billmen        exp 1 armour 0 weapon_lvl 0
            end
            spawn_army
                faction slave, sub_faction aztecs
                character    random_name, named character, age 38, x 212, y 162
                unit    Billmen        exp 1 armour 0 weapon_lvl 0
            end
    
            terminate_monitor
        end_monitor
    
        ; keep script unfinished until last monitor termination
        wait_monitors
    
    end_script
    And here is the result (one army on the left is hiding in the forest). The army to the right of Smolensk is a descr_strat placement with the aztecs sub faction. It would appear that I indeed mixed up the script display with the one from descr_strat. The symbol used for script spawned slave armies is taken from the descr_regions 'loyal' entry only and the sub faction entry is not read (has no effect).


    Last edited by Gigantus; February 12, 2016 at 11:35 AM.










  12. #12

    Default Re: making a army apper in strat map i turn and message appears

    You can make to appear in a region and then use the "reposition_character" command. I guess that it will respect the flag.

  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,681
    Blog Entries
    35

    Default Re: making a army apper in strat map i turn and message appears

    That will work - there is no reason why the symbol would change once it has been applied. Within the first rounds of the game you could actually use a unit from descr_strat in that way (age progression dependent), that would also give you the faction's strat model. Simply position it in a dense forest somewhere and give it a label (for easy scripting).

    I completely forgot: in EBII we use level strat models for the slaves to simulate a culture\geographical based model: simply give the general the required level trait so that he has the model to go with the symbol, culture wise.
    Last edited by Gigantus; February 12, 2016 at 12:21 PM.










  14. #14

    Default Re: making a army apper in strat map i turn and message appears

    Yes, good idea. This would avoid the same model of general. And add the battle model also

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

    Default Re: making a army apper in strat map i turn and message appears

    From a recent thread...

    Quote Originally Posted by Withwnar View Post
    There does seem to be a workaround for scripted slave spawns...

    http://www.twcenter.net/forums/showt...1#post14203640

    About halfway down that post. It's referring to this technique: http://www.twcenter.net/forums/showt...oiding-labels)

    Spawn the army into a 'spawnpool' faction but don't do the give_everything_to_faction step. Because the spawnpool faction has no settlements (and is not horde) spawnpool dies and the army will go rebel and, apparently, receive the name etc. appropriate for the region in which they are standing. I can't remember if a "Faction Destroyed ... spawnpool" message happens at that point ... hope not.

    The units you wish to be using might need to be in both faction rosters: spawnpool and slave.
    By "name" I mean the rebel army 'subfaction'/culture name, e.g. "(English Rebels)" in the army's tooltip, not the general's name.

    I don't know about accent though ... didn't test that. A named character would keep the accent of the spawnpool faction, I expect.

    EDIT:
    Quote Originally Posted by in the quote above
    I can't remember if a "Faction Destroyed ... spawnpool" message happens at that point ... hope not.
    It does. Blast. Well then that's no good unless some workaround for it can be found.
    Last edited by Withwnar; February 12, 2016 at 11:24 PM.

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

    Default Re: making a army apper in strat map i turn and message appears

    (continuing from previous post...)

    This works: give_everything_to_faction [spawnpool faction] slave false

    They still get the slave banner appropriate for the region in which they became rebel AND they still get the appropriate rebel-type description for the region (e.g. "English Rebels"). The latter doesn't happen for directly-spawned rebels.

    However, the accent is still that of the spawnpool faction, as is the strat model. For generals (captains) these can be fixed by killing the commander via his spawn label. For named characters you could give him a Level-effect trait to give him a different model (from the slave's model pool) but I don't see how the accent could be changed.

    Mind you, I don't think the strat models and accents are working for direct-spawn characters either. When I do it in Egypt he has a very european armour model and a german?/russion? accent. Models were mentioned in previous posts but a Level trait can't fix that for generals (captains).

    Quote Originally Posted by Gigantus View Post
    Within the first rounds of the game you could actually use a unit from descr_strat in that way (age progression dependent), that would also give you the faction's strat model. Simply position it in a dense forest somewhere and give it a label (for easy scripting).
    You could also send him off map. Maybe ... not sure if slaves can be.
    Last edited by Withwnar; February 14, 2016 at 04:39 AM.

  17. #17

    Default Re: making a army apper in strat map i turn and message appears

    Quote Originally Posted by Withwnar View Post
    Models were mentioned in previous posts but a Level trait can't fix that for generals (captains).
    It was basically not always will appear the generals (named_character) with European appearance

  18. #18
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: making a army apper in strat map i turn and message appears

    Just a quick clarification, those army spawn are all slave army spawns, so what about non-slave army spawns that have subfaction attached to them?
    Last edited by Squid; February 18, 2016 at 11:33 AM.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  19. #19

    Default Re: making a army apper in strat map i turn and message appears

    The "slave" spawn army that appears by "campaign_script" don't have subfaction. Are you referring to this?

  20. #20
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: making a army apper in strat map i turn and message appears

    I'm asking does the subfaction tag work for non-slave spawned armies in the campaign script. In other words, is the slave faction the exception where subfaction tag doesn't work, or does the subfaction tag just not work in general in campaign scripts. I'm asking so I know what to update my script editor's validation to work with.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

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
  •