Page 1 of 3

[Mod] Abjphabet [abjphabet]

PostPosted: Mon Apr 06, 2015 13:42
by ABJ
Hello all,
This is my first mod ever that I plan to release and I'm only 2 days into modding. But now I know how to make textured nodes myself (Thanks rubenwardy and your website)
Now, what I am planning to make is a bunch of nodes that have the letters of the alphabet, numbers from 0 to 9, and various symbols used in messages written on them. As for what this is used for, this can be used to give your friends BIG TIME messages without using boring chat. Funny stuff like that :D. This is only scribbleware so not optimized for place names (though you can use them for that too but there are waaaaay better mods than my noobtest for that E|:-) )

Licence: WTFPL

Dependencies: None

Here's a screenshot of the current progress as of 6th April 2015
Image



UPDATE!!! SAME DAY...........
Image



UPDATE: 7th April 2015: Finished implementing numbers. Added updated download.
Image




[/b]And here's the download[/b] with the alphabet nodes done, but no crafting recipes yet, as I can't think of good ones yet. PLEASE could anybody suggest some recipes? :))))



MAJOR UPDATE!!!!! [8th April 2015]: Total and complete code overhaul, thanks to 12Me21. Added a letter machine (Thanks to 12Me21). Letter blocks are no longer existant in the creative inventory. You have to create them using the letter machine, as demonstrated below.


Letter Machine: I haven't yet added a texture yet but it works
Image


Put paper in machine: And type the letter/number that you want. Numbers only range from 0 to 9. NOTE: Symbols do not work yet as they have not been implemented yet.
Image


Make block: Press the "Paper --> Letter" button and then take your block from the output.
Image


NOTE: There is no inventory description for the crafted blocks, due to an unknown bug. I have checked the code, and although the code in THIS version was not written by me, and the meanings are beyond me, I can tell for sure that 12Me21 intended to put in invdescriptions.

And, again, thank you 12Me21 for the code :)))) you have helped a lot!




Feel free to give feature ideas especially as this is a WIP mod.
And as this is my first mod and first shot at modding ever, any constructive criticsm is welcome. (That means no "wut r tdos tings dey luk lik d**ks" or "Luuuuuk at da baby tryin to mod! noooooooob" type of posts :)

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Mon Apr 06, 2015 14:31
by Sokomine
Maybe you ought to try a font that's a bit clearer and sticks more to lines than handwritten letters. A very simple font style might be best.

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Mon Apr 06, 2015 15:25
by 12Me21
I'm guessing those textures are just temporary,

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Mon Apr 06, 2015 15:40
by ABJ
If I can figure out how to write with GIMP, yes they are temporary. :)

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Mon Apr 06, 2015 17:12
by mahmutelmas06
ABJ wrote:If I can figure out how to write with GIMP, yes they are temporary. :)


There is a textbox for this function in gimp or any image editor you dont have write with brush :-D

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Mon Apr 06, 2015 17:15
by ABJ
I know I just can't figure it out how to use that beastly thing so I used MS P instead

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Mon Apr 06, 2015 17:24
by ABJ
Can a moderator please move this topic to released?

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Mon Apr 06, 2015 17:43
by riff
ABJ wrote:Can a moderator please move this topic to released?

I think there is a topic for requests

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Mon Apr 06, 2015 20:58
by 12Me21
I would recommend using 16x16 textures, because that would fit in with the rest of the textures in the game.

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Mon Apr 06, 2015 22:01
by rubenwardy
Well done!

