BUGFIX: Cone Light Aura when grid size 1 (32.3)
Moderators: dorpond, trevor, Azhrei
Forum rules
Posting now open to all registered forum users.
Posting now open to all registered forum users.
BUGFIX: Cone Light Aura when grid size 1 (32.3)
From this discussion thread.
This issue has been fixed in the SightType class but the bug still exists in the Light class. Since these two classes have a large section of duplicated code to produce Square, Circle and Cone areas my intention is to refactor these into functions of the Grid class from which all grid types inherit.
Then any future bug fixes or changes in this area will only need to be applied in one place.
This issue has been fixed in the SightType class but the bug still exists in the Light class. Since these two classes have a large section of duplicated code to produce Square, Circle and Cone areas my intention is to refactor these into functions of the Grid class from which all grid types inherit.
Then any future bug fixes or changes in this area will only need to be applied in one place.
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
I would appreciate it if other people could test this before I submit a pull request. I have used all the Sight, Light and Aura definitions I could find, but thats not that many. To test it you would need to pull my branch ConeLightFix. If you've not pulled other people's branches before, remember to check the branch out first, don't pull the branch into one of your existing branches.
cheers
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
Thank you!
I'll give it a try a little later today (I hope).
I'll give it a try a little later today (I hope).
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
Okay, trying to do some more testing. Looking in the code, Light seems to have a facing Offset, just like sight. However, for the life of me, I cannot set up a Light or Aura with an offset.
For Sight I would do something like:
Anyone know how you format that for Light?
PS: seems odd that Sight and Light have different formats?
For Sight I would do something like:
Code: Select all
Hindsight: cone arc=180 offset=180 distance=17.5
PS: seems odd that Sight and Light have different formats?
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
Heh, I was just mentioning this to the MOTE people. I think light, aura and sight should have the same formats. AFAIK, lights don't have an offset. Also, lights can have multiple sources/lights while aura only get 1.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
The Light class has code for an offset, but I can't see a way of setting it in the Campaign Properties screen.
It would seem odd that you couldn't set an offset on light. How else are you going to have rear red lights and white headlights?
Also, is it possible to have a vision setting where you could see 30 foot forward by only 15 feet behind? Is it possible to merge two sight definitions into one line?
It would seem odd that you couldn't set an offset on light. How else are you going to have rear red lights and white headlights?
Also, is it possible to have a vision setting where you could see 30 foot forward by only 15 feet behind? Is it possible to merge two sight definitions into one line?
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
Hmm, it would be awesome if we could have this. I was going to look into it myself later. I wanted it for an "Darkness" effect. eg. take this image for instance:Jagged wrote:The Light class has code for an offset, but I can't see a way of setting it in the Campaign Properties screen.
It would seem odd that you couldn't set an offset on light. How else are you going to have rear red lights and white headlights?
Also, is it possible to have a vision setting where you could see 30 foot forward by only 15 feet behind? Is it possible to merge two sight definitions into one line?
Darkness
Like Web and other "Radius" templates, they need to center on a grid corner. So, you either need to turn snap to grid off, then place it manually, or like I did, I "offset" the image for the token so when it's SnappedToGrid, it perfectly aligns with the grid.
The problem is, I then add a "negative" light source to emulate the "Darkness" and it's off by half a cell. It would be nice to "center" the light with the "center" of the image, ie take into account it's "offsetx/y".
I couldn't think of another example, but the headlights example is a good one!
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
The snap is based on the footprint so if you change the size to large you can change back to freesize and it'll keep the large footprint thus making the center on the grid.JamzTheMan wrote:Like Web and other "Radius" templates, they need to center on a grid corner. So, you either need to turn snap to grid off, then place it manually, or like I did, I "offset" the image for the token so when it's SnappedToGrid, it perfectly aligns with the grid.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
not really, this is what I get...
Spoiler
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
Here's what I mean. All of these are free size.
- Attachments
-
- template example.jpg (93.39 KiB) Viewed 3669 times
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
wait... what.... what holy hell magic is this???
Ok, that's freaky cool, never knew this. But WHY does this happen again?
PS prob still need offsets but thanks for fixing my issue
Ok, that's freaky cool, never knew this. But WHY does this happen again?
PS prob still need offsets but thanks for fixing my issue
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
It's all about the center of the token. If you have a 400x400 image it will be centered in the middle of the footprint. So, a medium footprint's center is in the middle of the square while a large token footprint's is at the grid crossing.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
So does the freesize not get a center?
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
What am is saying is that in case of free size image, it "remembers" the footprint of the last set preset size(medium, large, huge,etc). And uses that to snap the picture.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
Just for reference: In the case of Light and Sight, Offset should not be confused with grid offset and is a measurement in degrees away from the angle of facing and is only applicable to cones.
Last edited by Jagged on Fri May 08, 2015 8:12 am, edited 1 time in total.