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

Thread: 098 teaser: SCRIPTING & OPTIMISATION by Belovèse

  1. #1

    Icon14 098 teaser: SCRIPTING & OPTIMISATION by Belovèse

    Hello everyone, it is time for a new teaser for 098!

    What have I been doing these past weeks/months? Well these days I looked and solved a CTD in the last testing version for a few days, CTD that I created myself when tinkering too much with the event scroll...
    I made the historic event scrolls larger, but the jury's still out on that one: if there is much text it is good, if there is just a few words it looks bad. Plus we would need to redo a lot of the images, so

    Well then, what did I do appart from fixing my own mistakes?
    Mostly few tweaks here and there, but I also worked on new things.

    - NEW SYSTEM: RATE OF EXPANSION - This is a concept in testing: I'm looking at a new way for the diplomacy system to react to the player aggressivity toward it's neighbours.
    For now it is pretty basic: if you conquer too much settlements too fast, your reputation will go down.
    It is a point system, so if you way a bit, people will stop being defiant of you.

    I wasn't satisfied with the automatic way it works now: not matter the context, you have the same penalty.

    My idea is: the faster you expand, the heavier penalty will be. For now it is only a reputation and relation malus, but in the future it could be money for example (to simulate the cost of managing the fast conquests)

    It works in two parts, first a script:
    Code:
        set_event_counter player_aggressivity 0
        set_event_counter player_aggressivity_feedback 0        ; 1 if info on acceptable neighbour already fired, 2 if info on warmonger already fired
        
        monitor_event GeneralCaptureSettlement not IsFactionAIControlled
            log --- Player aggressivity : info event
            historic_event info_player_aggressivity
            set_event_counter player_aggressivity_feedback 1        ; consider first info on as as "acceptable neighbour" info
            terminate_monitor
        end_monitor
    
        monitor_event GeneralCaptureSettlement not IsFactionAIControlled
            inc_event_counter player_aggressivity 5
            log TEST player_aggressivity inc by 5
        end_monitor
    
        monitor_event FactionTurnStart not IsFactionAIControlled
    
            if I_EventCounter player_aggressivity > 0
                inc_event_counter player_aggressivity -1
                log TEST LOWERING player_aggressivity
    
                if I_EventCounter player_aggressivity > 8
                    and I_EventCounter player_aggressivity_feedback = 1
                        historic_event player_aggressivity_warmonger
                        set_event_counter player_aggressivity_feedback 2
                end_if
    
                if I_EventCounter player_aggressivity < 9
                    and I_EventCounter player_aggressivity_feedback = 2
                        historic_event player_aggressivity_acceptable
                        set_event_counter player_aggressivity_feedback 1
                end_if
            end_if
        end_monitor
    And then a descr_faction_standing trigger:
    Code:
    Trigger Player_Aggressivity_Warmonger
        WhenToTest FactionTurnEnd
        Condition I_EventCounter player_aggressivity > 8
        FactionStanding exclude_factions { slave } normalise -1.0 30
        FactionStanding global normalise -1.0 30


    - CHOOSE YOUR AI! - We're testing XXZit campaign AI, lightly reworked by JLMP, as XXZit knidly allowed us to use it.
    For my test it is a better campaign AI, more reactive and aggressive, and it will punish you a bit more if you are not cautious.
    During one test campaign I played as Venice, I had Serbia mount a coordinated attack against me: a land army attacked Ragusa, and a naval invasion landed in Sicily!
    We still have to test it though, to balanced it before decinding to make it our new AI or not.

    SO I made a bat file to easily switch between the two AI, it will be in th SSHIP folder.


    - CIVIL WAR - I'm convinced it was source of a lot of the reported CTDs, and the AI doesn't know how to handle it.
    For these two reasons I limited if to the player only.

    I'm also working on a new way of implementing civil war, but it is not ready for release (at all!), so... I won't say more about it!


    - REEMERGENCE BUGFIX - Some CTD were caused by living factions trying to reemerge from themselves, or from other factions.
    I think I fixed that, and added a way for the reemergence counters to be reset to 0 when needed.
    Anyway, I'm going to try and change the way it works, by going for this method detailled by Callistonian here
    The main idea is to create an army of the dead faction to reemerge, and make it capture a city before the turn end. That is the solution EBII implemented in patch 2.35A I believe.


    - BETTER LOG - A few things put in the campaign_script allow for us to know what version you are using when uploadind a bug report. And difficulty, because some scripts don't fire for medium and/or hard difficulty.
    Code:
        log always SSHIP VERSION 0.98 TESTING BUILD 2021-04-14. For support please upload log and savegames here: https://www.twcenter.net/forums/showthread.php?654747-Bugs-Reports-amp-Technical-Help
        monitor_event GameReloaded TrueCondition
            log always SSHIP VERSION 0.98 TESTING BUILD 2021-04-14. For support please upload log and savegames here: https://www.twcenter.net/forums/showthread.php?654747-Bugs-Reports-amp-Technical-Help
            if I_EventCounter DifficultyLevel = 4
                log ------ difficulty : very hard
            end_if
            if I_EventCounter DifficultyLevel = 3
                log ------ difficulty : hard
            end_if
            if I_EventCounter DifficultyLevel = 2
                log ------ difficulty : medium
            end_if
            if I_EventCounter DifficultyLevel = 1
                log ------ difficulty : easy
            end_if
       end_monitor
    So you'll see something like this in your log:
    Code:
    09:04:24.960 [game.script] [always] SSHIP VERSION 0.98 TESTING BUILD 2021-04-14. For support please upload log and savegames here: https:/www.twcenter.net/forums/showthread.php?654747-Bugs-Reports-amp-Technical-Help
    09:04:24.960 [game.script] [always] ------ difficulty : very hard


    - CharacterTurnEndInSettlement OPTIMISATION - There were traits triggerstriggers that were not efficient, turn-time wise, for these two reasons, so I redid a lot of them.

    Coding tweaks:
    - CharacterTurnEnd and EndedInSettlement merged into CharacterTurnEndInSettlement, makes for less character tested and less tests
    - Traits condition move down at the bottom of the condition list, because they are more expansive I believe, so they should be tested last.

    A goor exemple is the old coding for scurvy triggers:
    Code:
    Trigger RobustPlayerTownRecoveryScurvy
        WhenToTest CharacterTurnEnd
    
        Condition Trait Scurvy = 1
           and EndedInSettlement
           and Trait Robust = 1
           and FactionIsLocal
    
        Affects Healed 2 Chance 90
    Here is the new version:
    Code:
    Trigger RobustPlayerTownRecoveryScurvy
        WhenToTest CharacterTurnEndInSettlement
    
        Condition FactionIsLocal
            and EndedInSettlement
            and Trait Scurvy = 1
            and Trait Robust = 1
    
        Affects Healed 2 Chance 90


    - SMALL CHANGES FOR NORWAY - I playtested Norway recentrly and was annoyed by two things, that I fixed:
    - Sigurd the bastard now appears in the familly tree
    - Rebels generals in the scandinavian settlements no longer have mounted nodyguars, just Veteran Djengards. Concerned settlements are: Skara, Kalmar, Visby and Sigtuna


    - OTHER STUFFS - Other various stuffs I worked on:
    - reviewing future scripts for the team,
    - I used Bovi's checker A LOT (it is a really great tool!) so it pointed out a lot of small stuffs to fix, I did (just) some of them,
    - reworked merchant traits to remove antitrais mechanic
    - deactivated the night falling during sunset battle: now it should be either sunset, either night.
    - spawned general for "early sieges" could occasionaly revolt, causing CTD. Increased their starting loyalty
    - fixed faulty conditions in georgian evolution script, (spotted by b0Gia de Bodemloze)
    - in battle arrow are not permanent, but stay for 30s before disapearing. I just like to see the ground covered in arrows when I play an archer faction !! But permanent arrow could be too much for some PCs, hence 30s,
    - knights now cost 50% of their upkeep to recruit, instead of 0 in the last version (asked by Jurand, done by Belovèse)


    Well, plus other really small stuffs. And sorry to tease you(but hey, it's in the title ) but I really enjoy playing SSHIP 098!
    Cheers!
    Last edited by Jurand of Cracow; November 06, 2021 at 08:53 AM.
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  2. #2
    Nemesis2345's Avatar Semisalis
    Join Date
    May 2013
    Location
    Constanta, Romania
    Posts
    462

    Default Re: 098 teaser: Belovèse's work

    Great Job ! Waiting for it !

  3. #3

    Default Re: 098 teaser: Belovèse's work

    Thank you for your work!

  4. #4

    Default Re: 098 teaser: Belovèse's work

    Yes great work. Sounds like good changes. Looking forward to play 098

  5. #5

    Default Re: 098 teaser: Belovèse's work

    Great work Belovese!!! Looking forward to play new version and enjoy it!
    THE MORE YOU SWEAT NOW,
    THE LESS YOU BLEED IN BATTLE!!!



    Sign the petition to remove hardcoded limits for M2TW

  6. #6

    Default Re: 098 teaser: Belovèse's work

    Thanks guys for the comments and the reps!
    It is true it can sound a bit obscure if you don't mod, but I really found my place in this team as scripter and text files reviewer, I do like it!
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  7. #7
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: 098 teaser: Belovèse's work

    Quote Originally Posted by Belovèse View Post
    Thanks guys for the comments and the reps!
    It is true it can sound a bit obscure if you don't mod, but I really found my place in this team as scripter and text files reviewer, I do like it!
    Yeah, I've also got a rep once that was telling "I don't understand what you're doing, but I do appreciate it"

  8. #8

    Default Re: 098 teaser: Belovèse's work

    Hey guys, so we're also working on having nicer scrolls. Here is a change I made for when you're informed of a diplomatic relation evolution that I like and just submitted to the team. Tell me what you think!

    OLD VERSION

    NEW VERSION
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  9. #9
    Nemesis2345's Avatar Semisalis
    Join Date
    May 2013
    Location
    Constanta, Romania
    Posts
    462

    Default Re: 098 teaser: Belovèse's work

    Quote Originally Posted by Belovèse View Post
    Hey guys, so we're also working on having nicer scrolls. Here is a change I made for when you're informed of a diplomatic relation evolution that I like and just submitted to the team. Tell me what you think!

    OLD VERSION

    NEW VERSION
    I think you bought back the clean stuff that was present in Rome Total War scrolls (where they would also show the faction's emblem) . A big quality of life , i love it !

  10. #10

    Default Re: 098 teaser: Belovèse's work

    Thanks! it's true it would be nice to have the faction's emblem, maybe I'll find a way to do it!
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  11. #11
    kostic's Avatar Domesticus
    Join Date
    Jan 2007
    Location
    Near Lyon in France
    Posts
    2,267

    Default Re: 098 teaser: Belovèse's work

    If the text was centered it would be even prettier.

  12. #12

    Default Re: 098 teaser: Belovèse's work

    Quote Originally Posted by kostic View Post
    If the text was centered it would be even prettier.
    Yes, same opinion and also about add faction emblem if is possible, but of course is a great improvement compared to the old version
    THE MORE YOU SWEAT NOW,
    THE LESS YOU BLEED IN BATTLE!!!



    Sign the petition to remove hardcoded limits for M2TW

  13. #13
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: 098 teaser: Belovèse's work

    Quote Originally Posted by kostic View Post
    If the text was centered it would be even prettier.
    This can be done in the txt file (one needs add spaces).

  14. #14

    Default Re: 098 teaser: Belovèse's work

    You're right, I'll center the text directly in desct_event_images, it will be easier.
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  15. #15
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: 098 teaser: Belovèse's work

    Quote Originally Posted by Belovèse View Post
    You're right, I'll center the text directly in desct_event_images, it will be easier.
    I think it's not the best idea given that - if I understand it correctly - all the descriptions will be from then on aligned to the center. Some should not, and I'd leave it aligned to the left, as it is now. We'd then go case-by-case by introducing spaces in the text file.

  16. #16

    Default Re: 098 teaser: Belovèse's work

    Well, I didn't mean center all the texts in desc_event_images, but only the one that we need to: there is a lot of scroll layout definitions in the file. So the screenshot I posted, faction alliance notification scoll, is a separate layout from others, so it is possible to center only this one and leave the others as is.
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  17. #17
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: 098 teaser: Belovèse's work

    ah, ok, I got it, that's right!

  18. #18

    Default Re: 098 teaser: Belovèse's work

    Hello everyone, I thought I'll turn this thread in more of a dev log than a teaser thread, so that players can see what I'm up to and how the work on the mod is going!

    So these days I'm mostly building the various SSHIP 0.98 versions, by merging what other devs send me on our private subforum. I then use a few tools to look for mistakes, typos, missing files, etc... then make some fixes if needed, and publish the alpha build on the dev's forum. Only then if we feel the build is stable enough do we release it to the players as a beta build.

    So here's what's brewing for the next alpha version:

    - Macaras
    is continuing his great work on revamping the building's recruitment system, he sent me some files a few weeks ago,
    - Kostic has been fixing some missing models and armours we found in the previous beta build, and that a lot of players kindly reported to us

    That's it for the big changes I received, but there is also a lot of smaller stuff. I'm not sure I'll remember correctly who did what, but here are my changes for now:

    - I modified the purse script to give more money to the AI when a script spawn an army for it: it seems the spawned armies would otherwise be disbanded quickly.
    - I fixed the missing text in diplomacy pannel for factions unsing nordic accent (pointed out by @Berk)
    - price and building times for roads are now the same for cities and castles
    - if you gift a settlement to the AI, the settlement rebels and you take it back from the rebels: you are no longer suffering a reputation malus for taking back the gifted settlement.
    - walls now provide a fixed number of recruitment slots, it is the farms that provide more recruitment spots. This is is now shown in the farms building info, and castle follow the same system as cities
    - nomadic camps give more recruitment slots to cumans, to compensate the fact they can't make high level farms.
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  19. #19

    Default Re: Dev log (Belovèse)

    Great to hear, can't wait for the beta build.

  20. #20
    kostic's Avatar Domesticus
    Join Date
    Jan 2007
    Location
    Near Lyon in France
    Posts
    2,267

    Default Re: Dev log (Belovèse)

    Very good idea that this thread "Dev log (Belovèse)"
    Last edited by kostic; November 02, 2021 at 08:45 AM.

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
  •