[Abandoned] [Game] Hamlet's Quest "Valhalleluja" [3.2.2] [hamlets_quest]

timsoft
Member
Posts: 58
Joined: Sat Jun 04, 2016 20:38
GitHub: timsoftgit

Re: [Abandoned] [Game] Hamlet's Quest "Valhalleluja" [3.2.2] [hamlets_quest]

by timsoft » Post

goats, thanks for looking at that. At the moment I use mese lamps, and ladders to create breathing pockets, with glass tunnels and air shelters. I remember glowing mossy cobblestone, or it may have been called messy coblestone, I seem to remember seeing both; that was with the cave mining goblins, which were interesting for a bit, but after a long while they messed up caverns, and were forever breaking into my mineshaft. I'm not too sad to see them gone. I do have a world still on that version, and when the satiates issue is fixed I hope to move all my hamlets quest worlds to the current version.
I spoke with dfcaverns and farmingredo creators, so hopefully the missing satiates will appear in them in due time; the thirsty one for drinks is separate; the mod creator hasn't checked into his mod forum for a few years, I'm hoping to get some info from other users that use his mod. It would be nice if mint tea and coffee actually did something. I haven't checked milk recently either, to see if a glass of milk reduces thirst. First to catch a cow!..

User avatar
Saturn
Member
Posts: 57
Joined: Sat Jul 11, 2020 12:03
Location: Lombardy, Italy

Re: [Abandoned] [Game] Hamlet's Quest "Valhalleluja" [3.2.2] [hamlets_quest]

by Saturn » Post

About the underground lighting
goats wrote:
Thu Dec 03, 2020 04:03
I kind of missed it, it was nice, atmospheric, and not overmuch "OP" for the player to be able to use. I am guessing something from dfcaverns or subterrane was meant to replace it.
I removed it after talking with Facedeer, long story short: he didn't wanted DF Caverns look as bright as Cave Realms, so I opted for the "original" version, that is, no glowing.

However, if you want to check or download previous releases, look at this url:
https://codeberg.org/Hamlet/hamlets_quest/releases

Click on the release's commit alphanumeric code to see its source code, for example:
"bdbaf3196f" for the version 2.4.2
"0804ebc7a2" for the version 3.1.1

If you want less darker DF Caverns, this is the former code:
https://codeberg.org/Hamlet/hamlets_que ... t.lua#L383

NOTE: you must add "dfcaverns" as dependency in the mod.conf file of hq_tweaks.

You can copy-paste the former code in the hq_tweaks' init.lua, but I would suggest to create a separate file in the "tweaks" folder to keep things clean.

I hope this helps :)

EDIT: Actually there is already a separate file named "dfcaverns.lua" in the "tweaks" subfolder, so you can paste the code there; I'm unsure about the dependency though: it may work with the already present "df_caverns" or it may need "dfcaverns"...

User avatar
goats
Member
Posts: 212
Joined: Thu Nov 21, 2019 05:29

Re: [Abandoned] [Game] Hamlet's Quest "Valhalleluja" [3.2.2] [hamlets_quest]

by goats » Post

Thanks for taking the time to respond! I do have older versions of HQ. (I tend to keep all versions of games and not merely update over them.) I had not even realized there was dfcaverns in the last version of HQ with the glowing mossycobble. I hadn't gotten down that far, i was collecting the normal ores and spent a lot of time avoiding or trying to fight dungeon masters. :D

I haven't any problem finding HQ older releases, it's just dfcaverns. It was suggested to me in that thread that i could get an older version of df (specifically the mapgen helper) that would actually work for me, but there are no releases older than the new mapgen. For all i know one can git an older revision of the code (idk the terminology), but i never looked into installing a git client or how to go about doing that, if possible.

Doesn't matter, HQ is still a great game, and someday i might be able to play around with dfcaverns/subterrane, but pff there are a lot of things i can't run on my systems. It's just the reality of it.

timsoft
Member
Posts: 58
Joined: Sat Jun 04, 2016 20:38
GitHub: timsoftgit

Re: [Abandoned] [Game] Hamlet's Quest "Valhalleluja" [3.2.2] [hamlets_quest]

by timsoft » Post