You've taken the first step to becoming a master modder. Don't be afraid to ask for help (in a non pestering way, and when you've tried to solve the problem yourself). The best resource in learning to mod is the community: looking at the existing mods, reading forum posts and asking.

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Tue Apr 07, 2015 10:58
by ABJ
rubenwardy wrote:Well done!

You've taken the first step to becoming a master modder. Don't be afraid to ask for help (in a non pestering way, and when you've tried to solve the problem yourself). The best resource in learning to mod is the community: looking at the existing mods, reading forum posts and asking.

Image



And about the 16x16 thingy........
I don't think such a low resolution would look good with these letters, and that along with the fact that I don't know how to.

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Tue Apr 07, 2015 11:27
by ExeterDad
ABJ wrote:
rubenwardy wrote:Well done!

You've taken the first step to becoming a master modder. Don't be afraid to ask for help (in a non pestering way, and when you've tried to solve the problem yourself). The best resource in learning to mod is the community: looking at the existing mods, reading forum posts and asking.

Image



And about the 16x16 thingy........
I don't think such a low resolution would look good with these letters, and that along with the fact that I don't know how to.

THIS... is about the coolest post I've seen in a long time. This is community.

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Tue Apr 07, 2015 11:45
by 12Me21
ExeterDad wrote:
ABJ wrote:
rubenwardy wrote:Well done!

You've taken the first step to becoming a master modder. Don't be afraid to ask for help (in a non pestering way, and when you've tried to solve the problem yourself). The best resource in learning to mod is the community: looking at the existing mods, reading forum posts and asking.

Image



And about the 16x16 thingy........
I don't think such a low resolution would look good with these letters, and that along with the fact that I don't know how to.

THIS... is about the coolest post I've seen in a long time. This is community.

I don't know...

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Tue Apr 07, 2015 12:29
by ABJ
ExeterDad wrote:THIS... is about the coolest post I've seen in a long time. This is community.

Image


BTW 12Me21 why are you so upset?

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Tue Apr 07, 2015 12:36
by twoelk
12Me21 wrote:
ExeterDad wrote:
...lotsofsnip...

THIS... is about the coolest post I've seen in a long time. This is community.

I feel the exact opposite...

the hottest post?

Re: [Mod] Abjphabet [abjphabet]

PostPosted: Tue Apr 07, 2015 12:40
by maikerumine
This is a great mod! I would like better for blocky letters and maybe colour option but adding colour would increase texture amount which add lag.

The immediate downside to mod if used on server is for unpleasant language and attacks.

Re: [Mod] Abjphabet [abjphabet]

PostPosted: Tue Apr 07, 2015 12:49
by ABJ
maikerumine wrote:This is a great mod! I would like better for blocky letters and maybe colour option but adding colour would increase texture amount which add lag.

The immediate downside to mod if used on server is for unpleasant language and attacks.

-How do I decrease texture resolution?
-I was planning to add colors both to the letters and colors and also maybe glowing nodes in the future.
-That tho..............well I could always make this a precious minable......should I do so? (General Question)

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Tue Apr 07, 2015 12:51
by ABJ
twoelk wrote:the hottest post?

What do you mean?


EDIT: LOL..........Now I get it hahahaha
But wouldn't the WARMEST post be more appropriate?

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Tue Apr 07, 2015 14:30
by twoelk
ABJ wrote:But wouldn't the WARMEST post be more appropriate?

but not as funny ;-P

btw ... regarding this
ABJ wrote:I haven't been able to think up of good recipes. Should I...........

and this
ABJ wrote:... and also maybe glowing nodes in the future

you may want to study how others solved this


Re: [Mod] Abjphabet [abjphabet]

PostPosted: Tue Apr 07, 2015 15:16
by 12Me21
ABJ wrote:-How do I decrease texture resolution?

I can make some 16x16 textures, and then there can be an option to either have the high-res textures or my 16x16 ones.

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Tue Apr 07, 2015 15:20
by 12Me21
ABJ wrote:I haven't been able to think up of good recipes.

Some other mods have used braille, but doesn't seem like a good idea, since you still need to look at a chart to see how to craft stuff.
Maybe make a machine where you type in the letter/number/symbol that you want, and it makes it (though that is kind of complicated to do)

Re: [Mod] Abjphabet [abjphabet]

PostPosted: Tue Apr 07, 2015 15:36
by Sokomine
As far as receipes go: Why not stick to one craftable block which is empty and can be set to a text after it has been placed? The block could take further plain blocks out of the player's inventory and place them to the right of the current block according to what the player typed.

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Tue Apr 07, 2015 15:54
by ABJ
twoelk wrote:
ABJ wrote:But wouldn't the WARMEST post be more appropriate?

but not as funny ;-P

btw ... regarding this
ABJ wrote:I haven't been able to think up of good recipes. Should I...........

and this
ABJ wrote:... and also maybe glowing nodes in the future

you may want to study how others solved this


I'll look it up and see what I need to do.

Sokomine wrote:As far as receipes go: Why not stick to one craftable block which is empty and can be set to a text after it has been placed? The block could take further plain blocks out of the player's inventory and place them to the right of the current block according to what the player typed.

I also thought of that, but the coding for the machine was what destroyed me. If I manage to learn the codings, YES that is a good idea

12Me21 wrote:
ABJ wrote:-How do I decrease texture resolution?

I can make some 16x16 textures, and then there can be an option to either have the high-res textures or my 16x16 ones.

Very much thank you if you will :)))))))))))) P.S. Do you mean like two downloads?



