How to build a system?

so I've been playing around with serverside curing and I'm really happy that the administration added this into the game. I was wondering how I might be able to start augmenting the system with my own and was wondering if anyone had a framework or rough blueprint of how to go about this. What should be the first to do? I assume managing afflictions which I've heard you can do with gmcp. I read a guide on gmcp and it seems pretty doable though how would I track stackable afflictions? Normal afflictions I would assume would just be checking gmcp.char.afflictions.add and setting the affliction to true within a table though something like tendons or humors seem troublesome. Even things like blackout and stun(I don't think these are in gmcp?) How would I go about tracking them?

Comments

  • As for gaining stacked afflictions, gmcp will send a remove event for the existing count, and add the new one. If you were moving up from torntendons (1) to torntendons (2), for example, gmcp.Char.Afflictions.Remove will fire on torntendons (1), and gmcp.Char.Afflictions.Add will fire on torntendons (2), successively.

    I've heard people have had problems with gmcp in blackout in the past, but I've also heard people mention that there have been fixes. I haven't tested it much myself, but I do know that a diagnose after blackout will fix any tracking problems you've had under blackout (gmcp.Char.Afflictions.List being fired on diagnose, with a full list of your afflictions.)

    Stun can't be tracked with gmcp afaik 😥

  • ArchaeonArchaeon Ur mums house lol

     for aff, count in rex.gmatch(gmcp.Char.Afflictions.Add.name, [[(\w+)(?:\s\((\d+)\))?]]) do

  • @Romaen So for stacking afflictions I don't really need to do much differently, it seems? If the "new" stack is given last then I can just use that information instead of the remove.


    @Archaeon could you explain a bit?

  • Yeah, I don't do anything different for stacking afflictions. As long as your gmcp.Char.Afflictions.Add, Remove, and List functions are set up correctly, you shouldn't have any problems.

  • Stun can just be ignored as an affliction in most cases. See it as a big lag spike.

  • edited March 2021

    I think what Archaeon is attempting to describe is that in your capture you should have two variables, one that will capture the affliction name and one that will capture the affliction level (or count, stack, whatever you want to call it). So in his code example, aff is being set to (\w+), or in other words the affliction name and count is being set to (\d+) , the affliction level. Thus giving you two variables that you can utilize in the affliction tracking.

    How you get to that point will depend, but the end result might perform a check such as,

    // Pseudo Code
    if args.gmcp_method == "Char.Afflictions.Add"
        for aff, count in rex.gmatch(args.gmcp_args.name, [[(\w+)(?:\s\((\d+)\))?]]) do
            if aff == 'pressure'
                if count >= 4
                    send command CURING PRIOAFF aff
    

    That code does not look great but hopefully it gets the point across.

  • ArchaeonArchaeon Ur mums house lol

    yeah that

  • I've managed to get my defences/affliction tracking to work for the most part!


    I do have a few questions now though! How would I go about replacing my default prompt with a custom prompt that I could edit/change client side?


    Also, to relieve future headaches while making my system, what is the best way to go about anti-illusion? I've been tracking my balances(sip, smoke, etc) with the cure line and the message you get upon recovery but couldn't this just be illusion'd to throw off my entire curing system?

  • Why do you need to track your own curing balances, if you're using serverside?

    As for anti-illusion, you'll likely have to experiment with trial and error. I'd imagine that kinda information isn't something people will readily give away since it's one of the few ways illusions can still actually be useful vs non-manual players.

    Disappearing from Achaea for now. See you, space cowboy.


    smileyface#8048 if you wanna chat.

  • @Saonji I thought it might help me in the long run when deciding whether to prio swap things. For example, if I have x, y and b, and off a balance then do etc.

    I might be overthinking this though..

  • edited April 2021

    Curing balances are really important to track for prio swap logic - particulary focus, tree, and class actives, but also sometimes herb/salve as well.

    Would be kinda cool if there was a prompt string for it, like prompt defences. Tracking it by normal usage / balance recovery lines is a big anti-illusion challenge that makes it pretty impractical to use for newer players. It's kind of like old sileris tricks where you can get people to permanently think they're off Fitness or tree balance which can screw up their prio swaps and active cure logic.

  • edited April 2021

    @Darzo If you're insistent on tracking them, getEpoch() would serve well enough to deter things like that.

    --You eat something.
    lastEat = getEpoch()
    sys.bals.herb = false
    if sys.timers.herbTimer then killTimer(sys.timers.herbTimer) end
    sys.timers.herbTimer = tempTimer(1.65, [[ sys.bals.herb = true; sys.timers.herbTimer = nil ]])
    --slightly higher than herb bal to account for any lag issues.
    
    
    --You can eat another thing.
    if lastEat and ( getEpoch() - lastEat \>= 1.5) then
      --This is saying 'if we ate something and it was at least 1.5 seconds ago' basically.
      --Again, we're accounting for some lag in our timer.
      lastEat = nil
      sys.bals.herb = true
      if sys.timers.herbTimer then killTimer(sys.timers.herbTimer) end
    end
    

    It would function similarly for other bals as well, just change the 1.65 and the 1.5 to match the bals you're tracking. People don't really tend to illusion stuff like that anymore though, so yeah.

    eta: Ignore the \ on the if lastEat line. Had to put it there so stupid forums wouldn't jump me into a quote box.

    Disappearing from Achaea for now. See you, space cowboy.


    smileyface#8048 if you wanna chat.

Sign In or Register to comment.