Loot Markers

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
Gorec
Posts: 322
Joined: Tue Feb 09, 2016 9:41 pm
Operating System Version (Optional): Windows 11
Location: )()()()()()()()()()()()(

Re: Loot Markers

Post by Gorec »

cyber_cool wrote: Sun Apr 23, 2023 12:14 pm
Gorec wrote: Sun Apr 23, 2023 11:59 am remebered that there is a mod that marks loot and stuff, but it does not work with gzdoom 4.10.0, works fine on 4.8.2 but havent tested other verions, dont wanna try dev builds yet

Script error, "MWR_LootMarkers.pk3:zscript/linesegcollide.zs" line 31:
Return type mismatch
Seems to work fine for me on gzdoom 4.10.0.
It did have 6 errors at first, but that's because I didn't extract the pk3 file, gzdoom had trouble seeing the inner pk3 archive.
how did you do it? i tried the latest dev build too and still get the same error, i dont know anything about zscript so i cant maybe edit it for myself
User avatar
cyber_cool
Posts: 150
Joined: Tue Aug 13, 2019 8:40 pm
Graphics Processor: nVidia with Vulkan support

Re: Loot Markers

Post by cyber_cool »

Gorec wrote: Sun Apr 23, 2023 2:07 pm how did you do it? i tried the latest dev build too and still get the same error, i dont know anything about zscript so i cant maybe edit it for myself
Oh, wait, I am actually [censored word], I grabbed a link from OG post.
So the fix I figured out is to replace this function in file "MWR_LootMarkers.pk3\zscript\LineSegCollide.zs"

from

Code: Select all

	uint Push3Floats(actor HitActor, float HitLocationX, float HitLocationY, float HitLocationZ)
	{
		if (!HitActor) return -1;
		
		HitA.Push(HitActor);
		HitX.Push(HitLocationX);
		HitY.Push(HitLocationY);
		return(HitZ.Push(HitLocationZ));
	}
to

Code: Select all

	uint Push3Floats(actor HitActor, float HitLocationX, float HitLocationY, float HitLocationZ)
	{
		if (!HitActor) return -1;
		
		HitA.Push(HitActor);
		HitX.Push(HitLocationX);
		HitY.Push(HitLocationY);
		HitZ.Push(HitLocationZ);
		return HitX.Size() - 1;
	}
User avatar
Gorec
Posts: 322
Joined: Tue Feb 09, 2016 9:41 pm
Operating System Version (Optional): Windows 11
Location: )()()()()()()()()()()()(

Re: Loot Markers

Post by Gorec »

cyber_cool wrote: Sun Apr 23, 2023 2:26 pm
Gorec wrote: Sun Apr 23, 2023 2:07 pm how did you do it? i tried the latest dev build too and still get the same error, i dont know anything about zscript so i cant maybe edit it for myself
Oh, wait, I am actually [censored word], I grabbed a link from OG post.
So the fix I figured out is to replace this function in file "MWR_LootMarkers.pk3\zscript\LineSegCollide.zs"

from

Code: Select all

	uint Push3Floats(actor HitActor, float HitLocationX, float HitLocationY, float HitLocationZ)
	{
		if (!HitActor) return -1;
		
		HitA.Push(HitActor);
		HitX.Push(HitLocationX);
		HitY.Push(HitLocationY);
		return(HitZ.Push(HitLocationZ));
	}
to

Code: Select all

	uint Push3Floats(actor HitActor, float HitLocationX, float HitLocationY, float HitLocationZ)
	{
		if (!HitActor) return -1;
		
		HitA.Push(HitActor);
		HitX.Push(HitLocationX);
		HitY.Push(HitLocationY);
		HitZ.Push(HitLocationZ);
		return HitX.Size() - 1;
	}
absolute legend thank you :cheers:
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm

Re: Loot Markers

Post by randi »

cyber_cool wrote: Sun Apr 23, 2023 2:26 pm

Code: Select all

	uint Push3Floats(actor HitActor, float HitLocationX, float HitLocationY, float HitLocationZ)
	{
		if (!HitActor) return -1;
The return type should be int, not uint. uint can't hold negative numbers like -1.
User avatar
cyber_cool
Posts: 150
Joined: Tue Aug 13, 2019 8:40 pm
Graphics Processor: nVidia with Vulkan support

Re: Loot Markers

Post by cyber_cool »

randi wrote: Sun Apr 23, 2023 4:42 pm The return type should be int, not uint. uint can't hold negative numbers like -1.
I know, but it wasn't my code in the first place. If some other part of it depends on this behaviour (considering zscript correctly overflows unsigned integers), changing it may break something.
Starman the Blaziken
Posts: 284
Joined: Thu Mar 07, 2019 9:40 pm
Graphics Processor: ATI/AMD (Modern GZDoom)
Location: United States, MI

Re: Loot Markers

Post by Starman the Blaziken »

Since this topic was bumped to the top, I remembered to comment about the mod not exactly being friendly with mod loader programs like ZDL for my example.
I am guessing it loads in other files in it first before the necessary parts are called and it fails to start up no matter what I load before or after it.
User avatar
Sir Robin
Posts: 537
Joined: Wed Dec 22, 2021 7:02 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: Loot Markers

Post by Sir Robin »

FYI, I'm looking into the issues mentioned and also another issue I'm seeing. I'll post an update when it's fixed.
User avatar
Unregret
Posts: 145
Joined: Wed Jan 04, 2023 5:42 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 9+1
Location: Cloud District

Re: Loot Markers

Post by Unregret »

Hello, can this mod detect if there are any secret items hidden inside the map? Or some similar mods can help you find secret easily?
User avatar
Sir Robin
Posts: 537
Joined: Wed Dec 22, 2021 7:02 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: Loot Markers

Post by Sir Robin »

Unregret wrote: Mon Aug 21, 2023 3:02 am Hello, can this mod detect if there are any secret items hidden inside the map? Or some similar mods can help you find secret easily?
Right now it shows any actors within the line of sight, regardless if they are behinid another actor, a texture, or in a dark sector. So yes it can be used to find tings hidden in that way.
User avatar
Rowsol
Posts: 982
Joined: Wed Mar 06, 2013 5:31 am

Re: Loot Markers

Post by Rowsol »

Uhh, I'm getting this when trying to load

MWR_LootMarkers.pk3:zscript/lootcursor.zs, line 1: Class LootCursorInv has unknown base class MWR_Cursor3dInv
MWR_LootMarkers.pk3:zscript/lootcursor.zs, line 84: Class MarkerCursor has unknown base class MWR_Cursor2d
MWR_LootMarkers.pk3:zscript/lootcursor.zs, line 1: LootCursorInv: Non-actor classes may not have defaults
MWR_LootMarkers.pk3:zscript/lootcursor.zs, line 8: Attempt to override non-existent virtual function DoWhileEnabled
MWR_LootMarkers.pk3:zscript/lootcursor.zs, line 30: Attempt to override non-existent virtual function DoBeforeDisable
MWR_LootMarkers.pk3:zscript/lootcursor.zs, line 84: MarkerCursor: States can only be defined for actors.
Starman the Blaziken
Posts: 284
Joined: Thu Mar 07, 2019 9:40 pm
Graphics Processor: ATI/AMD (Modern GZDoom)
Location: United States, MI

Re: Loot Markers

Post by Starman the Blaziken »

Rowsol wrote: Mon Aug 21, 2023 11:21 pm Uhh, I'm getting this when trying to load

MWR_LootMarkers.pk3:zscript/lootcursor.zs, line 1: Class LootCursorInv has unknown base class MWR_Cursor3dInv
MWR_LootMarkers.pk3:zscript/lootcursor.zs, line 84: Class MarkerCursor has unknown base class MWR_Cursor2d
MWR_LootMarkers.pk3:zscript/lootcursor.zs, line 1: LootCursorInv: Non-actor classes may not have defaults
MWR_LootMarkers.pk3:zscript/lootcursor.zs, line 8: Attempt to override non-existent virtual function DoWhileEnabled
MWR_LootMarkers.pk3:zscript/lootcursor.zs, line 30: Attempt to override non-existent virtual function DoBeforeDisable
MWR_LootMarkers.pk3:zscript/lootcursor.zs, line 84: MarkerCursor: States can only be defined for actors.
Is that when you load it in a mod loader too? I just reported it to Sir Robin not long ago which probably prompted him to revisit the comments.
User avatar
Rowsol
Posts: 982
Joined: Wed Mar 06, 2013 5:31 am

Re: Loot Markers

Post by Rowsol »

The base classes are in a separate pk3 that's located in the main pk3. Strange.
User avatar
Sinael
Posts: 244
Joined: Tue Oct 18, 2011 8:57 am

Re: Loot Markers

Post by Sinael »

Unregret wrote: Mon Aug 21, 2023 3:02 am Hello, can this mod detect if there are any secret items hidden inside the map? Or some similar mods can help you find secret easily?
Here's a minimod that simply places a map marker in the center of all secret sectors.
Works for all cases except UDMF maps where secret requires special kind of actions to be marked as such (like digging a hole), or can be in the wrong place when secret sector is self-referenting or has a highly irregular concave shape which rarely happens, but still happens some times.
You do not have the required permissions to view the files attached to this post.
User avatar
Sir Robin
Posts: 537
Joined: Wed Dec 22, 2021 7:02 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: Loot Markers

Post by Sir Robin »

Sinael wrote: Wed Aug 23, 2023 2:41 am
Unregret wrote: Mon Aug 21, 2023 3:02 am Hello, can this mod detect if there are any secret items hidden inside the map? Or some similar mods can help you find secret easily?
Here's a minimod that simply places a map marker in the center of all secret sectors.
Works for all cases except UDMF maps where secret requires special kind of actions to be marked as such (like digging a hole), or can be in the wrong place when secret sector is self-referenting or has a highly irregular concave shape which rarely happens, but still happens some times.
Nice mod.

What I do without a mod is in the Automap Options, set Show Secrets On Map to Always, then go to Customize Map Colors and set Secret Sector and Unexplored Secret to different colors. I set unexplored to bright magenta and secret to a darker magenta. So when I get to the exit and don't have 100% secrets, I look at my map for bright magenta sectors to visit. It isn't perfect because the colors can be over-ridden by other factors, but it works most of the time.
User avatar
Sir Robin
Posts: 537
Joined: Wed Dec 22, 2021 7:02 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: Loot Markers

Post by Sir Robin »

ok, new version drop. Get it here

Fixed it to work newer version of GZDoom (tested on v4.10.0)

Fixed a problem where if you get an item without facing it it would often stay marked on the map.

Since I don'know how to properly do dependant packages, I just zipped up both packages. To run, load the cursor package before the marker package.

Tell me if you're still having problems. Or if you know of a better way to package this.

Return to “Gameplay Mods”