Anemone Client

Forum for alternative clients, mods & discussions on the same.

Moderator: Phades

Re: Anemone Client

Postby borka » Sun Apr 19, 2015 10:16 pm

Needed gluegen-rt-natives-windows-amd64.jar is missing - did you download the full client or just the update?
(sometimes it's just because of a corrupt download)

i suggest downloading the full one again, extract and just copying over the existing by allowing overwrite
https://dl.dropboxusercontent.com/u/371 ... -amd64.zip
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
User avatar
borka
 
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: Anemone Client

Postby zeto » Thu May 07, 2015 10:19 pm

When a bucket returns from being filled in a well, it becomes a new gob when put down. Is there a way to get type Gob or Item that is currently on the mouse? Additionally, waitforgrab does not work with buckets from a well as it seems to be a special action via the debug window.

I also see no way of knowing that to see the growth stage of a crop you need to look at:

getblob, which sends you to drawables, which sends you to message, which sends you to a blob byte array... and ultimately I guess for crops the first byte is the stage. Perhaps I'm naive in programming, but I found that difficult to follow given that I'm not sure where packet definitions are for a "crop". Is there a definition somewhere that tells me how blobs are deserialized for particular object types?

The system seems very data driven, which is cool, but since objects seem generic, it makes it hard to follow for me. In Object Oriented, I'd get a gob, find its type, cast it to that type, then use its methods, but here I cannot do that. If you have any suggestions on deciphering how things work or what the structure is, please teach me if you have some time.
zeto
 
Posts: 4
Joined: Sun Apr 05, 2015 5:58 am

Re: Anemone Client

Postby mvgulik » Fri May 08, 2015 9:13 am

- Any item that is transferred from, or into, the characters hand becomes a new Gob.
In generally that is solved by the fact that Animone in the related wait functions return the new Gob after waiting for the action to be finished.

Waiting for well action:
For waiting when the "getting water from the well" action is finished, you might try waitForTask().
(Note: I have not played with wells yet.)


Crop Stage:
Code: Select all
crop_stage = crop_gob.getblob(0)
mvgulik
 
Posts: 3773
Joined: Fri May 21, 2010 2:29 am

Re: Anemone Client

Postby zeto » Sat May 09, 2015 10:29 am

mvgulik wrote:- Any item that is transferred from, or into, the characters hand becomes a new Gob.
In generally that is solved by the fact that Animone in the related wait functions return the new Gob after waiting for the action to be finished.

Waiting for well action:
For waiting when the "getting water from the well" action is finished, you might try waitForTask().
(Note: I have not played with wells yet.)


Crop Stage:
Code: Select all
crop_stage = crop_gob.getblob(0)


waitForTask doesn't work, because it's not a task. you get msg:chres 7727 34 as the debug action for when the well passes the bucket back to your cursor filled. There is no generic waitForMessage...

I know how to get crop stage, I expand on the entire method chain used by doAreaFindCrop, but the point is that without that, I'd have no idea how to find that byte array because I don't understand the overarching data driven architecture used to create the haven client. An overview of this structure would be helpful, as wading through the undocumented code via github is a huge chore. I don't have a suitable IDE atm, and even if I did, I'm not sure I could entirely follow without a primer.
zeto
 
Posts: 4
Joined: Sun Apr 05, 2015 5:58 am

Re: Anemone Client

Postby mvgulik » Sat May 09, 2015 8:21 pm

I can't really help with the client internal data structure, as I don't even understand most of it myself. In general it kinda looks like a big tree of widgets/classes & other stuff to me.

Some example code showing the base of the tree.
(And how to detect that bucket change.)
(To see what options are available for a given TYPE ... You will have to dig into the source code. Which is actual pretty well organized.)
Code: Select all
def test_scan() {
   maid.doSay(">test_scan()");
   
   if (maid.isDragging()) {
   
      def Widget root = UI.instance.root;
      for (Widget wdg = root.child; wdg != null; wdg = wdg.next) {
         
         // showing what's currently available at the root.
         maid.doSay('');
         maid.doSay("wdg" +" == "+ wdg);
         maid.doSay("wdg.getClass()" +" == "+ wdg.getClass());
         
         if (wdg.getClass() == haven.Item) {
            maid.doSay("   wdg.GetResName()" +" == "+ wdg.GetResName());
            // "gfx/invobjs/buckete" -> empty bucket.
            // "gfx/invobjs/bucket-water" -> bucket with water.
         }
      }
      
   } else {
      maid.doSay("isDragging = False");
   }
}
test_scan();return


Good luck.
mvgulik
 
Posts: 3773
Joined: Fri May 21, 2010 2:29 am

Re: Anemone Client

Postby zeto » Sun May 10, 2015 5:21 am

I'll check that out, your time is much appreciated.

I'm having another small'ish issue... this one is definitely due to my ignorance.

Code: Select all
Inventory inv = maid.getInventory("cupboard");
items = maid.getItems(inv);
bags = new ArrayList<Inventory>();
seeds = new ArrayList<Item>();

for(Item item : items)
     {
        if(maid.getName(item) == "Seedbag")
        {
        bags.Add((Inventory)item);  ////////this cannot cast, for obvious reasons
        }
     }


The above doesn't work. It gets the first bag of type Item and cannot cast it to Inventory, because it's type Item. I believe perhaps I could get its base type widget, then cast that to Inventory, but I'm unsure how to go about that or if it would work.

The goal is to look in a cupboard, get the seedbags, get the seeds inside all the seedbags, sort the array, do a loop that pulls out the highest quality seeds from those bags into my inventory based on free slots. The issue is that seedbags are weird, they are inventories inside an inventory, and the getInventory helper method I believe only searches open widgets on the UI. I should be able to programmatically get the sack inventory data without opening them, and move them out of the sacks that way... if not I can probably do it the hard way: get the cupboard, get the sacks, open the sacks, memorize all the seeds, open the sacks with the best seeds, remove them.
zeto
 
Posts: 4
Joined: Sun Apr 05, 2015 5:58 am

Re: Anemone Client

Postby mvgulik » Sun May 10, 2015 6:30 am

Not sure. Java is not really my cup of thee.

I personally would try
Code: Select all
bags.Add(item);// or .add(..)
and/or
Code: Select all
bags = new ArrayList<Item>();
mvgulik
 
Posts: 3773
Joined: Fri May 21, 2010 2:29 am

Re: Anemone Client

Postby mvgulik » Mon May 11, 2015 9:15 am

Just in case.

I think it would be nice if pathFind(Coord dst, int playerSize, boolean dbg) also had a Gob parm as alternative to the Coord parm. ... The pathfinder could than ignore that object as a blocker item (which currently makes the pathfinder fail if you target your target-item/gob to close).

Still kinda mystified by the playerSize parm ... but that will probably solve itself in time.
... Have not seen slim or fat hearthlings, so that's probably not it.

--- --- ---

Mmm, seems playerSize is more a ignore stuff inside playerSize-range at Target location. Kinda a alternative target Gob, while also ignoring that Gob.
... Back to trying to learn my character to hunt sheeps and miss piggies.
mvgulik
 
Posts: 3773
Joined: Fri May 21, 2010 2:29 am

Re: Anemone Client

Postby zeto » Wed May 13, 2015 9:34 am

Trying to do an item sort within a cupboard and running into a similar problem as before. I don't know how to get the Item on my cursor.
Code: Select all
inv = getInventory("Cupboard");
items = getItems(inv);
doTakeItem(item[0]);

//define item as biggest, compare to other items... oh I found a bigger item, better swap them

doDrop(item[0], inv, location of next biggest item);

//but wait... now I have an item on my cursor and I don't have a reference to that Item


I'm thinking about mapping items to their coordinates before I pick them up, so I can reverse the drop location into an item, BUT I can't do that either because the item.c is NOT the same drop coord. Cupboards can be dropped (0 to 7, 0 to 7) and the debug window shows this to be the case. But item.c returns a pixel based coordinate. Of course I could manually translate the pixel coordinate to the relative coordinate, but I'm curious if there's a workaround for this.

I tried following the wdgmsg... at some point drop has to be called based on the inventory... I see new Coord(15, 15)).div(invSqSize)... invsqsize is 32,32, which is the square size. In theory this should be where it returns the translated coordinates, but the coordinate it translates is static 15,15 and I'm not sure where "Coord ul" comes from, and "Coord cc" parameter isn't even used. This code breaks my brain.

Any thoughts on sorting items by quality inside a cupboard? I already know about shift+control+mousewheel, but that's not enough.
zeto
 
Posts: 4
Joined: Sun Apr 05, 2015 5:58 am

Re: Anemone Client

Postby Fostik » Mon May 25, 2015 9:39 am

Item collecting function (alt+s) has only 2 tile radius. How can i raise it?
Known as zunzon. Contact discord: zunzon.
User avatar
Fostik
 
Posts: 2236
Joined: Tue Jul 05, 2011 4:08 pm
Location: EU

PreviousNext

Return to The Wizards' Tower

Who is online

Users browsing this forum: Claude [Bot] and 1 guest