Code Monkey home page Code Monkey logo

bettercartographytable's Introduction

Better™ Cartography Table

Valheim mod that allows precise control over sharing pins and map exploration via cartography tables. Supports private pins, public pins, and guild pins. Supports NoMap runs, giving cartography tables a purpose in NoMap. Translations available.

Video showcase

(Click on items to show details)

Private and public pins

Astrid and Brynhild are playing together, however Astrid has a tad too many mushroom pins for Brynhild's liking. Thanks to Better™ Cartography Table, their friendship is safe, as Astrid can selectively decide which pins to share on the public cartography table.

Public.pins.mp4
Real-time collaboration

Astrid and Brynhild are planning their next expedition. Thanks to Better™ Cartography Table, it will be a great success, as they can collaborate and prepare it in real time on the public cartography table.

Real.time.collaboration.mp4
Guild pins

Astrid and Brynhild are members of rival guilds (The Mushroom Enjoyers and The Ground Shakers), and neither wants their archnemesis to know about their secret hideout. Thanks to Better™ Cartography Table, their rivalry is fueled, as guild members can share guild-only pins on their guild-restricted cartography table.

Guild.pins.mp4

Features

  • Pins are private by default, and can be individually shared to cartography tables.
    • You can now safely go ham and pin all those nice berries / copper veins / whatever floats your boat, without worrying about cluttering another player's map.
  • When multiple players interact with the same cartography table at the same time, all changes are reflected in real time.
    • This allows collaborating over the map in real time, especially useful when planning the next expedition.
  • Cartography tables can be public (default) or restricted to a guild (if Guilds is installed).
    • For when you want to share super secret guild hideouts with your mates. Not that it ever happens. Definitely don't look for super secret guild hideouts on your servers. Nope...
  • Map exploration sharing can be public (default), private, or restricted to a guild (if Guilds is installed).
    • In case you need to be extra careful that other players know not where you roamed.
  • If using the NoMap world modifier, the map will be accessible through cartography tables (but only when directly interacting with them).
  • Translations available: English, French. New languages can be added easily (see below for details).

But why?

The vanilla cartography table is extremely quirky. This often leads to frustration on multiplayer servers when multiple players interact with the table on a regular basis, as shared pins seem to disappear / reappear constantly, and crossing off shared pins does not update the table.

On top of that, since the vanilla cartography table is "all or nothing", some players might refrain from engaging altogether. This is typically the case for those that like to meticulously pin all berries / copper veins / etc. but don't want others to yell at them for cluttering the table, or those that do not want to share some super secret locations they would prefer to keep private.

And of course, the vanilla cartography table has no purpose in NoMap runs.

Vanilla cartography tables, but Better™

The goal of this mod is to stick as close as possible to the vanilla experience. We keep cartography tables relevant for sharing both pins and map exploration, same as in vanilla: players must still interact with the same cartography table on a regular basis to synchronize progress with other players. For NoMap runs, the goal is to give cartography tables a purpose.

How it works (click to show details)
  • When opening the map without interacting with a cartography table:
    • Your private pins can be interacted with, same as in vanilla.
    • Public or guild pins previously retrieved from a cartography table can be shown or hidden (akin to vanilla shared pins), but cannot be interacted with (cannot cross off, cannot remove).
    • In NoMap runs, the map will still refuse to open: it can only open by interacting with a cartography table.
  • When hovering a cartography table:
    • Text will appear (akin to vanilla) and list information about the table and how to interact with it.
    • If Guilds is installed, the table can be switched between public mode (default) or guild mode. When a table is in guild mode, only its guild members can interact with it.
  • When interacting with a cartography table:
    • Retrieve other players' map exploration currently shared to the table, same as in vanilla.
    • If map exploration sharing is in public mode (default) or guild mode (and we are interacting with a guild table), share your map exploration to the table.
    • Retrieve public or guild pins currently shared to the table.
    • Open the map:
      • Your private pins can be interacted with, same as in vanilla, but can additionally be shared to the table (becoming public or guild pins).
      • Public or guild pins can be crossed off / removed akin to vanilla, or unshared from the table (becoming private pins on your map).
      • When multiple players interact with the same cartography table at the same time, all changes to public or guild pins are reflected in real time.

Compatibility

With vanilla clients / clients not using the mod

Public and guild pins are stored separately from the vanilla shared pins in the cartography table, thus there is no conflict between clients using the mod and clients not using the mod: all can interact with the same cartography tables. Additionally, clients using the mod will copy public pins to the vanilla shared pins, allowing clients not using the mod to receive them seamlessly. However, clients not using the mod are not able to contribute back: clients using the mod can only receive pins from other clients also using the mod.

With other mods

Better™ Cartography Table tries to play nice with other mods by isolating its behaviour as much as possible, and failing that by trying to ensure the other mods will contribute pins in a compatible way. Nevertheless, there might be instances where other mods interacting with pins will result in incompatiblities. Feel free to report any issue you find.

Translations

Better™ Cartography Table comes with the following languages available out of the box:

  • English
  • French

To add a new language as a user:

  • Navigate to your BepInEx/plugins/nbusseneau-Better_Cartography_Table/plugins/Translations/ directory.
    • From r2modman, use Settings > Browse profile folder to find your BepInEx directory.
  • Make a copy of the English directory, then rename it to the appropriate name for your language (see valid folder names).
  • Edit <your_language_name>/BetterCartographyTable.json as appropriate using a text editor.

If you localize Better™ Cartography Table for your own language, you are most welcome to send your translation file my way, and I will integrate it as part of the languages available by default.

Install

  • This is technically a client-side mod, but it is strongly recommended to also install the mod server-side for the best experience.
  • If installed on the server, all clients will be forced to have the mod installed, ensuring pin sharing will work as intended.

In other words:

  • Do not install the mod on servers intended for Xbox crossplay, otherwise Xbox clients will not be able to join anymore. If you do want to allow Xbox crossplay while recommending PC clients to use the mod, note that clients not using the mod will not be able to share any of their pins with clients using the mod (see above for details).
  • This mod can be installed on your side as a client, and you will still be able to join any server (even vanilla ones), however this is strongly not recommended. Pin sharing will only work with other clients also using the mod (see above for details), thus you should always coordinate with the admin and other players.

Thunderstore (recommended)

  • [Prerequisite] Install r2modman.
  • Click Install with Mod Manager from the mod page.
  • [Optional] Install Guilds for guild support.

Manually (not recommended)

bettercartographytable's People

Contributors

nbusseneau avatar github-actions[bot] avatar

Stargazers

 avatar

Watchers

 avatar

bettercartographytable's Issues

Game crashing error

I attached a screenshot of the error. Ive been playing for about 15 hours or so with a bunch of mods. no issues until I went on a long exploration and when I came back to my base the Error just continually happens. It also rolled back my server like 15 mins or so. It might be from a custom pin? I use a mod called REBUILT_AMPED_AutoMapPainsEnhanced. it has custom pins for stuff like berries and mushrooms. I attached a screenshot of the pins for reference.

Better Cartography Error

image

Unable to see other players on map

Good day!

I have been looking for a cartography table mod for Valheim, and I absolutely love the functions of your mod. I have however noticed that unfortunately when your mod is installed it doesn't display other players on the map. I don't know if this is an intended feature, but has proved troublesome when playing some friends, and making it impossible for me to know where anyone is located at any given time. Thank you again for this mod, I absolutely love the function it adds to the cartography table.

Public pins get wiped if the Cartography Table is in use while a world save occurs

Hey man. Me and a friend experienced a rather inconvenient issue.
We both had the cartography map open (I was the host, listen server), messing with pins and figuring out how the mod worked, and I saw the usual world autosave message appear in the upper corner. In the same instant, all the green Public pins vanished, for both me and my friend, and were not recoverable.
I was able to replicate this myself later. If the Cartography Table map is open, and a save occurs, all Public pins get wiped.
Let me know if I can give any more info.

[Suggestions] Comapatability assurance with PPP & Last Tombstone Pins

TLDR:
PinnaclePinPerformance
LastTombstonePin

considering bettercartographies feature set i intend to recommend lots of changes to make it the best cartography table mod on the internet for valheim

