AtomicTorch Studio Forums

CryoFall => Mods => Topic started by: Mars on June 05, 2020, 11:48:31 PM

Title: [Client] MapMarkers
Post by: Mars on June 05, 2020, 11:48:31 PM
MapMarkers

Marks on your map and mini-map.

How to use: You can add marks on your map by left clicking anywhere, works only with the full map (M key), but you can see the marks on the mini-map too. 
If you left click near a mark, you will remove it. 
You can remove all marks with right click and "remove all marks" command.
Also a right click command to "copy" a mark, same way as copy coordinates.  If you paste it in the chat, anyone with the mod will get a pink mark on their map, (only the last 5 pink marks are visible)
Your own marks are orange, the Marketplace marks (version 0.1.2) are orange too.


Screenshot:
(https://i.imgur.com/Nu9aNX1.png)
   
Mod type: Client-side mod.

Latest version: 0.2.2

Changelog:
0.2.2
Changes for A29 Member visualizer.
0.2.1
Changes for A29 Base visualizers.
0.2.0
Changes to compile in A29
0.1.3
Changes to compile in A28.
0.1.2
Using ClientNotificationDisplayed event
0.1.1
Changes to compile in A27.

Download latest version A29: here (https://drive.google.com/file/d/13qkkxB6hX_B5jqcDplHteAdfYxECsejJ/view?usp=sharing)

GitHub : https://github.com/mars-x24/MapMarkers


How to install mod:
File "ModsConfig.xml":

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<mods>
  <mod>core_1.0.0</mod>
  <mod>mapmarkers</mod>
</mods>

Title: Re: [Client] MapMarkers
Post by: ai_enabled on June 06, 2020, 05:24:22 PM
This is an impressive mod. Congratulations! :-)
Thank you for working on it!

It might be tough to keep it updated for future versions as we will modify some of the source code.
Please consider uploading it to Github like Djekke does for his mods https://github.com/Djekke/CNEI

Regards!
Title: Re: [Client] MapMarkers
Post by: Mars on June 06, 2020, 10:23:07 PM
Thanks, I understand the marketplace will probably die with A27 or later, but if you think this one can survive to A27 with some modifications, I will add it on github

It would be nice if you add an event like this one in the notification system, same as ChatSystem
ChatSystem.ClientChatRoomMessageReceived += ChatSystem_ClientChatRoomMessageReceived;
Title: Re: [Client] MapMarkers
Post by: ai_enabled on June 09, 2020, 05:17:37 PM
Not in A27, maybe in A28 or even later so marketplace mod would prove useful. :-)

Regarding the C# event for the notification systemΓÇösure, we can add it easily.

Regards!
Title: Re: [Client] MapMarkers
Post by: Mars on June 30, 2020, 08:48:32 PM
Updated the file to work in A27.  If anyone can test the "copy mark" from another player in chat, let me know if it still works.  From Marketplace notification too.

ai_enabled: Did you add an event for notification message yet?
Title: Re: [Client] MapMarkers
Post by: ai_enabled on June 30, 2020, 10:59:39 PM
The event is not added yet. Still in my tasks list so it will be done during the experimental stage.
Title: Re: [Client] MapMarkers
Post by: ai_enabled on July 03, 2020, 04:14:03 AM
The event is added in the latest experimental patch released yesterday. See NotificationSystem, ClientNotificationDisplayed event.

Regards!
Title: Re: [Client] MapMarkers
Post by: Mars on July 05, 2020, 07:15:46 PM
Using it now, thanks!

Do you know how I can add my IWorldMapVisualizer in the list HUDMiniMap.visualisers without overriding the whole HUDMiniMap class? Same thing with WindowWorldMap.
Title: Re: [Client] MapMarkers
Post by: ai_enabled on July 06, 2020, 02:02:06 AM
@Mars, there is currently no way to do so, I will think about it.
Title: Re: [Client] MapMarkers
Post by: Mars on September 24, 2020, 08:32:11 PM
Quote from: ai_enabled on July 03, 2020, 04:14:03 AM
The event is added in the latest experimental patch released yesterday. See NotificationSystem, ClientNotificationDisplayed event.

Regards!

It would be nice to have one in ClientShowItemsNotification too :)
Title: Re: [Client] MapMarkers
Post by: ai_enabled on October 02, 2020, 05:57:35 PM
Quote from: Mars on September 24, 2020, 08:32:11 PM
I would be nice to have one in ClientShowItemsNotification too :)
Done for A28 UpdateΓÇöClientItemNotificationDisplayed event in NotificationSystem.
Title: Re: [Client] MapMarkers
Post by: Mars on October 03, 2020, 06:07:02 PM
Nice, but the event is only giving me "HUDItemNotificationControl obj".

I need the ProtoItem, it is in the viewModel but it is private "private ViewModelHUDItemNotificationControl viewModel;"
Title: Re: [Client] MapMarkers
Post by: ai_enabled on October 03, 2020, 06:26:21 PM
Oops! I think for now you can get it by casting obj.DataContext to ViewModelHUDItemNotificationControl but it may be empty as the control might be not loaded yet. You can try calling obj.UpdateLayout() to make it load immediately as it's already added in the notification panel.

Regards!
Title: Re: [Client] MapMarkers
Post by: Mars on October 03, 2020, 09:07:28 PM
Worked with UpdateLayout(), thanks!
Title: Re: [Client] MapMarkers
Post by: Mars on October 03, 2020, 09:11:05 PM
Updated for A28
Title: Re: [Client] MapMarkers
Post by: ai_enabled on October 06, 2020, 12:24:13 PM
Patch #2 expanded the API as discussed above, but I guess the mod is fine as is now. :-)

Regards!
Title: Re: [Client] MapMarkers
Post by: Mars on December 18, 2020, 09:02:34 PM
Updated for A29
Title: Re: [Client] MapMarkers
Post by: ai_enabled on December 21, 2020, 05:51:22 PM
I'm afraid the latest A29 experimental patch has broken compatibility with this mod.
I've slightly changed the base visualizer class API. Please see how other visualizers are implemented. Feel free to ask any questions!

Regards!
Title: Re: [Client] MapMarkers
Post by: Mars on December 21, 2020, 07:37:24 PM
A29 again.  I went through the code kinda fast, if anyone find a bug please tell me.
Title: Re: [Client] MapMarkers
Post by: adam0101222 on May 11, 2021, 04:59:37 PM
Updated