Results 1 to 13 of 13

Thread: fs and gs invasion priority modifiers

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default fs and gs invasion priority modifiers

    Here they are in campaign_ai_db:

    Code:
    		<invade_priority_fs_modifier float="0.0"/>           // modifies the final invade priority for new faction targets by += (faction_standing * modifier) {makes factions more likely to start war with disliked targets}
    		<invade_priority_gs_modifier float="0.0"/>              // modifies the final invade priority for new faction targets by += (global_standing * modifier) {makes factions more likely to start war with untrustworthy targets}
    The included explanations are so ambiguous that they're nonsense. A modifier is not simply a boost to something so it doesn't make sense that the setting 'makes factions more likely' any more than it would make them less likely.

    I have a strong hunch what they actually mean, but I haven't tested. So for example a higher number like 2.0 should double a faction's faction_standing rating. If they were -0.6 they would become -1.0, but if they were 0.6 they would become 1.0. I hypothesise that it emphasises the effect, in one direction and the other, so we cannot just make friends less likely to attack without making enemies more likely.

    I actually posted this as a question in the first place, but as I thought about how to phrase it the answer seemed to appear. What still isn't clear to me though is what influence fs and gs have on invasion priorities in the first place.
    Last edited by Taiji; April 06, 2010 at 05:33 PM.

  2. #2
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: fs and gs invasion priority modifiers

    Doesn't it seem fairly straight forward? FS and GS are faction_standing and global_standing. If you have an invade value towards faction X of, say, 50, these modifiers will alter whether you will proceed to actually invade it. Normally these modifiers act as multipliers (e.g. a value of 2.0 would produce invade value of 10); however here it says the value is modified as +=, which in computer-speak means that it will be additive (not 5x2 but 5+2).

    The actual modifier value which you add to 50 will be (faction_standing * modifier). So if the faction is at 100 standing with you, and the modifier is 2, the final value added to the 'invade value' will be 200. I suppose this means that if a faction is very friendly with you, you will be more likely to invade it. This doesn't make sense, so you should probably make that modifier negative, so -2, in which case multiplying by the faction_standing would make -200, which, added to the 'invade value' would subtract from it, and make you less likely to invade this ally of yours.

    Thus an invade_priority_fs_modifier of -2.0 would make you much less likely to invade faction X, subtracting as much as 200 points from your 'invade decision' if this faction's standing to you is at 100.
    Last edited by SigniferOne; April 07, 2010 at 12:56 AM.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  3. #3
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: fs and gs invasion priority modifiers

    Hiya SO, yes it does seem straightforward... but not to anyone else it seems

    OK, so firstly, I am suggesting that Vanilla and every mod has the wrong settings here. Vanilla, DLV, TA:TW, etc. appear to be treating a modifier as an offset. Unless I am being unusually stupid, I've again stumbled on an area neglected by CA and at least a large swathe of the modding community.

    Secondly, faction standing max = 1.0 (love them), min = -1.0(hate them) ... So you'll find no faction at 100 standing with you.

    Thirdly ... lol I don't like these lists ... but anyway I have a good idea of what the modifier is modifying. I'll be shocked if I'm wrong.

    These settings are refered to as global modifiers which means that somewhere else we'll find more specific settings that this setting will modify. So then it's obvious to me that the settings this implies are in the same file - invasion decisions dealt with elsewhere? I don't think so. Any measurement of faction or global standing in the file will be modified by these modifiers.

    Just to make it clear how wrong vanilla and, by extension, everyone else is:

    <invade_priority_gs_modifier float="-200.0f"/>

    I think that's a vanilla setting, I see it in DLV and TA:TW. I suspect that it is so stupidly broken by CA that it has until now confused modders.

    Now look at what my understanding generates:

    <invade_priority_gs_modifier float="1.0"/>

    Note the lack of a letter which probably would have broken it, and which in turn should mean a default is used in vanilla (hopefully that default was 1 anyway).

    So then what should one expect if using this setting? Basically this would allow your ai_db to process global standing based decisions as written. 1.1 would increase a faction's global standing by 10% when dealt with by the ai_db. Obviously if the standing is a minus number like -0.6 then 1.1 would make it -0.66, so in that case the modifier has made it appear that those you do not like are even more invade-worthy. The same modifier but applied to someone we like, at say 0.6, would give us 0.66 - which means we like them even more for the sake of invasion decisions. And so we are less likely to invade them, assuming our ai_db is set up to invade those we don't like.

    I'd like to see it tested more thoroughly, but so far I am pretty certain of my discovery.

    Like I mentioned before, a broken setting which doesn't generate an error is likely to be using a default, and with a modifier like this it's likely that default was 1. Testing for effects of settings would have to be done using an ai_db that actually uses fs and gs in invade decisions, because if I am right then only those decision will be affected.

    That's if I am right.



    BTW, as a humorous side-note, I found a setting which measures how much the player likes the AI!!!

    Unfortunately I don't think it actually requires setting up electrodes inserted into the brain...
    Last edited by Taiji; April 07, 2010 at 07:11 AM.

  4. #4
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: fs and gs invasion priority modifiers

    Quote Originally Posted by Taiji View Post
    So then what should one expect if using this setting? Basically this would allow your ai_db to process global standing based decisions as written. 1.1 would increase a faction's global standing by 10% when dealt with by the ai_db. Obviously if the standing is a minus number like -0.6 then 1.1 would make it -0.66, so in that case the modifier has made it appear that those you do not like are even more invade-worthy. The same modifier but applied to someone we like, at say 0.6, would give us 0.66 - which means we like them even more for the sake of invasion decisions. And so we are less likely to invade them, assuming our ai_db is set up to invade those we don't like.
    Unfortunately you got it reversed, which is why I had the negative number in my previous post. Whatever value you get from multiplying faction_standing by modifier then gets ADDED to the 'invade value'. Let's assume that the modifier is 1.1. If your invade value is 5, and the faction X has 0.6 (friendly) standing towards you, the total modifier would be 0.66. Thich then would get added to the invade-value of 5 and give us the final invade-value of 5.66, meaning that you would be more likely to invade the faction if it was friendly to you.

    That is why it's paramount to make that value negative. This inverts the faction_standings of your target factions, so that factions with more friendliness towards you (positive faction_standing) would subtract from the invade value, whereas factions with negative standing towards you would add to the invade value. That is why vanilla is at negative.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  5. #5
    irishron's Avatar Cura Palatii
    Moderator Emeritus

    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: fs and gs invasion priority modifiers

    You set your error log to follow the ai, you will see everyone of those triggered for every faction. Do you really want to know what your neibors think of you?

  6. #6
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: fs and gs invasion priority modifiers

    If I wanted to know 'my standing with another faction' why wouldn't I just open the diplomacy scroll? ...

    I appreciate the hint that AI logging may have some more clues. But I have a hypothesis and it should be straightforward to test.

    If there is some other point to your post then I don't get it, sorry.
    Last edited by Taiji; April 07, 2010 at 08:59 AM.

  7. #7
    irishron's Avatar Cura Palatii
    Moderator Emeritus

    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: fs and gs invasion priority modifiers

    Okay, a little exlanation of sticking my nose in here this way.

    I stole the ai following line for the error log from Augustus Lucifer because I was coming up with strange ctds in my mod that were ai related and needed a way to log them

    When I was going through the log, I could see the ai faction check each faction in turn of whether it was ally, enemy, crusade, jihad, etc., whether next door or the other side of the map. I could also see the invasion thinking of the ai of reachable points and even sea invasion. The invasion points are all in coordinates so you would have to check those manually.

    To me, the ts and gs do influence these and the reason for bringing it up.

    Now if ithis is off topic, sorry and delete it.

  8. #8
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: fs and gs invasion priority modifiers

    My hypothesis assumes that the effects of GS and FS on invasion decisions are defined by the ai_db. If there are no decisions that use GS and FS defined by the modder then the modded ai_db, and it's invasion decisions, will ignore FS and GS.

    A modifier can only work if there is 'something' to modify, and in this case that 'something' is comes in the form of decisions including GS or FS in the ai_db.

    I think your comments aren't offtopic and your input is appreciated, thankyou
    Last edited by Taiji; April 07, 2010 at 09:09 AM.

  9. #9
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: fs and gs invasion priority modifiers

    What is this 'invade value' you refer to? Do you mean the invasion priority?

    And no a modifier does not get 'added', it gets applied. You must be thinking of an offset, which this isn't unless the programmer mislabelled it. I have no example of mislabelling of commands by the programmers. So I think the crap in vanilla (and there is a lot of it) has been done by the coders, who didn't, or couldn't, consult thoroughly enough with the programmmers to understand the commands.

    If the value was a negative, I'm saying you'd break it. A negative modifier in this sense is correctly represented by anything less than 1.0 (that isn't a minus number), just like a positive is anything in excess of 1.0.

    edit:

    To help clarify it for you:

    <invade_priority_fs_modifier float="1.0"/>
    <invade_priority_gs_modifier float="0.5"/>
    <invade_priority_assistance_offset int="1000"/>

    The last setting is actually an offset, it will behave the way you are describing. Although I'd wonder about using a minus value because it's not feasible that upon asking for assistance and then being promised it, we would actually want to receive the opposite - a reduced invasion priority. So perhaps that unneeded flexibilty has been omitted. Or perhaps we could rename it, having inserted a -n, to make a diplomatic option that prevents the AI from attacking a certain faction.

    In contrast note that I have halved the global standing of all factions with regard to the decisions defined in ai_db. Of course that is true only if my hypothesis is correct. And if so then the relevance of it is defined by the GS values used to make decisions in the ai_db, if any actually refer to GS at all.

    edit:

    BTW vanilla is not just a negative value, it has a letter in it. There is no conceivable way that it works. It's just another CA-made mess.
    Last edited by Taiji; April 07, 2010 at 01:48 PM.

  10. #10
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: fs and gs invasion priority modifiers

    Quote Originally Posted by Taiji View Post
    What is this 'invade value' you refer to? Do you mean the invasion priority?
    Yeah.


    And no a modifier does not get 'added', it gets applied.

    A negative modifier in this sense is correctly represented by anything less than 1.0 (that isn't a minus number), just like a positive is anything in excess of 1.0.
    The only way what you say would be true is if the modifier was multiplied upon the invade priority. I say that it is added, and the reason I say that is the following from the quotes which I contend you that you've completely missed:

    Code:
    <invade_priority_fs_modifier float="0.0"/>
    // modifies the final invade priority for new faction targets by += (faction_standing * modifier) {makes factions more likely to start war with disliked targets}
    <invade_priority_gs_modifier float="0.0"/>
    // modifies the final invade priority for new faction targets by += (global_standing * modifier) {makes factions more likely to start war with untrustworthy targets}
    I repeat what += means in computer-speak: it means to ADD the two values together.


    Quote Originally Posted by Taiji View Post
    BTW vanilla is not just a negative value, it has a letter in it. There is no conceivable way that it works. It's just another CA-made mess.
    This is another example of computer-speak. In computer-speak it is perfectly valid to specify some numbers as, e.g. 2.114f in certain contexts, because 2.114 is a floating-point integer.

    Find the purple text here: http://webcache.googleusercontent.co...&ct=clnk&gl=us

    or here:
    http://webcache.googleusercontent.co...&ct=clnk&gl=us
    Last edited by SigniferOne; April 07, 2010 at 06:23 PM.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  11. #11
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: fs and gs invasion priority modifiers

    Great points, and it explains the letter. Also '+=', I didn't know that, thankyou

    So then, any idea why one has an f and the other not? Please, forgive my ignorance

    And BTW your interpretation seems much better than mine, it makes even more sense to me now
    Last edited by Taiji; April 08, 2010 at 12:38 PM.

  12. #12
    Gorrrrrn's Avatar Citizen
    Join Date
    Jan 2007
    Location
    here
    Posts
    5,546

    Default Re: fs and gs invasion priority modifiers

    apologies for digging this thread up.

    From searching around the interwebs I've only found constant float representation (using the 0.02f format) of numbers in languages such as C / C ++

    I've checked the documentation regarding .xml datatypes, numerical expressions and can't find anything that allows the use of f as in a constant float.

    the line is already defined as floating point - why duplicate that in the numerical field?

    some documentation on .xml numerical data types:

    http://www.w3.org/TR/xmlschema-2/

    http://docstore.mik.ua/orelly/xml/schema/ch04_04.htm
    Last edited by Gorrrrrn; November 23, 2010 at 06:09 PM.

  13. #13
    Gorrrrrn's Avatar Citizen
    Join Date
    Jan 2007
    Location
    here
    Posts
    5,546

    Default Re: fs and gs invasion priority modifiers

    a little empirical testing.

    here's all the global standing entries for england during some of the turns 1 - 15 using the <invade_priority_gs_modifier float="-200.0f"/>
    Attachment 122899

    and here's all the entries for similar turns using <invade_priority_gs_modifier float="-200.0"/>
    Attachment 122900

    I'll let those who know what the numbers mean decide which is the better set of values for global standing.
    ------------
    and here are the corresponding invade_priority lines:
    <invade_priority_gs_modifier float="-200.0f"/>
    Attachment 122957

    and the entries for:
    <invade_priority_gs_modifier float="-200.0"/>
    Attachment 122958
    Last edited by Gorrrrrn; November 24, 2010 at 06:48 AM.

Posting Permissions

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