Shoulder Surfing Reloaded

Shoulder Surfing Reloaded

2M Downloads

Functionality with other mods

NABS2ER opened this issue · 21 comments

commented

Hello code creators!)
Please help, my build includes several weapon mods and when shooting from them your aim is not accurate. If, when shooting from a bow, your sight moves to where the arrow is flying, then, alas, there is no such thing here! (These are the mods with which difficulties arise: MrCrayfish's Gun Mod;, Stabx Modern Guns;, Alliance of Valiant Arms Guns;, Point Blank! There are a few more, but they are not very significant. It would be very cool if the sight worked correctly with these mods! Thank you for your attention

commented

The issue is known to be caused by sodium, oculus and optifine.

commented

By the way, while I was playing now, in some moments it was somewhat inconvenient, for example, in cramped rooms, closets and similar rooms the sight was behind the head, but it was unclear where it was looking, it would be great if at this moment the character himself and his clothes with equipment , became translucent, like in most RPG games. Otherwise, it’s inconvenient to open drawers and even look around. 2024-01-29_22 25 20 2024-01-29_22 24 45

I would like to offer one idea, maybe you will still be able to implement this transparency function!
Of course, if you haven’t changed your mind, and simply don’t know how to implement this function, maybe this mod will help you
There is such a mod Better Invisibility. Here is the link https://www.curseforge.com/minecraft/mc-mods/better-invisibility
It makes the player and all his equipment invisible, maybe this can somehow be used for our purposes?
Well, it’s natural that this effect would be just a dummy for mobs but real for us

And I would also like to thank you for the spyglass, it has become much more convenient. Thank you

commented

Transparency manipulation was implemented in the same update (2.9.+) as the spyglass "fix". If it does not work for you, please file a separate issue and isolate the conflicting mod(s).

commented

I don’t even know how correctly it works for me, because I don’t know how it should! Well, for example, it’s like mine now, and I don’t know if it should be transparent in this position.
2024-03-10_20 12 46

Well, for example, if you stand close to the wall, it seems to work, but it worked even before the update. So I don't know
2024-03-10_20 12 59

And how do I know which mods conflict?
If there is one at all

commented

Сan you show how this should work? and if it doesn't work correctly for me, I'll create a new topic and show the problem

commented

When the crosshair moves behind the player, the player model (and armor), become transparent. Most likely, the mods that you have installed, have custom renderers for armor that do not allow for transparent rendering.

screenshot.png

commented

And how do I know which mods conflict? If there is one at all

You can use this method.

commented

Please see #143

commented

Thank you, I read this news but didn’t quite understand what and how! Could you use an example of one or more types of weapons to explain how to do this? I don't think I can do this on my own without your help and support. (V. Mine. 1.20.1)

commented

By the way, while I was playing now, in some moments it was somewhat inconvenient, for example, in cramped rooms, closets and similar rooms the sight was behind the head, but it was unclear where it was looking, it would be great if at this moment the character himself and his clothes with equipment , became translucent, like in most RPG games. Otherwise, it’s inconvenient to open drawers and even look around.
2024-01-29_22 25 20
2024-01-29_22 24 45

commented
  1. Find out the id of the item that should have a "dynamic" crosshair
    1. Press F3+H ingame to enable advanced tooltips
    2. Hover over the item in the inventory
    3. At the bottom of the tooltip, it should say the item id. If you are hovering over a stack of stone for example, it should say minecraft:stone
  2. Goto ../.minecraft/config
  3. Open shouldersurfing.toml with a text editor
  4. Find adaptive_crosshair_items. By default it should look as follows:
    adaptive_crosshair_items = ["minecraft:snowball", "minecraft:egg", "minecraft:experience_bottle", "minecraft:ender_pearl", "minecraft:splash_potion", "minecraft:fishing_rod", "minecraft:lingering_potion"]
  5. Now add the the item id to the array. As an example, i will add minecraft:stone:
    adaptive_crosshair_items = ["minecraft:stone", "minecraft:snowball", "minecraft:egg", "minecraft:experience_bottle", "minecraft:ender_pearl", "minecraft:splash_potion", "minecraft:fishing_rod", "minecraft:lingering_potion"]
  6. Save the file and start minecraft
  7. Whenever you are holding stone now, it will automatically switch to the dynamic crosshair
  8. You can repeat the steps for every item
commented
  1. Find out the id of the item that should have a "dynamic" crosshair

    1. Press F3+H ingame to enable advanced tooltips
    2. Hover over the item in the inventory
    3. At the bottom of the tooltip, it should say the item id. If you are hovering over a stack of stone for example, it should say minecraft:stone
  2. Goto ../.minecraft/config

  3. Open shouldersurfing.toml with a text editor

  4. Find adaptive_crosshair_items. By default it should look as follows:

    adaptive_crosshair_items = ["minecraft:snowball", "minecraft:egg", "minecraft:experience_bottle", "minecraft:ender_pearl", "minecraft:splash_potion", "minecraft:fishing_rod", "minecraft:lingering_potion"]
  5. Now add the the item id to the array. As an example, i will add minecraft:stone:

    adaptive_crosshair_items = ["minecraft:stone", "minecraft:snowball", "minecraft:egg", "minecraft:experience_bottle", "minecraft:ender_pearl", "minecraft:splash_potion", "minecraft:fishing_rod", "minecraft:lingering_potion"]
  6. Save the file and start minecraft

  7. Whenever you are holding stone now, it will automatically switch to the dynamic crosshair

  8. You can repeat the steps for every item

Thank you very much for taking the time and explaining everything in detail, I did everything as you said, and voila, everything really worked, I’m so glad)) You are just super. thank you, thank you, thank you!)

