Post your modding questions here

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Likwid H-Craft wrote:How do I make the, Version hidden, and change it?

And can I make Mouse 2 Click to do something just for, one item in the init.lua?
1st: Please dont double post.
2nd: http://forum.minetest.net/viewtopic.php?id=4483
3rd: Do you mean doubleclick?

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

Yes I made this but I don't know how I make it work so, Adam do you know how? or anyone?
Image
How do I get this to work?
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Likwid H-Craft wrote:Yes I made this but I don't know how I make it work so, Adam do you know how? or anyone?
Image
How do I get this to work?
Add the background element to the players formspec.

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

PilzAdam wrote:
Likwid H-Craft wrote:Yes I made this but I don't know how I make it work so, Adam do you know how? or anyone?
Image
How do I get this to work?
Add the background element to the players formspec.
So how do I put the img make, it work?
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

User avatar
pandaro
Member
Posts: 320
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro
Location: behind

by pandaro » Post

there is a way to know the position of a player whose name I know?
sorry for bad english
Linux debian 7 wheezy 64
kde

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

Like this:

Code: Select all

local position = minetest.env:get_player_by_name(name):getpos()
print(tostring(position))
That ought to work, havn't tested it. Try it yourself :3
Last edited by Traxie21 on Wed Feb 06, 2013 18:39, edited 1 time in total.

User avatar
pandaro
Member
Posts: 320
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro
Location: behind

by pandaro » Post

local position = minetest.env:get_player_by_name(name):getpos()
print(tostring(position))
d'oh!
was so simple...
sorry for bad english
Linux debian 7 wheezy 64
kde

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

How do I remove this see though, so I can have it just a, table.
Image

I don't like it be color I just like it be allowed, to see the block under it, and all around like glass, works. unless that what I do, I use the the Glass Code.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

Topic: How does one use a string variable to refrence a table in ipairs() [ or any other thing for that matter]

Reason: I have multiple tables which are refrenced by string variables that I need to be able to use. (Ranks module for ServerXtended)

EG:

Code: Select all

t = {steve="steve"}

tablename = "t"

for i,v in ipairs(tablename) do print(v) end
More Info: I've tried but I can't seem to make it work.
Last edited by Traxie21 on Wed Feb 06, 2013 20:27, edited 1 time in total.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Traxie21 wrote:Topic: How does one use a string variable to refrence a table in ipairs() [ or any other thing for that matter]

Reason: I have multiple tables which are refrenced by string variables that I need to be able to use. (Ranks module for ServerXtended)

EG:

Code: Select all

t = {steve="steve"}

tablename = "t"

for i,v in ipairs(tablename) do print(v) end
More Info: I've tried but I can't seem to make it work.
Use

Code: Select all

for field_name, field_value in pairs(table)
Last edited by PilzAdam on Wed Feb 06, 2013 20:28, edited 1 time in total.

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

Erm, I don't see how that will help here.

The error I get is this:
bad argument #1 to 'pairs' table expected, got nil

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Traxie21 wrote:Erm, I don't see how that will help here.

The error I get is this:
bad argument #1 to 'pairs' table expected, got nil
Oh, sorry, I havent read the whole question. You have to use pairs() to access fields that are not indexed by integers.
And you have to pass the table and not a string with the name to pairs() or ipairs(). AFAIK you cant convert a string to a variable name in Lua.

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

Not Good.... Now I have to rethink the whole format I have been saving this in...

EDIT: Got some help on IRC:

Code: Select all

Admins = { 

privs = { 
"se_admin=true", "se_player=true", "homes=true" 
} 

}

group = "Admins"

--print(tostring(_G[group])) Works properly, gives me the table ID.

print(tostring(_G[group..'["privs"]']))

That ought to give me the table ID. But no, still returns nil. Can someone help me use that to print a table within a table?
Last edited by Traxie21 on Wed Feb 06, 2013 22:18, edited 1 time in total.

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

Can anyone tell me how to make the texture not change random colors? It's really annoying.
Back from the dead!

User avatar
sdzen
Member
Posts: 1170
Joined: Fri Aug 05, 2011 22:33
Location: Paradise (your not allowed)

by sdzen » Post

Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
Well evergreen try turning off shaders apparently that can cause issues of this variety.

Zen S.D.

The next generation of tranquility!
malheureusement mon français n'est pas bon :<
Owner of the Zelo's
In game name: MuadTralk, spdtainted, sdzen, sd zen, sdzeno

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

you could make it check every server-step and if the privs are not right then have it set the privs
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
The engine uses a random color if the texture isnt found.

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

PilzAdam wrote:
Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
The engine uses a random color if the texture isnt found.
That isn't what happened, it looks fine until I place a bunch next to each other.
Back from the dead!

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

PilzAdam wrote:
Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
The engine uses a random color if the texture isnt found.
Try the Moreblocks mod and try and build something large with it. Then you will see what I mean.
Back from the dead!

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Evergreen wrote:
PilzAdam wrote:
Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
The engine uses a random color if the texture isnt found.
Try the Moreblocks mod and try and build something large with it. Then you will see what I mean.
Screenshot?

User avatar
Topywo
Member
Posts: 1721
Joined: Fri May 18, 2012 20:27

by Topywo » Post

Evergreen wrote:Try the Moreblocks mod and try and build something large with it. Then you will see what I mean.
Did you disable the texture atlas in your minetest.conf? If I don't, on redcrab my cacti-block Oracle get yellow stripes.

enable_texture_atlas = false

User avatar
ArcticStorm
New member
Posts: 9
Joined: Fri Feb 08, 2013 07:17
Location: New Zealand

by ArcticStorm » Post

question: what program do you recommend to make a mod with?
reason: I wanna try to make mods. :)
more info: i'm using windows 7.
Minetest

User avatar
VanessaE
Moderator
Posts: 4504
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

All you need is a good text editor, preferably one with Lua-specific syntax highlighting, good coding skills in general, the Minetest modding API, and one of the various Lua tutorials out there.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

Topywo wrote:
Evergreen wrote:Try the Moreblocks mod and try and build something large with it. Then you will see what I mean.
Did you disable the texture atlas in your minetest.conf? If I don't, on redcrab my cacti-block Oracle get yellow stripes.

enable_texture_atlas = false
Thanks! :D
Back from the dead!

User avatar
pandaro
Member
Posts: 320
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro
Location: behind

by pandaro » Post

someone has already done an anvil? I find in that mod?
sorry for bad english
Linux debian 7 wheezy 64
kde

Locked

Who is online

Users browsing this forum: No registered users and 2 guests