• Visit Rebornbuddy
  • Accessing the actual Roulette rule in play from ActiveRules

    Discussion in 'Community Developer Forum' started by hkme, Sep 17, 2017.

    1. hkme

      hkme Member

      Joined:
      May 12, 2014
      Messages:
      197
      Likes Received:
      0
      Trophy Points:
      16
      Hi, I've been rewriting my own version of Triple Triad botbase,
      problem i encountered is when the game has Roulette rule, the RemoteAgents.AgentTripleTriad.Instance.ActiveRules always returns TripleTriadRule.Roulette, which on actual triple triad table it is replaced by a random rule in play, however I have no idea how to access the actual rule in play

      this is probably one of the lowest priority mastahg cares about, just make a post so if anyone search the forum or come up with a way to access the actual Roulette rule in play please reply and let me know

      EDIT: I've already found how to read the actual Rule in play since 4.2, if anyone came across this thread finding for an answer try pm me. It's a 4 byte array from a pointer of pointer of pointer of pointer of pointer of pointer, I am not sure if it's a correct way but at least it works on my machine. Not posting actual code here coz every time game patches it'll need update.
       
      Last edited: Jun 1, 2018
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Is there an npc that has that rule always?
       
    3. hkme

      hkme Member

      Joined:
      May 12, 2014
      Messages:
      197
      Likes Received:
      0
      Trophy Points:
      16
      Yes, for example, Rowena in Mor Dhona (after you completed her sidequest "The Weaponsmith of Legend")
      ZoneId="156" XYZ="25.89143, 29, -823.0742"
       
    4. Ilyatk

      Ilyatk New Member

      Joined:
      Aug 20, 2019
      Messages:
      10
      Likes Received:
      5
      Trophy Points:
      3
      Actual rules can be found here:
      Code:
      Core.Memory.ReadArray<TripleTriadRule>(AgentTripleTriad.Instance.Pointer + 0x34, 4);
      There's hotfix for TripleTriHard.cs in attach file.
       

      Attached Files:

    5. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Hrm, looks like that might just be a better offset to read the rules from in the first place. Thanks for this.
       
    6. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      After doing a bit more digging it looks like 0x34 only gets updated once your actually in the card game. I think ill add some logic to the activerules read that masks this so you get the correct rules.
       

    Share This Page