commented

But the problem with narrow rooms is very annoying; is it possible to make it so that every time the camera touches the wall, the hero and everything he is wearing become translucent?

commented

But the problem with narrow rooms is very annoying; is it possible to make it so that every time the camera touches the wall, the hero and everything he is wearing become translucent?

I had this idea a while ago, but did not proceed with the implementation, as is a bit tricky. I also fear that it will break compatibility with other mods.

commented

But just imagine, if it works, it will be simply incredible and convenient, maybe it’s worth at least trying and releasing a test version of the mod, and also using the config to add those elements from the mod that should also be translucent. Without exaggeration, I have 505 mods in minecraft, and every time I add something new. I could test your mod with other mods.

commented
  1. Does not work with a standard telescope, it is very inconvenient to switch to first-person view to look through it

  2. The target is a block that you cannot aim at, the crosshair slides off it.
    The sight is located exactly in the middle above the character's head.
    And in connection with this, when you begin to move the sight under you, at some point it jumps over a whole block under your feet. More than once I’ve been faced with the fact that I need to kill a skeleton, I draw my bow but I can’t aim, it misses the position I need! Or during construction I can’t get to the block I need!

2024-02-03_10 20 11

2024-02-03_10 20 07

commented
  1. Does not work with a standard telescope, it is very inconvenient to switch to first-person view to look through it

    1. The target is a block that you cannot aim at, the crosshair slides off it.
      The sight is located exactly in the middle above the character's head.
      And in connection with this, when you begin to move the sight under you, at some point it jumps over a whole block under your feet. More than once I’ve been faced with the fact that I need to kill a skeleton, I draw my bow but I can’t aim, it misses the position I need! Or during construction I can’t get to the block I need!

2024-02-03_10 20 11

2024-02-03_10 20 07

Please file different issues/bugs in separate github issues.

commented
  1. Does not work with a standard telescope, it is very inconvenient to switch to first-person view to look through it

    1. The target is a block that you cannot aim at, the crosshair slides off it.
      The sight is located exactly in the middle above the character's head.
      And in connection with this, when you begin to move the sight under you, at some point it jumps over a whole block under your feet. More than once I’ve been faced with the fact that I need to kill a skeleton, I draw my bow but I can’t aim, it misses the position I need! Or during construction I can’t get to the block I need!

2024-02-03_10 20 11
2024-02-03_10 20 07

Please file different issues/bugs in separate github issues.

I apologize, I thought it would be more appropriate to write here, since the problem is almost the same. Should I create a topic and copy all this there?

commented

Please file a different issue for topic 1. For topic 2. there is a config option called center_camera_when_looking_down_angle in shouldersurfing.toml. If you set it to a lower value, the camera will center later. If you set it to 0 it will not center at all when you look down.

commented

Please file a different issue for topic 1. For topic 2. there is a config option called center_camera_when_looking_down_angle in shouldersurfing.toml. If you set it to a lower value, the camera will center later. If you set it to 0 it will not center at all when you look down.

I tried changing the value as you said, I tried a bunch of different options, but I didn’t see much of a difference! But!
Of course, it is very strange that not all objects have a crosshair like a bow when aiming, because I just tried to add other objects to this file, as you said earlier, namely a sword and a building block, and it turned out perfect for me. Tell me, can I do with one command everything that is in Minecraft, what I just did with individual items?

Well, I just don’t have enough life and patience to introduce all the items from all the mods

commented

If you want to use the dynamic crosshair (moving crosshair) for all items, set crosshair_type to DYNAMIC.