Page 10 of 10 FirstFirst ... 8910
Results 226 to 239 of 239

Thread: Randoms Development

  1. #226
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    Quote Originally Posted by hoodz View Post
    I can put them in the include of my tutorial.
    My version is the same as the github version (i think that is what you search) but it has a some extra reflection functions and al_include. The smartparams file works with the latest version of smart too.
    Is that version linked with the github version? It's not a good idea to have all of these things fragmented.... Speaking of which I would think the reflection I clues should also be setup on the srl git. This way whenever the devs finally get included with simba srl update there won't be any fragmentation.

    If everyone uses a certain function... Like some of flights stuff, why wouldn't we just add to the official git?


    Sending a pull request isn't very difficult - idk if we have tutorials here on it but it should be an easy google search I believe. If not you can just send me changes and I'll put them up there

  2. #227
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Finished some fixes to the frog random, I'll update the post to include this new version. Credits to Flight for the conversation-handling (adapted from Frog_Solve2) and the frog dtm. Frog-finding is the only thing that uses a back-up because the bmp-finding and dtm-finding aren't working very well for the crown. I re-worked the Frog_WalkCenter method because dtm-finding no longer works on the minimap. Added compass handling. Ran it through a few times to make sure everything worked. You can make the edits Flight recommends to FindTalk; (which handle frogs before you enter the cave) and they will not clash with Frog_Solve. Frog_Solve2 method included does not use cave-walking.
    I've been making a few more edits to the strangebox random to try and get a more constant solve rate.. I haven't altered the shape settings, just added some score requirements.. I don't really like the scanrotateobject methods because they appear to cause a lot of lag, but I don't have any new solutions..
    The mordaut random was too much atm.. I improved small object finding a little bit and then got stuck on the big item puzzle because nothing was getting recognised and when I set the accuracy lower, nearly everything was incorrect. Much respect for Coh3n & DemiseScythe who created the original solver, most item info will likely need to be re-calibrated.

  3. #228
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    Quote Originally Posted by Krazy_Meerkat View Post
    Finished some fixes to the frog random, I'll update the post to include this new version. Credits to Flight for the conversation-handling (adapted from Frog_Solve2) and the frog dtm. Frog-finding is the only thing that uses a back-up because the bmp-finding and dtm-finding aren't working very well for the crown. I re-worked the Frog_WalkCenter method because dtm-finding no longer works on the minimap. Added compass handling. Ran it through a few times to make sure everything worked. You can make the edits Flight recommends to FindTalk; (which handle frogs before you enter the cave) and they will not clash with Frog_Solve. Frog_Solve2 method included does not use cave-walking.
    I've been making a few more edits to the strangebox random to try and get a more constant solve rate.. I haven't altered the shape settings, just added some score requirements.. I don't really like the scanrotateobject methods because they appear to cause a lot of lag, but I don't have any new solutions..
    The mordaut random was too much atm.. I improved small object finding a little bit and then got stuck on the big item puzzle because nothing was getting recognised and when I set the accuracy lower, nearly everything was incorrect. Much respect for Coh3n & DemiseScythe who created the original solver, most item info will likely need to be re-calibrated.
    Yeah some of those spinning objects/changing color randoms are a huge pain with color. Might also be worth looking into reflection solutions for them.

  4. #229
    Join Date
    Mar 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Yes very good

  5. #230
    Join Date
    Apr 2013
    Posts
    395
    Mentioned
    1 Post(s)
    Quoted
    177 Post(s)

    Default

    Been more than half a year since anyone posted here, hope I don't get flame for gravedigging.

    For some reasons, FindNonInvetoryRandoms will still go back to clicking the inventory tab, can't find which part of antirandoms include is doing that. I've done some changes in Pillory's color and colorcount, working perfectly fine now. I found a way to differentiate the frogs in frog random, now I'm testing on solving the frog random when it is found, instead of solving it in the cave.

    Not sure if this was a typo or it was done intentionally...

  6. #231
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Quote Originally Posted by Haxz View Post
    Been more than half a year since anyone posted here, hope I don't get flame for gravedigging.

    For some reasons, FindNonInvetoryRandoms will still go back to clicking the inventory tab, can't find which part of antirandoms include is doing that. I've done some changes in Pillory's color and colorcount, working perfectly fine now. I found a way to differentiate the frogs in frog random, now I'm testing on solving the frog random when it is found, instead of solving it in the cave.

    Not sure if this was a typo or it was done intentionally...
    If you're using reflection, there is a boolean R_InventoryRandoms which controls it, but the Rewards() solver is the one which causes the problem (searching for the lamp etc.).
    Last edited by Krazy_Meerkat; 07-01-2014 at 07:47 AM.

  7. #232
    Join Date
    Feb 2012
    Location
    UK
    Posts
    909
    Mentioned
    10 Post(s)
    Quoted
    191 Post(s)

    Default

    Quote Originally Posted by Krazy_Meerkat View Post
    If you're using reflection, there is a boolean R_InventoryRandoms which controls it, but the Rewards() solver is the one which causes the problem (searching for the lamp etc.).
    Do you see the Frogland track name is Frooland in the frog.simba file though? Think that's what he is referring to.
    Solar from RiD.

  8. #233
    Join Date
    Apr 2013
    Posts
    395
    Mentioned
    1 Post(s)
    Quoted
    177 Post(s)

    Default

    Quote Originally Posted by Krazy_Meerkat View Post
    If you're using reflection, there is a boolean R_InventoryRandoms which controls it, but the Rewards() solver is the one which causes the problem (searching for the lamp etc.).
    The OSR include's antirandom is the one giving me problems, reflection's working fine. At some point my script will go back to inventory tab to eat food, reflection's reward solver is working great, never had any problems solving mysterious box, lamps etc. Since reflection's include will be automatically updated, I'm not changing anything inside reflection include, else my work will be gone lol.

  9. #234
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Quote Originally Posted by Haxz View Post
    The OSR include's antirandom is the one giving me problems, reflection's working fine. At some point my script will go back to inventory tab to eat food, reflection's reward solver is working great, never had any problems solving mysterious box, lamps etc. Since reflection's include will be automatically updated, I'm not changing anything inside reflection include, else my work will be gone lol.
    Hmm.. Well the Rewards random is the only Inventory random on the list, that's why I mentioned it.
    Some of the other randoms have a Rewardbox, but they are not classed as inventory randoms.. This is the part of OSR's antirandom which causes the issue:
    Simba Code:
    // solve reward box if a non inventory random was just solved
          if (loggedIn()) then // if solver failed, player would be logged out
            if (not SRL_Randoms[i].isInvRandom) then
            begin
              // reward box doesn't exist if inventory is full/some randoms don't have reward box
              result := (invFull() or (not SRL_Randoms[i].hasRewardBox));
    As you can see, it clearly checks your inventory if it's not an inv random. I might submit a pull request on this, but if you'd like a quick fix yourself, you can just change the part where it checks .isInvRandom and also add checkInv like this:
    Simba Code:
    if ((not SRL_Randoms[i].isInvRandom) and checkInv) then
    Last edited by Krazy_Meerkat; 07-02-2014 at 01:51 AM.

  10. #235
    Join Date
    Apr 2013
    Posts
    395
    Mentioned
    1 Post(s)
    Quoted
    177 Post(s)

    Default

    Quote Originally Posted by Krazy_Meerkat View Post
    Hmm.. Well the Rewards random is the only Inventory random on the list, that's why I mentioned it.
    Some of the other randoms have a Rewardbox, but they are not classed as inventory randoms.. This is the part of OSR's antirandom which causes the issue:
    Simba Code:
    // solve reward box if a non inventory random was just solved
          if (loggedIn()) then // if solver failed, player would be logged out
            if (not SRL_Randoms[i].isInvRandom) then
            begin
              // reward box doesn't exist if inventory is full/some randoms don't have reward box
              result := (invFull() or (not SRL_Randoms[i].hasRewardBox));
    As you can see, it clearly checks your inventory if it's not an inv random. I might submit a pull request on this, but if you'd like a quick fix yourself, you can just change the part where it checks .isInvRandom and also add checkInv like this:
    Simba Code:
    if ((not SRL_Randoms[i].isInvRandom) and checkInv) then
    Thanks! I actually gave up on using OSR's randoms finding functions already lol. I'll do a quick fix on the include

  11. #236
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Just got the Mordaut random again so I did some more object recording in the big puzzle (as I plan to solve this random the same way my certer-solver works) and I see now why my results are never consistent: in each puzzle the item changes size as well, how many sizes are possible I have no idea but if it's certain amount it won't be a problem. Now this does complicate how my solver will work and I'll need to make multiple object profiles based on how many sizes are possible for each item but I've updated my debugger to record both, the rest is all manual. Frustrating no doubt but this random event is very common so it makes sense to give more attention to making a solver for it.

    That's all, just wanted to give some helpful tips on anyone else trying to tackle this one and a simple update for everyone else.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  12. #237
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    I think I remember checking the 'frooland' thing myself by printing the text it found using GetMusic and it was read by simba as 'frooland'.. I think anyway.. I've never had any problems detecting the frog random

  13. #238
    Join Date
    Apr 2013
    Posts
    395
    Mentioned
    1 Post(s)
    Quoted
    177 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Just got the Mordaut random again so I did some more object recording in the big puzzle (as I plan to solve this random the same way my certer-solver works) and I see now why my results are never consistent: in each puzzle the item changes size as well, how many sizes are possible I have no idea but if it's certain amount it won't be a problem. Now this does complicate how my solver will work and I'll need to make multiple object profiles based on how many sizes are possible for each item but I've updated my debugger to record both, the rest is all manual. Frustrating no doubt but this random event is very common so it makes sense to give more attention to making a solver for it.

    That's all, just wanted to give some helpful tips on anyone else trying to tackle this one and a simple update for everyone else.
    It'll be great if there's a working solver for mordaut, which I think is outside of my ability to make one.

    Quote Originally Posted by Krazy_Meerkat View Post
    I think I remember checking the 'frooland' thing myself by printing the text it found using GetMusic and it was read by simba as 'frooland'.. I think anyway.. I've never had any problems detecting the frog random
    You were right

  14. #239
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Made a Molly Solver
    Code:
    program R_MollySolve;
    {$DEFINE SMART8}
    {$I SRL-OSR/SRL.Simba}
    {$I SRL-OSR/SRL/misc/al_functions.simba}
    {$I SRL-OSR/SRL/Reflection/Reflection.simba}
    
    VAR
      Molly: TNPC;
      Fakes:  array of TNPC;
      StartArea, RandomArea: TBox;
      PlayerLoc, CraneLoc, DoorLoc, mousetile: TPoint;
      i: Integer;
      Twin,t: TNPC;
    
    Function InMollyRoom: Boolean;
    begin
      if (R_FindNPC('Molly', Molly)) then
      begin
        writeln('found molly: ' + inttostr(Molly.NPCId));
        Result := true;
      end;
    end;
    
    Procedure WalkOutDoor;
    var DoorLoc, Coord: TPoint;
    
    begin
       DoorLoc := Point((R_GetTileGlobal.x + 2), R_GetTileGlobal.y);
       R_OpenDoor(DoorLoc, 'E');
       repeat
          wait(100);
       until(FindNPCChatText('Molly', Nothing));
       clicktoContinue;
       ChatWait;
       ChatWait;
       if FindNPCChatText('Select', Nothing) then
       begin
        FindNPCChatText('know', ClickLeft);
        ChatWait;
        ChatWait;
        ClickToContinue;
        ChatWait;
        ChatWait;
        ClickToContinue;
        wait(2000);
       end;
    end;
    
    Function GoToControls: Boolean;
    var ControlBoxLoc, BoxCoords: TPoint;
    begin
      MakeCompass('E');
       ControlBoxLoc := Point((R_getTileGlobal.x + 5), (R_getTileGlobal.y - 2));
       BoxCoords := R_TileToMS(ControlBoxLoc);
       MMouse(BoxCoords.x, BoxCoords.y, 3, 3);
       wait(200+random(200));
       if (IsUpText('panel')) then
       begin
        clickmouse2(Mouse_left);
       end;
    end;
    
    Function OnControls: Boolean;
    var x, y: Integer;
    begin
      result := findcolortolerance(x,y,39423,665,212,723,257,1);
    end;
    
    Function findEvilTwin: TNPC;
    var tempTNPCArray: TNPCArray;
        tmp: TNPC;
        i, loc, lowestID: integer;
    begin
       tempTNPCArray := R_GetAllNPCs;
        lowestID := 10000000;
       for i := 0 to high(tempTNPCArray) do
       begin
         if (tempTNPCArray[i].Index < lowestID) then
         begin
           lowestId := tempTNPCArray[i].index;
           loc := i;
         end;
       end;
       result := tempTNPCArray[loc];
    
    end;
    
    Procedure ControlArm(dir: String; var Coord: Tpoint);
    begin
      case dir of
          'u': begin
                  Mouse(640, 290, 1, 1, Mouse_left);
                  dec(Coord.y);
                  wait(300+random(500))
               end;
          'd': begin
                  Mouse(639, 385, 1, 1, Mouse_left);
                  inc(Coord.y);
                  wait(300+random(500))
               end;
          'l': begin
                  Mouse(593, 333, 1, 1, Mouse_left);
                  inc(Coord.x);
                  wait(300+random(500))
               end;
          'r': begin
                  Mouse(693, 330, 1, 1, Mouse_left);
                  dec(Coord.x);
                  wait(300+random(500))
               end;
       end;
    end;
    
    Function overFake: boolean;
    begin
      R_FindNPC(t.NPCID, Twin);
      Result:= ((CraneLoc.x = Twin.Tile.x) and (CraneLoc.y = Twin.Tile.y))
    end;
    
    
    Function GoUp:Boolean;
    begin
      R_FindNPC(t.NPCID, Twin);
      Result := (CraneLoc.y > Twin.tile.y);
    end;
    
    Function GoDown: Boolean;
    begin
      R_FindNPC(t.NPCID, Twin);
      Result := (CraneLoc.y < Twin.tile.y);
    end;
    
    Function GoRight: Boolean;
    begin
      R_FindNPC(t.NPCID, Twin);
      Result := (CraneLoc.x > Twin.tile.x);
    end;
    
    Function GoLeft: Boolean;
    begin
      R_FindNPC(t.NPCID, Twin);
      Result := (CraneLoc.x < Twin.tile.x);
    end;
    
    Function WaitForControl:boolean;
    begin
      repeat
        wait(100);
      until(GetColor(699, 234) =  39423)
      result := true;
    end;
    
    
    Function CatchTheFake:Boolean;
    var xStart: Tpoint;
        dir: String;
        i, yDis, xDis:Integer;
    begin
    
      CraneLoc.x := R_GetTileGlobal.x;
      CraneLoc.y := R_GetTileGlobal.y - 4;
      repeat
        R_FindNPC(t.NPCID, Twin);
        begin
          if (overFake) then
          begin
            Mouse(699,423,2,2,Mouse_left);
            continue;
          end;
          if GoUp then
          begin
          R_FindNPC(t.NPCID, Twin);
            ControlArm('u',CraneLoc);
            continue;
          end;
          if GoDown then
          begin
            R_FindNPC(t.NPCID, Twin);
            ControlArm('d',CraneLoc);
            continue;
          end;
          if GoLeft then
          begin
            R_FindNPC(t.NPCID, Twin);
            ControlArm('l',CraneLoc);
            continue;
          end else
          if GoRight then
          begin
            R_FindNPC(t.NPCID, Twin);
            ControlArm('r',CraneLoc);
            continue;
          end;
    
        end;
      until(FindBlackChatMessage('Evil'));
    end;
    
    Procedure BackToDoor;
    begin
      doorLoc.x:= R_GetTileGlobal.x - 5;
      doorLoc.y:= R_GetTileGlobal.y + 1;
      R_OpenDoor(doorLoc,'W');
    end;
    
    Procedure WaitTilInRoom;
    var PlayerLoc: TPoint;
    begin
      repeat
        wait(100);
      until(R_FindNPC('Molly',Molly));
      PlayerLoc := R_TileToMS(Molly.Tile)
      Mouse(playerLoc.x, PlayerLoc.Y, 1, 1, Mouse_Left);
    end;
    
    begin
      SetupSRL;
      SetupReflection;
      ActivateClient;
      if InMollyRoom then
      begin
        MakeCompass('N');
        WalkOutDoor;
        GoToControls;
        WaitForControl;
        t:= findEvilTwin;
        CatchTheFake;
        repeat
          wait(100);
        until(FindNPCCHatText('Molly',nothing));
        ClickToContinue;
        ChatWait;
        ClickToContinue;
        makeCompass('w');
        doorLoc.x:= R_GetTileGlobal.x - 5;
        doorLoc.y:= R_GetTileGlobal.y + 1;
        mousetile := R_TileToMS(doorLoc);
        Mouse(mouseTile.x, Mousetile.y, 1, 1, Mouse_left)
        wait(4000);
        R_OpenDoor(R_GetTileGlobal,'W');
        waitTilInRoom;
        wait(1000);
        clicktoContinue;
        ChatWait;
        ChatWait;
        ClickToContinue;
        ChatWait;
        ChatWait;
        ClickToContinue;
      end;
    
    
    
    
    end.
    The Function InMollyRoom will detect if you are in the random.

    I'd like to know if this works for everyone. I found that the index of the twin was always the lowest number out of all the possible evil twins so it wasn't too difficult figuring out.

Page 10 of 10 FirstFirst ... 8910

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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