:P
While im not sure that any issues will arise because of the three mods i want to ensure that they dont as i'll be adding this to the optional modpack. LTP also has an MIT license so theoretically could be replicated or integrated to ensure stability of BCT mod

Can't get the hotkey to work

I install the mod but when I press the default hotkey "LeftShift", nothing happens. I can't change the pins to public/private and the colors does not change. I tried changing the hotkey but same result. I am unsure if maybe this is a compatibility issue so here is the list of mods I am currently using.

Page1

Page2

I don't think any of these mods would conflict but I am unsure.

Getting Crashes, Loss of mobility etc with this mod and another. [bug]

----- 716x -----
[Error : Unity Log] InvalidCastException: Specified cast is not valid.
Stack trace:
(wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
System.Linq.Enumerable+d__341[TResult].MoveNext () (at <a790f10e63dd4341b206460141e07e75>:0) System.Linq.Enumerable+WhereEnumerableIterator1[TSource].MoveNext () (at :0)
BetterCartographyTable.UI.MinimapManagerUI.UpdatePins () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.UI.MinimapManagerUI.OnUpdatePins () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Patches.MinimapPatches+UpdateUIOnUpdatePins.Postfix () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
(wrapper dynamic-method) Minimap.DMDMinimap::UpdatePins(Minimap)
(wrapper dynamic-method) Minimap.DMDMinimap::Update(Minimap)

[Warning: Unity Log] 04/05/2024 15:02:00: Missing item prefab GreatbowModer_TW
[Warning: Unity Log] 04/05/2024 15:02:00: Missing item prefab KnifeWrench_TW

----- 40x -----
[Error : Unity Log] InvalidCastException: Specified cast is not valid.
Stack trace:
(wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
System.Linq.Enumerable+d__341[TResult].MoveNext () (at <a790f10e63dd4341b206460141e07e75>:0) System.Linq.Enumerable+WhereEnumerableIterator1[TSource].MoveNext () (at :0)
BetterCartographyTable.UI.MinimapManagerUI.UpdatePins () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.UI.MinimapManagerUI.OnUpdatePins () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Patches.MinimapPatches+UpdateUIOnUpdatePins.Postfix () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
(wrapper dynamic-method) Minimap.DMDMinimap::UpdatePins(Minimap)
(wrapper dynamic-method) Minimap.DMDMinimap::Update(Minimap)

[Error : Unity Log] InvalidCastException: Specified cast is not valid.
Stack trace:
(wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
System.Linq.Enumerable+d__341[TResult].MoveNext () (at <a790f10e63dd4341b206460141e07e75>:0) System.Linq.Enumerable+WhereEnumerableIterator1[TSource].ToList () (at :0)
System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable1[T] source) (at <a790f10e63dd4341b206460141e07e75>:0) BetterCartographyTable.Managers.MinimapManager.RemovePins (System.Collections.Generic.IEnumerable1[T] pins) (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Managers.MinimapManager.ReplaceMinimapPinsWithTablePins (MapTable mapTable) (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Managers.InteractionManager.OnMapTableUse (MapTable mapTable, Humanoid user) (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Patches.MapTablePatches+StartInteractionOnMapTableUse.Prefix (MapTable __instance, Switch caller, Humanoid user, ItemDrop+ItemData item, System.Boolean& __result) (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
(wrapper dynamic-method) MapTable.DMDMapTable::OnRead(MapTable,Switch,Humanoid,ItemDrop/ItemData)
(wrapper dynamic-method) Switch.DMDSwitch::Interact(Switch,Humanoid,bool,bool)
(wrapper dynamic-method) Player.DMDPlayer::Interact(Player,UnityEngine.GameObject,bool,bool)
(wrapper dynamic-method) Player.DMDPlayer::Update(Player)

----- 128x -----
[Error : Unity Log] InvalidCastException: Specified cast is not valid.
Stack trace:
(wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
System.Linq.Enumerable+d__341[TResult].MoveNext () (at <a790f10e63dd4341b206460141e07e75>:0) System.Linq.Enumerable+WhereEnumerableIterator1[TSource].MoveNext () (at :0)
System.Collections.Generic.List1[T].AddEnumerable (System.Collections.Generic.IEnumerable1[T] enumerable) (at <834b2ded5dad441e8c7a4287897d63c7>:0)
System.Collections.Generic.List1[T]..ctor (System.Collections.Generic.IEnumerable1[T] collection) (at <834b2ded5dad441e8c7a4287897d63c7>:0)
System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at :0)
BetterCartographyTable.Patches.MinimapPatches+InjectPublicPinsInGetSharedMapData.Prefix () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
(wrapper dynamic-method) Minimap.DMDMinimap::GetSharedMapData(Minimap,byte[])
MapTable.GetMapData (System.Byte[] currentMapData) (at :0)
BetterCartographyTable.Extensions.MapTableExtensions.StoreExploredMapAndPublicPinsInZDO (MapTable mapTable) (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Extensions.MapTableExtensions.SyncVanillaSharedData (MapTable mapTable) (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Managers.InteractionManager.OnMapClose () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Patches.MinimapPatches+HandleInteractionsOnMapModeChange.Postfix (Minimap+MapMode mode) (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
(wrapper dynamic-method) Minimap.DMDMinimap::SetMapMode(Minimap,Minimap/MapMode)
(wrapper dynamic-method) Minimap.DMDMinimap::Update(Minimap)

----- 405x -----
[Error : Unity Log] InvalidCastException: Specified cast is not valid.
Stack trace:
(wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
System.Linq.Enumerable+d__341[TResult].MoveNext () (at <a790f10e63dd4341b206460141e07e75>:0) System.Linq.Enumerable+WhereEnumerableIterator1[TSource].MoveNext () (at :0)
BetterCartographyTable.UI.MinimapManagerUI.UpdatePins () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.UI.MinimapManagerUI.OnUpdatePins () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Patches.MinimapPatches+UpdateUIOnUpdatePins.Postfix () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
(wrapper dynamic-method) Minimap.DMDMinimap::UpdatePins(Minimap)
(wrapper dynamic-method) Minimap.DMDMinimap::Update(Minimap)

----- 1960x -----
[Error : Unity Log] InvalidCastException: Specified cast is not valid.
Stack trace:
(wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
System.Linq.Enumerable+d__341[TResult].MoveNext () (at <a790f10e63dd4341b206460141e07e75>:0) System.Linq.Enumerable+WhereEnumerableIterator1[TSource].MoveNext () (at :0)
System.Collections.Generic.List1[T].AddEnumerable (System.Collections.Generic.IEnumerable1[T] enumerable) (at <834b2ded5dad441e8c7a4287897d63c7>:0)
System.Collections.Generic.List1[T]..ctor (System.Collections.Generic.IEnumerable1[T] collection) (at <834b2ded5dad441e8c7a4287897d63c7>:0)
System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at :0)
BetterCartographyTable.Patches.MinimapPatches+InjectPublicPinsInGetSharedMapData.Prefix () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
(wrapper dynamic-method) Minimap.DMDMinimap::GetSharedMapData(Minimap,byte[])
MapTable.GetMapData (System.Byte[] currentMapData) (at :0)
BetterCartographyTable.Extensions.MapTableExtensions.StoreExploredMapAndPublicPinsInZDO (MapTable mapTable) (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Extensions.MapTableExtensions.SyncVanillaSharedData (MapTable mapTable) (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Managers.InteractionManager.OnMapClose () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Patches.MinimapPatches+HandleInteractionsOnMapModeChange.Postfix (Minimap+MapMode mode) (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
(wrapper dynamic-method) Minimap.DMDMinimap::SetMapMode(Minimap,Minimap/MapMode)
(wrapper dynamic-method) Minimap.DMDMinimap::Update(Minimap)

[Error : Unity Log] InvalidCastException: Specified cast is not valid.
Stack trace:
(wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
System.Linq.Enumerable+d__341[TResult].MoveNext () (at <a790f10e63dd4341b206460141e07e75>:0) System.Linq.Enumerable+WhereEnumerableIterator1[TSource].GetCount (System.Boolean onlyIfCheap) (at :0)
System.Linq.Enumerable.Count[TSource] (System.Collections.Generic.IEnumerable1[T] source) (at <a790f10e63dd4341b206460141e07e75>:0) BetterCartographyTable.Model.IEnumerableSharablePinDataExtensions.ToZPackage (System.Collections.Generic.IEnumerable1[T] pins) (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Managers.PlayerSaveManager.StorePinsInPlayerSavefile (System.Collections.Generic.IEnumerable`1[T] pins) (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Managers.PlayerSaveManager.OnSave () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
BetterCartographyTable.Patches.PlayerPatches+SaveSharedPinsOnPlayerSave.Prefix () (at <30c2a97e47dc4320b532fd7ef8e77b59>:0)
(wrapper dynamic-method) Player.DMDPlayer::Save(Player,ZPackage)
(wrapper dynamic-method) PlayerProfile.DMDPlayerProfile::SavePlayerData(PlayerProfile,Player)
(wrapper dynamic-method) Game.DMDGame::SavePlayerProfile(Game,bool)
(wrapper dynamic-method) Game.DMDGame::Shutdown(Game,bool)
(wrapper dynamic-method) Game.DMDGame::OnApplicationQuit(Game)

[Warning: Unity Log] 04/05/2024 15:02:48: Player destroyed sec:-5,22 pos:(-333.24, 138.21, 1389.04) zdopos:(-333.24, 138.21, 1389.04) ref (-333.24, 138.21, 1389.04)
[Warning: Unity Log] 04/05/2024 15:02:48: Local player destroyed

LogOutput.log

Unintended interaction between BetterCartographyTable by nbusseneau and Ressurection By Smoothbrain

Description:

While using BCT and Resurrection By Smoothbrain, dying when you would generate a tombstone (ie with items in your inventory) toggles "Visible to Other Players" option ON on the map. Dying with items in your inventory when that effect is toggled ON for any reason, either after it toggles itself on or after you manually toggle it on, then generates a Player icon on the map (the same on you would see if a player toggled "Visible to Other Players") that cannot be manually deleted. That icon will vanish after logging out.

To Reproduce

• Install Resurrection 1.0.11.
• Install BetterCartographyTable 0.5.12.
• Launch game.
• Interact with a Cartography Table and ensure you have "Visible to Other Players" toggled off.
• Put items into inventory.
• Die.
• Go back to Cartography Table and verify that "Visible to Other Players" is now toggled on.
• Leaving it toggled on, interact with your Tombstone to regain your items.
• Die again.
• Check map for new Player pin that cannot be deleted until relogging.

Related Links:
https://github.com/blaxxun-boop/Resurrection
https://github.com/nbusseneau/BetterCartographyTable

Related Issue: blaxxun-boop/Resurrection#8

Notes: If you need any additional input from me let me know.

Stuck in Map if table is broken

Hello,

If the table is broken while you are viewing the map, you get stuck in the map screen and have no choice but to alt f4 (and hope that someone can save for you before you do)

Discussion around ownership of pins / moving pins between tables

As the title says specifically, every single pin including the bosses pins, is gonna be deleted after the table is destroyed
I have not thoroughly tested it, but it did happen unfortunately

I have made every pin public before destroying the table except the ones I couldn't (EpicLoot bounties, bosses etc)

Incompatibility with Server_Devcommands?

Hi!

I run a NoMap server with this fantastic mod - however, this mod seems to override Server_Devcommands capability to re-enable the map again for admins. Is there a solution for this? I have attempted to add mod onto greylist so admin can disable it, however, it is checking with the server and preventing this from being a simple solution.

Thanks !

Suggestion for MoreMapPins mod compatibility

Hi there !

Just installed you mod and it is pretty cool, especially in nomap mod.
I also have the MoreMapPins mod installed and some text is overlapping. Would it be possible to slightly move your toggle options a bit or to make it repositionnable via the .cfg file ?

Here is a screenshot :
image

Thanks a lot and have a nice day.

Issues with Exploration Skill and Better Cartography Table

Im not entirely sure which one is causing the issue, but when i attempt to write to the cartography table it just opens the map, it refuses to write, i have an exploration skill level of 68 (40 to write on the table) and i cannot write my map to the table. Holding shift does not help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.