MechanicalMod v0.9.2

Description

Machines! Machines! Machines! This mod brings in several machines as well as an API for power management and transfer. The system is fully self-sufficient and allows attaching the Power Source and Power Drain components to any entity. The API service automatically manages the connections and power transfer as well as the registration and unregistration of machines. This mod also implements the Engineer class as the one that creates and builds the various machines.

Features

  • PowerAPI
    • Flexible API for managing power sources and drains
    • Handles registration and unregistration
    • Handles power transfer along connections
    • Automatically builds connections between machines
  • NEW - LiquidAPI
    • Flexible API for managing liquid sources and drains
    • Handles registration and unregistration
    • Handles liquid transfer along connections
    • Automatically builds connections between machines
  • Machine details UI
    • Button to toggle view mode
    • Rename machine in UI title
    • Configure gear ratio (does not apply to all machines)
  • Engineer class
    • Custom Engineer Toolbox talisman crafted by the Blacksmith
    • Custom workbench
    • Recipes for crafting machines
  • Common Components
    • Power Source
    • Power Drain
    • Drive Shaft
    • Gear Box
    • Clutch
  • Complex Components
    • Processing Machine
      • Properties for input, output, and rate of production
      • Properties for setting power consumption rate as well as minimum speed and torque requirements
    • Advanced Processing Machine
      • Properties for recipe list file, fuel list, inventory sizes, rate of production, and active/inactive effects
      • Properties for setting power consumption rate as well as minimum speed and torque requirements
      • Recipe list file is same format as job recipe list files
      • Recipes are same format as job recipes with minor alterations
      • Consumes fuel at regular interval based on duration value of fuel from fuel list
      • Production is based on recipe files and is selected randomly
  • Machine parts
    • Wood Cog
    • Wood Shaft
    • Wood Base
    • Stone Base
    • Iron Bearings
    • Iron Cog
    • Iron Shaft
    • Iron Base
  • Misc Entities
    • Corn Meal
    • Wood Barrel
    • Ethanol
  • Waterwheel (Lvl 0)
    • Requires water
    • Produces power
    • Water flow rate determines power rate
  • Wind Sail (Lvl 0)
    • Produces power
  • Driveshaft (Lvl 0)
    • Transfers power from one connected machine to another
  • Long Driveshaft (Lvl 1)
    • Twice as long for small resource cost increase
  • Vertical Driveshaft (Lvl 0)
    • Same as Driveshaft but mounted vertically on walls and cliffs
  • Gear Box Shaft (Lvl 0)
    • Transfers power at different speeds to the input
    • Ratio is configured in the machine details view in settings tab
  • Clutch Shaft (Lvl 0)
    • Allows connecting and disconnecting mechanical lines at will
    • Clicking the command button will call a hearthling over who will change the machine state. Once they’re done then the clutch swaps state between open and closed
  • Grinding Mill (Lvl 0)
    • Consumes power
    • Citizens will bring corn to it
    • Grinds corn into cornmeal and puts it nearby as it has power
  • Spinning Mule (Lvl 0)
    • Consumes power
    • Citizens will bring fiber to it
    • Spins fiber into thread as long as it has power
  • Smelt Forge (Lvl 0)
    • Consumes power
    • Consumes fuel
    • Citizens will bring resources and fuel
    • Uses metal ingot recipes (almost identical to blacksmith recipes)
  • Saw Mill (Lvl 1)
    • Consumes power
    • Citizens will bring wood to it
    • Divides wood logs into the more manageable Lumber entities
  • Fermenter (Lvl 1)
    • Consumes power
    • Consumes fuel
    • Citizens will bring resources and fuel
    • Uses fermenting recipes (first one produces Ethanol from corn)
  • NEW - Water Pump (Lvl 2)
    • Consumes power
    • Pulls in water from nearby water sources and pumps to connected pipes
  • NEW - Water Outlet (Lvl 2)
    • Consumes liquid
    • Pours liquid out onto the ground in front of outlet
  • NEW - Water Valve (Lvl 2)
    • Similar to clutch for turning liquid flow on and off
  • NEW - Storage Tank (Lvl 2)
    • Stores 20,000 liters of liquid
    • Functions as pipe for connections
  • NEW - Pipe (Lvl 2)
    • Connects liquid machines together
    • Comes in 4 wood variants: short, long, corner, and 4-way junction

Screenshots

Current Downloads

v0.9.2: Release MechanicalMod v0.9.2 · chessmaster42/mechanicalmod · GitHub
v0.9.1: Release MechanicalMod v0.9.1 · chessmaster42/mechanicalmod · GitHub
v0.8.1: Release MechanicalMod v0.8.1 · chessmaster42/mechanicalmod · GitHub
v0.8.0: Release MechanicalMod v0.8.0 · chessmaster42/mechanicalmod · GitHub
v0.7.0: Release MechanicalMod v0.7.0 · chessmaster42/mechanicalmod · GitHub
v0.6.0: Release MechanicalMod v0.6.0 · chessmaster42/mechanicalmod · GitHub
v0.5.1: Release MechanicalMod v0.5.1 · chessmaster42/mechanicalmod · GitHub

Legacy Downloads

v0.5.0: mechanicalmod_0.5.0.smod - Google Drive
v0.4.0: mechanicalmod_0.4.0.smod - Google Drive
v0.3.0: mechanicalmod_0.3.0.smod - Google Drive
v0.2.0: mechanicalmod_0.2.0.smod - Google Drive
v0.1.0: mechanicalmod_0.1.0.smod - Google Drive

Source

GitHub: GitHub - chessmaster42/mechanicalmod: Machinery Mod for the game Stonehearth. This adds power creation, distribution and consumption and more!

Microworld

Download: (see v0.9.0+ github releases)
Instructions: Download the microworld.smod from the github release page and following the instructions for the base microworld on the stonehearth github here: GitHub - stonehearth/microworld: Microworld Stonehearth Mod

Notes

None at the moment.

Known Issues

  • Connection detection just checks whats adjacent (will be more data driven later)
  • Animations of grinding mill and spinning mule are running backwards
28 Likes

Hey @coasterspaul

Engineers.

4 Likes

explodes into ponies and rainbows

I’ll try it out tomorrow!

4 Likes

Sounds good! :smile:

Later tonight I’ll have at least have one more version with another power source so you’re not reliant on water. If I’m lucky I’ll get the animations fixed too and maybe some feature cleanup.

Oh! My god, you is a genius! That’s great!

4 Likes

Alrighty, version 0.2.0 is out and here’s the details:

  • Fixed grinding mill animation
  • Fixed many misc bugs in power source and drain components
  • Added ‘Wind Sail’ machine that produces power
  • Added machine details UI

The power level view is off by default but clicking on a machine will show a gear icon command. This opens up the machine details UI. There is a button here to toggle the view mode. Also, clicking in the UI title you can edit and rename the machine. The Wind Sail provides an alternate power source to the Water Wheel and at the moment provides a constant amount of power. In the future I will change it so that it varies with the time of day and season and such.

I’ve got the main APIs and such down pretty well now so I’m working on adding more content. That said I’m looking for any sort of machine ideas you guys have that fit in the Stonehearth style and period.

Enjoy! :smile:

4 Likes

Obvious types would be Mining and refining but then what would the blacksmith and workers do? hmm… No need for light power since they have wall and garden lamps (where they get light from is a mystery), Maybe conveyor belts? able to move items to the stockpiles?

That one is easy to answer: focus on building houses or crafting armor and weapons. :wink: Basically the same reasons, people developed machines in the real world… ^^

2 Likes

How do you multi-like?!?! :heart: :heart: :heart: :heart: :heart: :heart:

I like the wooden drive-shaft thing.

Would gearing be possible?

90 degree gearing?

For SH purposes, these would probably be 4-tooth gears… so long as the anims look slick!

One last pic before I get back to work:

5 Likes

Reduction gearing would really just be a visual effect but would be hard to make it meaningful. When you reduce mechanical speed you increase torque but your total power throughput remains roughly the same (friction can monkey with this). Right now the PowerAPI system just calculates total throughput power. It doesn’t track torque and speed independently because that would massively complicate things. So, this is possible but not very practical.

As for the 90-degree gearing, I do have plans to add vertical driveshafts as well as some other variants. No special gearings needed. You’d just put down a regular driveshaft near a wall or something then stick the vertical one on the wall so it connects to the one on the ground.

2 Likes

The mechanical speed variation could be nice for decorative purposes later on as well (moving contraptions and the like). Functionally though, it’d need a lot more components to justify the needs for different torque and acceleration rate (as you said).

3 Likes

:loud_sound: WOW. This is awesome. :loud_sound: :two_hearts:

2 Likes

[quote=“chessmaster42, post:10, topic:11515”]
Reduction gearing would really just be a visual effect but would be hard to make it meaningful. When you reduce mechanical speed you increase torque but your total power throughput remains roughly the same
[/quote]I know in the Minecraft mod RotaryCraft, all machines need a minimum torque to run, many have a maximum torque to run safely, and speed determines how fast a processing job is done. That may be too complicated for this though. You’re the mod-maker, it’s your decision!

2 Likes

YES! YES! I approve of this mod, now if only I played Stonehearth more rather than just playing mapgames…

2 Likes

Well, that can be done here too but as you know RotaryCraft is a modern-day, almost-future styled mod for Minecraft and that doesn’t really fit with Stonehearth. Also you didn’t really see most of the moving bits at their actual rotating speeds and were mostly hidden inside the blocks. However, the mechanics of needing to meet certain speed and torque requirements for a machine to function and direct, continuous transference was one of my favorite things about RotaryCraft. It was actually my favorite machinery mod for Minecraft.

That said I’m still deciding on the complexity I’m going to use in this mod. If I can get other people to help contribute ideas as well as voxel models and animation rigs then I’m more than happy to build ever increasingly complex systems around them :smile:

1 Like

can someone help, i put the .smod in the mod folder but i don’t notice anything different in the game. am i doing something wrong

2 Likes

The main difference is that you should see the Engineer job available in the promotion tree. It requires that a blacksmith craft the Engineer toolbox and then you have to promote a Blacksmith that is at least level 1. Also, if you already have a blacksmith then you need to un-promote them back to basic worker then put them back to Blacksmith. This refreshes their recipe cache.

First big overhaul update is out now as v0.3.0. Here’s the scoop on the details:

  • Added Long Driveshaft (2x length as regular)
  • Added Spinning Mule
    • Spins fiber into thread
  • Added new ProcessingMachine component
    • Data driven from entity json
    • Allows recipe-like control over input and output resources of machine
  • Fixed quite a few bugs in the PowerAPI and source and drain components
  • Removed GrindingMill component (uses ProcessingMachine now)
  • Machines are now produced from components instead of just raw resources
    • Wood Cog - Crafted by Carpenter
    • Wood Shaft - Crafted by Carpenter
    • Stone Base - Crafted by Mason
    • Iron Bearings - Crafted by Blacksmith

This update consists of a significant overhaul of how machines are crafted by the Engineer as well as an overhaul of how the resource processing machines operate. Now that I have much more of the groundwork completed I can add tons more machines relatively easily and just have them work. In fact, any voxel modeler out there that wants to add a machine pretty much just needs to build the entity json and qb files and that’s it.

I recommend that you start a fresh world or at least destroy all of your existing machines after this update because of how significant some of the changes are. In the future this will not be necessary but I do apologize to those who need to do this. If anyone has any troubles with the update please let me know!

Enjoy! :smiley:

4 Likes

@chessmaster42 @RepeatPan Whether can add a “conveyor belt”. Using dynamic drive. Will add “engine”. The steam age…Look, this is I just improvise, hope to be able to add this functionality. “conveyor belt”

10003.qb (87.9 KB)

5 Likes

Alright, thats it.
Hire this guy, no discussion.