Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Map creation #3505

Closed
LKS23 opened this issue Jul 20, 2022 · 3 comments
Closed

[Feature]: Map creation #3505

LKS23 opened this issue Jul 20, 2022 · 3 comments
Assignees
Labels
feature Adding functionality that adds value

Comments

@LKS23
Copy link

LKS23 commented Jul 20, 2022

Feature Request

Hello

I was writing this on the discord the other day. I'm currently working on a System to randomly create dungeon maps, as a part of a mega dungeon project. Maptool currently offers enough functions & features to create a macro that creates the full VBL, when provided with a sufficient image. However, to use something like that, one manually has to create a map first to use it on. If it was possible to implement a function, that can create maps, one would be able to fully create a full dungeon map via macro, which would be immensely helpful for randomized dungeon crawls.

If the feature is too difficult to produce, I have a possibly easier compromise: A function that lets you set a new map image. This way, the same could be achieved with the copyMap function + setting a new map image.

The Solution you'd like

New Function -> createMap(1,2,3,4,5)
1 - Name -> necessary input
2 - DisplayName -> necessary input
3 - Background (color id / asset ID) -> necessary input
4 - Map (asset id) -> optional input
5 - Fog (color id / asset id) -> optional input

Further options? (these could be simply taken by the default maptool properties or maybe via additional "setMap" functions)
Cell Type (SQUARE,HEX1,HEX2,ISOMETRIC,NONE) -> default to maptool properties
Distance per cell -> default to maptool properties
Pixels per cell -> default to maptool properties
Vision distance -> default to maptool properties
AI - (NONE,CELLU,INTEGER) -> default to maptool properties
Lights (NONE,DAY,NIGHT) -> default to maptool properties

Alternatives that you've considered.

Alternate / Additional expansion of the existing "g/setMap" functions:
g/setMapBackground(Mapname,colorid/assetid)
g/setMapImage(Mapname,assetid)
g/setMapFog(Mapid,assetid)

Additional Context

No response

@LKS23 LKS23 added the feature Adding functionality that adds value label Jul 20, 2022
@FullBleed
Copy link

Would be a nice function.

I think everything in the "New Map" dialog definitely needs to be an option... probably using a json object similar to how create token does it.

@kwvanderlinde
Copy link
Collaborator

I agree that a JSON object would be a good way to do the configurations, especially since most could have default values.

Here's how I picture the function being defined:

createMap(mapName)
createMap(mapName, settings)

A full settings object would look like this, where each key would be optional:

{
  "display name": "New Map Display Name",
  "player visible": true,
  "vision type": "NIGHT",
  "vision distance": 500,
  "grid": {
    "type": "Vertical Hex",
    "size": 50,
    "units per cell": 10,
    "color": "#ffffff",
    "x offset": 25,
    "y offset": 31
  },
  "background": "#ff0000",
  "fog": "#00ff00",
  "map asset": "asset://014aaa10a10b5ddcbbe006f3c22188c2"
}

@kwvanderlinde
Copy link
Collaborator

Closing this off as the feature has been released for a while now. Bug reports can be filed if needed.

@github-project-automation github-project-automation bot moved this from Needs Testing to Done in MapTool 1.14.0 Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value
Projects
Status: Done
Development

No branches or pull requests

3 participants