By the way, I have a question. When I copy-paste code and edit it to fit my needs, it works perfectly and displays the node. But when I write by hand the SAME code, it comes up with some ridiculous error. I tried using notepad++ but still this persists. From what I've so far discovered, ALL the spaces in the init.lua's seem to be special characters of their own, which I can't write. How do I solve this?

Re: [Mod] Abjphabet [abjphabet]

PostPosted: Tue Apr 07, 2015 16:00
by ABJ
As for the Braille, I could have mod documentation on that, or, even better, actually make a "Braille guide" that could be stuck to walls like the signs and right clicked to view the craft charts. And/Or I could make a plugin for inventory plus mod that adds a Braille guide to the inventory.

But in the end, it all boils down to how much lua I know.

Re: [Mod] Abjphabet [abjphabet]

PostPosted: Tue Apr 07, 2015 16:01
by rubenwardy
The minetest community usually uses tabs for indentation, but that doesn't actually matter.

Image

Re: [WIP][Mod]Abjphabet[abjphabet]

PostPosted: Tue Apr 07, 2015 18:15
by 12Me21
ABJ wrote:[
12Me21 wrote:
ABJ wrote:-How do I decrease texture resolution?

I can make some 16x16 textures, and then there can be an option to either have the high-res textures or my 16x16 ones.

Very much thank you if you will :)))))))))))) P.S. Do you mean like two downloads?


Yes, there would be a high-res and 16x16 download, plus texture packs for people who play on servers that have the mod. (if the server used the 16x16 version, but you wanted the high-res version, you could use a texture pack)

Re: [Mod] Abjphabet [abjphabet]

PostPosted: Tue Apr 07, 2015 19:12
by cx384
Maybe you should ad some special character`s. (like ←→↓↑!¡?¿Ω߀&"\ / ...)

Re: [Mod] Abjphabet [abjphabet]

PostPosted: Tue Apr 07, 2015 19:33
by 12Me21
cx384 wrote:Maybe you should ad some special character`s. (like ←→↓↑!¡?¿Ω߀&"\ / ...)

I think it only needs common symbols like punctuation and arrows.

Re: [Mod] Abjphabet [abjphabet]

PostPosted: Tue Apr 07, 2015 20:46
by 12Me21
I made a much more efficient version of the code, now you can more easily add or remove blocks:

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


Re: [Mod] Abjphabet [abjphabet]

PostPosted: Tue Apr 07, 2015 21:18
by 12Me21
I'lm almost done making a machine that will craft them!
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[10,11;]"..
         "field[0,0;2,1;lettername;Letter;]"..
         "list[current_name;input;1,1;1,1;]"..
         "list[current_name;output;1,2;1,1;]"..
         "list[current_player;main;1,7;8,4;]"..
         "button[7,8;6,4;name;label]")--6 4 5 4
         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
         local give = {}
         give[1]=inv:add_item("output","abjphabet:"..fields.lettername)
         inputstack:take_item()
         inv:set_stack("input",1,inputstack)
      end   
   end
})

--Craft

















type the letter/number you want into the text box, put a piece of paper in the top item slot, then press enter and go back in and the paper will be crafted into the letter you typed! (currently It doesn't check the input so it'll probably give an error or unknown node if you type something else.)