MarioClient Custom Client

Forum for alternative clients, mods & discussions on the same.
Mario_Demorez
Posts: 600
Joined: Sun Jan 11, 2015 9:32 pm

MarioClient Custom Client

Post by Mario_Demorez »

WARNING - EARLY DEVELOPMENT - WARNING

After years of playing on other people's clients, I wanted one of my own that takes a little of what I liked in each and adds the things I always wanted on top. This is that client.

It is a fork of the default client with a dark steel UI, a HUD you can rearrange, and a bot framework for running a base while you are away. It stays close to loftar's client; most of what it adds is in its own files.

Source: https://github.com/rreed1996/MarioClient/tree/bot
Guide: https://github.com/rreed1996/MarioClien ... bot/BOT.md
Farming notes: https://github.com/rreed1996/MarioClien ... t/CROPS.md

Install (Windows)
Download MarioClient.exe, put it in an empty folder and run it. It downloads Java 21, Ant and the source into that folder, builds the client and starts it. Run it again to play; it rebuilds only when there is a new version. Windows may warn that the file is unsigned. The installer's source is in the installer folder if you want to build it yourself.

Install (Linux / macOS, or with git)
You need a Java 21 JDK and git. Clone the repo, switch to the bot branch and run update.sh (Update.bat on Windows). I only play on Windows, so update.sh has had little testing.

Interface
  • Black and steel-grey theme for windows, buttons and the HUD. One checkbox turns it off.
  • Every HUD piece can be moved, and some resized. Positions are saved relative to the screen, so the layout survives a resolution change.
  • Extra hotbars, belt contents shown as a row of slots, quick equipment slots, equip sets.
  • Night vision, collision boxes, hiding trees/houses/walls as flat boxes, crop stage markers, barrel labels, bee hive and mound bed reach.
  • Item count and quality numbers with your own color rules, inventory sort button.
  • Cookbook that records the food you see.
Bots
  • Areas with roles and Put/Take item lists. Bots find things by area, not by fixed coordinates.
  • Route recording through doors, stairs and mine holes, with pathfinding around objects and animals.
  • Deposit and fetch for containers, barrels and stockpiles.
  • Bulk farming and quality farming for field crops.
  • Storage upkeep: keep amounts, limits, surplus to swill.
  • Feeding troughs, chicken coops and compost bins from swill, and watering coops.
  • Bots drink (milk first) when stamina or energy is low.
  • Scenarios: saved lists of bot steps.
Scheduler
A separate program that runs beside the game (Scheduler.bat) and stays in the system tray. It plays your characters on a timetable.
  • Starts the game at the set time, logs in with a saved login token, picks the character, runs the job, logs out and closes the game.
  • A job is any bot with its settings filled in on a form, or a scenario. Scenarios can have variables, so one "farm a field" scenario can be scheduled for different fields.
  • Schedules: every day at a time, chosen weekdays, every N hours, or once.
  • Several accounts can run at the same time, one run per account. If an account is busy, a schedule can wait or skip.
  • Every run has a time limit and a watchdog, so a stuck bot does not hold up the next run.
  • History of every run with its full bot log. Failed runs keep a screenshot.
  • Optional video of each run, recorded by the client itself with ffmpeg. It works with the PC locked.
  • A partly ripe field can ask the Scheduler to come back and check again later.
  • Tabs to look things up without opening the game: characters (gear, stats, inventory), items you own and where they are, areas and their settings, and the cookbook.
  • Reports: charts of crop quality over time, harvests, swill levels, items owned and run results.
  • It can update the client to the latest version by itself and restart on the new build.
Discord (optional)
The Scheduler can connect to a Discord bot that you create yourself, in your own server. You enter the bot token in the Scheduler and it sets up its own channels. Only your account can give it commands. It is a way to follow and control the base from a phone.
  • Notifications when a run starts and ends, with the result, how long it took and a screenshot.
  • Alerts when something needs you: a stuck bot, nothing left to drink, a game name that changed after an update.
  • An information channel with a line per run: harvest quality, tiles planted, swill used.
  • Run videos posted in a thread with a list of what the bot did and when. !clip 3:20 cuts a clip from that point.
  • Schedules: !schedules, !add, !edit, !pause, !resume, !delete, !run, !stop.
  • Status: !status (a picture of what is running, what is next and disk use), !runs, !log, !shot for a live screenshot.
  • Base lookups: !char for a character card, !item to find where an item is stored, !area to see or change an area's settings.
  • Cookbook: !recipe, !best, !fav.
  • Reports on demand or on a schedule: !report, !addreport.
  • !update pulls and builds the latest version from your phone. !help lists everything.
  • /login adds a game account through a private form, so the password never appears in a channel. Only the login token is kept.
Data
  • The client talks to the Seatribe servers only. The installer and updater download from GitHub, Adoptium and Apache.
  • Discord and the "shared setup" sync (your own Supabase table) are off unless you set them up yourself.
  • Login tokens stay on your computer.
State
This is an early release and I use it on one base. Farming is tested on onions, wheat, barley, millet, flax, lettuce, watermelon, carrots and turnips. Other crops and some of the newer features have not had a full run yet, so expect rough edges. Trellis crops and animals are not done.

Bots never open or close gates.

Thanks
None of this would exist without the people who have been building and sharing clients for this game for years. I learned the game on Ender's, Ardennes', Hurricane and Nurgling, and almost every idea in here started with something I first saw in one of them. Thank you to EnderWiggin, Ardennes, Nightdawg, the Nurgling team, and everyone else who has posted a client, a tool or a tutorial in this section. Reading your source and your threads is how I learned to do any of this.

Thanks also to loftar and jorb for keeping the client source open, which is what makes all of it possible. Some crop data comes from Nurgling 2.

If you recognise an idea of yours in here and want it credited by name, tell me and I will add it.

Bug reports are welcome here or on GitHub.


Setup guides

1. First steps in a base
  1. Open the bot menu: the Bots button under your portrait, or Ctrl+Shift+B.
  2. Turn on "Record routes" and walk your usual paths once, including through doors, stairs, cellars and mine holes. Right-click doors yourself; the client records them. Turn it off when done.
  3. Open "Areas...", click the new-area button and drag a rectangle on the map for each place that matters: fields, storage rooms, a dumping spot.
  4. Give each area its roles (the + under the list) and drop items on its Put and Take panels to say what belongs there.
The minimap has to be enabled. Areas are shared by all your characters.

2. Your first farm run
  1. Draw an area over the plowed field and give it the Crop role with the crop's name.
  2. Draw an area over the storage for the harvest. Drop the seed or produce on both Put and Take, and give it the "Normal bulk seeds/produce" role so replanting can find it.
  3. For crops that drop straw or fibres, make an area for those too and click the item's badge so stockpiles are allowed.
  4. On the bot bar: Farming > Farm a field, pick the field, Run.
By default it waits until the whole field is ripe. Use Storage > Empty inventory (deposit) on its own first if you want to check your areas.

3. Scheduler
  1. Log in to the game once with "Login saved" ticked, then close it.
  2. Start Scheduler.bat (in the client folder).
  3. Accounts > Add > "Use a login saved in the client", then "Find characters".
  4. Schedules > Add: pick the account and character, the bot or scenario, when to run and a time limit.
  5. Press "Run now" once to watch a run from start to finish before trusting the timetable.
The PC has to be on and awake, and the account must not be logged in elsewhere when a run starts.

4. Discord
  1. Go to the Discord developer portal, create an application and add a bot to it. Copy the bot token.
  2. On the bot's page, turn on "Message Content Intent".
  3. Make an invite link with the scopes "bot" and "applications.commands" and the permissions Manage Channels, Manage Threads, Send Messages and Attach Files. Invite it to your own server.
  4. In the Scheduler, open the Discord tab, paste the token and save.
  5. The bot creates a "Haven" category with its channels. Type !help in #commands.
Use a private server. Anyone who can see the channels can see your run results and screenshots.

5. Run videos
  1. Install ffmpeg: in a terminal, winget install Gyan.FFmpeg
  2. Restart the Scheduler.
  3. Tick "Record runs" on the schedules you want filmed.
Videos are saved with the run logs and, with Discord set up, posted in #run-videos.

6. Shared setup with Supabase (playing from more than one computer)
This keeps your areas, routes, lists, bot bar and client settings the same on every computer. It uses a free Supabase project that belongs to you. Skip it if you play on one PC.
  1. Make a free account at supabase.com and create a new project. Any name and region will do. Save the database password it asks for somewhere; the client does not need it.
  2. In the project, open the SQL Editor, paste the block below and press Run. This makes the one table the client uses.
  3. Open Project Settings > API (on newer projects: API Keys). Copy the Project URL and the secret key (called "service_role" on older projects). Do not use the public/anon key.
  4. In the game: Options > Custom settings > Shared setup. Paste the URL and the secret key, and type a profile name for this computer, for example Desktop.
  5. Press Sync now. The page says whether it worked. Your current setup is uploaded.
  6. On each other computer, do steps 4 and 5 with the same URL and key. Use the same profile name for computers that should share window and HUD layout, or a different one (Laptop) for a different screen.

Code: Select all

create table public.kv (
  scope text not null,
  profile text not null default '',
  key text not null,
  value text,
  deleted boolean not null default false,
  updated_at timestamptz not null,
  updated_by text,
  primary key (scope, profile, key)
);
grant usage on schema public to service_role;
grant select, insert, update, delete on table public.kv to service_role;
How it behaves:
  • Everything is fetched and merged when the game starts, and changes are sent as you make them. A change made on another computer shows up the next time you start the game here.
  • Two computers changing different things both keep their changes. If both change the same thing, the later change wins.
  • It works offline. Changes are queued and sent when the connection is back.
  • Window positions, HUD layout and display settings are per profile. Areas, routes, lists and the rest are shared by all.
  • Login tokens and the connection settings themselves are never uploaded.
If it fails, the bot log says why: "key refused" means the wrong key was pasted, "may not use the table" means the two grant lines were not run, "table not found" means the SQL was not run in this project.

The secret key gives full access to that Supabase project, so use a project made only for this and do not share the key. It is stored in a file in your user folder on each computer.

7. After a game update
Run Tools > Game check, then the calibrate bot. Game check reports any names or windows the bots depend on that have changed.

Return to “The Wizards' Tower”