Miloet / LC_Map

0 stars 0 forks source link

Handheld Map options #1

Closed Qugar closed 5 months ago

Qugar commented 9 months ago

Would it perhaps be possible to add an option so that only loot is displayed on the map? No turrets, no doors and no enemies?

Great mod so far just a bit powerful =)

Miloet commented 9 months ago

it all depends on how the game creator, zeekers, has layered everything. if each map object, I.E turrets, doors, enemies, loot, and ground(maybe) are layered separately it should be fairly easy. Otherwise quite difficult. I will have a look.

On Tue, 6 Feb 2024 at 22:45, Qugar @.***> wrote:

Would it perhaps be possible to add an option so that only loot is displayed on the map? No turrets, no doors and no enemies?

Great mod so far just a bit powerful =)

— Reply to this email directly, view it on GitHub https://github.com/Miloet/LC_Map/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO6CQPF7EYXZBBRERPOSZK3YSKP7FAVCNFSM6AAAAABC4XOTXCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZDCNZRHA4TGNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Qugar commented 9 months ago

Maybe there are some really good approaches in this mod? Apparently it is possible to turn various things on and off there.

I don't want this to come off the wrong way. I'm just trying to be helpful. An item with these functions and battery consumption would be simply great.

https://thunderstore.io/c/lethal-company/p/Tyzeron/Minimap/

Miloet commented 9 months ago

I’ll check it out. thanks for the input!

tors 8 feb. 2024 kl. 00:37 skrev Qugar @.***>:

Maybe there are some really good approaches in this mod? Apparently it is possible to turn various things on and off there.

I don't want this to come off the wrong way. I'm just trying to be helpful. An item with these functions and battery consumption would be simply great.

https://thunderstore.io/c/lethal-company/p/Tyzeron/Minimap/ http://url

— Reply to this email directly, view it on GitHub https://github.com/Miloet/LC_Map/issues/1#issuecomment-1933118316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO6CQPBEBFS3DJG74TURCJLYSQF4ZAVCNFSM6AAAAABC4XOTXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZTGEYTQMZRGY . You are receiving this because you commented.Message ID: @.***>

Miloet commented 9 months ago

i used the mod you gave as a base for how to do it for my mod. it has now been implemented. i do expect some bugs to exist but for the most part it works!

On Thu, 8 Feb 2024 at 08:59, Milo Et @.***> wrote:

I’ll check it out. thanks for the input!

tors 8 feb. 2024 kl. 00:37 skrev Qugar @.***>:

Maybe there are some really good approaches in this mod? Apparently it is possible to turn various things on and off there.

I don't want this to come off the wrong way. I'm just trying to be helpful. An item with these functions and battery consumption would be simply great.

https://thunderstore.io/c/lethal-company/p/Tyzeron/Minimap/ http://url

— Reply to this email directly, view it on GitHub https://github.com/Miloet/LC_Map/issues/1#issuecomment-1933118316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO6CQPBEBFS3DJG74TURCJLYSQF4ZAVCNFSM6AAAAABC4XOTXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZTGEYTQMZRGY . You are receiving this because you commented.Message ID: @.***>

Qugar commented 9 months ago

I found two problems.

  1. If you switch the map in the ship to another player, the tool also shows that player instead of itself.

  2. I don't know exactly what happens, but as soon as you get to the map on the ship, the configs for the tool are overwritten.

I know that there was a minimap where you could have this minimap separate from the map in the terminal. Unfortunately it wasn't a tool to take with you but was simply displayed in the hud. I'll see if I can find it again and then edit the post.

But great progress so far and thank you for looking at it and trying to make it happen.

Edit: This isn't exactly the minimap I meant, but in both of these mods there seems to be a way to create a new instance that is independent of the map on the ship.

https://thunderstore.io/c/lethal-company/p/Zaggy1024/TwoRadarMaps/ https://thunderstore.io/c/lethal-company/p/SeparateCameras/SeparateCameras/

Please excuse all the trouble.

Miloet commented 9 months ago

The second point is intentional. when the player is inside the ship all map objects are shown as normal, allowing for the navigator to still do their job by seeing all the mapobjects. when the player leaves the ship the map objects are changed to reflect the settings. also this is no trouble at all, i love having the bugs told to me since i have limited testing capabilities. this instance is independent from the ship in most regards but since it largely uses the monitors original code some cracks slip through. will look into and fix

Qugar commented 9 months ago

If the second point is intentional, then it could be that the first point only takes place on the ship. Unfortunately I don't know when I'll be able to play multiplayer in the next few days. I will give you further feedback, of course even more so if everything works.

Edit: Is it possible to hide turrets as well?

Miloet commented 9 months ago

i did add that just forgot to add it to the config file, not 100% sure if it works just yet tho. i also fixed switching issue- tho the green flash animation is still synced between them and idk how to fix that since its basically a server call telling it to play.

Qugar commented 9 months ago

Unfortunately, turrets and mines are displayed to me if I set it to false in the config.

grafik grafik

And I don't know why but this eyeless dog was shown to me. I can't reproduce why it's displayed to me either.

grafik

Yes, I died but I needed the picture. XD

If it's just the green flash animation then that's completely ok at least for me.

Here are a few mods with which handheld map is compatible, which I thought could have caused problems but it works without any errors:

AdvancedCompany LethalLevelLoader Modded moons Modded enemies

Edit: After going back to the main menu and then starting again, the handheld map disappears from the ship. Found the handheld map outside the ship, apparently the position is not saved correctly when you leave the save file.

Edit2: So first the good news. I was just able to test the tool in multiplayer and the errors that occur there are the same as in singleplayer. The multiplayer seems to work great with the tool.

However, sometimes the enemies appear on the tool and I just can't reproduce it reliably.

grafik grafik

As you can see in the picture, the opponent disappears from the map again. That's why I'm wondering whether the game sends updates from the ship map or whether there is an update rate for the tool.

Then I found two rather small, not so important errors.

  1. In the config you wrote scarp instead of scrap, nothing crazy.
  2. Lamps are not shown as loot but only the light source, not that bad either.

grafik

To keep a bit of an overview:

  1. Turrets and mines are displayed despite the config. If it can't be solved, it's not a problem.
  2. Sometimes enemies are displayed on the tool.
  3. The green flash animation. But it's not a bad thing if you don't find a solution.
  4. When loading the save file, the tool is outside the ship.
  5. Lamps are shown as light source and not as loot, would be ok.
  6. In the config Scarp as a typo.

But all in all it looks very good and I already love it. The biggest error would be that enemies sometimes appear even when you are not at the ship.

Thank you so far. :smile:

Miloet commented 9 months ago

For the turrets and the mines i used a very bad temp solution that didn't work. It has now been changed and i will test it shortly. The eyeless dog being visible might have been because you were semi-close to the ship (within 10 units of it) but the snare flee in the facility i am a bit more unsure of- it could be that when new enemies spawn it doesn't change it for them, that might have been the case with the dog as well. The savefile loading i believe i know a fix to as well. I fixed the scarp typo 🤚💀

Thank you for all your work as well.

Edit: yes there is a 5 second update rate for the tool but it should be an issue unless you leave the ship and come back or use the jetpack to get to the facility. I can lower it an see the results.

Qugar commented 9 months ago

First of all, I'm happy to be able to help.

The update rate could perhaps be built into the config, then I could immediately test how much impact it has on performance and the players can decide for themselves, depending on their system, which rate they think is appropriate. Maybe with a small note that it can affect performance and that no values ​​less than one second should be selected, that would be a good option. It's just an idea.

