[Mod] Abjphabet [abjphabet]

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

-Make these nodes into uncraftable minables
2
18%
-Go on and think up craft recipes anyway
9
82%
 
Total votes : 11

User avatar
12Me21
Member
 
Posts: 826
Joined: Tue Mar 05, 2013 00:36

Re: [Mod] Abjphabet [abjphabet]

by 12Me21 » Thu Apr 09, 2015 12:35

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: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Thu Apr 09, 2015 15:26

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

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Thu Apr 09, 2015 15:27

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: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Thu Apr 09, 2015 15:30

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: 826
Joined: Tue Mar 05, 2013 00:36

Re: [Mod] Abjphabet [abjphabet]

by 12Me21 » Thu Apr 09, 2015 18:42

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

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Fri Apr 10, 2015 09:55

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

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 487
Joined: Thu Feb 27, 2014 19:19
IRC: rbduck
In-game: rubberduck

Re: [Mod] Abjphabet [abjphabet]

by rubberduck » Fri Apr 10, 2015 12:40

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: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Sat Apr 11, 2015 16:17

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

Re: [Mod] Abjphabet [abjphabet]

by death » Sun Apr 12, 2015 22:06

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Sun Apr 19, 2015 13:00

ANNOUNCEMENT!!!

Development of this mod has been moved to this awesome modpack at https://forum.minetest.net/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: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Mod] Abjphabet [abjphabet]

by ExeterDad » Sun Apr 19, 2015 19:56

Sounds "awesome."

:P
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Mon Apr 20, 2015 10:18

LOL hahahahaha your sooooooo funny Exeter:Dad
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Mod] Abjphabet [abjphabet]

by ExeterDad » Mon Apr 20, 2015 10:27

٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

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

Re: [Mod] Abjphabet [abjphabet]

by Don » Mon Apr 20, 2015 14:12

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: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Abjphabet [abjphabet]

by ABJ » Mon Apr 20, 2015 15:53

No We're de-topicing a MineKansen train.
 

Previous

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 13 guests

cron