local function set(name) local player = minetest.get_player_by_name(name) local speed = playersettings.get(name,"creativesettings:speed") local jump = playersettings.get(name,"creativesettings:jump") local gravity = playersettings.get(name,"creativesettings:gravity") local x = playersettings.get(name,"creativesettings:visualx") local y = playersettings.get(name,"creativesettings:visualy") local z = playersettings.get(name,"creativesettings:visualz") player:set_physics_override({ speed = speed, jump = jump, gravity = gravity, }) player:set_properties({ visual_size = vector.new(x,y,z), }) end playersettings.register("creativesettings:speed",{ shortdesc = "Physics Override: Speed", longdesc = "A multiplier affecting speed of movement.\n'1' is normal speed.", type = "number", min = 0.5, max = 5, default = 1, afterchange = set, onjoin = set, }) playersettings.register("creativesettings:jump",{ shortdesc = "Physics Override: Jump Height", longdesc = "A multiplier affecting jump height.\n'1' is normal height.", type = "number", min = 0.5, max = 3, default = 1, afterchange = set, }) playersettings.register("creativesettings:gravity",{ shortdesc = "Physics Override: Gravity", longdesc = "A multiplier affecting gravity strength.\n'1' is normal strength.", type = "number", min = 0.15, max = 5, default = 1, afterchange = set, }) playersettings.register("creativesettings:visualx",{ shortdesc = "Visual Size: X (Width)", longdesc = "How wide (left to right) you appear to be.\n'1' is normal width.", type = "number", min = 0.75, max = 1.25, default = 1, afterchange = set, }) playersettings.register("creativesettings:visualy",{ shortdesc = "Visual Size: Y (Height)", longdesc = "How tall (top to bottom) you appear to be.\n'1' is normal height.", type = "number", min = 0.75, max = 1.25, default = 1, afterchange = set, }) playersettings.register("creativesettings:visualz",{ shortdesc = "Visual Size: Z (Depth)", longdesc = "How deep (front to back) you appear to be.\n'1' is normal depth.", type = "number", min = 0.75, max = 1.25, default = 1, afterchange = set, })