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 myselfcyber_cool wrote: ↑Sun Apr 23, 2023 12:14 pmSeems to work fine for me on gzdoom 4.10.0.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
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.
Loot Markers
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.
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.
-
- Posts: 322
- Joined: Tue Feb 09, 2016 9:41 pm
- Operating System Version (Optional): Windows 11
- Location: )()()()()()()()()()()()(
Re: Loot Markers
-
- Posts: 150
- Joined: Tue Aug 13, 2019 8:40 pm
- Graphics Processor: nVidia with Vulkan support
Re: Loot Markers
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));
}
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;
}
-
- Posts: 322
- Joined: Tue Feb 09, 2016 9:41 pm
- Operating System Version (Optional): Windows 11
- Location: )()()()()()()()()()()()(
Re: Loot Markers
absolute legend thank youcyber_cool wrote: ↑Sun Apr 23, 2023 2:26 pmOh, 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"
fromtoCode: 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)); }
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; }
-
- Site Admin
- Posts: 7749
- Joined: Wed Jul 09, 2003 10:30 pm
Re: Loot Markers
cyber_cool wrote: ↑Sun Apr 23, 2023 2:26 pmThe return type should be int, not uint. uint can't hold negative numbers like -1.Code: Select all
uint Push3Floats(actor HitActor, float HitLocationX, float HitLocationY, float HitLocationZ) { if (!HitActor) return -1;
-
- Posts: 150
- Joined: Tue Aug 13, 2019 8:40 pm
- Graphics Processor: nVidia with Vulkan support
Re: Loot Markers
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.
-
- Posts: 284
- Joined: Thu Mar 07, 2019 9:40 pm
- Graphics Processor: ATI/AMD (Modern GZDoom)
- Location: United States, MI
Re: Loot Markers
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.
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.
-
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
Re: Loot Markers
FYI, I'm looking into the issues mentioned and also another issue I'm seeing. I'll post an update when it's fixed.
-
- 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
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?
-
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
Re: Loot Markers
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.
-
- Posts: 982
- Joined: Wed Mar 06, 2013 5:31 am
Re: Loot Markers
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.
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.
-
- Posts: 284
- Joined: Thu Mar 07, 2019 9:40 pm
- Graphics Processor: ATI/AMD (Modern GZDoom)
- Location: United States, MI
Re: Loot Markers
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.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.
-
- Posts: 982
- Joined: Wed Mar 06, 2013 5:31 am
Re: Loot Markers
The base classes are in a separate pk3 that's located in the main pk3. Strange.
-
- Posts: 244
- Joined: Tue Oct 18, 2011 8:57 am
Re: Loot Markers
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.
-
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
Re: Loot Markers
Nice mod.Sinael wrote: ↑Wed Aug 23, 2023 2:41 amHere'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.
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.
-
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
Re: Loot Markers
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.
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.