Regarding the eyeless dog, I don't know what 10 units are, but on Atlas Abyss the spot was about as far away as the distance on Experimentation to the ladder. But as I said, all in all there's actually only one thing left that needs to be fixed, the rest are all more like cosmetic flaws that aren't too wild.

My group is also really excited about the mod and on Monday it will probably be tested over a longer period of time and with even more people.

Miloet commented 9 months ago

I have added the update rate as a config. Did the enemy visibility happen during a longer period of time like 10 seconds? Or did it always eventually switch off?

Qugar commented 9 months ago

So far I've always walked away from the enemies and checked to see if they were still visible when I came back. I'll stay with the enemy the next time it occurs.

Miloet commented 9 months ago

I checked and changed the code a bit. I tested it with 20 hoarding bugs and used the jetpack, non where visible by the time i got there. There is still the problem of enemies showing up right after they spawn but that would take quite a bit of code to fix. plus its only for the next update cycle.

Qugar commented 9 months ago

This just happened. If I stick with the visible enemies, then they won't fade out over time and every enemiy that comes along will also be visible.

grafik

Was created over a period of 2-3 minutes.

I'll see what happens with the new version as soon as r2modman recognizes it.

Edit: I will also test if it is a compatibility issue with other mods. This could take a while.

Edit2: So far it looks good. The fact that the enemies are shown briefly when spawning shouldn't be a problem as you can notice it yourself in most cases.

Also couldn't find any compatibility issues with my other mods, which is very good.

grafik

Is the last “Scarp” entry intentional? :joy:

Mines are no longer displayed, I still have to look for turrets, I will test it a little more and then give you feedback again, but so far it looks very promising.

A small request actually came up earlier in multiplayer. If you collect scrap, then the tool logically switches off. Switching it on costs battery every time if it is not set to 0, which makes sense. I was asked if I could ask if something could be done, I'm guessing not but I thought I'd throw it out there.

Miloet commented 9 months ago

the last one is because i changed the name- you can remove it in the .config file and it should be good. Do you mean like a setting so that it doenst turn off when you unequip it / pick up loot?

Qugar commented 9 months ago

Oh sure, sorry, my mistake.

Preventing it from turning off would be great, but I suspect it's either not possible or time-consuming. Preventing switching slots would probably cause compatibility problems because there are mods that work with switching slots.

I've now tried it with an update rate of 1 and can't notice any loss in performance. Also, I haven't seen a single enemy on the handheld map anymore, even when they spawn. Of course that could be a coincidence, but so far it looks perfect, I just have to look for turrets, they just don't spawn right now.

Edit: Is the update rate function carried out individually for each tool or does each tool receive the update via a single command? I only ask because the former could lead to a strong performance impact if many players use many tools at the same time.

Edit2: It now works great in singleplayer and turrets are no longer displayed. With the update rate of 1 I don't even see spawning enemies.

I will test it in multiplayer as soon as possible and give you feedback again.

But I would like to thank you in advance for your patience and for the implementation. This mod is an asset to us and you are definitely a great great asset to the modding community. :smirk:

Miloet commented 9 months ago

Thank you! The switching is really easy to implement actually so I will do that real quick.

Qugar commented 9 months ago

Works well and once again you have exceeded my expectations. Thank you.

Miloet commented 9 months ago

:> 👍

Qugar commented 9 months ago

As promised, the feedback on the mod in multiplayer:

Everything worked out wonderfully, no errors or anything and the people are very happy. With the exception of one person who would like the minimap to be displayed small in the hud when you have the tool on and put away.

I said that I could ask if that would be possible, but I also mentioned that that wasn't actually the intention behind the mod, because otherwise we could have used another mod.

In any case, I thank you very much again, apart from the small thing that the tool flies on some maps when you order it, there have been absolutely no problems.

Miloet commented 9 months ago

Yeah, that kinda goes against the intentions. I wanted to make a mod that fits in and mimics Lethal Company's items (and adding it would take quite a long time). I have no clue what causes it to do that tbh.

