Post your modding questions here

Locked
User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

by ak399g » Post

I know how to install mods per game and also globally. Is there a way to install mods per world?
aka SAFR

User avatar
AMMOnym
Member
Posts: 682
Joined: Tue Sep 10, 2013 14:18
IRC: AMMOnym
In-game: AMMOnym
Location: Slovakia

by AMMOnym » Post

ak399g wrote:I know how to install mods per game and also globally. Is there a way to install mods per world?
In world folder u must make new folder named "Worldmods" and here u can give mods which u want to have in gameplay

User avatar
hunterdelyx1
Member
Posts: 27
Joined: Fri Aug 10, 2012 02:14

by hunterdelyx1 » Post

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.
Still waiting for utf 8 minetest formspec support, looking at freeminer.

User avatar
DeepGaze
Member
Posts: 332
Joined: Fri May 10, 2013 00:49
GitHub: DeepGaze
IRC: DeepGaze
In-game: DeepGaze
Location: Take your best guess

by DeepGaze » Post

is there any code behind the air nodes?/any way to write a pseudo-air node?
Spoiler
a node that mimics air so closely that an abm could make it pass as the original
there's no place like 127.0.0.1
The deep life Minetest text page
minetest cards

User avatar
DeepGaze
Member
Posts: 332
Joined: Fri May 10, 2013 00:49
GitHub: DeepGaze
IRC: DeepGaze
In-game: DeepGaze
Location: Take your best guess

by DeepGaze » Post

in addition to the previous request:
is there a lua entity for sam/singleplayer I could use for a texture tester/game piece
there's no place like 127.0.0.1
The deep life Minetest text page
minetest cards

Sokomine
Member
Posts: 4287
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

by Sokomine » Post

DeepGaze wrote: is there a lua entity for sam/singleplayer I could use for a texture tester/game piece
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.
A list of my mods can be found here.

User avatar
fairiestoy
Member
Posts: 191
Joined: Sun Jun 09, 2013 19:25
Location: Germany

by fairiestoy » Post

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?
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 ...

User avatar
teamcrafterz112233
New member
Posts: 3
Joined: Thu Mar 13, 2014 13:32

by teamcrafterz112233 » Post

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

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

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
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.
Back from the dead!

User avatar
durtective6
Member
Posts: 186
Joined: Sun Aug 12, 2012 14:19
In-game: derplez or BlockFrog
Location: a shed in the desert

by durtective6 » Post

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;
Image
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.

Sokomine
Member
Posts: 4287
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

by Sokomine » Post

durtective6 wrote: series of items that upon right clicking on the ground, generates a small hollow cube (probably 5x5) w
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.
A list of my mods can be found here.

User avatar
durtective6
Member
Posts: 186
Joined: Sun Aug 12, 2012 14:19
In-game: derplez or BlockFrog
Location: a shed in the desert

by durtective6 » Post

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 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.
I'm still here, last time I checked at least.

User avatar
Enke
Member
Posts: 469
Joined: Fri Nov 15, 2013 02:56
GitHub: NANOsoldierEnke
IRC: Enke
In-game: Enke
Location: The internet

by Enke » Post

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

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

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,
})
'is_ground_content = false' will stop cavegen eating the node if the node is added by a mod 'on generated chunk'.
Last edited by paramat on Sun Mar 23, 2014 23:49, edited 1 time in total.

User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

by ak399g » Post

I'm trying to write a mod that plays music at dawn and dusk.

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
)
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?
Last edited by ak399g on Mon Mar 24, 2014 23:23, edited 1 time in total.
aka SAFR

Sokomine
Member
Posts: 4287
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

by Sokomine » Post

ak399g wrote: 'm trying to write a mod that plays music at dawn and dusk.
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: Second: How would one go about writing a chat_command that stops time?
"/set time_speed 0" ought to do.
A list of my mods can be found here.

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

Hybrid Dog wrote:
ak399g wrote:I'm trying to write a mod that plays music at dawn and dusk.

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
)
This doesn't work. I don't know enough to know why.
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.
Something like this should work

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

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

by Krock » Post

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
...
"dtime" is a double/float/decimal number, it counts in seconds. (ex. 0.06661337)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Amaz
Member
Posts: 354
Joined: Wed May 08, 2013 08:26
GitHub: Amaz1
IRC: Amaz
In-game: Amaz

by Amaz » Post

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

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

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...
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)
Last edited by stu on Wed Mar 26, 2014 22:19, edited 1 time in total.

NathanRandallHolt
New member
Posts: 2
Joined: Sat Mar 29, 2014 15:07

by NathanRandallHolt » Post

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?

User avatar
addi
Member
Posts: 666
Joined: Thu Sep 20, 2012 03:16
GitHub: adrido
Location: Black-Forest, Germany

by addi » Post

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?

User avatar
addi
Member
Posts: 666
Joined: Thu Sep 20, 2012 03:16
GitHub: adrido
Location: Black-Forest, Germany

by addi » Post

Hybrid Dog wrote:
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?
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."
uhh it all hurts in my head.
but i get closer to the solution:

that function returns a radiant like this:
Image
Degree-Radian Conversion [Public domain], by Inductiveload (Own work), from Wikimedia Commons
that can be easily converted to degrees :

Code: Select all

local grad = player:get_look_yaw()*180/math.pi
so now i have degrees. but the cero pount is on the left. this can be fixed with this:

Code: Select all

grad = grad -90;
if grad < 0 then grad = grad + 360 end
ok now is the 0° on the top and 180° on the bottom.

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.

CWz
Member
Posts: 197
Joined: Tue Dec 24, 2013 17:01
GitHub: chaoswormz
IRC: CWz
In-game: CWz
Location: Banana Land

by CWz » Post

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

Sokomine
Member
Posts: 4287
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

by Sokomine » Post

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

Code: Select all

minetest.after(3.5, myfunction, player,{x=0,y=15,z=0} )
and do the setpos in myfunction:

Code: Select all

myfunction = function( player, pos )
      if( player and pos ) then
          player:setpos( pos );
     end
end
(untested)
A list of my mods can be found here.

Locked

Who is online

Users browsing this forum: No registered users and 7 guests