Post your modding questions here
- hunterdelyx1
- Member
- Posts: 27
- Joined: Fri Aug 10, 2012 02:14
Why is nobody reading https://github.com/minetest/minetest/bl ... ua_api.txt?
>/worlds/*WORLDNAME*/worldmods
Both mods in this folder and global mods will work.
>/worlds/*WORLDNAME*/game/mods
Creating special game for this world. Only mods from this folder will work.
>/worlds/*WORLDNAME*/worldmods
Both mods in this folder and global mods will work.
>/worlds/*WORLDNAME*/game/mods
Creating special game for this world. Only mods from this folder will work.
Still waiting for utf 8 minetest formspec support, looking at freeminer.
-
- Member
- Posts: 4287
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Yes, the model that is used for the player can also be used for mobs. Some mods do that. Perhaps the Doppelgaenger mod may help you.DeepGaze wrote: is there a lua entity for sam/singleplayer I could use for a texture tester/game piece
A list of my mods can be found here.
- fairiestoy
- Member
- Posts: 191
- Joined: Sun Jun 09, 2013 19:25
- Location: Germany
Its all about this script:
Github link
The goal is, to kick all online players when the server is about to shutdown. For some reason, its not working, and im at the end with my thoughts about it. Instead of kicking the players in the list returned by .get_connected_players(), it just ignores it and starts looping again. Also the .request_shutdown call is ignored, until all players have left. The process then dies, and thats it.
The first time while testing, the shutdown request was ignored, due to the fact that i was not running the server as seperate process ( singleplayer started server ). After 'fixing' that, i inserted the kicking code, but its not working for some reason i cannot explain.
Im sure that i missed something, but i can't find it. Would be nice if somebody could point me to it.
So my question: What the cobble am i doing wrong?
Github link
The goal is, to kick all online players when the server is about to shutdown. For some reason, its not working, and im at the end with my thoughts about it. Instead of kicking the players in the list returned by .get_connected_players(), it just ignores it and starts looping again. Also the .request_shutdown call is ignored, until all players have left. The process then dies, and thats it.
The first time while testing, the shutdown request was ignored, due to the fact that i was not running the server as seperate process ( singleplayer started server ). After 'fixing' that, i inserted the kicking code, but its not working for some reason i cannot explain.
Im sure that i missed something, but i can't find it. Would be nice if somebody could point me to it.
So my question: What the cobble am i doing wrong?
Last edited by fairiestoy on Tue Mar 18, 2014 18:11, edited 1 time in total.
Interesting about new things is, to figure out how it works ...
- teamcrafterz112233
- New member
- Posts: 3
- Joined: Thu Mar 13, 2014 13:32
- 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:
You can't just "request" new versions of minetest. 0.5.0 is a long way off, and shouldn't be rushed. The first mod you suggested is possible, that might actually be something I'll give a shot at. As for your second request, try Blockmen's Creatures mod, PilzAdam's Simple Mobs, or MobF.teamcrafterz112233 wrote:im a need a minetest new version 0.5.0 or 0.5.1 and im a need minecraft player fire on the minetest and more monsters
Back from the dead!
- durtective6
- Member
- Posts: 186
- Joined: Sun Aug 12, 2012 14:19
- In-game: derplez or BlockFrog
- Location: a shed in the desert
Hi, im trying to improve my mod and i wanted to add a series of items that upon right clicking on the ground, generates a small hollow cube (probably 5x5) with another block in the middle of the interior (probably on the floor) and a doorway. However i don't know how to do this. If possible could i have some help.
Like this;
The wool represents a block from my mod
Many thanks.
Like this;
The wool represents a block from my mod
Many thanks.
Last edited by durtective6 on Sat Mar 22, 2014 12:44, edited 1 time in total.
I'm still here, last time I checked at least.
-
- Member
- Posts: 4287
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Items can react to rightclick via on_rightclick(pos, node, clicker, itemstack, pointed_thing). For spawning entire buildings, schematics are helpful (place_schematic). If the intended building is as tiny as shown in your sample, using minetest.add_node might also be sufficient.durtective6 wrote: series of items that upon right clicking on the ground, generates a small hollow cube (probably 5x5) w
A list of my mods can be found here.
- durtective6
- Member
- Posts: 186
- Joined: Sun Aug 12, 2012 14:19
- In-game: derplez or BlockFrog
- Location: a shed in the desert
I plan on using the building shown in the screenshot in my previous post, but each version will have something instead of the red wool. How would I make it so an item spawns the building, I don't know what to do for it; I haven't really played around with these kind of things before. Thanks for the reply.Sokomine wrote: Items can react to rightclick via on_rightclick(pos, node, clicker, itemstack, pointed_thing). For spawning entire buildings, schematics are helpful (place_schematic). If the intended building is as tiny as shown in your sample, using minetest.add_node might also be sufficient.
I'm still here, last time I checked at least.
- Enke
- Member
- Posts: 469
- Joined: Fri Nov 15, 2013 02:56
- GitHub: NANOsoldierEnke
- IRC: Enke
- In-game: Enke
- Location: The internet
Is there any way to get an ore to spawn in both stone and desert stone without having to create a seperate minetest.register_ore? Like: wherein = "default:stone, default:desert_stone"?
Lush8
ExtraVars for Red Eclipse
<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate
ExtraVars for Red Eclipse
<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
DeepGaze wrote:any way to write a pseudo-air node?
Code: Select all
minetest.register_node("modname:airlike", {
description = "Airlike Node",
drawtype = "airlike",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
})
Last edited by paramat on Sun Mar 23, 2014 23:49, edited 1 time in total.
I'm trying to write a mod that plays music at dawn and dusk.
This doesn't work. I don't know enough to know why.
Second: How would one go about writing a chat_command that stops time? I.E. "/stoptime" to halt the world clock, and "/starttime" to set it going again?
Code: Select all
minetest.register_globalstep(
function(dtime)
if minetest.env:get_timeofday() == 0.2
then minetest.sound_play("sunsong")
end
end
)
minetest.register_globalstep(
function(dtime)
if minetest.env:get_timeofday() == 0.8
then minetest.sound_play("sunsong")
end
end
)
Second: How would one go about writing a chat_command that stops time? I.E. "/stoptime" to halt the world clock, and "/starttime" to set it going again?
Last edited by ak399g on Mon Mar 24, 2014 23:23, edited 1 time in total.
aka SAFR
-
- Member
- Posts: 4287
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Take a look at my bell mod at github. It does slightly more than you want (plays a sound each hour and repeats it as much times as the time demands).ak399g wrote: 'm trying to write a mod that plays music at dawn and dusk.
"/set time_speed 0" ought to do.ak399g wrote: Second: How would one go about writing a chat_command that stops time?
A list of my mods can be found here.
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
Something like this should workHybrid Dog wrote:globalstep works ca. every 0.05s, I think, so minetest.env:get_timeofday() won't be exactly 0.8 or 0.2. You could use math.floor and check if the play_sound was already started 2s ago to avoid playing it more times.ak399g wrote:I'm trying to write a mod that plays music at dawn and dusk.This doesn't work. I don't know enough to know why.Code: Select all
minetest.register_globalstep( function(dtime) if minetest.env:get_timeofday() == 0.2 then minetest.sound_play("sunsong") end end ) minetest.register_globalstep( function(dtime) if minetest.env:get_timeofday() == 0.8 then minetest.sound_play("sunsong") end end )
Code: Select all
local is_day
minetest.register_globalstep(
function(dtime)
local t = minetest.get_timeofday()
local new_is_day = (t >= 0.2) and (t < 0.8)
if is_day == nil then
is_day = not new_is_day
end
if new_is_day ~= is_day then
if new_is_day then
minetest.sound_play("rooster") -- Dawn
else
minetest.sound_play("wolf") -- Dusk
end
is_day = new_is_day
end
end
)
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
"dtime" is a double/float/decimal number, it counts in seconds. (ex. 0.06661337)Hybrid Dog wrote: I would let it only try to work every 10s:Code: Select all
local is_day local t0 = 0 minetest.register_globalstep( function(dtime) t0 = t0+dtime --[dtime] = ms if t0 < 10000 then return end t0 = 0 ...
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
Funny, I'd never even thought about that. You shouldn't really need to modify bones, perhaps use register_on_dieplayer in armor to transfer the detached inventory to main. I think that should work but I will try to add something like that myself, now that bones are in the default minetest_game (since a while back actually)Amaz wrote:Is there any way to get items into bones that are in a detached inventory? I would like to get armor from Stu's armor mod into bones, and I'm using 0gb.us' inventory_plus mod. I don't mind modifying the bones mod itself...
Last edited by stu on Wed Mar 26, 2014 22:19, edited 1 time in total.
-
- New member
- Posts: 2
- Joined: Sat Mar 29, 2014 15:07
What does register_ore do if you specify sheet distribution? Does it create various flat deposits like clusters of magnetite and micro line in Dwarf Fortress? Does it create an intermittent sheet of ore that spans the world? If the latter, what determines the altitude of the sheet? Is it the min, the max, the average, or something else? Could someone provide an example of how to use it?
- addi
- Member
- Posts: 666
- Joined: Thu Sep 20, 2012 03:16
- GitHub: adrido
- Location: Black-Forest, Germany
uhh it all hurts in my head.Hybrid Dog wrote:I tried it out some time ago. I saved the yaw with get_look_yaw and added it back to the player but somehow it didn't work. "It [...] pretty randomly as of now."addi wrote:what value does return 'player:get_look_yaw()' (something between 1,5 and -4,6????) and how can i convert it into 0-360 degree?
but i get closer to the solution:
that function returns a radiant like this:
that can be easily converted to degrees :
Code: Select all
local grad = player:get_look_yaw()*180/math.pi
Code: Select all
grad = grad -90;
if grad < 0 then grad = grad + 360 end
but: 270° are on the left side and 90° are on the right side!?
is somebody good in math and is there a way to rotate this ?
one solution could be a switch case with 360 entries... but i hobe there is a better way.
Last edited by addi on Tue Apr 01, 2014 18:18, edited 1 time in total.
-
- Member
- Posts: 197
- Joined: Tue Dec 24, 2013 17:01
- GitHub: chaoswormz
- IRC: CWz
- In-game: CWz
- Location: Banana Land
Can someone please tell me what's wrong with this code. I can't seem to get it to work.
Code: Select all
if minetest.check_player_privs(name, {interact=false}) then
minetest.after(3.5, player:setpos(x=0,y=15,z=0))
end
Last edited by CWz on Thu Apr 03, 2014 11:42, edited 1 time in total.
I am CWz on the following servers: VanessaE's servers. If you see CWz on server other then those then chances are it's a Fake. you can contact me on irc.freenode.net or by PM if you are not sure
t3tNU9hNyeSJxFOmM5fmtGxlfoJrcBCg
t3tNU9hNyeSJxFOmM5fmtGxlfoJrcBCg
-
- Member
- Posts: 4287
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
The player:setpos call is evaluated (and thus executed) immediately, and the return value of that function (whatever that may be) is passed on to minetesminetest.after. Use
and do the setpos in myfunction:
(untested)
Code: Select all
minetest.after(3.5, myfunction, player,{x=0,y=15,z=0} )
Code: Select all
myfunction = function( player, pos )
if( player and pos ) then
player:setpos( pos );
end
end
A list of my mods can be found here.
Who is online
Users browsing this forum: No registered users and 7 guests