The parser of domestic animals

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

The parser of domestic animals

Postby mortos » Fri May 09, 2025 3:14 pm

Good afternoon, we have been playing hnh for a long time and have raised a large number of animals. We are now keeping a record of them in GoogleDocs and entering it all manually.

To speed up the process, I want to write a parser to collect game information about the list of animals from the character's memory and turn them into csv.

The main question is where is the list of memorised animals stored?
- In the local cache or on the server?
- Is it possible to access it?
- If it is possible, how to do it?
mortos
 
Posts: 1
Joined: Mon Nov 04, 2024 11:43 pm

Re: The parser of domestic animals

Postby gravesmerch » Sun May 11, 2025 3:00 pm

I couldn't find where it's saved locally, but if you fork the client from github, use this command to download Cattle Roster java sources:

java -cp bin/hafen.jar haven.Resource get-code ui/croster

running from project's root directory it should get these files:

wrote src/haven/res/ui/croster/CattleId.java
wrote src/haven/res/ui/croster/TypeButton.java
wrote src/haven/res/ui/croster/CattleRoster.java
wrote src/haven/res/ui/croster/Entry.java
wrote src/haven/res/ui/croster/RosterButton.java
wrote src/haven/res/ui/croster/Column.java
wrote src/haven/res/ui/croster/RosterWindow.java


In CattleRoster.java method uimsg you can println entries

add > [ ...... , Dolly, 0, 1, 66, 12, 8, 18, 100, 106, 115, 104, 54]

so I guess its possible to add a button that export these values to a file

i think each character has its own values saved somewhere

you'd have to play around to get used to modding, but it's fun endgame
gravesmerch
 
Posts: 336
Joined: Thu Sep 08, 2022 6:13 pm


Return to The Wizards' Tower

Who is online

Users browsing this forum: Claude [Bot] and 82 guests