Page 4 of 5 FirstFirst 12345 LastLast
Results 61 to 80 of 83

Thread: Creating a World - Named Forts

  1. #61

    Default Re: Creating a World - Named Forts

    Yeah I read about that. The princess scenario for named forts I believe? Your solution on that thread is where I got the idea to scan for them if they die... Also where I got the idea to turn them into scenery. You can't turn them into fort models and park them on the same tile as an invisible fort, I suspect, because she becomes a unit in residence. So I will change them into some eye candy statics that don't do much more than indicate a hidden resource and use regular trade resources for villages, etc... on top of a fort instead.

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

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

    Default Re: Creating a World - Named Forts

    Your number of options is only limited by the number of characters possible for factions. Technically you can even use witches and heretics, and all of them except captains (they can't have the required level trait) can have 10 different models. That adds up....










  3. #63

    Default Re: Creating a World - Named Forts

    I had considered that. I was unsure if using them may trigger some religion issues. I am trying to avoid having to deal with agent converting to religion and using only buildings. was thinking of religion as a form of corruption and cleansing. So if the undead take over a city, they begin to convert citizens to undead, and if it is liberated, then another would heal the corruption. that sort of thing.

    Max forts and watchtowers is each 7 for both wood and stone combined too, right?

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

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

    Default Re: Creating a World - Named Forts

    Forts and towers are bound to descr_culture entries, hence only 7 models possible initially. You can however work with the faction_variants sub folder method to get around it and have different models for each faction. See the teutonic campaign: ...\data\models_strat\residences\faction_variants\teutonic_order










  5. #65

    Default Re: Creating a World - Named Forts

    That is great. So essentially you can have 38 potential forts and watchtowers?
    That opens up a lot of possibilities.

  6. #66

    Default Re: Creating a World - Named Forts

    hello,
    I have a problem with my new stone forts. When I go my army to my new fort, his name move to left.

    http://fotowrzut.pl/7CL4D3RSCT

    where is error?

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

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

    Default Re: Creating a World - Named Forts

    You need to place the name character one pixel to the North of the fort (the fort's x value plus 1). To make totally sure (but a bit difficult) you can make that sport impassable in map_ground_types)










  8. #68

    Default Re: Creating a World - Named Forts

    Can you say, how I make that sport impassable in map_ground_types, because change named charackter doesnt work :/

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

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

    Default Re: Creating a World - Named Forts

    It might actually be easier to move the character back to the old spot by script:

    Code:
        monitor_event PreFactionTurnStart FactionIsLocal
            
            console_command move_character "[name of character]" [x value], [y value]
    
    
    		; add more characters
    
    
    	end_monitor










  10. #70

    Default Re: Creating a World - Named Forts

    Hi...i'm helping and providing support to the mod creator for a new Med II kingdoms mod.....we needed to know how to name the forts....but the link for the manual u provided doesnt seem to be working ....is it possible to upload a new link for the manual here or anywhere else???...

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

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

    Default Re: Creating a World - Named Forts

    The download works - but there appears to be a bandwidth issue which makes it abysmally slow. I have notified the administrator.










  12. #72

    Default Re: Creating a World - Named Forts

    Quote Originally Posted by Gigantus View Post
    The download works - but there appears to be a bandwidth issue which makes it abysmally slow. I have notified the administrator.
    Thank u for responding...
    Well.... I'm sorry to bother u ,I clicked the image but it doesn't trigger a download...any chance u could fix it or upload another link for the manual like Google drive etc??

    Edit: The rest of the post has been moved in a new thread here for clarity - Lifthrasir
    Last edited by Lifthrasir; January 28, 2020 at 06:40 AM.

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

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

    Default Re: Creating a World - Named Forts

    Just now tried the download again and had no problem. The reason why you may think that nothing happens when you click the 'download' button here is twofold:

    1. the download is only 1MB, so it happens fast
    2. there is no notification that the download started, it goes straight into what ever folder you have set as default download folder in our browser










  14. #74

    Default Re: Creating a World - Named Forts

    Quote Originally Posted by Gigantus View Post
    Just now tried the download again and had no problem. The reason why you may think that nothing happens when you click the 'download' button here is twofold:

    1. the download is only 1MB, so it happens fast
    2. there is no notification that the download started, it goes straight into what ever folder you have set as default download folder in our browser
    thanks for your quick reply )

  15. #75

    Default Re: Creating a World - Named Forts

    how many forts can I place on the campaign map? (or for each province?)
    is there a limit?

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

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

    Default Re: Creating a World - Named Forts

    Technically you can place a fort every two (or three?) squares. You can however expect an massive impact on the AI's behavior as well as on graphics.










  17. #77
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Re: Creating a World - Named Forts

    I have the script set up as follows:

    Spoiler Alert, click show to read: 

    Code:
        monitor_event PreFactionTurnStart FactionIsLocal                    ;name forts on turn 1
            inc_event_counter rename_forts 1                                ;CALL: rename_forts
            terminate_monitor
        end_monitor
        
        monitor_event FactionTurnEnd FactionType slave                        ;rename forts on all subsequent turn starts
            inc_event_counter rename_forts 1                                ;CALL: rename_forts
        end_monitor
        
        monitor_event FactionTurnStart FactionType slave                    ;don't let slave faction do anything with these witches
            retire_characters slave witch
        end_monitor
        
        monitor_event EventCounter EventCounterType rename_forts            ;FUNCTION: rename_forts
        and EventCounter > 0
            
            spawn_character    slave, Ethring, witch, age 16, x 269, y 217        ;Ethring
            console_command move_character Ethring 271, 214
            
            spawn_character    slave, Henneth, witch, age 16, x 331, y 233        ;Henneth Annûn
            console_command move_character Henneth 333, 232
            
            ;...etc.
            
        end_monitor


    Let me explain the reasoning. I'm using the slave faction instead of a dummy faction because I don't want the dummy faction to exist on the map (show up in the rankings scroll, etc.). I don't need to use a dummy faction with a frozen AI because the agents are retired at the start of the slave faction's turn, so the slave faction can't do any mischief with them. I respawn the agents at the end of the slave factions turn so that I don't have to spawn/retire them for every local faction (there could be a lot of them in hotseat). I only need to retire/respawn for the slave faction's turn, i.e. once per turn cycle. I'm using witches instead of princesses because I need the princess to retain her marriage action. I've deleted all of the witch's actions in descr_character so she doesn't convert the region to heretic religion (or any other religion). The other great thing about using witches from the slave faction is that they're killed when the fort is garrisoned (or even when the player moves a unit out and back in again) as opposed to popping out of the fort and being visible on a nearby tile. When they die, there is a couple seconds of loading, but that's much preferable to having the agent pop out and stand around on the map. My next step is to remove the witch's death audio and remove or shorten her death animation to remove the loading time when moving units into named forts.

    The script seems to be working exactly as intended. I've tested by making the witches visible and I'm not accumulating them each turn. The only bug is, as mentioned, when moving units into the fort the witch will be killed and the fort will lose its name until the next turn.

    So, questions: 1) does anyone see anything wrong with how I've set this up or any way to improve it? I'm sure there's something (there always is). 2) Is it possible to test when a unit enters a fort in a particular region? I'm 99% sure it's impossible, but if it is somehow possible, then we can just add another function call to the witch respawn. Perhaps some convoluted scripting to do with IsFortGarrisoned?
    Last edited by Callistonian; January 01, 2021 at 03:26 PM.

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

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

    Default Re: Creating a World - Named Forts

    In 1648 we made the experience that retiring the character and spawning it again every round started bloating the save file until the game wasn't able to load the save anymore, the theory being that every character record gets saved. We had about 200 named forts so by around turn 50 this started to happen.

    We then switched over to testing for the existence of the character before respawning and also did a 'move' command every turn to make sure they were in the right position in case they got bumped. That method might not work for you as you cannot immobilize the character if they belong to the slave faction - they will start moving around even with movement restriction traits.
    The characters are also not supposed within the fort due to the kill effect of other faction's characters entering the fort, they should be in the tile above it.

    As far as I know agent capabilities cannot be modified and the removal in descr_characters and descr_cursor_action will only disable actions for the player, but not for the AI.










  19. #79
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Re: Creating a World - Named Forts

    Testing for the existence of agents after retiring them returns false. If I_CharacterExists returns true after you retire an agent, then I suspect your retire command didn't fire.

    Why would we need to immobilize the character if they get retired at the start of the slave faction's turn? When exactly will they start moving around? If the agent belongs to slave, it can't be moved by any other faction except by bumping, and if the agent belongs to slave and is inside a fort, it can't be bumped because it will be killed instantly.

    If the agent is 1 tile north of the fort, then the fort won't appear to be named but rather a quite obvious invisible agent north of the fort will be. This precludes the use of the script for most of the forts on the map for which an impassable tile north of the fort can't be easily explained.

    The witch is not converting the region population to heretic. As far as I know, witches don't do anything else (and they're not doing anything in my campaign). This must be due either to my settings in descr_campaign.db or removal of actions in descr_character.

    The most serious objection to using retire_character (which is still the preferred method in the Word doc) is that it balloons the save file size eventually corrupting it. I have not been able to reproduce this with my script as written. See below for data.

    Spoiler Alert, click show to read: 

    The size of the save file is obviously dependent on a number of factors: scripts, units on map, buildings on map, etc. etc. We expect the file size to increase as the campaign progresses simply because the player and AI factions have more stuff around the map. If the game is saving character data for all retired agents, then we expect each save file to be larger, i.e. we still expect a linear dependence but with a greater derivative. In principle, all we would need to do is play two campaigns up to some turn number exactly the same way (hands off), one with the named forts enabled and the other with the script disabled. But since I'm going to have to manually click through all the turns anyway (the script won't fire if I give control of all factions to AI in hotseat and I'm afraid that might affect the save sizes) I may as well just make a graph.

    I've only implemented 8 named forts so far, so I collected a reasonably large data set to make it easier to discern any slight different in slope. If the game is indeed storing data on all the retired agents, then we expect the trend line with the script enabled to have a greater slope. As shown below, there is no discernible difference in the save file size trend with the script enabled vs. completely removed from campaign_script.



    If anything, the data shows a slightly greater slope for the campaign when the script was removed but I chalk this up to statistical anomaly. The game adds an average ~20 KB to the save files each turn, at least for the mod I used to test.


    In light of the evidence above, I'm inclined to believe that the only way retire_characters could possibly lead to a ballooning (increased slope or non-linear) of the save file size is if it isn't firing at all. That is to say, if the agents are invisible on the map and not being removed. This would explain why your I_CharacterExists tests returned true.

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

    Default Re: Creating a World - Named Forts

    The witch is not converting the region population to heretic.
    Maybe they do that at the end of their turn, or the slave faction's, e.g. at some point prior to FactionTurnEnd firing, and yours don't yet exist.

Page 4 of 5 FirstFirst 12345 LastLast

Tags for this Thread

Posting Permissions

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