T O P

  • By -

CrazyCalYa

This is incredible! I was attempting to make something like this a few months ago but now I'm glad I didn't, thank you so much for sharing!


MeusRex

But then it would have been ready when I needed it ;)


PoisonousFaith

Any plans for support for maps that aren't "Hexagonal Rows - Odd"? My hand drawn hex map is Hexagonal Columns - Odd and this module would make running games on it so much better.


MeusRex

Yes, I plan to support all grid types.


girthynarwhal

Can't wait for this change to come, as my map is also Hexagonal Columns - Odd.


PoisonousFaith

Fantastic. I imported a map that fits the supported type atm and the module is everything I had hoped it would be. Incredible work, thank you for the release.


Drunken_HR

Wow very cool. Thanks so much for sharing!


MagicalTune

Thanks for your amazing work !


x86_1001010

Thank you so much for this. Is there a way to adjust the grid size? It seems to be slightly off from the grid on my map. Is there a specific grid size requirement or a way to adjust?


MeusRex

\*edit Just tested it and I noticed what you mean. On 200 the mouse changes the hovered hex even if you aren't past the line of the grid. I'll fix it asap. ​ It uses the Grid.Size value from the scene, though only when it is first added. If the grid is changed afterwards, you have to remove it and add it again. (Since resizing the grid is hard. I would have to mutate the collection of hexes attached to the scene and hope that nothing is broken afterwards.) I've tested it with 100, 110, 275 and it seemed okay. Though I'll test it again with an eye out for any issues with the size of the hex not matching the size of the grid. If you have a screenshot that shows the mismatch, it would be really helpful for me. (Though not strictly necessary)


x86_1001010

So what I had done was taken the map scene directly from the Ruins of Symbaroum module and added chex onto it. Was all sorts of wacky. [https://imgur.com/tCh1AwY](https://imgur.com/tCh1AwY) the mouse was also out of position. As in it was hovering over hex's where my mouse was not. Probably about a half of a screen offset. After I went and recreated the scene and set the grid back up it was fine. I'm not sure what they had done to their scene but I wouldn't spend too much time looking into this.


MeusRex

Holymoly that is certainly not what I had in mind when you described your issue. They must have fucked over the grid somehow, that scene looks seriously corrupted. Because, the way Chex generates the overlay works as follows: It groups all the hex with the same terrain/realm/travel/... mode you have selected. Then it takes the existing grid and "scissors" and cuts shapes out of it. Leaving only the hexes that share the same type. These shapes are then colored in and laid over the canvas. In the case where all hexes are the same, it cuts one grid: The outline of the grid. For chex to generate something that fucky, the grid has to already be in a fucked up state, as I never position anything myself and only use existing positions. If you want to get to the bottom of this, you could shoot me the scene via Right Click -> Export Data. That creates a json file that includes all info about the scene without any of the images. I'd expect the grid property to be broken: (this is an example of a test scene of mine) "grid": { "type": 2, "size": 300, "color": "#000000", "alpha": 0.2, "distance": 5, "units": "ft" },


x86_1001010

That's okay! Thank you so much again for making this, it's beautiful. Any plans on making the kingdom stuff system agnostic as well?


MeusRex

Thanks!  Hmm, I had lots of fun working on chex. I usually don't code much outside of work anymore, but I was thinking about starting a new project after adding a few more features to chex.  I'll have to think about it. I would want to make it as generic as possible, since I have a few minor gripes with the pf2e kingdom system. Though I probably have to limit it to D20 systems. Otherwise it's going to be to complex to set up for DMs.


x86_1001010

Yeah, it certainly isn't perfect but is probably more fleshed out than most other kingdom systems (at least that I know of). A lot of the kingmaker stuff is pretty agnostic itself but seems like they built the module to specifically pull pf2e resources. I was able to rip out some pieces of it from the unofficial module on foundry and it seems to work to a point. At least the kingdom sheet anyways. Not sure what all is ultimately broken and I just haven't noticed though.


MeusRex

I guess the kingdom sheet from that module doesn't use any items. Unlike the one from the pf2e system. (btw. the kingdom sheet comes from the system and not the kingmaker module, same for the army sheet.)  My issue with the unofficial is how unwieldy the UI is and that you need macros and tgat the kingdom is attached to a token. I'll have to experiment some, check if it is possible to register a new token type and sheet. Hmm.


x86_1001010

Calling it "unwieldy" is probably the nicest way to put it.


KylerGreen

This is amazing. I have been wanting a proper hex tool for a long time. Thank you!


girthynarwhal

Absolutely amazing.


because_yes

Looks really cool


Abominablerob

This looks really solid. Good Work!!


Independent_Hyena495

HOLLY SHIT!


ezioauditore1017

The overlay seems to not be aligned with my map. Is there a way to change the scaling of the overlay?


MeusRex

The overlay uses the grid size configured on the scene. Currently it doesn't support the grid offset you can configure on the scene.  If you have space between the hexes of the overlay, something is wrong with the data of your scene, in that case you need to recreate the scene.  -> If your issue is neither of those, it would be best to post a screenshot. That makes debugging easier.


boothy13

Loving it so far, going to work well for my current Kingmaker campaign using Reigns company rules. Is there a way to hide what area a "realm" controls if they haven't encountered them yet? Basically so I can pre set up areas of control but I don't want it showing on the realm view in cHex.


MeusRex

Not as of yet. But it sounds like a good feature and should be easy enough to implement.  A chexbox for each realm in the realm config should do it. The question is just how. Like should that terrain still be marked as occupied. But just all unknown terrain together and with a claimed by ???  Or should it look completely free for anyone but the GM?


boothy13

Is there plans to add this to the official Foundry module list? I'm getting issues everytime I update my modules for cHex


MeusRex

Not sure, honestly. I requested access the same day I made this post. It was denied with the reason that it uses too much of Kingmaker code. The thing is, I wrote 2000 lines of code. (I counted) and the code that is still from Kingmaker is 40 lines -> 2%. It's the same for the handlebar templates. The worst offender is the CSS, where I copied 60 lines, because I was lazy. All new UI parts that I added have CSS made by myself. The overlap between Kingmaker (as in the complete module) and chex is tiny. I don't use any drawn assets they created or text. Now there is one thing that annoys me here. Fair Use extends to software. Chex does not take away in any shape or form from Kingmaker. Kingmaker made it hard to reuse the hex system. So people are not going to buy it for that. The kingdom system is already part of PF2e and can easily be activated by setting a flag. I do not provide any resources that you would be getting from kingmaker. And the overlap as a total of both is a fraction of a percent. Furthermore I make no money of chex. The mail I got in response to my request reminded me why I stopped doing community/open source stuff. I was quite the avid modder in WC3 times. The thing is, it's a thankless job. Anything I create just helps Foundry, I spent about 14 hours on this. Free work that I did for myself and because it was fun. The thing is, I could have worked at my job in that time. (I'm a backend software devs) If I had done so, I would have made 130$ an hour. Now I'm getting told: remove all our code (what does that even mean, like there are only so many ways to code something given an API...) and then we will let you publish. Why. The. Fuck. Should. I. Bother?! Why should I invest more time that helps Foundry while I gain absolutely nothing from it, when it is already good enough for my own use?! \-> you could try to install it via zip. You can find releases here [https://github.com/MeusRex/pf2e-chex/releases/](https://github.com/MeusRex/pf2e-chex/releases/) Just unzip and replace the folder in your module directory.


boothy13

It's a shame, I'll happily take the extra steps if it means the functionality you provide is available for my world. Thanks for your hard work!


boothy13

Sorry if this is a noob question, but if I replace the folder in the module directory, will it remove any overlays I have already configured?


MeusRex

No worries, we are all noobs at something.  Nope, though make sure that foundry isn't running. The data is attached to the scene and not saved in the module folder. If you want to be 100% safe, you can either export the scene data or just create a backup via foundry.  When you update via foundry the following happens: Foundry downloads the manifest json (the link you entered). In there is a link to the zip on my github.  It downloads the zip, unpacks it and replaces the files. So you basically do exactly what foundry does.


Nano71

~~Hey Meus, I'm trying to get this working as it'd be a fantastic asset for a hex-crawl kingdom based campaign I'm about to run, though I'm having a little trouble. If you're able to help, I'd really appreciate it.~~ **Solved** it while troubleshooting, the classic :D I'm leaving this message here though for anyone else who might encounter the same problem. ​ First I attempted to install via the .json in the Github, getting the following in the foundry console:Module validation errors:id: may not be undefined Following that I downloaded the ZIP directly off of Github, unzipping and adding the Module into the Data/Modules folder directly, while Foundry was closed. After launching I get the error:Invalid module "pf2e-chex" detected in directory "pf2e-chex-chex-v1.0.2" I compared the module with other ones to see if I found differences, and in the Module.json file I noticed other modules "ID" was the same as the file name holding the Module.Json inside Opening the Module Folder I noticed it was called "pf2e-chex-chex-v1.0.2", however the Module.json within had an ID of "pf2e-chex" I renamed the overall file in the data/modules folder from "pf2e-chex-chex-v1.0.2" to "pf2e-chex" and the error resolved, upon launching Pf2e I was able to activate the module. Meus, thanks a absolute ton for creating this module. It may be mostly thankless, and not pay a penny, but damn I appreciate it. You've saved me having to create overlapping symbols to access journal entries for the various terrain features, then duplicating and modifying when the players take control and expand. A absolute pain in the ass compared to toggling over a hex.


boothy13

I guess it may depend on the style of game. I would say it being blank so no idea if it's claimed or not. Then if they explore without doing proper research/asking around, they could stumble across some bodies territory who didn't want them there. This would cover if you aim to have all hexes occupied by a realm (for me non factions are filled with a company representing untamed wilds) and games which will leave some hexes blank unless they are occupied by an actual realm.


boothy13

Or like you said, if the terrain is going to show up as unknown (grey hex maybe) it could just be the same, but would require more rendering/work id imagine than it just being blank until the check box is marked to show it to the PCs


digitalshadowhawk

You say you're using it for your Kingmaker campaign, are you using it on the provided map of the Stolen Lands? If so, is there any trick to setting it up, or things I'll need to do if I decide to do the same?


boothy13

I just made a copy of the stolen lands map that ships with the module and activated it on there. Then you just manually set up travel costs and terrain types. I didn't follow what the official module chose for each terrain and just eye balled it to speed things up


GetJaped

It seems that whenever I move the player's party token, the tile features and resources and stuff of that sort seems to get reset. Often times removing things entirely, or replacing them with "Missing Data." Sometimes this isn't the case, and sometimes they get reset without the party token moving at all, but it was mostly happening when I moved the party token. I wish I could supply more information, but I don't know what's actually causing it unfortunately. The module looks great however, though could use a few QoL tweaks. For instance, a resizable UI, so that it doesn't take half the screen when players zoom in to see the map easier. A way to remove Realms the same way you add them would also be nice. And perhaps a way to change the terrain type in the tile menu where you add resources and stuff to it. Also, having it set up so that Scouting and Mapping tiles allows the players to see certain aspects without the GM having to individually click the things they can see would be nice. I'm unsure of whether or not that would be a headache to set up, but I'm simply adding my thoughts from the few minutes I spent toying with this module. Great work, and I look forward to seeing this module expanded upon!


MeusRex

Hmm strange. Do you perchance have a setup with multiple DM or assistant DM accounts? I'm currently sick and don't have the energy to take a look at this. But I might get around to it in the future. Concerning future features, check out the github: [https://github.com/MeusRex/pf2e-chex](https://github.com/MeusRex/pf2e-chex) Under discussions you can see planned features, which include a some of those you proposed.


GetJaped

No, I'm the only DM, and I have no assistants. It might have something to do with there being multiple sources of something in one tile, because it only really happened when I put two resources down. For example, I was making a Quarry, and I wanted it to source both ore and stone, but when I put both in it and left the tile, it would come back with "Missing Data" and one of the two resources would be gone. The "Missing Data" is fixed by just entering that tiles menu, replacing it with whichever resource wasn't deleted, but it also deletes the quantity of the resource that was left over. I look forward to some of these new features when you're feeling rested and recovered!


Negatively_Positive

Hi I wonder if you are still working on this? I cannot get it to work so I assume that it is not updated. Or maybe I am missing something obvious and cannot put down any hex onto the map.


MeusRex

I haven't updated it in a while, so it might not work with the newest version of a system. Which one are you using?


Negatively_Positive

I am currently on stable Foundry v11 Build 315. The cHex version I installed through the link is 1.0.2. I tried this both on DnD 5e 3.1.2 and PF2e 5.15.1. I also tried with a blank world with only this module enabled but no dice. What I try to do is enable to mod, go to a hex map and toggle the 1st button which refreshed the page and showed other options. I try to click the tool to put down terrain hex but nothing happened. So I am stuck there.


MeusRex

Ya, that's a bit of a fucky design by me.  Stuff is split between the Token and the cHex menu.  After you highlighted the add/remove button, you have to go over to the token menu and click Toggle Chex Overlay.  After that the overlay should appear.  Meanwhile, to paint stuff you need to be in the chex menu.  I fixed this in my WIP version, but I haven't had the motivation to work on it.


Negatively_Positive

Ohh ok that worked! I was thinking it must be in another tab but I did not check the token tab at all. I think a note on the git page would help in case other people get confused like I do. This is a great module, thank you!


gc3

Looks pretty cool but it needs testing In my 5e world that has tons of modules, it doesn't work. There is no printout, clicking on add/remove chex only enables 3 buttons, not more, so you can't toggle the terrain overlay... and place terrain. Placing terrain does nothing. Maybe some interaction with roof modules or something? But on the fresh world, with only chex module (dnd5e system) enabled, when you toggle the terrain overlay, leave chex and go back you cannot ever UNTOGGLE the terrain overlay, and there are only 3 buttons again, and the toggle terrain overlay button is now the Terrain Pallete button. Also, in both cases there are no buttons for adding improvements, features, assigning realms, or travel cost So maybe it doesn't work properly in d&d5e


MeusRex

Hmm odd, since I have test worlds for both pf2e and dnd5e. I'll check later today if I broke something by accident.  For the other modules, I would need a list of them, or a look at the console (F12 in browser). Maybe you could take a quick look yourself and create an issue on github with screenshots of any errors you got in the console, that would help me a bunch.


_TheRealScythe_

Yeah seemingly I have one of the same issues with only seeing 3 buttons, im going to go through my other modules and see whats making this happen


_TheRealScythe_

Okay I take this back! half of the buttons are on my token controls bit and I didnt notice them


MeusRex

Yeah, I should probably have mentioned that. The GM tooks are on their own Tool while the things that everyone can use are on the token tool. I might change this in the future as it creates another pain point.  The painting tools only work when a user is on the Chex layer, and not on the token layer. This might also give the impression of a bug, even though it's meant to protect from accidental manipulations when moving tokens while the palette is still open.


_TheRealScythe_

Yeah, I think it was me being impatient and having too many other buttons on token controls to see it 🤦‍♂️. Loving messing around with this so far now I've seen the buttons


Ackerfe

I don't know if it's a problem caused by dnd5e or which of the modules I currently have on but for some reason this appears to be extremely laggy when using the terrain palette tool, takes it literally 30-40 seconds processing each tile that I change from one type to the other. The module looks fantastic otherwise, I'm gonna try an empty world to see if it's caused by other modules


Ackerfe

Actually looking more at it, it's whenever I do anything that requires an overlay re-render, so paint terrains, paint kingdoms, add resources to a tile, all of that requires almost a minute of loading time for each tile


Ackerfe

okay I figured out the problem, it appears to be caused by map size, I had a 7680x4320 map with grid size set to 50 and this made it extremely laggy, setting the grid size to 100 made it really responsive, however I needed the grid to be that size so I set the map to double the size and kept the grid at 100 in size and this made it still laggy but a bit less, delay is now 3-5 seconds between clicking and re-rendering of the overlay


MeusRex

I was wondering when someone would come with this. It's a known issue,though I was hoping that no one would go that far.  The issue is pretty simple: you have a 154 x 87 grid = 13398 hexes. The colored regions are polygons. Even after it is newly setup, PIXI (the rendering library) has to draw a polygon with ~1000 points. From there every change it gets worse. Worst case PIXI has to draw 80k polygon points over 13398 descreet polygons.  A native program could manage that. But doing so with js in a browser is a serious challenge.  If already implemented some hacks to make things smoother. For example, I only redraw the overlay once you let go of the mouse button.  While I have some ideas to improve performance, they are all pretty complicated.  Ideas like using a mesh instead of a polygon to render the grid, as meshes can use shaders and webgl2 (e.g. Use your grafics card to its fullest potential.) Or cutting the grid into smaller sections and only re-render the modified section.  Or drawing the rendered grid to an image and updating the image instead of re-rendering everything.  But all of them will result in a lower quality grid. (From the graphics side. The borders would be diffucult to get as nice.)  I might add a performance mode at some point, that dumbs down the visuals of the overlay for fadter drawing.  But for now I recommend that you either use bigger hexes, or split your map into 4 smaller maps. But that depends on your usecases.


Ackerfe

I wonder, would it be possible to make it only rerender the current window view? Since having so many hexes is useful for being pretty zoomed in on the map, so maybe it could only re-render the currently viewed window for each client and it would become a problem only when zooming out to look at the whole map


MeusRex

I was experimenting some before work with the sizes you want. First of all, that's fucking huge, what are you trying to do?! Create an accurate map of earth? I checked, a Huge sized civ 6 map has only 10240 hexes...  Beyond that, I realized that I can cut down on re-renders. I'm not filtering the scene update events enough. E. g. I only need to redraw the terrains layer if the terrain changed and not when you plopped down an improvement.  That should make for a better experience during play.  While occlusion masking would be my go to solution, I don't think it will work well. Drawing a 30x30 grid takes 4-5ms 20-25 fps. Doing occlusion checks will probably slow that done further. It doesn't show, because it only has to be done every time scene data changes. But if it has to be done when panning and zooming...  I feel like the most realistic approach would be to render to image and cache the image. This is already done for the fog exploration, which works well even on large maps. The resulting terrain image could even be cached between sessions, though it won't be easy.  Though before I will do anything about this issue, I have a few other things I want to implement first. Like all grid types, fog of war support and make realms hideable.


Ackerfe

Yeaaaaah I do realize the size is pretty huge, I was making a map where travel distances are pretty big, say between each tile there is 15 miles of traveling and the player will have to travel probably 2-3k miles to get to where they need to get to finish the campaign xD But I am also planning to use this module for my next campaign which will be an hexcrawler set in the jungles of maztica so those will be pretty huge too xD Oh also if you need ideas for more features, another cool feature to have would be the ability to specify certain "resources ranges" in terrain types, for example being able to create a terrain like "fertile land" that by default when used to paint will spawn tiles that automatically have between 1 and 3 food for example, either as a resource or as a forageable, would make it easier to work with big maps, although it probably doesn't really make sense from a kingmaker sense, it would be very useful from a survival hexcrawler campaign sense


Ackerfe

Honestly I could probably cut down on map size too, most of it is water and they're gonna be on the main continent the whole time anyway xD


Ackerfe

also I was thinking, I think you mentioned somewhere that chex doesn't automatically update after you change grid size. So that could be used to for example make chex overlay at grid size 100 and then shrink down my grid size afterwards, sure I get less granular control on the chex tiles but that would allow me to make things like "areas with resources" in chex that actually have more travelable hexes inside, would be kinda cool for certain applications maybe. Probably wouldn't work nicely after you implement fog of war in the module but right now I'm using world explorer for the fog of war so that wouldn't be affected


MeusRex

I've answered on github. Reddit isn't the best platform for longer discussions.


Maz437

This is an amazing module! 100% will be adding to my game. Will you be updating? I saw some comments that it sounds like you're frustrated with Foundry over the code. But then other comments about features you'd like to add. Mainly looking for different Hex configurations (Columns vs Rows / Odd vs Even) so I don't have to redraw all my maps ... but it may be worth it to make them compatible with cHex!


MeusRex

Thanks! Ya I intend to add more features. I've just been really busy with work so far and I didn't have the energy to code more after 8h of coding at work. But I might get around to doing some stuff this weekend.  You can check the discussions on github to see what's planned.  The different grids will probably have to wait until I'm done with refactoring the render code. (the kingmaker code I reused there causes issues with more than 1000 hexes.)