Results 1 to 4 of 4

Thread: "Best Friends Forever" AI Code

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: "Best Friends Forever" AI Code

    I am no modder by any stretch of the imagination. So please take this with a pinch of salt - I could be completely wrong.

    What seems to be a good idea if you intend to make such code work, is to play a bit with the variables (both in coding, as well as in game - e.g. have relationships with more factions). Once you get different results, it is easier to track down when a change has kicked in, and how the game actually uses these triggers. What happens when you start a game as the Seleukids or Ptolemaoi, and particularly with regards to the relationship between those two powerhouses?

    From what I can gather from the MT2W documentation FactionScorePercent compares the score against the leading faction (likely to be Seleukids or Ptollies in the beginning). While FactionScoreRank, tests the faction score ranking with respect to other discovered and alive factions. From my reading, once Ptollies get their turn, the trigger is checked, but because they will have a "FactionScorePercent" that is way above the threshold, they would not get anything. The same is not true of Pontos. In the case of Pontos it is certainly not that hard to know more than 5 other factions (and given the difficult position of Pontos, that most likely means 5 factions that are stronger than Pontos). Since none of the factions is excluded via FactionStanding, this applies to all factions.

    So it seems that every time the turn starts for Pontos, the 1.0 / 10 kicks in, and thus you get 0.10 improvement in relationships, irrespective of the size of the other faction. So what seems to be missing is a variable that excludes the biggest factions from getting this relationship boost. You want to do that dynamically, rather than use a blunt tool to exclude the Seleukids and the Ptollies.

    As said, I could be completely wrong here.

  2. #2
    EBII Council Senior Member Kull's Avatar
    Join Date
    Jan 2003
    Location
    El Paso, TX
    Posts
    13,502

    Default Re: "Best Friends Forever" AI Code

    The takeaway is we have TONS of AI code that does many different things. The problem was that those three pieces of code (less than 1% of the total) overwhelmed all the rest of it.
    "Numidia Delenda Est!"

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO