[Feature]: Add setMapLightingStyle() Function and Ability to Set other Map Settings via Macros
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
This is a feature request to expose existing map properties as macro functions, matching the keys already accepted by createMap() (lighting style, vision type/distance, grid, fog, visibility, assets, and so on). Start by locating how createMap() and current map macros are implemented and how lighting style is applied in the UI, then add setters that update an existing map the same way. Done means macros can change those settings without duplicating lights, with behavior aligned to the menu toggles. No source paths are named in the issue.
Written by the indexing model from the issue text.
Description
Describe the Problem
(Just following the example suggested here, lol):
"I'm always frustrated when..." I go to toggle a setting that can be toggled via menus, but there isn't a macro function() that can do the same thing.
Case in point is various Map settings, such as Lighting Style, Vision Distance, and Grid Settings.
The Solution you'd like
I would like to be able to change map aspects via macro functions. Maybe something like setMapLightingStyle() as one example (and, in my particular case, the most significant, since I'm unable to adjust scene data that would look better toggling between map lighting styles based on time-of-day changes).
Would actually be nice if ALL of the variables that can be used in the createMap() function could have associated macro functions() to allow adjusting them on an existing map:
"display name", "Display Name",
"player visible", json.true,
"vision type", "NIGHT",
"vision distance", 600,
"lighting style", "OVERTOP",
"has fog", json.true,
"ai rounding", "CELL_UNIT",
"grid", json.set("{}",
"type", "Square",
"color", "#FF0000",
"units per cell", 20,
"size", 200,
"x offset", 7,
"y offset", 11
),
"background paint", "asset://c93660c09e3d3f9aff04df49a6c594b4",
"map asset", "asset://014aaa10a10b5ddcbbe006f3c22188c2"
Alternatives that you've considered.
I've considered writing scripts that would cycle through all the lights on a map and set to them to a dimmer or brighter variant to mimic what happens when toggling the Map Lighting Style between Environmental and Overhead. While the actual scripting wouldn't be crazy complex, it requires duplicate light entries for an effect that's already baked into MapTool.
Additional Context
No response
- Dominant language
- Java
- Stars
- 927
- Forks
- 286
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 94
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RPTools/maptool
-
[Bug]: An initiative list with no current entry logs an error on every changePossibly taken @dwizard0 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
[Maintenance]: Migrate gradle dependency submission to modern alternativePossibly taken @VelpulaGangavardhan claimed this 18 days ago. Opencode-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
RPTools/maptool#6156 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
code-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
Similar issues
-
Cleanup: restore the interrupt flag in AiFailureAnalyzerPossibly taken @Rishankgupta08 claimed this today. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seleniumboot/selenium-boot#258 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
johanhaleby/occurrent#1505 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
FasterXML/jackson-databind#6443 ·
Maintainers usually reply within 1 day
-
Docs: 2 broken linksOpen
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day