Post your modding questions here

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Post your modding questions here

by Nathan.S » Sat May 30, 2015 13:30

Oh, I guess I should have been able to figure that out.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

CWz
Member
 
Posts: 185
Joined: Tue Dec 24, 2013 17:01

Re: Post your modding questions here

by CWz » Mon Jun 01, 2015 10:01

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
minetest.register_privilege("build", "Can place and dig nodes/blocks")

minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
   if not minetest.get_player_privs(placer:get_player_name()).build then
      minetest.remove_node(pos)
      return itemstack
   end
end)

minetest.register_on_dignode(function(pos, oldnode, digger)
   if not minetest.get_player_privs(digger:get_player_name()).build then
      minetest.set_node({x=pos.x, y=pos.y, z=pos.z}, oldnode)
      return
   end   
end)


this isn't working right. for some reason it still registers players as placing the nodes. also the register on dignode dignode give the player the item it digs.
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Post your modding questions here

by Hybrid Dog » Mon Jun 01, 2015 15:32

CWz wrote:
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
minetest.register_privilege("build", "Can place and dig nodes/blocks")

minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
   if not minetest.get_player_privs(placer:get_player_name()).build then
      minetest.remove_node(pos)
      return itemstack
   end
end)

minetest.register_on_dignode(function(pos, oldnode, digger)
   if not minetest.get_player_privs(digger:get_player_name()).build then
      minetest.set_node({x=pos.x, y=pos.y, z=pos.z}, oldnode)
      return
   end   
end)


this isn't working right. for some reason it still registers players as placing the nodes. also the register on dignode dignode give the player the item it digs.

you add the node after the player dug it?
Overriding minetest.node_dig should work better
http://dev.minetest.net/node_dig#Example
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

Re: Post your modding questions here

by prestidigitator » Mon Jun 01, 2015 18:38

Or use protection. This is pretty much what protection is designed for. For example:

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 oldProtect = minetest.is_protected;
function minetest.is_protected(pos, playerName)
   return not minetest.get_player_privs(playerName).build or
          oldProtect(pos, playerName);
end;
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Post your modding questions here

by Hybrid Dog » Mon Jun 01, 2015 19:19

prestidigitator wrote:Or use protection. This is pretty much what protection is designed for. For example:

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 oldProtect = minetest.is_protected;
function minetest.is_protected(pos, playerName)
   return not minetest.get_player_privs(playerName).build or
          oldProtect(pos, playerName);
end;

this also would disallow using e.g. chests which are accessible for only the owner and members of a protected area
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

Re: Post your modding questions here

by prestidigitator » Tue Jun 02, 2015 00:38

Hybrid Dog wrote:this also would disallow using e.g. chests which are accessible for only the owner and members of a protected area

Ah. Okay. I see. Didn't realize chests checked for that. Thanks.
 

mrjkuhl
New member
 
Posts: 1
Joined: Sun Jun 07, 2015 04:45
GitHub: mrjkuhl

Re: Post your modding questions here

by mrjkuhl » Sun Jun 07, 2015 16:13

How does one create a window/menu screen, like the inventory and furnace screens? Is this functionality provided by minetest, or does this need to be done through plain lua?
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Post your modding questions here

by ABJ » Sun Jun 07, 2015 16:25

It's called a formspec actually. It's provided in Minetest. See rubenwardy's excellent modding book for how to create them.(I don't really know much about that stuff myself :P)
 

Ivà
Member
 
Posts: 115
Joined: Sun Feb 22, 2015 07:11
GitHub: melzua
IRC: melzua
In-game: melzua

Re: Post your modding questions here

by Ivà » Mon Jun 08, 2015 10:24

Hi all,

I'm trying to implement a kind of linear sight of view for luaentities, here is the code that I'm using:

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 cRadarLength = 3
local vNormalizedVel = vector.normalize(self.object:getvelocity())
local pEntityPos = self.object:getpos()

minp = {x = pEntityPos.x, y = pEntityPos.y - 2.5, z = pEntityPos.z}
maxp = vector.add(pEntityPos, vector.multiply(vNormalizedVel,cRadarLength))
maxp = {x = maxp.x, y = maxp.y + 1.5, z = maxp.z}

local nodes = minetest.find_nodes_in_area(minp, maxp, {"group:water"})
if #nodes > 0 then
   for _,node in ipairs(nodes) do
      print("node = "..minetest.pos_to_string(node))
   end
end


But this is only halfway right, it detects water only in some directions but not in others.
I suspect that the key is deciding which point is minp and which is maxp (depending of the movement direction of luaentity), but I can't figure out the criteria for deciding that.

Can somebody point me to the right direction please?

Thankyou!
 

funambulista
New member
 
Posts: 4
Joined: Sat Sep 27, 2014 07:38
In-game: funambulista

Re: Post your modding questions here

by funambulista » Tue Jun 09, 2015 09:51

Hi,
I am trying to implement a somewhat uncommon modding behaviour. I have tried to find a solution in other mods but no success till now.

The problem: I want to determine via code if a particular block (node) is (at a given time) visible by a player. For example, the player can be very close to the node, but is looking opposite direction, so it is no visible. Then he turns and the node becomes visible.

I have seen these methods in the Player entity:
* get_look_dir() — get camera direction as a unit vector
* get_look_pitch() — pitch in radians
* get_look_yaw() — yaw

That maybe are the starting point to try to figure out if a node in a particular position is visible under that camera data and player position.

But this will require me to code some somewhat complex things. I wonder if there is a better and simpler way of doing it, some sort of API call or convenience function? maybe a different approach?

Thanks in advance!

-- funambulista
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

Re: Post your modding questions here

by prestidigitator » Wed Jun 10, 2015 05:19

funambulista wrote:I have seen these methods in the Player entity:
* get_look_dir() — get camera direction as a unit vector
* get_look_pitch() — pitch in radians
* get_look_yaw() — yaw

That maybe are the starting point to try to figure out if a node in a particular position is visible under that camera data and player position.

But this will require me to code some somewhat complex things. I wonder if there is a better and simpler way of doing it, some sort of API call or convenience function? maybe a different approach?

It's not really that complex. The dot product between the viewing direction and the direction of the block is the cosine of the angle between them. Basically:

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 function vectorDot(va, vb)
   return va.x * vb.x + va.y * vb.y + va.z * vb.z;
end;

local blockDir = vector.normalize(vector.subtract(blockPos, player:getpos()));
local angle = math.acos(vectorDot(blockDir, player:get_look_dir()));

if angle <= VIEW_ANGLE then ... end;


EDIT: Oops. Fixed vector subtraction.
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

wrong node is placed

by addi » Fri Jun 12, 2015 12:19

I have a realy odd problem:

I have written a function that registeres 5 nodes and names that *_stack_<1-5>
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
nodebox_stack = {
        type = "fixed",
        fixed = {
            {-0.4375, -0.5, 0.0625, -0.0625, -0.125, 0.4375}, -- unten, hinten_links
            
{0.125, -0.5, 0.125, 0.5, -0.125, 0.5}, -- unten, hinten_rechts
            
{-0.4375, -0.5, -0.375, -0.0625, -0.125, 0}, -- unten,vorne_links
            
{0.0625, -0.5, -0.4375, 0.4375, -0.125, -0.0625}, -- unten, vorne_rechts
            
{-0.1875, -0.125, -0.125, 0.1875, 0.25, 0.25}, -- oben, mitte
        
},
    }

function generate_stack(item)
    local nodedef = table.copy(minetest.registered_nodes[item]);
    local modnode = string.split(item,":");
    local mod = modnode[1];
    local node = modnode[2];
    nodedef.description = nodedef.description .." Stack";
    nodedef.drawtype = "nodebox";
    nodedef.selection_box = nil;
    local nodebox = {
        type = "fixed",
        fixed = {},
        }; --initialize empty nodebox
        
    for number 
= 1, 5, 1 do 
        nodebox
.fixed[number] = nodebox_stack.fixed[number];--copy a part to nodebox
        nodedef
.node_box = nodebox;--add nodebox to nodedef
        nodedef
.selection_box = {type="fixed",fixed= nodebox_stack.fixed[number]}
        nodedef["drop"] =  item.." "..number;--set drop
        nodedef
.name = item.."_stack_"..number;--set name
        minetest
.register_node(":"..nodedef.name, nodedef)--register node
        print
(dump2(minetest.registered_nodes[nodedef.name],nodedef.name))
    end
    

end

minetest
.register_node("test:item", {
    description = "Item",
    stack_max = 99,
    tiles = {"default_wood.png"},
    paramtype = "light",
    groups = {cracky=2}
})
generate_stack("test:item");

The problem is, if i now use /giveme test:item_stack_3 (or another number 1-4)
its correctly in the inventory. But if I now place the node in the wold, it converts directly into test:item_stack_5

i dont see why it is placing _5 there instead of _3
Does someone have an idea?
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: wrong node is placed

by Hybrid Dog » Fri Jun 12, 2015 15:08

addi wrote:I have a realy odd problem:

I have written a function that registeres 5 nodes and names that *_stack_<1-5>
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
nodebox_stack = {
        type = "fixed",
        fixed = {
            {-0.4375, -0.5, 0.0625, -0.0625, -0.125, 0.4375}, -- unten, hinten_links
            
{0.125, -0.5, 0.125, 0.5, -0.125, 0.5}, -- unten, hinten_rechts
            
{-0.4375, -0.5, -0.375, -0.0625, -0.125, 0}, -- unten,vorne_links
            
{0.0625, -0.5, -0.4375, 0.4375, -0.125, -0.0625}, -- unten, vorne_rechts
            
{-0.1875, -0.125, -0.125, 0.1875, 0.25, 0.25}, -- oben, mitte
        
},
    }

function generate_stack(item)
    local nodedef = table.copy(minetest.registered_nodes[item]);
    local modnode = string.split(item,":");
    local mod = modnode[1];
    local node = modnode[2];
    nodedef.description = nodedef.description .." Stack";
    nodedef.drawtype = "nodebox";
    nodedef.selection_box = nil;
    local nodebox = {
        type = "fixed",
        fixed = {},
        }; --initialize empty nodebox
        
    for number 
= 1, 5, 1 do 
        nodebox
.fixed[number] = nodebox_stack.fixed[number];--copy a part to nodebox
        nodedef
.node_box = nodebox;--add nodebox to nodedef
        nodedef
.selection_box = {type="fixed",fixed= nodebox_stack.fixed[number]}
        nodedef["drop"] =  item.." "..number;--set drop
        nodedef
.name = item.."_stack_"..number;--set name
        minetest
.register_node(":"..nodedef.name, nodedef)--register node
        print
(dump2(minetest.registered_nodes[nodedef.name],nodedef.name))
    end
    

end

minetest
.register_node("test:item", {
    description = "Item",
    stack_max = 99,
    tiles = {"default_wood.png"},
    paramtype = "light",
    groups = {cracky=2}
})
generate_stack("test:item"); 

The problem is, if i now use /giveme test:item_stack_3 (or another number 1-4)
its correctly in the inventory. But if I now place the node in the wold, it converts directly into test:item_stack_5

i dont see why it is placing _5 there instead of _3
Does someone have an idea?

l think when you call minetest.register_node(":"..nodedef.name, nodedef) you need to use table.copy(nodedef) instead of just nodedef, else when the loop continuous to the next one you also modify nodedef of the previous registered node. And maybe minetest.register_node adds something like an on_place to nodedef.
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: Post your modding questions here

by addi » Fri Jun 12, 2015 15:56

ahh now it works, the odd thing was only, that print(dump2(minetest.registered_nodes[nodedef.name],nodedef.name)) had nothing displayed about on_place...
c'est la vie thanks a lot
 

Diamond knight
Member
 
Posts: 262
Joined: Sun Apr 19, 2015 19:50
In-game: Diamondknight or diamond_knight

Re: Post your modding questions here

by Diamond knight » Fri Jun 12, 2015 23:43

is it possible to have palpatine style lightning in minetest kinda like in the minecraft mod
I can never get enough MESE!!!!!!!!!

my subgame: https://forum.minetest.net/viewtopic.php?f=50&t=11901
 

funambulista
New member
 
Posts: 4
Joined: Sat Sep 27, 2014 07:38
In-game: funambulista

Re: Post your modding questions here

by funambulista » Sun Jun 21, 2015 20:26

prestidigitator wrote:
funambulista wrote:I have seen these methods in the Player entity:
* get_look_dir() — get camera direction as a unit vector
* get_look_pitch() — pitch in radians
* get_look_yaw() — yaw

That maybe are the starting point to try to figure out if a node in a particular position is visible under that camera data and player position.

But this will require me to code some somewhat complex things. I wonder if there is a better and simpler way of doing it, some sort of API call or convenience function? maybe a different approach?

It's not really that complex. The dot product between the viewing direction and the direction of the block is the cosine of the angle between them. Basically:

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 function vectorDot(va, vb)
   return va.x * vb.x + va.y * vb.y + va.z * vb.z;
end;

local blockDir = vector.normalize(vector.subtract(blockPos, player:getpos()));
local angle = math.acos(vectorDot(blockDir, player:get_look_dir()));

if angle <= VIEW_ANGLE then ... end;


EDIT: Oops. Fixed vector subtraction.


Many thanks!
 