just a quick question. hopefully it's not off topic. I's probably more minetest general, but here goes.. In adding mobs to HQ (farm animals, monsters and water stuff), I also tried wildlife mod. I got tired of the wolves and so removed the mod, but my world seems to still have spawn points for the wildlife, which it complains about when I go to certain areas, now I removed the mod. Is there a way of removing unwanted spawn points?. I have a similar thing with snakes from waterlife which i disabled, but they (as unknown) still appear in certain parts of the world.

User avatar
goats
Member
Posts: 212
Joined: Thu Nov 21, 2019 05:29

Re: [Abandoned] [Game] Hamlet's Quest "Valhalleluja" [3.2.2] [hamlets_quest]

by goats » Post

Hi timsoft. It is going to depend on the particular mod, but generally, you need to make sure you remove all references. E.g., for "wolves", you might not just need to remove a directory "/wolves", or a file "wolves.lua", there may be references in an init.lua, or api.lua, etc.

edit: So i had a look at the mod.

Code: Select all

local abr = minetest.get_mapgen_setting('active_block_range')

local node_lava = nil

local wildlife = {}
--wildlife.spawn_rate = 0.5		-- less is more

local min=math.min
local max=math.max

local spawn_rate = 1 - max(min(minetest.settings:get('wildlife_spawn_chance') or 0.2,1),0)
local spawn_reduction = minetest.settings:get('wildlife_spawn_reduction') or 0.5

local function lava_dmg(self,dmg)
	node_lava = node_lava or minetest.registered_nodes[minetest.registered_aliases.mapgen_lava_source]
	if node_lava then
		local pos=self.object:get_pos()
		local box = self.object:get_properties().collisionbox
		local pos1={x=pos.x+box[1],y=pos.y+box[2],z=pos.z+box[3]}
		local pos2={x=pos.x+box[4],y=pos.y+box[5],z=pos.z+box[6]}
		local nodes=mobkit.get_nodes_in_area(pos1,pos2)
		if nodes[node_lava] then mobkit.hurt(self,dmg) end
	end
end

local function predator_brain(self)
	-- vitals should be checked every step
	if mobkit.timer(self,1) then lava_dmg(self,6) end
	mobkit.vitals(self)
--	if self.object:get_hp() <=100 then	
	if self.hp <= 0 then	
		mobkit.clear_queue_high(self)									-- cease all activity
		mobkit.hq_die(self)												-- kick the bucket
		return
	end
	
	if mobkit.timer(self,1) then 			-- decision making needn't happen every engine step
		local prty = mobkit.get_queue_priority(self)
		
		if prty < 20 and self.isinliquid then
			mobkit.hq_liquid_recovery(self,20)
			return
		end
		
		local pos=self.object:get_pos()
		
		-- hunt
		if prty < 10 then							-- if not busy with anything important
			local prey = mobkit.get_closest_entity(self,'wildlife:deer')	-- look for prey
			if prey then 
				mobkit.hq_hunt(self,10,prey) 									-- and chase it
			end
		end
		
		if prty < 9 then
			local plyr = mobkit.get_nearby_player(self)					
			if plyr and vector.distance(pos,plyr:get_pos()) < 10 then	-- if player close
				mobkit.hq_warn(self,9,plyr)								-- try to repel them
			end															-- hq_warn will trigger subsequent bhaviors if needed
		end
		
		-- fool around
		if mobkit.is_queue_empty_high(self) then
			mobkit.hq_roam(self,0)
		end
	end
end

local function herbivore_brain(self)
	if mobkit.timer(self,1) then lava_dmg(self,6) end
	mobkit.vitals(self)

	if self.hp <= 0 then	
		mobkit.clear_queue_high(self)
		mobkit.hq_die(self)
		return
	end
	
	if mobkit.timer(self,1) then 
		local prty = mobkit.get_queue_priority(self)
		
		if prty < 20 and self.isinliquid then
			mobkit.hq_liquid_recovery(self,20)
			return
		end
		
		local pos = self.object:get_pos() 
		
		if prty < 11  then
			local pred = mobkit.get_closest_entity(self,'wildlife:wolf')
			if pred then 
				mobkit.hq_runfrom(self,11,pred) 
				return
			end
		end
		if prty < 10 then
			local plyr = mobkit.get_nearby_player(self)
			if plyr and vector.distance(pos,plyr:get_pos()) < 8 then 
				mobkit.hq_runfrom(self,10,plyr)
				return
			end
		end
		if mobkit.is_queue_empty_high(self) then
			mobkit.hq_roam(self,0)
		end
	end
