Post your modding questions here
Re: Post your modding questions here
You can use minetest.get_connected_players() also
Re: Post your modding questions here
Getting a player object has failed me so far. Even with suggestions. I resorted to modifying the main config file and adjusting gravity jump etc there.
However I was wondering if there is a way to debug a script. Does anyone know how? I need more useful errors than the standard can't load the lua file.
However I was wondering if there is a way to debug a script. Does anyone know how? I need more useful errors than the standard can't load the lua file.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your modding questions here
leeminer, see viewtopic.php?f=11&t=7224 for manual change of physics by chat command, or viewtopic.php?f=11&t=6329 for automatic change of physics depending on location.
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
Re: Post your modding questions here
There is no built-in debugging mechanism. You can use the print() function to send information to Minetest's standard output (or error—not sure which), which is generally visible when you start Minetest from a command line. The minetest.debug() and minetest.log() functions do similar things. I also created a LuaCmd mod which allows you to run snippets of Lua code from Minetest's chat console and is intended to help with some debugging tasks (such as calling global functions and examining global variables). If you use that mod, give this command a try:leeminer wrote:Getting a player object has failed me so far. Even with suggestions. I resorted to modifying the main config file and adjusting gravity jump etc there.
However I was wondering if there is a way to debug a script. Does anyone know how? I need more useful errors than the standard can't load the lua file.
Code: Select all
/lua me:set_physics_override({ gravity=3, jump=3, speed=3 })
EDIT: Oh, by the way, setting both gravity and jump to 3 might be a bit cross-purpose, as one allows you a stronger initial jump, while the other causes gravity to pull stronger. You might try one or the other, or setting gravity to a fractional value (e.g. 0.333). By increasing both you may have little or no impact on the player's jump height, though falling off a cliff could be different.
- davidthecreator
- Member
- Posts: 452
- Joined: Mon Aug 18, 2014 19:48
- GitHub: daviddoesminetest
- In-game: DavidDoesMinetest
- Location: Lithuania
how to put mods online
hi im new at this but im kinda trying to make mods and finaly im succeeded so i would like to know how to make them downloadable to others
Re: Post your modding questions here
I am very new to entities, and I would like to know this: How are setacceleration, setvelocity, etc used? I've tried to call them, but I can't figure out how.
Re: how to put mods online
You could search for an upload site that let's you upload mods and screenshots. Look at the links in mod releases to get an overview of the most common.davidthecreator wrote:hi im new at this but im kinda trying to make mods and finaly im succeeded so i would like to know how to make them downloadable to others
I use dropbox, it suites me best at this moment. GitHub is also a possibility, but that may take more time to get accustomed to. Or Bitbucket.
Re: Post your modding questions here
davidthecreator you can always use the forum attachment function if you mod isn't huge. If you look below where you type a reply or a topic, there is an options tab and an upload attachment tab. Just click the upload attachment tab and then browse to the file you want to upload. Once selected, just click the add the file button and your file will be uploaded to the forum, you can even give it a comment if you want to.
Re: Post your modding questions here
I love with the idea of mobs, so I am trying to make some. I made models in blender, but I don't know how to use them in to the mod. I think you should use .x files ,but blender would not let me export the models as .x files.
- 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:
Re: Post your modding questions here
Export them as .b3d instead. I made a tutorial here: viewtopic.php?p=151207#p151207fireuser wrote:I love with the idea of mobs, so I am trying to make some. I made models in blender, but I don't know how to use them in to the mod. I think you should use .x files ,but blender would not let me export the models as .x files.
Re: Post your modding questions here
I tried to create a first-person-shooter weapon mod https://github.com/yetanotherusernamebe ... omsdayarms using a code of cannons mod, but ran into an issue with the entities: I can shoot through walls when facing it close enough. The reason for this is the initial velocity: bullet spawns inside of a wall, gets velocity and thus not collide with it. When I set velocity to 0, bullet collides successfully. Is there an easy way to workaround this problem? Or maybe I should not use entities for bullets at all?
- 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:
Re: Post your modding questions here
If you want the bullets to be visual, nothing else would really work (even entities are a bit iffy for something moving that fast). Most gun mods I have seen don't use visuals for the bullet, and just use math for figuring that out.drkwv wrote:I tried to create a first-person-shooter weapon mod https://github.com/yetanotherusernamebe ... omsdayarms using a code of cannons mod, but ran into an issue with the entities: I can shoot through walls when facing it close enough. The reason for this is the initial velocity: bullet spawns inside of a wall, gets velocity and thus not collide with it. When I set velocity to 0, bullet collides successfully. Is there an easy way to workaround this problem? Or maybe I should not use entities for bullets at all?
Re: Post your modding questions here
Honestly, I'd like to have some visuals. Like the old Ace of Spades had.Evergreen wrote:Most gun mods I have seen don't use visuals for the bullet, and just use math for figuring that out.
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
Re: Post your modding questions here
Quick one, is it safe to use alpha channel for HUD images?
(by that I am referring to partial transparency)
(by that I am referring to partial transparency)
- HeroOfTheWinds
- Member
- Posts: 470
- Joined: Wed Apr 23, 2014 23:16
- GitHub: HeroOfTheWinds
- IRC: WindHero
- Location: Hawaii
Re: Post your modding questions here
Yup! :) Just take a look at Big Freaking Dig, the tool hotbar uses a semi-transparent overlay for the selected tool, if I remember correctly.stu wrote:Quick one, is it safe to use alpha channel for HUD images?
(by that I am referring to partial transparency)
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
-
- New member
- Posts: 3
- Joined: Mon Aug 25, 2014 02:16
Re: Post your modding questions here
Hi, I'm new to minetest, and I'm trying to write my first mod. Basically, it's a trade machine mod where the player who places it sets up what he wants to trade and what to trade for, and fills the machine's stock. When another player right clicks on it, they should see a different formspec that only shows what's being traded and a button to perform the trade.
My question is this: How do I make a node show two different formspecs to two different players when they right click on it?
My question is this: How do I make a node show two different formspecs to two different players when they right click on it?
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
Re: Post your modding questions here
Instead of using the node's metadata formspec like a chest does, you'll want to use a callback function (e.g. on_rightclick) to call minetest.show_formspec. That way you can vary the formspec each time a player interacts with the node.ultimatemuffin wrote:Hi, I'm new to minetest, and I'm trying to write my first mod. Basically, it's a trade machine mod where the player who places it sets up what he wants to trade and what to trade for, and fills the machine's stock. When another player right clicks on it, they should see a different formspec that only shows what's being traded and a button to perform the trade.
My question is this: How do I make a node show two different formspecs to two different players when they right click on it?
-
- New member
- Posts: 3
- Joined: Mon Aug 25, 2014 02:16
Re: Post your modding questions here
Oh, I see. so then from the callback, how do I refer to the node's inventory when I create the formspec?prestidigitator wrote:Instead of using the node's metadata formspec like a chest does, you'll want to use a callback function (e.g. on_rightclick) to call minetest.show_formspec. That way you can vary the formspec each time a player interacts with the node.ultimatemuffin wrote:Hi, I'm new to minetest, and I'm trying to write my first mod. Basically, it's a trade machine mod where the player who places it sets up what he wants to trade and what to trade for, and fills the machine's stock. When another player right clicks on it, they should see a different formspec that only shows what's being traded and a button to perform the trade.
My question is this: How do I make a node show two different formspecs to two different players when they right click on it?
when I was calling it from the node's formspec I could just use current_name, but that won't work in the callback and I can't find documentation for the syntax for it.
eg: "list[current_name;sale_memory;1,2;3,3;]"..
What can I replace current_name with?
Edit: After scouring the source, I figured it out. The "inventory_location" part of a list formspec needs to be formatted as one of 5 specific formats:
switch(type){
case InventoryLocation::UNDEFINED:
os<<"undefined";
break;
case InventoryLocation::CURRENT_PLAYER:
os<<"current_player";
break;
case InventoryLocation::PLAYER:
os<<"player:"<<name;
break;
case InventoryLocation::NODEMETA:
os<<"nodemeta:"<<p.X<<","<<p.Y<<","<<p.Z;
break;
case InventoryLocation::DETACHED:
os<<"detached:"<<name;
break;
default:
assert(0);
}
so I just needed to put nodemeta:"..pos["x"]..","..pos["y"]..","..pos["z"].." and then everything was happy.
I also recommend putting this info in the dev wiki under the formspec section, I may take a look at doing it a bit later.
drunk affect to player
I was wondering if it is possible to invert a mouse or cover the players screen with an animated image.
After making a beer mod I wondered if you could invert the players mouse or do something which will affect the player if the drink too much.
If anyone know how to do this I will be more than happy.
Meany thanks
After making a beer mod I wondered if you could invert the players mouse or do something which will affect the player if the drink too much.
If anyone know how to do this I will be more than happy.
Meany thanks
Re: Post your modding questions here
Ive tried downloading mods. Nothing is working for me. Heres my situation, I cant not afford anything for my brother for his birthday, and he loves minecraft. So I figured I will download minetest for him , at first he liked it but got easily bored due to nothing to do. I tried downloading mods for him but it just doesnt seem to work for me. I know I must be doing something wrong. I tried dowloading the PilzAdam mods and nothings working. SO can I please get step by step instructions. It would be greatly appreciated. :(
- Minetestforfun
- Member
- Posts: 940
- Joined: Tue Aug 05, 2014 14:09
- GitHub: MinetestForFun
- IRC: MinetestForFun
- In-game: MinetestForFun
- Location: On earth
- Contact:
Re: Post your modding questions here
Hi HANNAHBOO,
1) download the mod
2) dezip the mod
3) rename the mod like the author of the mod says to you in his topic
4) move your folder renamed to your minetest/mods folder
5) Launch the game, select your server, click "configure", active your mod(just check the box on the top right of the window configure), launch the world => it's over
(EDIT : @philipbenr thank you for correction, and more details for HANNAHBOO ;))
1) download the mod
2) dezip the mod
3) rename the mod like the author of the mod says to you in his topic
4) move your folder renamed to your minetest/mods folder
5) Launch the game, select your server, click "configure", active your mod(just check the box on the top right of the window configure), launch the world => it's over
(EDIT : @philipbenr thank you for correction, and more details for HANNAHBOO ;))
Last edited by Minetestforfun on Sat Aug 30, 2014 01:12, edited 3 times in total.
MinetestForFun Team mods : [spidermob] [fishing]
---
Our Minetest servers :
MinetestForFun (Survival - PvP - Hardcore)[FR/EN]
MinetestForFun HUNGER GAMES
MinetestForFun SKYBLOCK
MinetestForFun CREATIVE
---
Our Minetest servers :
MinetestForFun (Survival - PvP - Hardcore)[FR/EN]
MinetestForFun HUNGER GAMES
MinetestForFun SKYBLOCK
MinetestForFun CREATIVE
- philipbenr
- Member
- Posts: 1897
- Joined: Fri Jun 14, 2013 01:56
- GitHub: philipbenr
- IRC: philipbenr
- In-game: robinspi
- Location: United States
Re: Post your modding questions here
The post above is a pretty good explanation, except the word server should be replaced with singleplayer world. servers already come with pre-enabled mods.
Image for reference. Ex: castle mod.
@Minetestforfun: It shouldn't be called a server, it should be called a world. Online servers don't allow client side mods.
Image for reference. Ex: castle mod.
@Minetestforfun: It shouldn't be called a server, it should be called a world. Online servers don't allow client side mods.
-
- New member
- Posts: 3
- Joined: Mon Aug 25, 2014 02:16
Re: Post your modding questions here
Hi, I am trying to make a soft-protection mod that will make protected nodes harder to dig for other players, but not indestructible. Is there any way to dynamically change the dig times for a particular node?
Re: Post your modding questions here
How would one make a gas rise in the air? I was thinking of something like making water with the gravity inversed or that flows upward but I do not think that is possible.
Coding;
1X coding
3X debugging
12X tweaking to be just right
1X coding
3X debugging
12X tweaking to be just right
Re: Post your modding questions here
I don't know if that is possible, have you checked moonrealm's air or fake fire's smoke? II think those are close to accomplish your idea.jojoa1997 wrote:How would one make a gas rise in the air? I was thinking of something like making water with the gravity inversed or that flows upward but I do not think that is possible.
Who is online
Users browsing this forum: No registered users and 3 guests