Currently I am trying to "stupid proof" the mod so that it will work no matter the mods that are used- well to a certain degree anyways.

Qugar commented 9 months ago

Completely understandable and as I said, I also think it's nonsense, because otherwise we could have chosen another mod, it was important to me that there wasn't a mini map in the hud.

But as I said, that was just one person and I think you can never make everyone happy. The majority of people are happy and so am I because you really took a lot of time for it.

Great work and keep it up. :smile::thumbsup:

Miloet commented 9 months ago

I wanna thank you. You have been an invaluable resource in making this mod better. Both in the feedback and bug-catching you have done but also from a motivational standpoint. I can often find it hard to keep on going when I hit my head against a brick wall for hours on end but knowing someone is standing in my corner hoping I succeed is just such a boost to that. This was just a hobby project, turned school later on, and I finally feel like I can say this mod is good. Mostly thanks to you and everyone else who has contacted me about bugs and such.

Thank you, truly.

Qugar commented 9 months ago

I was happy to help and yes it definitely turned out to be a good mod. I'm very pleased that you can take such a sense of achievement with you from all the work you've done and you can also be very proud of yourself.

I had always thought about whether I would find a mod like this and you realized what I was looking for. It's a bit sad that it's finished now because I also had a lot of fun giving you feedback and seeing how you continued to develop the mod.

Thank you for your perseverance.

Qugar commented 8 months ago

Hi,

It's me again. I actually found a small error but I'm sure you'll get it fixed relatively quickly and without any problems.

The way the mod is at the moment, the tool updates as soon as you have it in your inventory, which may lead to severe performance losses. I had tools with me for the whole team and my frames dropped to 20 fps.

I then looked at the whole thing in the logs and in fact every tool updates as soon as it is in the inventory, if I saw it correctly the tool does not update if it is on the floor even if it is on, which is perfect. If you could also implement this so that only the tool you are actively holding in your hand updates, the problem should be solved.

Miloet commented 8 months ago

You’re right about it being easy. I’ll add a check to see if it is the local player holding it and if it isnt it wont update. That should ensure that it never updates when you specifically dont hold it. I could see if there is any varibles such as ”pocketed” or ”in hand” so that it only updates when youre looking at it and not while its pocketed. I’ll have it fixed within 24 hours.

tis 13 feb. 2024 kl. 07:16 skrev Qugar @.***>:

Hi,

It's me again. I actually found a small error but I'm sure you'll get it fixed relatively quickly and without any problems.

The way the mod is at the moment, the tool updates as soon as you have it in your inventory, which may lead to severe performance losses. I had tools with me for the whole team and my frames dropped to 20 fps.

I then looked at the whole thing in the logs and in fact every tool updates as soon as it is in the inventory, if I saw it correctly the tool does not update if it is on the floor even if it is on, which is perfect. If you could also implement this so that only the tool you are actively holding in your hand updates, the problem should be solved.

— Reply to this email directly, view it on GitHub https://github.com/Miloet/LC_Map/issues/1#issuecomment-1940489604, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO6CQPG2MRE3CSY42Y77CFLYTMANNAVCNFSM6AAAAABC4XOTXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBQGQ4DSNRQGQ . You are receiving this because you commented.Message ID: @.***>

Qugar commented 8 months ago

Thank you.

I can always count on you. 😄

Miloet commented 8 months ago

I tried to make it so that you could have settings for update distance, max amount of maps and if you should be able to view other players maps at all. But I couldnt manage to get it to work In earlier versions I remember you could view other players maps as well but it seams that I broke that in some update along the way. I did do the preformance update so things should be stable frame wise. Both the map object culling and the map camera updates have been locked to only the local client player.

Qugar commented 8 months ago

Unfortunately that didn't solve the problem. I used ten tools for testing purposes and my frames went below 14 FPS. As soon as I throw away the tools it goes back to normal.