afeys
Member
 
Posts: 17
Joined: Thu Mar 26, 2015 08:55

Re: Post your modding questions here

by afeys » Mon Jun 22, 2015 12:37

Hi,

I have two questions:

1/
there probably is a simple solution to this, but I'm making a mod (obviously) and I want to get a list of the location of all players.
Alternatively (even better), if someone knows the fastest way to check if any player currently playing in the minetest-world is within 10 blocks of x,y,z, I'd greatly appreciate it.

2/
is there an easy way to know if the world is already rendered at position x,y,z ?
In my mod I use abm's to generate world content, but I seem to remember reading somewhere on this forum that it can cause problems when the world is not available at the location I'm add content to.

thanks a lot
 

Ivà
Member
 
Posts: 115
Joined: Sun Feb 22, 2015 07:11
GitHub: melzua
IRC: melzua
In-game: melzua

Re: Post your modding questions here

by Ivà » Mon Jun 22, 2015 13:25

afeys wrote:Hi,

I have two questions:

1/
there probably is a simple solution to this, but I'm making a mod (obviously) and I want to get a list of the location of all players.
Alternatively (even better), if someone knows the fastest way to check if any player currently playing in the minetest-world is within 10 blocks of x,y,z, I'd greatly appreciate it.

2/
is there an easy way to know if the world is already rendered at position x,y,z ?
In my mod I use abm's to generate world content, but I seem to remember reading somewhere on this forum that it can cause problems when the world is not available at the location I'm add content to.

thanks a lot


Hi afeys,

First question is solved in the example below :-)
http://dev.minetest.net/minetest.get_objects_inside_radius
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Post your modding questions here

by Hybrid Dog » Mon Jun 22, 2015 14:11

Ivà wrote:Hi afeys,

First question is solved in the example below :-)
http://dev.minetest.net/minetest.get_objects_inside_radius

l guess it's faster if minetest.get_connected_players() (and vector.length(vector.subtract(yourpos, player:getpos()))) is used.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Post your modding questions here

by rubenwardy » Mon Jun 22, 2015 14:36

Hybrid Dog wrote:
Ivà wrote:Hi afeys,

First question is solved in the example below :-)
http://dev.minetest.net/minetest.get_objects_inside_radius

l guess it's faster if minetest.get_connected_players() (and vector.length(vector.subtract(yourpos, player:getpos()))) is used.


It'll be even faster to do

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 _, player in ipairs(minetest.get_connected_players()) do
    local v = vector.subtract(yourpos, player:getpos())
    if v.x * v.x + v.y * v.y + v.z * v.z < 100 then
        -- is less than 10 blocks
    end
end


as it avoids a square root.
and it would be faster if you avoided the vector.subtract call (although not by much).
 

afeys
Member
 
Posts: 17
Joined: Thu Mar 26, 2015 08:55

Re: Post your modding questions here

by afeys » Mon Jun 22, 2015 14:54

Ivà, Hybrid Dog & rubenwardy (and anyone else who might answer this while I type this reply) :

thanks a lot for the VERY fast answers.
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Post your modding questions here

by Hybrid Dog » Mon Jun 22, 2015 17:28

rubenwardy wrote:and it would be faster if you avoided the vector.subtract call (although not by much).

lt would also be faster if you use pairs instead of ipairs l think.


2:
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 chunk_active = minetest.get_node_or_nil(pos) and true or false

with vm you can get nodes in inactive chunks, they're "ignore" if the map isn't generated l think.
abms only work in active chunks
 

deezl
Member
 
Posts: 18
Joined: Tue Jan 13, 2015 12:32
GitHub: deezl
IRC: deezl
In-game: deezl

Areas versus Protector

by deezl » Fri Jun 26, 2015 15:14

I am wondering if someone could help me figure out how to reconcile these two mods: https://github.com/Calinou/carbone/blob ... r/init.lua and https://github.com/ShadowNinja/areas

The issue is that one does not seem aware of the other, though both use the same minetest.is_protected function. I am running a modified carbone server, so it includes Calinou's version of "protector", and I also installed ShadowNinja's "areas" mod, and did not realize they could overlap each other until there were far too many of the protector blocks in use for me to just remove it. Currently, you can place a protector block near an areas border, and the overlapped area will become unuseable to both players, and it is also possible to set an area protection that overlaps the protector's borders with the same results. Personally, I prefer the areas mod, but the protector blocks are much easier to use for some of my players, so if it is possible, I would like to make it possible for both to exist peacefully. Any help or direction will be much appreciated, thank you.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Post your modding questions here

by TenPlus1 » Fri Jun 26, 2015 18:12

Running two different protection mods isnt recommended at all and re-writing one to suit the other will only slow things down having to check for protection on both fronts... Use one or the other or if you want a happy inbetween try Protection Redo which allows you to modify the protected area around the protector nodes (using 'protector_radius = 5' setting in minetest.conf) as well as giving protected chests and doors:

viewtopic.php?f=9&t=9376
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Post your modding questions here

by rubenwardy » Fri Jun 26, 2015 18:51

TenPlus1 wrote:Running two different protection mods isnt recommended at all and re-writing one to suit the other will only slow things down having to check for protection on both fronts... Use one or the other or if you want a happy inbetween try Protection Redo which allows you to modify the protected area around the protector nodes (using 'protector_radius = 5' setting in minetest.conf) as well as giving protected chests and doors:

viewtopic.php?f=9&t=9376


He can't just use one or the other, because he is running an active server world and needs backwards compatibility.

----


What is the behaviour you want if two zones overlap?
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: Post your modding questions here

by Sokomine » Sat Jun 27, 2015 03:12

deezl wrote:I would like to make it possible for both to exist peacefully.

How about an abm running on the protector nodes that automaticly sets up areas for the areas mod and make the protector node disappear afterwards? At least for those places where there's no conflict?
A list of my mods can be found here.
 

deezl
Member
 
Posts: 18
Joined: Tue Jan 13, 2015 12:32
GitHub: deezl
IRC: deezl
In-game: deezl

Re: Post your modding questions here

by deezl » Sat Jun 27, 2015 03:44

rubenwardy wrote:
TenPlus1 wrote:Running two different protection mods isnt recommended at all and re-writing one to suit the other will only slow things down having to check for protection on both fronts... Use one or the other or if you want a happy inbetween try Protection Redo which allows you to modify the protected area around the protector nodes (using 'protector_radius = 5' setting in minetest.conf) as well as giving protected chests and doors:

viewtopic.php?f=9&t=9376


He can't just use one or the other, because he is running an active server world and needs backwards compatibility.

----


What is the behaviour you want if two zones overlap?


Rubenwardy, I would like them to just not be allowed to overlap. If you try to overlap two "areas" protections it yells at you and says you can't protect that area, same with the protector blocks, but if you overlap the two different protections, it's allowed, but the overlapped area becomes unuseable to both owners. The server has been around a while, it didn't used to be a problem, but as areas are becoming more dense with builds and builders that want to protect their stuff, starting to run into issues. The Area Lock from protector protects a 25x25x25 area around the block. If there was another Area Lock within that radius, it knows about it and will stop you from placing it. I am hoping there is a way to make it check for an area protected by the areas mod in the same way...or actually, maybe not the same way. I think the Area Lock just looks for other Area Locks. but isn't checking in the radius for any other .is_protected nodes.
-TenPlus1, yeah, I know, lol. I wouldn't have run both if I had realized sooner that it would be an issue, but i didn't know then what I know now :)
 

deezl
Member
 
Posts: 18
Joined: Tue Jan 13, 2015 12:32
GitHub: deezl
IRC: deezl
In-game: deezl

Re: Post your modding questions here

by deezl » Sat Jun 27, 2015 03:48

Sokomine wrote:
deezl wrote:I would like to make it possible for both to exist peacefully.

How about an abm running on the protector nodes that automaticly sets up areas for the areas mod and make the protector node disappear afterwards? At least for those places where there's no conflict?


Sokomine, not a bad idea. I was trying to look at the code for your markers mod for some clues on how to make the the protector mod work with areas, but I get a little lost in the coding sometimes. Any ideas from that direction, or is that a dead end?
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: Post your modding questions here

by Sokomine » Sat Jun 27, 2015 04:01

deezl wrote:Sokomine, not a bad idea. I was trying to look at the code for your markers mod for some clues on how to make the the protector mod work with areas, but I get a little lost in the coding sometimes. Any ideas from that direction, or is that a dead end?

The init.lua from my markers mod contains the code to protect a new area in the function markers.marker_on_receive_fields (close to the end of it). Perhaps that code will help you. If I ever get around to it, I'll add protector-like nodes to my markers mod as well - nodes that protect after beeing placed and then disappear.
A list of my mods can be found here.
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Post your modding questions here

by ABJ » Mon Jun 29, 2015 18:39

How do I make a thing happen to the player if he is wearing a certain piece of armor and then uses a certain item?
 

PreviousNext

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron