Jump to content

I am looking for an opportunity to show regions where can not build.


hameleon0128

Recommended Posts

Hello to all.

There is a rule on the server: you cannot build in the regions (list below)

 

In the mod "server fixes" it is possible to view the map. And you can also see the grid of regions.

 

I tried to repaint the map files. And I give an example of how it looked. But after the players visited these regions, the color disappeared.

 

666379707_3F7E21C2-C820-4F1A-813C-0FB0DC13B355.png.jpg.e0e576d39306aca66e5fe3f7af937dfc.jpg

 

In the folder "\webserver\js" - I found a file that is responsible for the grid of regions. name "leaflet.regionlayer.js"

Is it possible to change it so that it shows not the whole grid, but only the specified regions?

 

Please don't think that I am crazy :) I just want to simplify the task a bit. Do not explain to everyone where it is impossible to build, but give a chance by ticking to see it on the map.

 

If there are any other ideas how to do it. I will listen.

Link to comment
Share on other sites

CPM has that exact functionality. Consolecommand for managing reset regions. Automatic ingame notification on enter/leave. Landclaimblocks cannot be placed on them. They can be turned off/on by checkbox on allocs map automatically and you can actually reset them by console command(s).

 

https://confluence.catalysm.net/display/CPM/Functional+Overview

 

Maybe its of use to you.

 

Cheers

 

-edit- Visualisation:

image2019-1-9_18-1-44.jpg.f798ba0e9bb362f15f1b3dddddb2e714.jpg

Link to comment
Share on other sites

CPM has that exact functionality. Consolecommand for managing reset regions. Automatic ingame notification on enter/leave. Landclaimblocks cannot be placed on them. They can be turned off/on by checkbox on allocs map automatically and you can actually reset them by console command(s).

 

https://confluence.catalysm.net/display/CPM/Functional+Overview

 

Maybe its of use to you.

 

Cheers

 

Give thanks. I have this mod installed. But I do not know all the functionality. I hope I can handle this :)

Link to comment
Share on other sites

If you need any help, fastest way is to hop over to our discord. There is always a teammember around to answer questions :)

 

https://discord.gg/AMnrvg

 

Cheers

 

My task is to make people unable to put (cl)blocks in cities, but at the same time there should be the possibility of loot.

 

The most difficult thing is to translate and understand exactly what to translate on this site. There is a lot of text there, but I don’t know yet what of this relates to my task :)

Link to comment
Share on other sites

Look for mrr (markresetregions) here: https://confluence.catalysm.net/display/CPM/CPM+Console+Commands

 

Once a region is marked, all will be there automatically: LCB's cannot be placed (they return to the player), exit/leave notification will be there automatically also. For displaying them automatically on allocs map after creating, you have to use my map.js. That will show all adv. claims and reset regions on demand. Get it here: https://confluence.catalysm.net/pages/viewpage.action?pageId=1114446

 

And you dont have to worry players placing blocks in them or destroy buildings. After you give the reset command all regions marked for reset wil go to RWG virgin state.

 

Really nothing more to it ;)

 

Cheers

Link to comment
Share on other sites

Look for mrr (markresetregions) here: https://confluence.catalysm.net/display/CPM/CPM+Console+Commands

 

Once a region is marked, all will be there automatically: LCB's cannot be placed (they return to the player), exit/leave notification will be there automatically also. For displaying them automatically on allocs map after creating, you have to use my map.js. That will show all adv. claims and reset regions on demand. Get it here: https://confluence.catalysm.net/pages/viewpage.action?pageId=1114446

 

And you dont have to worry players placing blocks in them or destroy buildings. After you give the reset command all regions marked for reset wil go to RWG virgin state.

 

Really nothing more to it ;)

 

Cheers

 

I get up in the right region. I enter into the console command mrr. I get the answer. It's enough? Just nothing appears on the map.

lampa.jpg.83ab65c3599e48a6292d9a47d4684ae5.jpg

Link to comment
Share on other sites

You have the reset regions checkbox on map?

 

If so and they dont show you need to open up the firewall for the CPM webapi (which exposes the regions/claims).

 

That port is allocs webmapport + 1. Its listed in log at serverstart like: "INF [CSMM_Patrons] Started CPM webAPI on XXXXX"

 

Cheers

Link to comment
Share on other sites

You have the reset regions checkbox on map?

 

If so and they dont show you need to open up the firewall for the CPM webapi (which exposes the regions/claims).

 

That port is allocs webmapport + 1. Its listed in log at serverstart like: "INF [CSMM_Patrons] Started CPM webAPI on XXXXX"

 

Cheers

 

Thank you very much! You helped me a lot :)

 

My last question is: How to remove unnecessary checkboxes?

18266687_3F7E21C2-C820-4F1A-813C-0FB0DC13B355.png.jpg.2219eb538d55c38e7f4d7207b6eec33f.jpg

Link to comment
Share on other sites

For that you can edit map.js.

 

Goto line 184 (it should say "//cpm ->")

 

if you completely remove:

if (HasPermission ("webapi.viewallclaims")) {
	layerControl.addOverlay (GetNormalClaimsLayer (map, mapinfo), "Adv. Claims Normal");
	layerCount++;

	layerControl.addOverlay (GetReversedClaimsLayer (map, mapinfo), "Adv. Claims Reversed");
	layerCount++;

	layerControl.addOverlay (GetTimedClaimsLayer (map, mapinfo), "Adv. Claims Timed");
	layerCount++;

	layerControl.addOverlay (GetLeveledClaimsLayer (map, mapinfo), "Adv. Claims Leveled");
	layerCount++;

	layerControl.addOverlay (GetPortalClaimsLayer (map, mapinfo), "Adv. Claims Portal");
	layerCount++;

	layerControl.addOverlay (GetHostilefreeClaimsLayer (map, mapinfo), "Adv. Claims Hostilefree");
	layerCount++;

	layerControl.addOverlay (GetOpenhoursClaimsLayer (map, mapinfo), "Adv. Claims Openhours");
	layerCount++;

	layerControl.addOverlay (GetNotifyClaimsLayer (map, mapinfo), "Adv. Claims Notify");
	layerCount++;

	layerControl.addOverlay (GetCommandClaimsLayer (map, mapinfo), "Adv. Claims Command");
	layerCount++;

	layerControl.addOverlay (GetPlayerlevelClaimsLayer (map, mapinfo), "Adv. Claims Playerlevel");
	layerCount++;
}

 

the shielded checkboxes will be gone.

 

Cheers

Link to comment
Share on other sites

  • 2 weeks later...
For that you can edit map.js.

 

Goto line 184 (it should say "//cpm ->")

 

if you completely remove:

 

 

the shielded checkboxes will be gone.

 

Cheers

 

Hey. In the version of server A17.2 B20, the reset region does not work. Mod installed version 9.3.1

 

In stable 17.2 All is well. I do everything as usual. I even tried to change regions.txt from 17.1 to 17.2 Nothing happens :(

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...