[Mod] Abjphabet [abjphabet]

I haven't been able to think up of good recipes. Should I...........

-Make these nodes into uncraftable minables
3
18%
-Go on and think up craft recipes anyway
14
82%
 
Total votes: 17

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Post

12Me21 wrote:ABJ, what type of keyboard do you use?
QWERTY

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Post

Builder123 wrote:

Code: Select all

letters: a,b,c,d,e,f,g,h,I,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
Where does that go?

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: [Mod] Abjphabet [abjphabet]

by rubenwardy » Post

Keyboards are all different. :(

Mine's like this (not my PIC, though)

Image
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

Builder123
Member
Posts: 85
Joined: Mon Dec 15, 2014 21:50
IRC: Builder123
In-game: Builder123

Re: [Mod] Abjphabet [abjphabet]

by Builder123 » Post

Enable letters

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: [Mod] Abjphabet [abjphabet]

by 12Me21 » Post

OK, so now we need to decide on what symbols to include.

I think A-Z, 0-9, plus simple punctuation like . , ? ! ' - , and also arrows: ↑↓←→
that totals 46.

of course, it's simple to add and remove blocks, but we still would need textures.

EDIT:
OK, I just realized that there's a huge problem... some symbols are not allowed in filenames/node names.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Abjphabet [abjphabet]

by Don » Post

12Me21 wrote:OK, so now we need to decide on what symbols to include.

I think A-Z, 0-9, plus simple punctuation like . , ? ! ' - , and also arrows: ↑↓←→
that totals 46.

of course, it's simple to add and remove blocks, but we still would need textures.

EDIT:
OK, I just realized that there's a huge problem... some symbols are not allowed in filenames/node names.
Use the name for the symbol
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: [Mod] Abjphabet [abjphabet]

by 12Me21 » Post

Don wrote:
12Me21 wrote:OK, so now we need to decide on what symbols to include.

I think A-Z, 0-9, plus simple punctuation like . , ? ! ' - , and also arrows: ↑↓←→
that totals 46.

of course, it's simple to add and remove blocks, but we still would need textures.

EDIT:
OK, I just realized that there's a huge problem... some symbols are not allowed in filenames/node names.
Use the name for the symbol
I think i'll just use the ascii number

Builder123
Member
Posts: 85
Joined: Mon Dec 15, 2014 21:50
IRC: Builder123
In-game: Builder123

Re: [Mod] Abjphabet [abjphabet]

by Builder123 » Post

Try Harder @~#}]{[_-+=)(*&^%$£"!¬`?/.,<>:; ALL

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Post

Well I can't add everything at once. I'll start with the essentials like full stop, comma, apostrophe, slashes etc

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: [Mod] Abjphabet [abjphabet]

by rubenwardy » Post

It wouldn't be that hard to use imagemagick to generate all these letters automatically.

Code: Select all

convert -background white -fill black  -font Arial \
          -size 32x32  -gravity center \
          label:A     output.png
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: [Mod] Abjphabet [abjphabet]

by 12Me21 » Post

12Me21 wrote:
Don wrote:
12Me21 wrote:OK, so now we need to decide on what symbols to include.

I think A-Z, 0-9, plus simple punctuation like . , ? ! ' - , and also arrows: ↑↓←→
that totals 46.

of course, it's simple to add and remove blocks, but we still would need textures.

EDIT:
OK, I just realized that there's a huge problem... some symbols are not allowed in filenames/node names.
Use the name for the symbol
I think i'll just use the ascii number
I tried converting them to the ascii numbers, but now I think just using the name is actually simpler, though you have to do more work to add new symbols.

Anyway, I mostly finished the 16x16 textures, they're not perfect but they're pretty good.

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Post

rubenwardy wrote:It wouldn't be that hard to use imagemagick to generate all these letters automatically.

Code: Select all

convert -background white -fill black  -font Arial \
          -size 32x32  -gravity center \
          label:A     output.png
That looks awesome rubenwardy!! No need to do M$ ;P ing anymore!
And now I come to think of it, Arial seems a more appropriate font for this kind of job.
I'll have to check the code 12Me21 gave me to see where this goes.

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Post

12Me21 wrote: Anyway, I mostly finished the 16x16 textures, they're not perfect but they're pretty good.
How did you pull this off?

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Post

I've halted development on this mod until I know which way to go. This is getting too exciting to ignore.

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: [Mod] Abjphabet [abjphabet]

by 12Me21 » Post

Ok, here's my current version of the init.lua:

Code: Select all

local characters = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0",

--ADD SYMBOLS HERE:
",",
".",
"'",
"?",
"!",
":",
"-",
";",
"(",
")",
"+",
"*",
"/",
"^",
"<",
">"}