end

-- spawning is too specific to be included in the api, this is an example.
-- a modder will want to refer to specific names according to games/mods they're using 
-- in order for mobs not to spawn on treetops, certain biomes etc.

local function spawnstep(dtime)

	for _,plyr in ipairs(minetest.get_connected_players()) do
		if math.random()<dtime*0.2 then	-- each player gets a spawn chance every 5s on average
			local vel = plyr:get_player_velocity()
			local spd = vector.length(vel)
			local chance = spawn_rate * 1/(spd*0.75+1)  -- chance is quadrupled for speed=4

			local yaw
			if spd > 1 then
				-- spawn in the front arc
				yaw = plyr:get_look_horizontal() + math.random()*0.35 - 0.75
			else
				-- random yaw
				yaw = math.random()*math.pi*2 - math.pi
			end
			local pos = plyr:get_pos()
			local dir = vector.multiply(minetest.yaw_to_dir(yaw),abr*16)
			local pos2 = vector.add(pos,dir)
			pos2.y=pos2.y-5
			local height, liquidflag = mobkit.get_terrain_height(pos2,32)
	
			if height and height >= 0 and not liquidflag -- and math.abs(height-pos2.y) <= 30 testin
			and mobkit.nodeatpos({x=pos2.x,y=height-0.01,z=pos2.z}).is_ground_content then

				local objs = minetest.get_objects_inside_radius(pos,abr*16+5)
				local wcnt=0
				local dcnt=0
				for _,obj in ipairs(objs) do				-- count mobs in abrange
					if not obj:is_player() then
						local luaent = obj:get_luaentity()
						if luaent and luaent.name:find('wildlife:') then
							chance=chance + (1-chance)*spawn_reduction	-- chance reduced for every mob in range
-- XX						if luaent.name == 'wildlife:wolf' then wcnt=wcnt+1
-- XX						elseif luaent.name=='wildlife:deer' then dcnt=dcnt+1 end
							if luaent.name=='wildlife:deer' then dcnt=dcnt+1 end
						end
					end
				end
--minetest.chat_send_all('chance '.. chance)
				if chance < math.random() then

					-- if no wolves and at least one deer spawn wolf, else deer
--					local mobname = (wcnt==0 and dcnt > 0) and 'wildlife:wolf' or 'wildlife:deer'
-- XX					local mobname = dcnt>wcnt+1 and 'wildlife:wolf' or 'wildlife:deer'
					local mobname = dcnt and 'wildlife:deer'


					pos2.y = height+0.5
					objs = minetest.get_objects_inside_radius(pos2,abr*16-2)
					for _,obj in ipairs(objs) do				-- do not spawn if another player around
						if obj:is_player() then return end
					end
--minetest.chat_send_all('spawnin '.. mobname ..' #deer:' .. dcnt)
					minetest.add_entity(pos2,mobname)			-- ok spawn it already damnit
				end
			end
		end
	end
end


minetest.register_globalstep(spawnstep)
--[[  XX
minetest.register_entity("wildlife:wolf",{
											-- common props
	physical = true,
	stepheight = 0.1,				--EVIL!
	collide_with_objects = true,
	collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.7, 0.3},
	visual = "mesh",
	mesh = "wolf.b3d",
	textures = {"kit_wolf.png"},
	visual_size = {x = 1.3, y = 1.3},
	static_save = true,
	makes_footstep_sound = true,
	on_step = mobkit.stepfunc,	-- required
	on_activate = mobkit.actfunc,		-- required
	get_staticdata = mobkit.statfunc,
											-- api props
	springiness=0,
	buoyancy = 0.75,					-- portion of hitbox submerged
	max_speed = 5,
	jump_height = 1.26,
	view_range = 24,
	lung_capacity = 10, 		-- seconds
	max_hp = 14,
	timeout=600,
	attack={range=0.5,damage_groups={fleshy=7}},
	sounds = {
		attack='dogbite',
		warn = 'angrydog',
		},
	brainfunc = predator_brain,
	
	on_punch=function(self, puncher, time_from_last_punch, tool_capabilities, dir)
		if mobkit.is_alive(self) then
			local hvel = vector.multiply(vector.normalize({x=dir.x,y=0,z=dir.z}),4)
			self.object:set_velocity({x=hvel.x,y=2,z=hvel.z})
			
			mobkit.hurt(self,tool_capabilities.damage_groups.fleshy or 1)

			if type(puncher)=='userdata' and puncher:is_player() then	-- if hit by a player
				mobkit.clear_queue_high(self)							-- abandon whatever they've been doing
				mobkit.hq_hunt(self,10,puncher)							-- get revenge
			end
		end
	end

})
]]--

minetest.register_entity("wildlife:deer",{
											-- common props
	physical = true,
	stepheight = 0.1,				--EVIL!
	collide_with_objects = true,
	collisionbox = {-0.35, -0.19, -0.35, 0.35, 0.65, 0.35},
	visual = "mesh",
	mesh = "herbivore.b3d",
	textures = {"herbivore.png"},
	visual_size = {x = 1.3, y = 1.3},
	static_save = true,
	makes_footstep_sound = true,
	on_step = mobkit.stepfunc,	-- required
	on_activate = mobkit.actfunc,		-- required
	get_staticdata = mobkit.statfunc,
											-- api props
	springiness=0,
	buoyancy = 0.9,
	max_speed = 5,
	jump_height = 1.26,
	view_range = 24,
	lung_capacity = 10,			-- seconds
	max_hp = 10,
	timeout = 600,
	attack={range=0.5,damage_groups={fleshy=3}},
	sounds = {
		scared='deer_scared',
		hurt = 'deer_hurt',
		},
	
	brainfunc = herbivore_brain,

	on_punch=function(self, puncher, time_from_last_punch, tool_capabilities, dir)
		local hvel = vector.multiply(vector.normalize({x=dir.x,y=0,z=dir.z}),4)
		self.object:set_velocity({x=hvel.x,y=2,z=hvel.z})
		mobkit.make_sound(self,'hurt')
		mobkit.hurt(self,tool_capabilities.damage_groups.fleshy or 1)
	end,
})


-- minetest.register_on_chat_message(
	-- function(name, message)
		-- if message == 'doit' then
			-- local plyr=minetest.get_player_by_name(name)
			-- local pos=mobkit.get_stand_pos(plyr)
			-- local nodes = mobkit.get_nodes_in_area(pos,mobkit.pos_shift(pos,{x=-1,z=-1,y=-1}))
			-- for p,n in pairs(nodes) do
				-- minetest.chat_send_all(p.name ..' '.. dump(n))
			-- end
		-- end
	-- end
-- )
Probably hacky at the least. Generally i would suggest requesting options from mod authors. Loads of mods and games could benefit from settings, or more of them, exposed to the UI. This mod has some, but given it literally spawns two critters, i see the author might not imagine a setting to turn one of them off. :)
Last edited by goats on Wed Dec 09, 2020 18:28, edited 1 time in total.

timsoft
Member
Posts: 58
Joined: Sat Jun 04, 2016 20:38
GitHub: timsoftgit

Re: [Abandoned] [Game] Hamlet's Quest "Valhalleluja" [3.2.2] [hamlets_quest]

by timsoft » Post

ok thanks; so I'll have to trawl through. Because (in the case of wildlife mod) I had removed it entirely from the world, I was surprised to still see elements in the world. I'll go hunting. on windows I use crimson editor (emmerald editor) which has a nice search text in files in folders option which has come in handy going through minetest lua files hunting for where stuff is referenced.

User avatar
goats
Member
Posts: 212
Joined: Thu Nov 21, 2019 05:29

Re: [Abandoned] [Game] Hamlet's Quest "Valhalleluja" [3.2.2] [hamlets_quest]

by goats » Post

if you entirely turned off the mod or removed it from mods folder, then you probably still just have entities saved in your map database which had spawned previously. That would be unknown entities/objects. (Punch them.) Chat complaining that "wolf/snake not exist" should not be happening without the mod enabled for that world.

edit: Yer snakes:
spawn.lua;96
crafts.lua;302;331;375
init.lua;63
/animals/snake.lua