Are the tools rendered and calculated as soon as I have them in my inventory? Maybe invisible? Something is happening in the background.

Miloet commented 8 months ago

well it should fix it for when other people are using them. it could be that the "isHeld" variable is actually for when its in your inventory rather than in your hand. ill do some quick testing

edit: that sure was it. will try to find, or create if i have to, a variable that will be for if its in the hand.

Qugar commented 8 months ago

Another little thing is that if you turn the tool on and off quickly you get negative battery values.

I think this should be solveable with a query as to whether the battery value is less than 0 then equal to 0.

Should then also fix problems with mods that only cause partial charging through objects.

Miloet commented 8 months ago

The only reason i didnt add that is cuz i thought zeeker already had done that for chargable items... guess not! or well i do it slightly differently- ill fix it.

Qugar commented 8 months ago

I'm sorry for causing you trouble again. :sweat_smile:

It's all the little things that you can overlook or don't notice because you don't think anyone could do that.

Miloet commented 8 months ago

No need to say sorry. Thank you for your valuable input.

Qugar commented 8 months ago

Now the background of the tool turns green but no map can be seen anymore. :anguished:

grafik

Or if you turn on the map on the ship, it no longer updates when you leave the ship.

grafik

It almost seems as if it now only synchronizes with the map on the ship, which is not active when no one is on the ship. At least not with the mods we use.

Miloet commented 8 months ago

Very strange... ill have a look soon. i am pretty sure i didnt change anything that would cause this...

Miloet commented 8 months ago

ok so i think i figured out what is causing the lack of updating. the logic for when it should update might have been flawed in how it checked. but there is a second issue in that provided picture i believe. i added a fail safe a few patches ago which used a camera that was close but not exactly the one used in game as a replacement if it couldnt find it. it has different layers so it looks a bit more "high detail" than the normal map. did you get any errors in a little yellow box to the right connected to this mod?

Qugar commented 8 months ago

No, I didn't, but if you're confused by the look of the map, that could be because it's on Triskelion, where everything outside the facility is made of grid paths.

Miloet commented 8 months ago

Oooooooohhh (thank god cuz otherwise it be would be a lot harder to solve. I just released a patch. It works fine for me. I realized another performance update too that will make being in the ship with many maps much better. I hope it fixes it

Qugar commented 8 months ago

I will download it manually to give you quicker feedback.

Edit: First, this is what the floor of Triskelion looks like.

grafik

And no, unfortunately the problem is not solved for me. :worried:

grafik

I'll see if BepInEx outputs anything.

Edit2: BepInEx doesn't give me any errors. However, I just noticed that when I switch the tool on and off in the ship, there is the green flash animation on the map monitor. I don't think this happened in version 1.5 when it still worked.

Qugar commented 8 months ago

I created a completely new profile using only BepInEx and your mod, unfortunately the result remains the same.

grafik

Miloet commented 8 months ago

I did find an error in BepInEx. I will try to find the solution.

Qugar commented 8 months ago

Now I feel really bad about how much trouble this is causing.

Miloet commented 8 months ago

No no, its fine. I figured out which piece of code was causing it.

Edit: i think i found and fixed the problem.

Miloet commented 8 months ago

ok 1.5.4 is out now. you can download and check it out.

Qugar commented 8 months ago

I don't dare say it, but nothing has changed.

Miloet commented 8 months ago

Screenshot (1060) One step closer. I managed to recreate it.

Qugar commented 8 months ago

How is it possible that we get such different results when I am on a newly generated profile?

Am I doing something wrong? :cold_sweat:

Forgive me for the stupid questions, my knowledge is limited to php and Lua. :sweat_smile:

Miloet commented 8 months ago

I believe I might have forgotten some kind of dependency.

Edit: ... it works when i add lethalthings...

Edit2: wait wait wait I FIGURED IT OUT! it turns off the camera for some stupid reason :P