PDA

View Full Version : Core Enhanced Images Code for map layers



ShotGun Jolly
May 1st, 2015, 21:41
Hi all...

I am trying to isolate the code out of the enhanced image Extension fir the layers. I am trying to make my own extension with that one feature. I think i should be able to shoe horn it together. I thought it would be simple and i had some success with doing it but i run in to some scripting errors.

I must be missing some code some where but I cant find it. Anyone able to help me find it or point it out to me in that extension?

Thanks Jolly

Trenloe
May 1st, 2015, 21:55
The main thing in the enhanced images extension is that two new image controls are added: <imagecontrol name="features_image"> and <imagecontrol name="play_image">. <imagecontrol name="image"> is the base layer and this has the same naming convention as the single image layer in a normal FG campaign (without the layers).

Then, in the various related LUA files you'll see these layers referred to as play_image (the top layer), features_image (the middle layer) and image (the base bottom layer).

Be aware that there are many areas of this image layering that aren't supported by the imagecontrol API. See post #1 and #2 in the enhanced images extensions for more info on gotchas and usage.

ShotGun Jolly
May 6th, 2015, 23:56
Thanks Trenlo!

Ive made some progess from that!

Trenloe
May 7th, 2015, 00:09
I am trying to isolate the code out of the enhanced image Extension fir the layers. I am trying to make my own extension with that one feature.
I've just re-read this properly. Layering is all the CoreRPG enhanced images (https://www.fantasygrounds.com/forums/showthread.php?20231-Enhanced-Images-%28layers%29-for-FG-3-0-CoreRPG-%28and-rulesets-based-on-CoreRPG%29) extension does - it doesn't bring across other functionality from Zeus's original 4E enhanced images extension.

So, I'm curious as to what you're actually doing? :)

ShotGun Jolly
May 7th, 2015, 01:21
Im trying to add the layering code to the extension Dulux made for me. But it seems i can not have both. Its one or the other.

Mask_of_winter
May 7th, 2015, 01:24
I know the enhanced image extension breaks Savage Worlds custom markers. Perhaps it just can't be done. Shame, since I really like the 3 layers.

Trenloe
May 7th, 2015, 01:26
But it seems i can not have both. Its one or the other.
That Dulux, he's so unsociable - doesn't want to play with the cool kids... ;)

Trenloe
May 7th, 2015, 01:30
I know the enhanced image extension breaks Savage Worlds custom markers. Perhaps it just can't be done. Shame, since I really like the 3 layers.
The problem is that any extension that messes around with the base map image control is pretty much stand alone (i.e. only one extension can make modifications to that control and the associated LUA scripts) without designing the extensions specifically to work together.

dulux-oz
May 7th, 2015, 03:55
That Dulux, he's so unsociable - doesn't want to play with the cool kids... ;)

EXCUSE ME?

OK, I know that was meant to get a bite, and it did - but in the interests of accuracy I can say its YOUR Layered Extension that doesn't want to work with mine - and so its you who is being unsociable and who doesn't want to play with the cool kids :p

OR, you and I could work together to allow BOTH extensions to work at the same time - I know exactly how to do that, but it requires you to make some changes to your extension (& I'll have to do the same with mine).

Dude, I know that was meant as a joke, but seriously... uncool, my friend, very uncool!

<sniff> Now I'm going to go home and cry to mummy <sniff><sniff>

:)

Trenloe
May 7th, 2015, 03:57
but in the interests of accuracy I can say its YOUR Layered Extension that doesn't want to work with mine
*Mine* was here first!

:p

dulux-oz
May 7th, 2015, 04:01
*Mine* was here first!

:p

Actually, Shotgun's talking about my Pointers Toolkit, which I believe was posted BEFORE your excellent extension, so *mine* was here first :p

Trenloe
May 7th, 2015, 04:11
Actually, Shotgun's talking about my Pointers Toolkit, which I believe was posted BEFORE your excellent extension, so *mine* was here first :p
I very much doubt that: https://www.fantasygrounds.com/forums/showthread.php?15647-Dr-Zeuss-s-Enhanced-Images-Extention-for-FG-3-0-V0-1 Posted 2 months before you joined the forums...