local characternodenames={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0",

--Put the names for your symbols here (in order):
"comma",
"period",
"apostrophe",
"question_mark",
"exclamation_mark",
"colon",
"dash",
"semi_colon",
"left_p",
"right_p",
"plus",
"star",
"slash",
"up",
"left",
"right"}

for i, char in ipairs(characters) do --do this for all characters in the list
	minetest.register_node("abjphabet:"..characternodenames[i],{
		description = string.upper(char),
		tiles = {"abjphabet_"..characternodenames[i]..".png"},
		groups = {cracky=3}
	})	
end

minetest.register_node("abjphabet:machine", {
	description = "Letter Machine",
	tiles = {"abjphabet_machine.png"},
	groups = {cracky=2},
   
	after_place_node = function(pos, placer)
		local meta = minetest.env:get_meta(pos)
	end,

	on_construct = function(pos)
		local meta = minetest.env:get_meta(pos)
		meta:set_string("formspec","invsize[8,6;]".. --setting up the inventory inside
			"field[3.8,.5;1,1;lettername;Letter;]"..	--text input
			"list[current_name;input;2.5,0.2;1,1;]"..	--material input
			"list[current_name;output;4.5,0.2;1,1;]"..	--letter block output
			"list[current_player;main;0,2;8,4;]"..		--player's inventory
			"button[2.54,-0.25;3,4;name;Paper -> Letter]")	--craft button
			
		local inv = meta:get_inventory()
		inv:set_size("input", 1)
		inv:set_size("output", 1)
	end,

	on_receive_fields = function(pos, formname, fields, sender)
		local meta = minetest.env:get_meta(pos)
		local inv = meta:get_inventory()
		local inputstack = inv:get_stack("input", 1)
		local lettername = fields.lettername
		if lettername and (inputstack:get_name()=="default:paper" or minetest.setting_getbool("creative_mode")) then 
			for i, char in pairs(characters) do
				if char == string.lower(lettername) then 
					local give = {} 
					give[1] = inv:add_item("output","abjphabet:"..characternodenames[i])
					if not minetest.setting_getbool("creative_mode") then
						inputstack:take_item() 
						inv:set_stack("input",1,inputstack)
					end
					break
				end
			end 
		end   
	end
})
and here are my textures:
https://www.dropbox.com/s/3i92d4a4cychv ... z.zip?dl=0
I haven't done all of them yet, and I will probably make changes to these ones later.

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Post

12Me21 wrote:Ok, here's my current version of the init.lua:

Code: Select all

local characters = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0",

--ADD SYMBOLS HERE:
",",
".",
"'",
"?",
"!",
":",
"-",
";",
"(",
")",
"+",
"*",
"/",
"^",
"<",
">"}

local characternodenames={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0",

--Put the names for your symbols here (in order):
"comma",
"period",
"apostrophe",
"question_mark",
"exclamation_mark",
"colon",
"dash",
"semi_colon",
"left_p",
"right_p",
"plus",
"star",
"slash",
"up",
"left",
"right"}

for i, char in ipairs(characters) do --do this for all characters in the list
	minetest.register_node("abjphabet:"..characternodenames[i],{
		description = string.upper(char),
		tiles = {"abjphabet_"..characternodenames[i]..".png"},
		groups = {cracky=3}
	})	
end

minetest.register_node("abjphabet:machine", {
	description = "Letter Machine",
	tiles = {"abjphabet_machine.png"},
	groups = {cracky=2},
   
	after_place_node = function(pos, placer)
		local meta = minetest.env:get_meta(pos)
	end,

	on_construct = function(pos)
		local meta = minetest.env:get_meta(pos)
		meta:set_string("formspec","invsize[8,6;]".. --setting up the inventory inside
			"field[3.8,.5;1,1;lettername;Letter;]"..	--text input
			"list[current_name;input;2.5,0.2;1,1;]"..	--material input
			"list[current_name;output;4.5,0.2;1,1;]"..	--letter block output
			"list[current_player;main;0,2;8,4;]"..		--player's inventory
			"button[2.54,-0.25;3,4;name;Paper -> Letter]")	--craft button
			
		local inv = meta:get_inventory()
		inv:set_size("input", 1)
		inv:set_size("output", 1)
	end,

	on_receive_fields = function(pos, formname, fields, sender)
		local meta = minetest.env:get_meta(pos)
		local inv = meta:get_inventory()
		local inputstack = inv:get_stack("input", 1)
		local lettername = fields.lettername
		if lettername and (inputstack:get_name()=="default:paper" or minetest.setting_getbool("creative_mode")) then 
			for i, char in pairs(characters) do
				if char == string.lower(lettername) then 
					local give = {} 
					give[1] = inv:add_item("output","abjphabet:"..characternodenames[i])
					if not minetest.setting_getbool("creative_mode") then
						inputstack:take_item() 
						inv:set_stack("input",1,inputstack)
					end
					break
				end
			end 
		end   
	end
})
and here are my textures:
https://www.dropbox.com/s/3i92d4a4cychv ... z.zip?dl=0
I haven't done all of them yet, and I will probably make changes to these ones later.
I'm beginning to understand something NOW (YAY!). Thanks for the additional comments. Someday I might be you :D.
Noob question: Are those ends and break commands required?

