[Server] jastest

Post Reply
User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

[Server] jastest

by jas » Post

jastest
Address: 172.101.13.131
Port: 30000
Game: MTG-based 'jastest'
Engine: minetest-5.3.0-dev
PvP: Enabled outside of spawn
Mods: Armor, mobs, protector/areas, xdecor, shop, caverealms
Description: Use sprint to sneakjump. Only protectors can modify the core. Find a switch at spawn to teleport to some outside location.

TODO:
  • Colored glass/panes
  • Multi-colored beds
Features:
  • 24-hour day/night cycle with /night_toggle command
  • Zoom & minimap on by default
  • Skins -- use /skin <filename> or /skins or [Setup]->Skins
  • Armor -- use /armor or [Setup]->Armor
  • Mobs -- use /mobs or [Setup]->Mobs
  • Sprinting -- hold AUX1 to enable a sprinting state, or toggle using /supersprint, or double-tap the run key
  • Sneakjumping -- perform tricks and radical jumps while in a sprinting state
  • Shooter - make explosions with knockback and rocket jump
  • Stamina, with hunger tied together in a unified statbar
  • Books - get a /book and save a note with /book <your note here>
  • Homes - use /sethome [<name>], /home [<name>], and /homes [delete <name>] & [Setup]->Homes Management
  • Backpacks - place and dig them anywhere (careful!); new users get one placed in their backpack inventory automatically, and any item in that (save) slot remains after respawn. If the backpack is in its save slot when you die, all items in your lower 8*3 inventory will be saved in the backpack provided there's room available.
  • Walkie talkies show various waypoints, as well as coordinates and direction, and area protection.
  • Area protection in the form of areas mod (/protect) and protector mod (protector:protect & protector:protect2)
Image
Stamina and hunger are unified on one statbar. Your stamina drains as you sprint, but quickly recharges when you're not sprinting. Your maximum stamina is limited to your maximum satiation. Armor absorbs most damages before taking hearts. The following values are max 100: hp, breath, satiation, stamina, armor.

The walkie shows information on the HUD when held. Compass and coordinates on the lower right, with area protection information on the lower left. Waypoints are shown for respawn, spawn, death, cmd (/waypoint), and individual players, and can be cycled by left-clicking. Right clicking the walkie opens chat by default, or the terminal if desired.

The shooter gives knockback when you hit things with it. Try shooting your feet as you jump into the air! You can load it with lava and left-click to fire an explosion to give an even greater knockback effect. Right-clicking will always boost regardless of whether it's loaded.

CSM
Enable client-side sprinting with the following script:

Code: Select all

-- SuperSprint! (CSM)
-- Copyright 2020 James Stevenson
-- GPL 3+

local sprinting = false
local ack

local function sprint(player)
	player = player or minetest.localplayer
	if player then
		local m = minetest.mod_channel_join(player:get_name())
		if ack == "enabled" then
			local keys = player:get_control()
			if keys.aux1 and not sprinting then
				sprinting = true
				m:send_all("aux1")
			elseif sprinting and not keys.aux1 then
				sprinting = false
				m:send_all("aux0")
			end
		elseif not ack then
			m:send_all("sprint_enable")
		end
	end
	minetest.after(0, function()
		sprint(player)
	end)
end

sprint()

minetest.register_on_modchannel_message(function(channel_name, sender, message)
	if sender == "" and message == "sprint_ack" then
		ack = "enabled"
	end
end)

minetest.register_chatcommand("sprint", {
	params = "<enable|disable>",
	func = function(param)
		local player = minetest.localplayer
		local name = player:get_name()
		local m = minetest.mod_channel_join(name)
		if param == "enable" then
			m:send_all("sprint_enable")
			return true, "[CSM] Sprint enabled"
		elseif param == "disable" then
			ack = "disabled"
			m:send_all("sprint_disable")
			return true, "[CSM] Sprint disabled"
		end
		return false, "[CSM] enable or disable"
	end,
})
supersprint.zip 21.14 KiB It appears faster than server-side polling of AUX1. Further testing is required.

Use the following script to enable positional jump sounds:

Code: Select all

-- Jump! (CSM)
-- Copyright 2020 James Stevenson
-- GPL 3+

local del = minetest.get_us_time()

local touching = false
local in_water = false
local jumping = false

local ack

local floor = math.floor
local insert = table.insert

local a = minetest.after
local sp = minetest.sound_play

local function poll(player)
	player = player or minetest.localplayer
	if player then
		local j = player:get_control().jump
		touching = player:is_touching_ground()
		in_water = player:is_in_liquid()

		local m = minetest.mod_channel_join(player:get_name())
		if not ack then
			m:send_all("jump_enable")
		end
		if j and not touching and not jumping and
				not in_water and
				minetest.get_us_time() - del > 334000 then
			jumping = true
			del = minetest.get_us_time()
			if ack == "disabled" then
				sp({name = "jump_jump", gain = 0.9})
			else
				m:send_all("jump")
			end
		elseif touching then
			jumping = false
		end
	end

	a(0, function()
		poll(player)
	end)
end

minetest.register_on_modchannel_message(function(channel_name, sender, message)
	if sender == "" and message == "jump_ack" then
		ack = "enabled"
	end
end)

poll()
jumpsound.zip 793 Bytes

CSM Minimap toggles between radar and surface mode automatically:

Code: Select all

-- MiniMap! (CSM)
-- Copyright 2020 James Stevenson
-- GPL 3+

local ack, map, automap
local level = 2

local function minimap(player)
	player = player or minetest.localplayer
	if player then
		local m = minetest.mod_channel_join(player:get_name())
		if ack == "enabled" then
		elseif not ack then
			m:send_all("minimap_enable")
		end
		if ack and not map then
			map = minetest.ui.minimap
		elseif ack and map then
			if player:get_pos().y >= -100 then
				map:show()
				map:set_mode(level)
			else
				map:show()
				map:set_mode(level + 3)
			end
		end
	end
	minetest.after(0, function()
		minimap(player)
	end)
end

minetest.register_on_modchannel_message(function(channel_name, sender, message)
	if sender == "" and message == "minimap_ack" then
		ack = "enabled"
	end
end)

minetest.register_chatcommand("map", {
	func = function(param)
		param = tonumber(param)
		if param then
			if param < 1 or param > 3 then
				return false, "[Client] A level between 1 and 3"
			end
			level = param
			return true, "Level set to " .. param
		end
	end,
})

minimap()
Attachments
Untitled.png
(18.36 KiB) Not downloaded yet
Last edited by jas on Tue May 26, 2020 13:21, edited 16 times in total.
2009-10-7 02:04:55: ACTION[Server]: jastest activates

User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

Re: [Server] jastest

by jas » Post

Attachments
screenshot_20200506_073806.png
(114.93 KiB) Not downloaded yet
screenshot_20200506_085113.png
(181.21 KiB) Not downloaded yet
screenshot_20200429_073219.png
(68.51 KiB) Not downloaded yet
Last edited by jas on Fri May 22, 2020 22:04, edited 5 times in total.
2009-10-7 02:04:55: ACTION[Server]: jastest activates

User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

Re: [Server] jastest

by jas » Post

You can now enable sprint mode as a toggled state using /supersprint, or hitting Aux1 twice quickly.
2009-10-7 02:04:55: ACTION[Server]: jastest activates

User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

Re: [Server] jastest

by jas » Post

+ Spoiler
You can now do client-side polling of aux1 instead of server-side. You must first send a "sprint_enable" message on your named mod channel, and then you can sprint with an "aux1" signal on the same channel. Turn sprinting off with "aux0".

This script automatically enables CSM sprinting, and polls for aux1:

Code: Select all

-- SuperSprint! (CSM)
-- Copyright 2020 James Stevenson
-- GPL 3+

local sprinting = false
local ack

local function sprint(player)
	player = player or minetest.localplayer
	if player then
		local m = minetest.mod_channel_join(player:get_name())
		if ack == "enabled" then
			local keys = player:get_control()
			if keys.aux1 and not sprinting then
				sprinting = true
				m:send_all("aux1")
			elseif sprinting and not keys.aux1 then
				sprinting = false
				m:send_all("aux0")
			end
		elseif not ack then
			m:send_all("sprint_enable")
		end
	end
	minetest.after(0, function()
		sprint(player)
	end)
end

sprint()

minetest.register_on_modchannel_message(function(channel_name, sender, message)
	if sender == "" and message == "sprint_ack" then
		ack = "enabled"
	end
end)

minetest.register_chatcommand("sprint", {
	params = "<enable|disable>",
	func = function(param)
		local player = minetest.localplayer
		local name = player:get_name()
		local m = minetest.mod_channel_join(name)
		if param == "enable" then
			m:send_all("sprint_enable")
			return true, "[CSM] Sprint enabled"
		elseif param == "disable" then
			ack = "disabled"
			m:send_all("sprint_disable")
			return true, "[CSM] Sprint disabled"
		end
		return false, "[CSM] enable or disable"
	end,
})
2009-10-7 02:04:55: ACTION[Server]: jastest activates

