[Mod] SAFR's Simple Machines [0.1] [safr_simple_machines]

Post Reply
User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

[Mod] SAFR's Simple Machines [0.1] [safr_simple_machines]

by ak399g » Post

I've seen a few 'craft component' type mods around, but most use steel as the primary ore of choice and aren't based off of the classic Renaissance simple machines. This mod adds a few craft items that are all copper-based. So far there are the 6 primary simple machines (Lever, Wheel and Axle, Inclined Plane, Pulley, Wedge, and Screw) and three secondary machines (Gear, Nut, and Belt).

Image

Craft Recipes:
Spoiler

Code: Select all

i = Inclined Plane
w = Wedge
l = Lever
S = Screw
W = Wheel and Axle
p = Pulley
n = Nut
g = Gear
b = Belt

c = Copper Ingot
s = Stick
P = Paper
r = String
X = nothing

--

Inclined Plane *3
[X] [X] [c]
[X] [c] [X]
[c] [X] [X]

Wedge *2
[i] [i]

Lever *2
[i]
[c]

Screw *3
[c] [X]
[X] [c]
[c] [X]

Wheel/Axle *4
[X] [c] [X]
[c] [s] [c]
[X] [c] [X]

Pulley *2
[W]
[r]
[W]

Nut *1
[S]
[c]
(screw is returned!)

Gear *5
[X] [c] [X]
[c] [W] [c]
[X] [c] [X]

Belt *2
[r] [P] [r]
[W] [X] [W]
[r] [P] [r]
(wheel/axles are returned!)

I don't know if recipes conflict with other mods (though I hope they don't).

I'm okay with bundling in other components, but this mod isn't meant to provide complex machines, only the parts to make them.

The github is a repo of all mods I've worked on: once you extract the whole .zip file, just copy the "safr_simple_machines" out of it.
Github: https://github.com/ak399/minetest_mods/
Download .zip version 0.1: https://github.com/ak399/minetest_mods/ ... master.zip
(mod is also practice for me working with github :P)

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by Sokomine » Post

There was a posting some time ago about gears and building machines basically out of wood (wheels, rotating tree thrunks). I'm afraid it didn't went far. Something like that might be nice to have.

Also there was some talk recently about adding simple machines for grinding and similar tasks. Perhaps your craftitems could be helpful there.

User avatar
Wuzzy
Member
Posts: 4804
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by Wuzzy » Post

You asked for conflicts.
Well, there is another mod which adds gears, it is called “Factory”.
I don’t know how compatible/incompatible it is.

User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by ak399g » Post

this one? viewtopic.php?t=9277&p=141271
It relies on three levels of gears (steel, gold, diamond). I can add compatibility by including an optional steel gear craft -- something like
Spoiler

Code: Select all

local use_factory = minetest.get_modpath("factory")
at the beginning, and

Code: Select all

if use_factory then
	minetest.register_craft({
		output = "[[gear itemstring]]",
		recipe = {
			{"", "default:steel_ingot", ""},
			{"default:steel_ingot", "safr_simple_machines:gear", "default:steel_ingot"},
			{"", "default:steel_ingot", ""},
		},
	})
end
in the craft section
should work, yes?

Adding optional override crafts for all items, depending on whether or not "safr_simple_machines" and "factory" are enabled together might work, but what if someone only wants the gear part and not, say a conveyor belt craft? Which mod should be responsible for adding compatibility?

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by Krock » Post

Code: Select all

14:43:49: ERROR[main]: Failed to load and run script from
14:43:49: ERROR[main]: E:\Programme\minetest\bin\..\mods\safr_simple_machines\in
it.lua:
14:43:49: ERROR[main]: ...minetest\bin\..\mods\safr_simple_machines/components.l
ua:113: '}' expected (to close '{' at line 105) near ')'
14:43:49: ERROR[main]: stack traceback:
14:43:49: ERROR[main]:  [C]: in function 'dofile'
14:43:49: ERROR[main]:  ...ramme\minetest\bin\..\mods\safr_simple_machines\init.
lua:1: in main chunk
replace

Code: Select all

111	replacements = {
112		{"safr_simple_machines:screw", "safr_simple_machines:screw"},
113})
with

Code: Select all

111	replacements = {
112		{"safr_simple_machines:screw", "safr_simple_machines:screw"},
113	}
114})
EDIT: same at line 129
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by ak399g » Post

fixed. also, both wheels must be replaced, so added that in.

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by Bas080 » Post

You kept it basic by not adding tons of components, and I love how you made the different components very distinct from one and other. You can easily distinguish them by texture and intended function.

I like the textures. The style is very consistent and it is easy to see what the function of the tool is.

This is a great (example) for showing how a "components" mod should look like.

Hopefully it will give modders insentive to make mods that allow the making of cool machines. Only then will this mod be depended upon, and thus used.

User avatar
spootonium
Member
Posts: 94
Joined: Fri May 02, 2014 01:38
Location: Down the mine.

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by spootonium » Post

Awhile back, I compiled a list of components. It grew quite large, so I dispaired of ever implementing it. Still, if it could be of any use to you, here is the component list.

Code: Select all

== Components ==

-- tool heads
_arrow_head
_axe_head
_battleaxe_head
_bodkin_head
_chisel_blade
_dagger_blade
_drill_bit
_file_blade
_halberd_blade
_hammer_head
_hoe_head
_knife_blade
_mace_head
_pickaxe_head
_pitchfork_head
_ploughshare
_saw_blade
_scraper_blade
_screwdriver_blade
_shovel_blade
_spear_head
_sword_blade
_warhammer_head

-- tool handles
_butt
_grip
_guard
_handle
_knob
_pommel
_sling
_stock

-- primatives
_bar
_brick
_chunk
_foil
_fibre
_fragment
_granules
_lump
_node
_paste
_plate
_powder
_pulp
_rod
_scrap
_shard
_sheet
_stack
_slice
_wad
_wire

-- geometric planes, solids, and vessels
_ball
_band
_box
_cone
_column
_cube
_cylender
_disc
_globe
_prism
_ring
_slope
_square
_tube

-- components & simple "machines"
_anvil
_axle
_bag
_barrel
_bellows
_belt
_bob
_bolt
_bottle
_brush
_bulb
_bushing
_button
_cable
_case
_chain
_coil
_comb
_crank
_cup
_cushion
_damper
_dial
_diaphragm
_eyelet
_filament
_filter
_flap
_frame
_funnel
_gasket
_gear
_globe
_gnommon
_grid
_grille
_grommet
_hook
_horn
_hose
_lens
_lever
_loop
_lug
_mould
_nail
_needle
_nut
_pan
_panel
_pin
_pipe
_piston
_pivot
_pot
_press
_pulley
_rack
_rail
_ratchet
_reel
_reflector
_rocker
_roller
_sail
_screen
_screw
_scroll
_sear
_shaft
_shutter
_spindle
_spigot
_spool
_sprocket
_strap
_stud
_tab
_table
_tablet
_tank
_tape
_toggle
_valve
_vane
_vessel
_washer
_wedge
_wheel
_wick
_widget
_windlass
_wiper
I also made a list of "crafting nodes" to produce them and other craftitems, but I don't know how much use that would be to you.
I write code. Sometimes, it even works.

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by afflatus » Post

This may be just what I was looking for. Thank you!
Grailtest is stirring ...

Nyarg
Member
Posts: 276
Joined: Sun May 15, 2016 04:32

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by Nyarg » Post

ak399g wrote:I've seen a few 'craft component' type mods around, but most use steel as the primary ore of choice and aren't based off of the classic Renaissance simple machines.
What is "Renaissance simple machines" ? Renaissance member is not found.
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by afflatus » Post

Nyarg wrote:What is "Renaissance simple machines" ? Renaissance member is not found.
Archimedes only defined the lever, pulley, and screw as "simple machines". By the Renaissance (14th - 17th century), the list had been expanded to include wedge, inclined plane, wheel and axle. They had also begun to classify compound machines made out of simple components.
Grailtest is stirring ...

User avatar
Wuzzy
Member
Posts: 4804
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by Wuzzy » Post

I found a bug: The belt is called “Gear”.

Apart from that, the mod seems almost release-ready.
I just would add the usual metadata files (screenshot.png, mod.conf, description.txt. See lua_api.txt for more info) and call it version 1.0.

Intllib support would be nice.

It would be nice if the mod had its own repository; it is pretty annoying to download and work with it right now.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by texmex » Post

Man I wish a mod with some basic mechanical machinery would be built off of this.

User avatar
TechNolaByte
Member
Posts: 465
Joined: Wed May 10, 2017 21:00
GitHub: TechNolaByte

Re: [Mod] SAFR's Simple Machines [0.1] [safr_simple_machines

by TechNolaByte » Post

-deleated
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.

Post Reply

Who is online

Users browsing this forum: apercy and 27 guests