edit: there is also an .init.lua.swp (binary) which is created in the mod directory, but if i simply comment out init.lua;63 (the dofile line which calls snake.lua) and touch nothing else, snakes utterly disappear. no unknown objects, no messages. I built a box and put two in it, as i only managed ever to get one to spawn once i found desert and savanna.

timsoft
Member
Posts: 58
Joined: Sat Jun 04, 2016 20:38
GitHub: timsoftgit

Re: [Abandoned] [Game] Hamlet's Quest "Valhalleluja" [3.2.2] [hamlets_quest]

by timsoft » Post

thanks for the pointer. Ive editted waterlife\spawn.lua and commented out the snake spawner.(lines 74-88 ). I had already commented out the dofile entry that loads the snakes. Re. the wildlife, I'll just have to hunt over the map in the area where I originally enabled it to find the entities.

Chris
Member
Posts: 27
Joined: Thu Mar 01, 2018 11:33

Re: [Abandoned] [Game] Hamlet's Quest "Valhalleluja" [3.2.2] [hamlets_quest]

by Chris » Post

Hi,

I've updated the german translation of anvil.de.tr:

Code: Select all

# textdomain: anvil


# ./init.lua
@1 cannot be repaired with an anvil.=@1 kann nicht mit einem Amboss repariert werden.
@1's anvil=@1s Amboss
A tool for repairing other tools at a blacksmith's anvil.=Ein Werkzeug, um andere Werkzeuge auf einem Schmiedeamboss zu reparieren
A tool for repairing other tools in conjunction with a blacksmith's hammer.=Ein Werkzeug, um andere Werkzeuge mit einem Hammer  eines Schmieds zu reparieren
Anvil=Amboss
Right-click on this anvil with a damaged tool to place the damaged tool upon it. You can then repair the damaged tool by striking it with a blacksmith's hammer. Repeated blows may be necessary to fully repair a badly worn tool. To retrieve the tool either punch or right-click the anvil with an empty hand.=Rechtsklicken Sie mit dem beschädigten Werkzeug auf diesen Amboss, um es darauf abzulegen. Sie können es danach durch Schlagen mit dem Schmiedehammer reparieren. Zur vollständigen Reparatur können wiederholte Schläge auf das verschlissene Werkzeug nötig sein. Um das Werkzeug zu entnehmen, schlagen oder rechtsklicken Sie mit einer leeren Hand auf den Amboss.
Steel blacksmithing hammer=Stahlschmiedehammer
This anvil is for damaged tools only.=Dieser Amboss ist nur für beschädigtes Werkzeug.
Use this hammer to strike blows upon an anvil bearing a damaged tool and you can repair it. It can also be used for smashing stone, but it is not well suited to this task.=Benutzen Sie diesen Hammer, um ein beschädigtes Werkzeug über einem Amboss zu reparieren. Er kann auch zum Zertrümmern von Steinen benutzt werden, ist aber für diese Aufgabe nicht so gut geeignet.
Your @1 has been repaired successfully.=Ihr @1 wurde erfolgreich repariert.
##### not used anymore #####
Workpiece:=Werkstück:
Optional=Mögliche
storage for=Speicherplatz für
your hammer=Ihren Hammer
Punch anvil with hammer to=Schlagen Sie mit dem Hammer auf den Amboss um
repair tool in workpiece-slot.=das Werkzeug im Werkstückfeld zu reparieren.
anvil=Amboss
Anvil (owned by %s)=Amboss (gehört %s)
Owner: %s=Besitzer: %s

Please include it.

Chris

User avatar
Saturn
Member
Posts: 57
Joined: Sat Jul 11, 2020 12:03
Location: Lombardy, Italy

Re: [Abandoned] [Game] Hamlet's Quest "Valhalleluja" [3.2.2] [hamlets_quest]

by Saturn » Post

Chris wrote:
Tue Jan 19, 2021 20:24
Hi,
I've updated the german translation of anvil.de.tr:
Hi, thanks for your work, but this game is no longer being maintained - that is, no updates or new releases.
You should submit your translation on the Anvil's mod repository: https://github.com/minetest-mods/anvil
that way it will be available to anyone using it.

Thanks again.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests