RPTools.net

Discussion and Support

Skip to content

It is currently Fri Feb 23, 2018 1:54 am 




Forum rules


Posting now open to all registered forum users.



Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1206
Location: Bristol, UK
 Post subject: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Sun May 03, 2015 3:04 am 
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.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1206
Location: Bristol, UK
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Sun May 03, 2015 4:19 am 
Attachment:
meleeAura.jpg
meleeAura.jpg [ 115.12 KiB | Viewed 3095 times ]


Okay, that didn't take long. As I said, the bug seems to be fixed in SightType but not in Light. This is the Melee Reach aura on a Map with Units Per Cell set to 1.

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


Top
 Profile  
 
User avatar  Offline
TheBard
 
Joined: Tue Mar 21, 2006 7:26 pm
Posts: 3497
Location: Austin, Tx
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Sun May 03, 2015 8:41 am 
Thank you!

I'll give it a try a little later today (I hope).

_________________
ImageImage ImageImageImageImageImage
Support RPTools by shopping
Image
Image


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1206
Location: Bristol, UK
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Thu May 07, 2015 3:06 pm 
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:
Code:
Hindsight: cone arc=180 offset=180 distance=17.5


Anyone know how you format that for Light?

PS: seems odd that Sight and Light have different formats? :shock:


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8012
Location: Bay Area
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Thu May 07, 2015 3:31 pm 
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:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1206
Location: Bristol, UK
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Thu May 07, 2015 6:03 pm 
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?


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1762
Location: Chicagoland
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Thu May 07, 2015 6:31 pm 
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?


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:
Attachment:
Radius 20-ft (Darkness).png
Radius 20-ft (Darkness).png [ 198.97 KiB | Viewed 3057 times ]
...

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


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8012
Location: Bay Area
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Thu May 07, 2015 7:09 pm 
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.

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.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1762
Location: Chicagoland
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Thu May 07, 2015 9:10 pm 
not really, this is what I get...

Attachment:
templates.jpg
templates.jpg [ 389.77 KiB | Viewed 3053 times ]

_________________
-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


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8012
Location: Bay Area
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Thu May 07, 2015 9:43 pm 
Here's what I mean. All of these are free size.


template example.jpg
template example.jpg [ 93.39 KiB | Viewed 3050 times ]

_________________
Downloads:
Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1762
Location: Chicagoland
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Thu May 07, 2015 9:58 pm 
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 :)

_________________
-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


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8012
Location: Bay Area
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Thu May 07, 2015 11:57 pm 
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:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1762
Location: Chicagoland
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Fri May 08, 2015 1:11 am 
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


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9482
Location: Netherlands
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Fri May 08, 2015 1:12 am 
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

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
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


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1206
Location: Bristol, UK
 Post subject: Re: BUGFIX: Cone Light Aura when grid size 1 (32.3)
PostPosted: Fri May 08, 2015 2:27 am 
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 7:12 am, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 2 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman