Search found 2011 matches

Return to advanced search

Re: Change tool default range

If I understand that code correctly, it should set the range to the wielded item's range if available. If the wielded item's range is unavailable, it sets the range to the hand's range, except if both are inavailable, then it sets the range to 4. I think that code does not do what it should do. Eith...
by Hybrid Dog
Sat Oct 13, 2018 09:17
 
Forum: Modding Discussion
Topic: Change tool default range
Replies: 6
Views: 121

Re: Post your mod requests/ideas here

Onomatopoeia is not real time.
by Hybrid Dog
Fri Oct 12, 2018 06:27
 
Forum: Modding Discussion
Topic: Post your mod requests/ideas here
Replies: 1946
Views: 205536

Re: Post your mod requests/ideas here

Could CityEngine be implemented in minetest?
https://graphics.ethz.ch/Downloads/Publ ... _Par01.pdf
by Hybrid Dog
Thu Oct 11, 2018 11:41
 
Forum: Modding Discussion
Topic: Post your mod requests/ideas here
Replies: 1946
Views: 205536

Re: [Mod] Ray-traced explosion library/API [explosions]

I think there are algorithms which suit better for calculating strength vectors, maybe a surface of a sphere can be calculated while adding random offsets (the noise), i.e. combining diamond-square and Catmull–Clark subdivision surface.
by Hybrid Dog
Wed Oct 10, 2018 17:45
 
Forum: WIP Mods
Topic: [Mod] Ray-traced explosion library/API [explosions]
Replies: 20
Views: 955

Re: Is it possible to overwrite ObjectRef:punch?

Maybe you can use on_punch in the entity definition to adjust damage: https://github.com/minetest/minetest/bl ... .txt#L3319
by Hybrid Dog
Sun Oct 07, 2018 15:50
 
Forum: Problems
Topic: Is it possible to overwrite ObjectRef:punch?
Replies: 8
Views: 220

Re: Post your screenshots!

Image
by Hybrid Dog
Sat Oct 06, 2018 11:44
 
Forum: General Discussion
Topic: Post your screenshots!
Replies: 8056
Views: 845821

Re: Is it possible to overwrite ObjectRef:punch?

Every player and object is of type "userdata" and uses the same metatable: ObjectRef registered_entities is a table of entity definitions, so it does not contain ObjectRef. If you override the metatable, it affects every object and player, fortunately you can use the is_player method to te...
by Hybrid Dog
Sat Oct 06, 2018 09:45
 
Forum: Problems
Topic: Is it possible to overwrite ObjectRef:punch?
Replies: 8
Views: 220

Re: Is it possible to overwrite ObjectRef:punch?

If you want to modify the ObjectRef.punch method, you first need to get the ObjectRef table, this can be done by using getmetatable on some object because ObjectRef is used as metatable for objects (note that players are objects, too). Then you can overwrite it similarly to how one can overwrite min...
by Hybrid Dog
Fri Oct 05, 2018 20:13
 
Forum: Problems
Topic: Is it possible to overwrite ObjectRef:punch?
Replies: 8
Views: 220

Re: Getting the exact spot the player is pointing at

You'd just need to test the position on all selection boxes and select the one nearest to the player.
by Hybrid Dog
Thu Oct 04, 2018 10:26
 
Forum: Feature Discussion
Topic: Getting the exact spot the player is pointing at
Replies: 5
Views: 358

Re: [Mod] Ray-traced explosion library/API [explosions]

This looks interesting. For your interest, I currently use perlin noise to calculate explosion holes, here's an example: https://forum.minetest.net/download/file.php?mode=view&id=16854&sid=03f96b1825a685f8b7e257fb9962a604 There's the code: https://github.com/HybridDog/vector_extras/blob/8d78...
by Hybrid Dog
Thu Oct 04, 2018 10:22
 
Forum: WIP Mods
Topic: [Mod] Ray-traced explosion library/API [explosions]
Replies: 20
Views: 955

Re: [Mod] Item drops, pickups. Rewrite, new features [item_d

It works good in first-person view, but in third person you can see that the items fly right through the player on a vector. I would've never noticed it if it wasn't for you pointing to that problem. By the way, this happens even when the player stands still, you don't have to run away. I can't rep...
by Hybrid Dog
Thu Oct 04, 2018 09:36
 
Forum: Mod Releases
Topic: [Mod] Item drops, pickups. Rewrite, new features [item_drop]
Replies: 30
Views: 8643

Re: [Solved] Merge identical nodes in craft recipe

Did you consider special recipes yet? * Shapeless recipes are already grid-less I think, so you may want to handle them differently. recipe.width is 0 in this case. * There're also replacements, where you get more than one itemstack as crafting output, an item in the craft grid is replaced with anot...
by Hybrid Dog
Wed Oct 03, 2018 19:49
 
Forum: Modding Discussion
Topic: [Solved] Merge identical nodes in craft recipe
Replies: 15
Views: 297

Re: Merge identical nodes in craft recipe into one, with cou

Sorry, I didn't read the api.
Converting the hashmap to a list should still work, as 12Me21 already showed.
I generally don't use table.insert.
Code: Select all
local new_recipe = {}
for name, count in pairs(item_counts) do
   new_recipe[#new_recipe+1] = name .. " " .. count
end
by Hybrid Dog
Wed Oct 03, 2018 16:23
 
Forum: Modding Discussion
Topic: [Solved] Merge identical nodes in craft recipe
Replies: 15
Views: 297

Re: [Mod] Item drops, pickups. Rewrite, new features [item_d

I've pushed a fix: https://github.com/minetest-mods/item_drop/commit/fc89b2d2b4cad17e121bc4d4e84553a929a7f042 Please test if it works. A small problem is left: When a player makes an item fly to it and then quickly runs away from it, the item flies away, e.g. into sky. After 5 (magnet_time) seconds,...
by Hybrid Dog
Wed Oct 03, 2018 16:08
 
Forum: Mod Releases
Topic: [Mod] Item drops, pickups. Rewrite, new features [item_drop]
Replies: 30
Views: 8643

Re: Merge identical nodes in craft recipe into one, with cou

You could use a table as hash map to store the counts for each item. An item in a craft recipe could be e.g. "default:stone 3", so the item name is not necessarily the itemstring, thus I used the ItemStack function to parse the itemstring reliably. In the end a list is created which contai...
by Hybrid Dog
Tue Oct 02, 2018 17:26
 
Forum: Modding Discussion
Topic: [Solved] Merge identical nodes in craft recipe
Replies: 15
Views: 297

Re: New to coding, need help with deeper modifications

There's the code related to fps_max: https://github.com/minetest/minetest/blob/a29bc8e8babd9320b629e67dee753a08d18799d3/src/game.cpp#L3906 I've set fps_max to 61 some time ago because I thought that maybe something bigger than 60 fps may avoid trigger sleeping when vsync is enabled. Now I changed co...
by Hybrid Dog
Sun Sep 30, 2018 19:01
 
Forum: Modding Discussion
Topic: New to coding, need help with deeper modifications
Replies: 15
Views: 334

Re: How to get chat to show up in terminal?

Printing directly what the player writes is dangerous because they can use the ASCII escape character to make all the text in your terminal invisible. Instead of using print(msg), you can use minetest.log("action", msg). To remove escape characters: minetest.log("action", msg:gsu...
by Hybrid Dog
Tue Sep 25, 2018 17:29
 
Forum: Modding Discussion
Topic: How to get chat to show up in terminal?
Replies: 2
Views: 133

Re: Ghost Stone Problem

453c54v55435345v wrote:How can i use it, to detect only me? What can i type in the player's field?

http://mesecons.net/items.html
See Object Detector.
by Hybrid Dog
Tue Sep 25, 2018 17:15
 
Forum: Modding Discussion
Topic: Ghost Stone Problem
Replies: 3
Views: 126

Re: Updating Entity Values

Changes of the object, e.g. position, velocity and acceleration, need to be passed via a provided method, otherwise the changes are only on lua side. To change the nametag you likely need to change the object properties: https://github.com/minetest/minetest/blob/79e393cf4b5027eb9071df23f4834aac3f3a6...
by Hybrid Dog
Wed Sep 19, 2018 16:47
 
Forum: Modding Discussion
Topic: Updating Entity Values
Replies: 7
Views: 236

Re: Is the community decreased?

If you watch the serverlist things get rlly discouraging, as there are only around 14 servers that actively have more than 2 players, and 90% of servers have no players at all and are empty all day! I don`t think nobody wants to join servers of minetest is bad itself. Actually together with mods th...
by Hybrid Dog
Thu Sep 13, 2018 10:35
 
Forum: General Discussion
Topic: Is the community decreased?
Replies: 14
Views: 525

Re: [Map] Karsthafen - Diskussionsthread

Den Proxy kann man bestimmt mit einem anderen Proxy umgehen: https://bit.ly/1JnhzT8
by Hybrid Dog
Tue Sep 04, 2018 17:12
 
Forum: Deutsch
Topic: [Map] Karsthafen - Diskussionsthread
Replies: 311
Views: 25573

Re: abm / cactus / damage

With server-provided CSM an on_collide function could be executed client-side.
by Hybrid Dog
Fri Aug 31, 2018 18:36
 
Forum: General Discussion
Topic: abm / cactus / damage
Replies: 16
Views: 497

Re: abm / cactus / damage

Sam shouldn't be damaged when standing on a cactus because he wears shoes.
by Hybrid Dog
Thu Aug 30, 2018 09:50
 
Forum: General Discussion
Topic: abm / cactus / damage
Replies: 16
Views: 497

Re: Post your videos!

https://youtu.be/txE-WszHPaU I like the look of the tunnels. In my opinion a cave can easily be changed to a room for living after firstly removing single nodes from the walls. Before: https://forum.minetest.net/download/file.php?mode=view&id=16450&sid=fb87e6a512c7c98b5495dec1d8786f97 After...
by Hybrid Dog
Thu Aug 30, 2018 09:46
 
Forum: General Discussion
Topic: Post your videos!
Replies: 770
Views: 68426
Next

Return to advanced search