User avatar
rubberduck
Member
Posts: 505
Joined: Thu Feb 27, 2014 19:19
IRC: rbduck
In-game: rubberduck
Location: error 404 - location not found
Contact:

Re: [Mod] Abjphabet [abjphabet]

by rubberduck » Post

i have an idea for your machine, you could use input nodes / blocks to get these symbol-blocks.
the first would be a "base" block, for example this could be a clay block.

you could even add the possibility to use colored base blocks (background color), but only a few 2 - 3
you could mix the clay block with a white dye to get a white base-block, then add 2 more color variations of the base-block, then you can make these blocks in 3 different colors (uncolored not used as base-block then)

the other input could be some dyes to get the colors to write on the block.
here you could use 3 - 5 different colors and you can get some variations in colors.

the machine could use 2 base blocks and multiple (3 or 4) dyes to get 2 output blocks and you could use a "selection-field" for all supported symbol-blocks (like in color machine)
My game (not minetest): http://forum.freegamedev.net/viewtopic.php?f=22&t=6800

my mods: gold_and_gem, meseconductors

a penguin throws an apple through a window

sometimes i change my "forum location" via user control panel

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Post

I've finally summed up enough energy to start texturing the machine :)

death
Member
Posts: 14
Joined: Sun Apr 12, 2015 20:58
In-game: death
Location: UK, Hampshire

Re: [Mod] Abjphabet [abjphabet]

by death » Post

Code: Select all

local characters = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0"}


for _, name in ipairs(characters) do --do this for all characters in the list
   if tonumber(name) ~= nil then --if it's a number
      local desc = "Number "..name 
   else --if it's a letter
      local desc = "Letter "..string.upper(name) --make the letter uppercase in the description
   end

   minetest.register_node("abjphabet:"..name, {
      description = desc,
      tiles = {"abjphabet_"..name..".png"},
      groups = {cracky=3}
   })
end

minetest.register_node("abjphabet:machine", {
   description = "Letter Machine",
   tiles = {"abjphabet_machine.png"},
   paramtype = "light",
   groups = {cracky=2},
   
   after_place_node = function(pos, placer)
      local meta = minetest.env:get_meta(pos)
   end,

   on_construct = function(pos)
      local meta = minetest.env:get_meta(pos)
      meta:set_string("formspec", "invsize[8,6;]"..
         "field[3.8,.5;1,1;lettername;Letter;]"..
         "list[current_name;input;2.5,0.2;1,1;]"..
         "list[current_name;output;4.5,0.2;1,1;]"..
         "list[current_player;main;0,2;8,4;]"..
         "button[2.54,-0.25;3,4;name;Paper -> Letter]")
         local inv = meta:get_inventory()
      inv:set_size("input", 1)
      inv:set_size("output", 1)
   end,

   on_receive_fields = function(pos, formname, fields, sender)
      local meta = minetest.env:get_meta(pos)
      local inv = meta:get_inventory()
      local inputstack = inv:get_stack("input", 1)
      if fields.lettername ~= nil and inputstack:get_name()=="default:paper" then
         for _,v in pairs(characters) do
            if v == fields.lettername then
               local give = {}
               give[1] = inv:add_item("output","abjphabet:"..fields.lettername)
               inputstack:take_item()
               inv:set_stack("input",1,inputstack)
               break
            end
         end
         
      end   
   end
})
Last edited by ShadowNinja on Mon Apr 13, 2015 16:35, edited 1 time in total.
Reason: Add code tags
builder123: death -- you can set up shops now..
death: ????? Builder think your drunk?????

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Post

ANNOUNCEMENT!!!

Development of this mod has been moved to this awesome modpack at viewtopic.php?f=9&t=11890.

It includes this mod and many awesome others as well, with many many more even more awesome mods planned for the future! It's REALLY worth checking out!! It's even more complete than this mod, with textures for the letter machine, and crafting too! Do check it out! I promise you it'll be awesome :)
--ABJ

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Abjphabet [abjphabet]

by ExeterDad » Post

Sounds "awesome."

:P

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Post

LOL hahahahaha your sooooooo funny Exeter:Dad

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Abjphabet [abjphabet]

by ExeterDad » Post


User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Abjphabet [abjphabet]

by Don » Post

ExeterDad wrote:lol https://youtu.be/StTqXEQ2l-Y
Are we living our dream?
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Post

No We're de-topicing a MineKansen train.

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests