Post your modding questions here

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48

by Traxie21 » Wed Feb 06, 2013 18:39

Like this:

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 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: 266
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro

by pandaro » Wed Feb 06, 2013 18:52

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

by Likwid H-Craft » Wed Feb 06, 2013 19:08

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

by Traxie21 » Wed Feb 06, 2013 20:26

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:
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
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

by PilzAdam » Wed Feb 06, 2013 20:27

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:
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
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
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
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

by Traxie21 » Wed Feb 06, 2013 20:31

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

by PilzAdam » Wed Feb 06, 2013 20:33

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

by Traxie21 » Wed Feb 06, 2013 20:37

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

EDIT: Got some help on IRC:

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
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: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Thu Feb 07, 2013 22:33

Can anyone tell me how to make the texture not change random colors? It's really annoying.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
sdzen
Member
 
Posts: 1170
Joined: Fri Aug 05, 2011 22:33

by sdzen » Fri Feb 08, 2013 01:33

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.
[h]Zen S.D.[/h] 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

by jojoa1997 » Fri Feb 08, 2013 02:10

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

by PilzAdam » Fri Feb 08, 2013 16:38

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: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Fri Feb 08, 2013 17:45

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.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Fri Feb 08, 2013 17:51

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.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

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

by PilzAdam » Fri Feb 08, 2013 17:54

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: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Fri Feb 08, 2013 19:00

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
 

ArcticStorm
New member
 
Posts: 9
Joined: Fri Feb 08, 2013 07:17

by ArcticStorm » Fri Feb 08, 2013 23:22

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
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Fri Feb 08, 2013 23:29

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 (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sat Feb 09, 2013 01:46

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
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
pandaro
Member
 
Posts: 266
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro

by pandaro » Sat Feb 09, 2013 10:59

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

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

by Topywo » Sat Feb 09, 2013 16:19

pandaro wrote:someone has already done an anvil? I find in that mod?


sda97:

http://forum.minetest.net/viewtopic.php?pid=35981#p35981
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Sun Feb 10, 2013 13:22

Can you make an entity emit light?
 

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

by Likwid H-Craft » Mon Feb 11, 2013 15:55

How do I change the sun, and the moon? since I am building a texture pack.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Mon Feb 11, 2013 17:50

You can't. Those are not currently texturable.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

by lkjoel » Mon Feb 11, 2013 17:50

VanessaE wrote:You can't. Those are not currently texturable.

Wouldn't it be about time to send a pull request then?
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 

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

by Likwid H-Craft » Mon Feb 11, 2013 18:05

Oh why they not then how come, they box looking but texture zero.
Yeah what have a pull request.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

by lkjoel » Mon Feb 11, 2013 18:07

Likwid H-Craft wrote:Oh why they not then how come, they box looking but texture zero.
Yeah what have a pull request.

I'm not sure what you are talking about, but if you are wondering how minetest does it, it's a hardcoded rendering.
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 

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

by Likwid H-Craft » Mon Feb 11, 2013 18:09

Well, I hope on 0.4.5 we have the rights to change the moon and, sun and have add something minecraft don't have.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

by lkjoel » Mon Feb 11, 2013 18:10

Likwid H-Craft wrote:Well, I hope on 0.4.5 we have the rights to change the moon and, sun and have add something minecraft don't have.

Maybe you could file an issue (under the "enhancement" tag) to the minetest github page?
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 

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

by Likwid H-Craft » Mon Feb 11, 2013 18:24

My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

PreviousNext

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 5 guests

cron