Results 1 to 17 of 17

Thread: Rejected/Destroyed Guild Never Offered Again?

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

    Default Rejected/Destroyed Guild Never Offered Again?

    If you reject a guild offer or destroy a guild, will the guild ever be offered again in the same settlement? Does anyone have any evidence of being able to reject/destroy guilds and still have them offered again in the future? I find only a couple of threads in the M2 general discussions naturally devoid of reliable information.

    My Tests

    I have a test guild that requires 100 points for the first tier and a test trigger that adds 300 points when some building X is constructed. When building X finishes, I get the offer for the guild the next turn. If I reject the offer or I accept it and then destroy the guild building, I never get another offer for that guild in that settlement. Doesn't matter how many times I rebuild building X and trip the trigger to add +300 points. I can presumably have an unlimited amount of guild standing points in this settlement but never get the offer again.

    My first thought was that the trigger that adds +300 guild points for building X only fires once (although looking at the triggers in vanilla export_descr_guilds makes it obvious that these triggers don't terminate). So I added another trigger that checks when the next level of building X, let's call it Y, finishes constructing and adds another +300 guild points. This did not change the above results - the guild is never offered again after rejecting or destroying it.

    My next thought was that rejection or destruction somehow sets the guild points to an absurdly negative number so that +300 was not sufficient to make the guild available again. I already commented out the vanilla trigger that subtracts -100 points when a guild is destroyed and despite the claims in other threads on TWC (including the only authoritative guide to guilds), there is no trigger to subtract points for rejecting a guild offer, but I wanted to be sure. So I set up a script to reset the guild points using reset_guild_standing, which (supposedly) sets the points to 0. I build X, I get the guild offer, I reject the guild offer or accept and then destroy, I reset guild standing with my script, I build Y... I still never get another offer to build the guild.

    I tried running many turns to see if I just wasn't waiting long enough but I never get another offer. I made sure I always had enough money for the guild. I made sure there were no other guilds in the settlement. I even tried reducing the points added by the trigger to +110 in case I was seeing some sort of overflow issue. I get other guilds offered in the settlement but after rejecting them they never show up again either. And yet this guy says he gets offered the guild over and over again in the same settlement each turn, which is what I would have expected to happen. On the other hand, this guy says he stopped getting guild offers entirely after rejecting a bunch of them which conforms to my observations as well - after rejecting the offer in one settlement, I can build X in another settlement and will get the guild offer in that settlement on the next turn, but if I reject this offer then I will never get an offer for that guild in any other settlement ever again no matter how many of building X I construct and hence how many guild points I add to these settlements.

    Additional:

    - I tried changing my +300 triggers from 's' (only add to settlement that builds X) to 'a' (add 300 to all owned settlements), upon building X, I got the offer in the settlement that built X even though this settlement didn't have the most guild points (although I can't be absolutely sure how many guild points any settlement really has), I rejected the offer and was never given an offer to for the guild in any other settlement ever again no matter how many more of building X I constructed in any settlement.


    Am I doing something wrong? Is there a config/parameter somewhere I need to change that controls this guild behavior (I don't find anything in descr_campaign_db, descr_settlement_mechanics, or the configs)? It feels like there are actually two guild standing integers: one that we can change with triggers in export_descr_guilds and another one which is hard coded and which gets decremented every time you reject or destroy a guild.

  2. #2
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    EDIT

    Nvm


    I think you may get it offered again, though there might be more to it... will test if I have time
    Last edited by Jadli; December 03, 2021 at 10:40 AM.

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

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    Offered again after rejection, destruction, or both? Have you actually seen it happen?


    I thought it was strange that I got different results using 's' and 'a' in my +300 triggers, so I tried using 'o' which is supposed to only add the points to owned settlements other than the one exported by the trigger. Here is the trigger:

    Code:
    Trigger test_guild_trigger
        WhenToTest BuildingCompleted
        Condition SettlementBuildingFinished = test_building_X
        Guild test_guild o 300
    Weirdly, I still get the test_guild offer in the settlement where I built test_building_X. I don't know what to make of this. The trigger above is the only way the settlement in question could possibly have enough guild standing points on turn 2 to get the guild offer. Maybe if we only specify 'o', the trigger still adds the points to 's' (the settlement exported by the event) in addition to all other settlements, which would mean specifying only 'o' is effectively the same as specifying only 'a'. Indeed, I get the same results as using 'a' - the offer is only given in the settlement exported by the trigger and the guild is never offered again in that settlement or any other after initial rejection.

    I'm starting to think that guilds are just broken in that rejecting/destroying them prevents them from ever being offered again (which was obviously not CA's intention or else why make them rejectable/destroyable). I really hope someone can prove me wrong.

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

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    I did a bit more testing and Fynn checked the guild points integer using Cheat Engine. Here is what we found:

    1) There does not appear to be a limit on the guild standing points a settlement can have. Triggers can keep adding points well in excess of the guild upgrade thresholds. If any cap exists, it's probably determined by the size of the integer used to store the guild points.

    2) You can only get one guild offer per turn. This must be part of the fairly substantial hard coded functions that control guilds. We don't yet know how the offer order is determined if you have multiple settlements with the required number of points - it may be that settlements get 'scheduled' as soon as they reach a threshold or it may be ranked based on number of points each settlement has at each turn start.

    3) If you reject a guild offer, that guild will not be offered in any of your settlements for 11 turns. This 'cool down' period has been confirmed by Jojo to be hard coded (function checks > 10 turns passed since rejection) and is not at all affected by the number of guild points any settlement has. It is not affected by the timescale in descr_strat nor the season transitions in campaign_script. Once the cool down expires, you will start getting guild offers again at your settlements that have enough points, again one offer per turn.

    4) Destroying a guild building does not have a cool down period. There must have been a flaw in my previous tests. If you accept a guild offer and then immediately destroy the building, the guild will be offered again in the same settlement (and/or other settlements) the very next turn assuming the settlement still has enough guild points and the faction has enough money to build the guild.


    Townsaver claims he has been offered the same guild turn after turn in the same settlement. My only guess is that the 11 turn cool down was added to the Kingdoms code as some sort of bug fix by CA to prevent 'spam' if you reject a guild (Townsaver mentions further down that thread that he wasn't using Kingdoms).
    Last edited by Callistonian; December 03, 2021 at 09:53 PM.

  5. #5
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    Oh, these are very interesting findings! Should be added into the guide of guilds for sure https://www.twcenter.net/forums/show...ide-for-Guilds

    Well, I suppose your second post answers all your questions then?... The findings confirm that neither rejecting/destruction forbid the guild from being offered again... I suppose this also explains your issue with o vs s (the settlement could have had many more guild points before this trigger already? Or perhaps what o is supposed to do is simply miunsderstood... Maybe its supposed to add to the settlement, as well as neighboring settlement?) ? BTW, can guild points go negative?

    I think the guilds work fine, but issue is we dont see the actual guild points in respective settlements, so we have been kinda blind grasping here... There are simply too many variables that we cant see, and im sure some of them could explain the cases when it was not offered (soon enough) and so on... As you say, there can be only one offer per turn (samely like with adoptions, etc), so there is some system of scheduling the guilds, likely based on which settlements have the highest points for a guild... plus, you lose/gain points for various kind of stuff... there are other guilds trying to get offered as well, maybe there is also some kind of overral relation a guild have to respective factions.... did the players actually have a free guild spot?... Also perhaps, if a modder starts modifiyng the triggers, it quite easily happen that the way triggers are adjusted causes them to grow really pretty fast in settlements (there is probably a good reason, why the vanilla guild triggers have normalization). Then the scheduling list could get very long... etc...

    if Fynn or jojo could make a tool, that would show the guild points in each settlement, that would be great. Not just for testing (eventhough that would help tremendously with testing all of this, especially the triggers), but simply as another interesting mechanics to the game, that the players would surely enjoy to be able to see.
    Last edited by Jadli; December 05, 2021 at 03:20 AM.

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

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    I actually can't get 'a' or 'o' to work at all, at least with triggers using events that export settlement. The points only ever get added to the settlement exported by the event. Here's an example trigger I tried:

    Code:
    Trigger test_trigger
    WhenToTest SettlementSelected
    Condition FactionType sicily
    Guild test_guild s 0
    Guild test_guild o 300
    Looking at this, we would expect the selected settlement to get 0 points and all other settlements to get 300, but what happens is that only the selected settlement gets the 300 (which I confirm with Cheat Engine). According to Jojo, 'a' and 'o' show up in the game code but 's' does not which means you could put 'banana' or anything else there and get the same result. I'm not sure that 'a' and 'o' work either.

    The guild standing points are stored using a 32-bit signed integer. Jojo confirms that there is code that checks negative values (<= -1). The limit for guild points is therefore 2,147,483,647 and beyond this you get negative values. Negative values do work and the code checks for this - you won't get any offers for negative values even if you set the thresholds in EDG to negative values.

    As far as the offer order, another and possibly the mostly likely explanation is that the game is just going by whichever settlement has the lowest index (all settlements are indexed 0 through however many settlements you have).
    Last edited by Callistonian; December 06, 2021 at 04:19 PM.

  7. #7
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    Whaaat.... Well, thats definitely an issue

    So "s" doesnt actually do anything, "o" is apparently doing what "s" is supposed to be doing and "a" is doing the same as "o"?

    Perhaps to last question to save this, what happens with the events that are tied to a specific settlement, but are faction wide, such as when a faction leader has some trait, or a war is declared, and its supposed to add something to all settlements? Isnt it perhaps possible, that "o" and "a" works correctly only whensuitable events are exported? I.e., the ones exporting a settlement vs the ones exporting a faction?

    Well, at least we confirmed the negative values. I wonder whether a faction can receive guild missions when the guild points are negative (especially when used with guild score modifired, as that must deepen it even further)...

    Region index, well, I suppose that wouldnt be surprising.. the game is much less random than it tries to look like

    (Sorry for late answer, was kinda busy with being infected by covid ... though now I have 14 days quarantine, so a lot of time for modding )

  8. #8

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    Its not that 's' doesn't do anything, its just that the game (as far as i understand it) doesn't care what letter(or word can't remember rightnow) you put instead of the s as long as its not 'o' or 'a'

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

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    There are a lot of vanilla guild triggers using events that don't export settlement. If I recall correctly, they all use 'a' whereas the triggers with events that do export settlement use only 's' or 's' & 'o'.

    I tried testing a few of the vanilla 'a' triggers while monitoring the guild points in Cheat Engine - no change. I tried using 'o' - no change. Triggers with events that export settlement add the points to the exported settlement but no other settlements get any points no matter what you put for 'a' and 'o' in the trigger effects.

    My test approach might be naive in some way, we need Jojo to confirm. But it seems to me that 's', 'a', 'o' don't do anything at all and only triggers that export settlement do anything.


    Edit: I put 'banana' instead of 's' in a trigger that exports settlement and I still got the guild points and the offer the next turn.
    Last edited by Callistonian; December 11, 2021 at 11:09 PM.

  10. #10
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    Well, this is super weird.... I think we must be missing something here, would find it kind of hard to believe that the whole system is bugged the way you say... that would definitely make it the greatest vanilla bug of all .

    Well, a few last other theories then:

    - "o" and "a" work properly only with vanilla guilds? (might not be that surprising, considering lot of effects are hardcoded like that, such as the port buildings, etc). We should try testing this with vanilla guilds in bare geomod or somth.... Also, I have to ask, is your test_guild a usual guild? I.e., does it have 3 levels with m_ and g_m prefixes? Maybe show all your entries for this guild just to be sure?

    - Perhaps the guild points from non settlements triggers are some kind of a different kind of guild points? Or simply that the cheat engine somehow doesnt see them? Perhaps they are also added later in a turn, gradually, or something (could be case for "o" and "a" in settlement triggers as well I guess).... One way or other, we can test this easily. Lets use only one non settlement trigger with "a", and see if we ever get a guild offer.

    (- Also, I assume guild points are added even when the settlement doesnt fullfil the requirements, yes? Such as that it has high enough settlement level?)

    Otherwise I suppose there is not much else that could explain this other than that its simply bugged....

    (still, the guilds can work kind of fine with giving points only to local settlement, but would require lot of rework to scripts to make it work the way we want... maybe some counters to support non settlement events in settlement events )
    Last edited by Jadli; December 12, 2021 at 02:52 AM.

  11. #11
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    Yep, I have tested a non settlement trigger with "a" in bare geomod

    Code:
    ;------------------------------------------
    Trigger 0101_High_Income1
        WhenToTest FactionTurnStart
    
    
        Condition FactionIncome > 1
    
    
        Guild all a  100
    And I got an offer on third turn.

    So I suppose it must be some of the issues I wrote in the previous post...

    I will test the other things your reported in bare_geomod

  12. #12
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    Well, I contradict more of your results (but in accordance with jojos findings)

    In vanilla/bare geomod if I use settlemenet event

    Code:
    ;------------------------------------------
    Trigger 0028_Build_Town_Watch
        WhenToTest BuildingCompleted
    
    
        Condition SettlementBuildingFinished = town_watch
    
    
        Guild all o 150  ; in other test switched to a
    "o" indeed works as you said. Only the target settlement receivies the offer, and no other settlements do (in the following turns)

    However, if I use "a", all settlements get the offer (though the target settlements was first, but thats secondary I guess)

    Will play a bit more with it and then test it in my mod, whether it works properly as well with non vanilla guilds

    Also, "s" and "o" dont do anything when used with a non settlement event

    EDIT

    Therefore it appears that everything works as it should, except the fact that "s" doent exist, and "o" does what "s" is supposed to be doing (we can get the effect of what "o" was supposed to be doing by combing negative "o" or "s" with "a" I guess)
    Last edited by Jadli; December 12, 2021 at 03:42 AM.

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

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    I've actually been using merchants_guild just in case there was a hard coded name issue, but I was trying to be too pure and using vanilla test triggers as well and there were conditions that weren't satisfied. Simplifying things even more I finally did get 'a' to work as expected using a FactionTurnStart trigger. I also tried ScrollOpened (which doesn't export faction) and no points were added anywhere, so to use 'a' your event needs to export faction (which most events do). Here are some results:

    Code:
    Trigger TestTrigger
    WhenToTest SettlementSelected
    Condition FactionType sicily
        Guild merchants_guild a 5
        Guild merchants_guild s 13
    Does exactly what you'd expect: adds 18 points to the selected settlement and 5 to all others. Again, 's' can be replaced with 'banana' and you get the same result.

    Code:
    Trigger TestTrigger
    WhenToTest SettlementSelected
    Condition FactionType sicily
        Guild merchants_guild o 5
        Guild merchants_guild s 13
    Here we expect that 13 points go to the selected settlement and 5 points to all other settlements. But what happens is that 18 points go to the selected settlement and no points go to the others. I tried flipping the effects and this didn't change the result. Again, replacing 's' with 'banan' gives the same result.

    Code:
    Trigger TestTrigger
    WhenToTest SettlementSelected
    Condition FactionType sicily
        Guild merchants_guild o 18
    This is basically repeating my test from post #6 with the same result: all 18 points added only to the selected settlement and no others. It's clear that 'o' works the way 's' is supposed to work according to the comments in the vanilla EDG.

    Code:
    Trigger TestTrigger
    WhenToTest FactionTurnStart
    Condition FactionType sicily
        and I_TurnNumber > 0
        Guild merchants_guild o 100
    This adds no points to any settlement. Replacing 'o' with 'a' here adds 100 points to all of the faction's settlements and the guild is offered the next turn. It must be that 'o' requires settlement to be exported by the event.

    Summary: 'a' works as advertised, 'o' does what 's' is supposed to do according to CA's comments, and 's' isn't recognized and can be replaced with anything and give the same result. In order for 'a' to work, the trigger event must export faction. In order for 'o' and 'banana' to work, the trigger must export settlement.

    Quote Originally Posted by Jadli
    (- Also, I assume guild points are added even when the settlement doesnt fullfil the requirements, yes? Such as that it has high enough settlement level?)
    Guild points are only added by triggers as far as I'm aware.

    If 'a' had been bugged, someone might have noticed that, but it doesn't surprise me that 'o' is bugged and nobody ever noticed since the points are invisible and the values added by 'o' in vanilla triggers are typically very small compared to the values added by 's' in the settlement triggers.

  14. #14
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    Well, now I also tested this in my mod (with completely reworked guilds) and I confirm these results of mine above. You must have done something wrong in your tests in regards to "a" Callistonian... maybe using Cheat Engine also isnt the best, as it kinda breaks the game?

    I also confirmed in my test that we can get the intended result of "o" ( all settlements but the exported settlements) by combing "o" (or "s") with "a" (for example deducing points via "o", and adding points by "a")

    And also, when more guilds have the same amount of points and are eligible to be offered, the one thats closer to the top in export_descr_guilds will be offered.

    Anyway, so I suppose the conclusion is that:

    When using events exporting settlements:
    -"o" adds points the local settlement. Whatever else you write there (such as "s") also adds points the local settlements
    -"a" adds points to all the settlements within a faction

    When using events exporting factions:
    - Neither "o", "s" or anything adds any points
    - "a" adds points to all the settlements within a faction

    I guess I will add this and the other new info to the guide of guilds...


    EDIT
    didnt see your post

    Indeed, not a huge difference between "o" and "s" in most of original triggers.
    Last edited by Jadli; December 12, 2021 at 04:52 AM.

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

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    Exporting settlement, character, and faction aren't mutually exclusive. Most events that export settlement or character also export faction, so basically any event you could use in EDG will work for 'a' unless you pick something silly like ScrollOpened or EventCounter or etc. that don't export faction.
    Last edited by Callistonian; December 12, 2021 at 04:55 AM.

  16. #16
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    Cool, testing each of them would be pretty boring
    Last edited by Jadli; December 12, 2021 at 05:02 AM.

  17. #17
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: Rejected/Destroyed Guild Never Offered Again?

    Did anyone check error log for wrong triggers info?

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

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
  •