:D

Trenloe
May 7th, 2015, 04:13
OR, you and I could work together to allow BOTH extensions to work at the same time - I know exactly how to do that, but it requires you to make some changes to your extension (& I'll have to do the same with mine).)
Oh, you *do* want to play with the cool kids after all? Nice! (Maybe) :)

dulux-oz
May 7th, 2015, 04:20
I very much doubt that: https://www.fantasygrounds.com/forums/showthread.php?15647-Dr-Zeuss-s-Enhanced-Images-Extention-for-FG-3-0-V0-1 Posted 2 months before you joined the forums...

:D

OK, if that's the case, then I stand corrected.

dulux-oz
May 7th, 2015, 04:22
Oh, you *do* want to play with the cool kids after all? Nice! (Maybe) :)

You're missing the point - I AM the cool kid - you should be asking to play with *me*.

And if you're nice and polite, I might let you :p

Trenloe
May 7th, 2015, 04:25
OK, if that's the case, then I stand corrected.
It was my second extension, after converting Tenian's language extension.

ShotGun Jolly
May 7th, 2015, 14:18
Although this friendly hijacking/ banter is entertaining to read :) It does not help me get me any closer to merging the two extensions together. lol...

So....

My next question is... can that pointer extension be merged with the layering extension?

Trenloe
May 7th, 2015, 14:24
My next question is... can that pointer extension be merged with the layering extension?
Yes it can. Pretty easily.

I've sent a PM to dulux "playground for one" oz to get the "stuff" he's sent to you and I'll give you a merged version.

dulux-oz
May 7th, 2015, 14:51
Yes it can. Pretty easily.

I've sent a PM to dulux "playground for one" oz to get the "stuff" he's sent to you and I'll give you a merged version.

The "stuff" you need is in Shotgun's 40K Threads - its the Flamer Extension I did up for him.

And it's wearing a bit thin, Tren - I'm not as amused as you seem to think I am.

Trenloe
May 7th, 2015, 15:09
And it's wearing a bit thin, Tren - I'm not as amused as you seem to think I am.
Fair enough. Sorry.


The "stuff" you need is in Shotgun's 40K Threads - its the Flamer Extension I did up for him.
Could you point me to the exact post please? Thanks.

dulux-oz
May 7th, 2015, 15:32
Could you point me to the exact post please? Thanks.

Here's the post https://www.fantasygrounds.com/forums/showthread.php?24065-FFG-Deathwatch-Ruleset&p=209878&viewfull=1#post209878

It's OK, it was just dragging on a little bit too long :)

Cheers

Trenloe
May 7th, 2015, 16:03
Here's the post https://www.fantasygrounds.com/forums/showthread.php?24065-FFG-Deathwatch-Ruleset&p=209878&viewfull=1#post209878
Code integrated into current CoreRPG enhanced images extension and renamed to "Enhanced Images with Custom Pointers"

I've put the custom pointers on each layer for the GM - which means they are completely controlled on that layer - moving, resizing, deleting needs to be done on the same layer as when the pointer was originally added. This might get confusing, but I thought I'd do it that way to give maximum flexibility to the GM. The players still only have access to the top layer for their own pointers.

ShotGun Jolly
May 7th, 2015, 18:24
Wow!

Thanks guys! You have no idea how highly valued this extension will is for me!

ShotGun Jolly
May 8th, 2015, 00:21
Hey... You make these extension so easy! Gawd...

I just picked apart what you did.. and I was on the right track.. I had everything in the right place, but I was missing a few lines of code here and there.. But I am getting it.. Thanks again... I am learning from both of you!

Trenloe
May 8th, 2015, 01:15
But I am getting it.. Thanks again... I am learning from both of you!
That's cool. You'll be making extensions like the best of 'em soon. :)

dulux-oz
May 8th, 2015, 04:08
But I am getting it.. Thanks again... I am learning from both of you!

You're welcome :)