User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

Re: [Server] jastest

by jas » Post

I added a jump sound mod channel message. Use the following script to enable it:

Code: Select all

-- Jump! (CSM)
-- Copyright 2020 James Stevenson
-- GPL 3+

local del = minetest.get_us_time()

local touching = false
local in_water = false
local jumping = false

local ack

local floor = math.floor
local insert = table.insert

local a = minetest.after
local sp = minetest.sound_play

local function poll(player)
	player = player or minetest.localplayer
	if player then
		local j = player:get_control().jump
		touching = player:is_touching_ground()
		in_water = player:is_in_liquid()

		local m = minetest.mod_channel_join(player:get_name())
		if not ack then
			m:send_all("jump_enable")
		end
		if j and not touching and not jumping and
				not in_water and
				minetest.get_us_time() - del > 334000 then
			jumping = true
			del = minetest.get_us_time()
			if ack == "disabled" then
				sp({name = "jump_jump", gain = 0.9})
			else
				m:send_all("jump")
			end
		elseif touching then
			jumping = false
		end
	end

	a(0, function()
		poll(player)
	end)
end

minetest.register_on_modchannel_message(function(channel_name, sender, message)
	if sender == "" and message == "jump_ack" then
		ack = "enabled"
	end
end)

poll()
+ Spoiler
Attachments
jumpsound2.zip
(793 Bytes) Downloaded 3 times
supersprint.zip
(21.14 KiB) Downloaded 3 times
jumpsound.zip
(21.32 KiB) Downloaded 1 time
2009-10-7 02:04:55: ACTION[Server]: jastest activates

User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

Re: [Server] jastest

by jas » Post

You can now use /sethome <name> to save multiple home locations. Using /home and /sethome without argument defaults to normal behavior. Use /homes to list homes and /homes delete <name> to remove.

Also, there is a little race track with switches for start and finish. My time is like 8.5 seconds. lol

Image
Image
Image

But I've done it in 8.1
Attachments
screenshot_20200510_203957.png
(57.06 KiB) Not downloaded yet
screenshot_20200510_203941.png
(59.18 KiB) Not downloaded yet
screenshot_20200510_203934.png
(78.05 KiB) Not downloaded yet
2009-10-7 02:04:55: ACTION[Server]: jastest activates

User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

Re: [Server] jastest

by jas » Post

Added backpacks - place and dig them anywhere (careful!); new users get one placed in their backpack inventory automatically, and any item in that slot remains after respawn. Items in your lower 8 * 3 inventory are automatically added to whatever backpack is in the save slot on death if there's room.
Image

Additionally, I added a shooter right-click action, to give knockback without the explosion, and they wear down now.
Lastly, leaves do damage, and here's a video to prove it: https://www.youtube.com/watch?v=6scWfR5Z9rc
Attachments
screenshot_20200511_201131.png
(118.48 KiB) Not downloaded yet
2009-10-7 02:04:55: ACTION[Server]: jastest activates

User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

Re: [Server] jastest

by jas » Post

Added an MH-style unified stamina and hunger bar:

Video demonstration
Image


The shooter doesn't explode unless it's loaded now. To load it, simply point at some lava and left/rightclick.
Attachments
screenshot_20200512_083810.png
(58.21 KiB) Not downloaded yet
2009-10-7 02:04:55: ACTION[Server]: jastest activates

User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

Re: [Server] jastest

by jas » Post

Added bonemeal and caverealms and warpstones.

Image
Image
Attachments
screenshot_20200519_074225.png
(254.8 KiB) Not downloaded yet
screenshot_20200519_074217.png
(89.09 KiB) Not downloaded yet
2009-10-7 02:04:55: ACTION[Server]: jastest activates

User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

Re: [Server] jastest

by jas » Post

Added autofelling of trees. The acacia ones don't work right, but the others seem to. I'll add shops for saplings unavailable on v6. :) [Edit: Done]

Also made liquids nonrenewable and automatically drop if unsupported below. This resulted in the lava pit at spawn sinking before my eyes which was fun. I put some sources around the edges for now. I suppose I added this partly in response to the lava in caverealms, but it's not going to remedy the scene much. I'm going to look for settings to see about less lava underground, and do that if possible. [Edit: Didn't see anything, will continue to investigate.]

Image

These warpstones all do the same thing: place one and name it, then give it a destination to warp to. The destination must be another named warpstone and must be present. If its destination warpstone is dug, then the connection is broken and a new destination must be set. To change the warpstone's name, dig it and place it anew.

Update: Added chat, reworked the setup menu, and added waypoints to the walkie talkies. Open the chat with the walkie by right-clicking, by default. Do [Setup]->[Chat]->[X] Walkie Activates to toggle it on/off. You can also use /chat or type chat in the terminal. The waypoints include spawn, respawn, death, cmd (/waypoint), and players. I'm going to add /homes in there, oh and that reminds me I need to add a GUI for /homes, /sethome, /home.

Here's a video of me blowing some stuff up: https://www.youtube.com/watch?v=ZgMb-RJBekg

Lastly, I've added a GUI for homes:

Image

The statbars have backgrounds now, and are fixed up a bit:

Image

Image
Attachments
screenshot_20200523_123549.png
(68.25 KiB) Not downloaded yet
screenshot_20200523_022258.png
(136.55 KiB) Not downloaded yet
screenshot_20200522_092839.png
(29.57 KiB) Not downloaded yet
2009-10-7 02:04:55: ACTION[Server]: jastest activates

User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

Re: [Server] jastest

by jas » Post

Image

Added boats and carts back in (lol) and threw mese boats in for good measure. Going to look into simple_helicopter for fun, and redo privs shop for buying fast/fly time. Updated the default UI a bit, based on jp's craftguide texture:

Image

Update: Added "Fly Shield" and "Fast Boots" as items that allow you the privs. There are shops that sell them at spawn, and they're given to new users and wear out over time. Next I'll make a craft recipe for them, and instead sell fly/fast time, and use the armor pieces to save (pause, reserve) said time since I can't tell if the mode is toggled on the client.

Image
Attachments
screenshot_20200524_163552.png
(221 KiB) Not downloaded yet
screenshot_20200524_163231.png
(84.89 KiB) Not downloaded yet
screenshot_20200523_151431.png
(99.48 KiB) Not downloaded yet
2009-10-7 02:04:55: ACTION[Server]: jastest activates

User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

Re: [Server] jastest

by jas » Post

Added crops

Image

Fire now removes itself if it's in a protected area. Since I turned renewable liquids off, and made it so the watering can acts like a bucket in that it removes water sources, I've added in a check to slowly renew some flowing liquid nodes.

Here's a video
Attachments
screenshot_20200525_101042.png
(176.74 KiB) Not downloaded yet
2009-10-7 02:04:55: ACTION[Server]: jastest activates

User avatar
jas
Member
Posts: 506
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas
Contact:

Re: [Server] jastest

by jas » Post

Added a CSM Minimap script to automatically switch between radar and surface.

Code: Select all

-- MiniMap! (CSM)
-- Copyright 2020 James Stevenson
-- GPL 3+

local ack, map, automap
local level = 2

local function minimap(player)
	player = player or minetest.localplayer
	if player then
		local m = minetest.mod_channel_join(player:get_name())
		if ack == "enabled" then
		elseif not ack then
			m:send_all("minimap_enable")
		end
		if ack and not map then
			map = minetest.ui.minimap
		elseif ack and map then
			if player:get_pos().y >= -100 then
				map:show()
				map:set_mode(level)
			else
				map:show()
				map:set_mode(level + 3)
			end
		end
	end
	minetest.after(0, function()
		minimap(player)
	end)
end

minetest.register_on_modchannel_message(function(channel_name, sender, message)
	if sender == "" and message == "minimap_ack" then
		ack = "enabled"
	end
end)

minetest.register_chatcommand("map", {
	func = function(param)
		param = tonumber(param)
		if param then
			if param < 1 or param > 3 then
				return false, "[Client] A level between 1 and 3"
			end
			level = param
			return true, "Level set to " .. param
		end
	end,
})

minimap()
Here's a video: https://www.youtube.com/watch?v=DG5qgwpKbDQ

Update: Updated shops
Image
Image

Now you can click the buttons directly to make a sale. If you have reverse trades enabled, clicking the cost button will trade the other way.
Attachments
screenshot_20200526_140113.png
(157.06 KiB) Not downloaded yet
screenshot_20200526_140109.png
(150.17 KiB) Not downloaded yet
2009-10-7 02:04:55: ACTION[Server]: jastest activates

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest