PDA

View Full Version : Enhanced Images (layers) for FG 3.0 CoreRPG (and rulesets based on CoreRPG)



Trenloe
January 8th, 2014, 11:14
This is an old thread - see the V1.0 thread here for the latest versions and further development: https://www.fantasygrounds.com/forums/showthread.php?20231-Enhanced-Images-%28layers%29-for-FG-3-0-CoreRPG-%28and-rulesets-based-on-CoreRPG%29&p=165599#post165599


With the advent of FG 3.0 and the CoreRPG ruleset layer architecture I have updated Dr Zeuss's excellent Enhanced Images extension to work with this new architecture. For those who aren't aware of this extension, it provides 3 layers within an image - primarily useful for putting tokens on 3 different layers and stopping them messing with each other (known as token stacking issues). This functionality can be useful if the GM wants to use mapping tokens to draw maps on the fly or use larger tokens for underlying image functionality - a good example is a ship token on a sea/river image - put the ship token on the middle layer and all of the PC/NPC tokens on the top layer and there are no token stacking/selection issues.

v0.2.2: 5826

The extension adds a "layer" icon to all images on the GM side - which when clicked reveals 3 icons that an be used to access (from left-to-right) the base, middle and top layers. Dr Zeuss shows how the original extension works in a video in this post: https://www.fantasygrounds.com/forums/showthread.php?14916-4E-Enhanced-Images&p=114668&viewfull=1#post114668

Things to note:

This *should* be compatible with previous extensions - so campaign images with layers from previous versions should work OK.
Players can only interact with the top layer - GMs must put PC and NPC tokens on this top layer otherwise players can't move their PCs or target NPCs.
Masking only works on the base layer - and then only when the map/image is based on an image file (this is the usual FG mask functionality - you can't mask a freehand drawing).
As masking only works on the base layer, anything that the GM wants to mask should be put on the base layer - tokens that are used for mapping, etc.. If you want to hide NPC tokens don't put them on the base layer, put them on the top layers and use the individual token "visibility" setting (or the visibility setting for the NPC in the combat tracker) to hide/reveal the token to the players.
Grid settings (on/off), offset and size are the same across all 3 layers - there is 1 grid throughout. Other grid functionality is specific to an individual layer - lock tokens, snap-to grid, etc.. Be careful which layer you change these settings on as you will have to be on the same layer if you want to change them later.
Drawing (and erasing of a drawing) only works on the top layer. Drawings are never masked so there is no point in having drawings on any layer other then the top layer - this helps to keep memory use down too.
If you open an image that was from a campaign that was created without the layer extension then everything will be on the base layer. With the exception of the grid - this will be synchronised across all layers.
GMs can select targeting on the lower layers (if there are tokens on those layers) - but I don't think this will work in any way, especially as PC and NPC tokens should be on the top layer anyway. Essentially the targeting arrows will appear if the GM "targets" a token on any layer. This could be confusing so GMs should keep an eye on this... I hope to be able to limit targeting to the top layer only in the future.
Shortcuts (pushpin) that link to campaign entries can be put on any layer - but they are only active (can be selected) on that layer, even though they are viewable on the higher layers. Note: If you open an image from a module that has pushpins these will be visible across all layers but only selectable on the base layer.
For encounters with token placement created in a campaign that didn't use this extension (or a previous version) the extension will convert the token placement layer to the top layer on-the-fly so that the NPC tokens are placed on the correct layer. The original encounter record is not changed.


Things to be aware if you've used to the older extension:

Grids are now on all layers - I found I frequently needed the grid on the base layer to allow me to align mapping objets correctly.
Grid controls (size and alignment) and add grid/remove grid will affect the grid on all layers no matter which layer you do the operation on.
Drawings only operate on the top layer.
When opening an image it always defaults to the top layer selected.


Any questions/issues please post in this thread.

VenomousFiligree
January 8th, 2014, 11:27
Thanks for the great work!

Trenloe
January 8th, 2014, 16:18
Update: 0.2.1.

- Fixed the issue where token placement for encounters not created using this image, or a previous version of the image, were being placed on the bottom layer. The extension now converts on-the-fly to put the tokens on the top (play) layer without modifying the original encounter data.

viresanimi
January 8th, 2014, 17:27
I can't align the grid for all layers, so they fit on top of each other exactly. They seems to be a bit "off" each other, no matter what I do. Am I missing something?

Vires Animi

Trenloe
January 8th, 2014, 17:35
I can't align the grid for all layers, so they fit on top of each other exactly. They seems to be a bit "off" each other, no matter what I do. Am I missing something?
Could you provide a screenshot of the issue and steps to recreate?

viresanimi
January 8th, 2014, 18:09
Right. So this is in a dungeon, I am currently making into a module for Pathfinder.

https://i186.photobucket.com/albums/x71/viresanimi/gridproblem1.jpg
The first here is the grid when I place it on the lowest layer.

https://i186.photobucket.com/albums/x71/viresanimi/gridproblem2.jpg
Here you can see the two layers above it are not aligned with the lowest one. If I move the middle or top layer, the bottom layer ALSO moves and well... the problem persists. I did have a grid already on the map before I loaded the campaign with the extension. Don't know if that has anything to do with it.


EDIT: If I move the grid on any layer, the grids on all layers get moved. And then the problem persists...

Vires Animi

Trenloe
January 8th, 2014, 18:24
Thanks for taking the time to show that. It looks sometimes an imagecontrol with an image file (the base layer for maps based off an image file) does not synch the same as the higher level imagecontrols which essentially don't have an image file at all.

I'll have to spend some time looking at this - it might be base FG functionality that is the problem. This would explain why Dr Zeuss in his original extension didn't have a grid on the base layer.

Also, as an FYI, the grids are designed to try to synch together - whatever you do on *any* layer should synch up through all of the other layers. But, what looks like a bug in the FG imagecontrol is causing the grid offset to be different for empty imagecontrols compared to imagecontrols containing an actual image file.

viresanimi
January 8th, 2014, 19:04
Glad I could I help. I really liked this extention before and used it extensively after you made it for 3.5 / Pathfinder. It is so nice to place tokens that represent spells or traps in the middle layer.

Vires Animi

Trenloe
January 8th, 2014, 21:31
v0.2.2 updated in the first post with a quick fix for the grid-alignment issue - please give it a try.

The default imagecontrol was set to have a drawingsize of 500x500 - the middle and top layers are essentially just drawings, not controls based on an image file. The initial static sie of 500x500 would cause slight grid misalignment for any images that was not 500x500. I've removed this static size. The one down side to this is that if you are creating a new blank drawing the initial window is very small.

damned
January 8th, 2014, 23:20
should this work in all rulesets built on CoreRPG?

viresanimi
January 9th, 2014, 02:58
I just tested it, in the same image, as I've shown before. I drew the first grid on the lowest layer and the other two were slightly off. However, I was now able to align the other layers, so it seems to be working now. Thanks!

Vires Animi

Andraax
January 9th, 2014, 04:07
Doesn't currently work with Castles & Crusades ruleset.

Trenloe
January 9th, 2014, 07:46
I just tested it, in the same image, as I've shown before. I drew the first grid on the lowest layer and the other two were slightly off. However, I was now able to align the other layers, so it seems to be working now. Thanks!
Try creating the grid on the top layer - this shouldn't make a difference but all of the original code was built for drawing on the top layer.

Sometimes it might be slightly off, especially on certain zoom levels - try zooming a mouse-wheel click or two should realign the grid. I'll keep looking at this and see if I can work out what is going on with the slight misalignment while zooming.

Trenloe
January 9th, 2014, 08:58
Doesn't currently work with Castles & Crusades ruleset.
Try this one, I've made it ruleset agnostic - but it will only work properly with a ruleset layered on CoreRPG:

5846

The main issue this extensions has is the slight mismatch of grids on certain zoom levels. I've identified the issue and I'm working on a fix. When I have that all done I'll update the main extension in post #1 and make that attachment ruleset agnostic too.

Ikaris
January 11th, 2014, 17:53
I finally had a chance to play around with this extension. It is really cool.
Thank you very much for updating it for 3.0.
I had never used the original extension but now that I have seen how it works I can't live with out it :)

Trenloe
January 12th, 2014, 10:24
With some help from Moon Wizard I've been able to fix the grid synch issue and so have released this extension as v1.0 for general use in the CoreRPG forum: https://www.fantasygrounds.com/forums/showthread.php?20231-Enhanced-Images-%28layers%29-for-FG-3-0-CoreRPG-%28and-rulesets-based-on-CoreRPG%29&p=165599#post165599