PDA

View Full Version : Root image reference from a module ?



bratch9
September 8th, 2021, 11:14
Just a quick one.

How do I from a module access images from 'FG_install\images\sample.jpg' ?

Because of how modules are mapped, references without and '@module' name are assumed to be from the module path space.

so,

<bitmap>images/sample.jpg</bitmap>

In a module, will access 'module file mod\images\sample.jpg'.

How do you I access 'FG_install\images\sample.jpg' ?

Does the system have a '@root', '@FG' style something ?

<bitmap>images/sample.jpg</bitmap> => from modules files
<bitmap>images/sample.jpg@root</bitmap> => FG install images folder ?

Thanks, Pete

Moon Wizard
September 8th, 2021, 17:17
You may not be able to do that from a module; since modules are supposed to be self-contained, or refer to other modules.

If it does work (and I haven't tested); then it would be 'images/sample.jpg@'.

Regards,
JPG

bratch9
September 8th, 2021, 18:23
just an empty '@' was the first thing I tried and did not work. But will give it another go, as I was doing a lot of tests to play with this at the time.

What I'm trying to do is simplify a process.

Basically I have an external download zip of images, which I have renamed to <file>.ipk and put in the FG_install\images folder.

And I wanted to reference those images with <bitmap>images/<packname>/<imagename></bitmap> from my module.

I can do it by unpacking the 3rd parts images zip and dropping in a 'definition.xml' and re-packing it into a 'module' zip file and putting it into modules. Then I can reference with <bitmap>images/<packname>/<imagename>@<modulename></bitmap>

I just wanted to make is 'simple' for other users, so they could just rename the zip -> ipk put in images and add my module.

( Without having to 'faf' with unpacking/repacking a downloaded image pack... )

EDIT: re-checked and the '@' does not work it still fails to find the image. Guess I'll be unpacking the art zip pack.

Talyn
September 9th, 2021, 14:49
This is something I'd like to see as well. Tokens are required to have the @modulename parameter (since token modules are recommended) but now that Unity has the Assets ... "thing" ... it would be nice to be able to pull something out of there (specific example would be product/company logos for credits pages, or cover art) rather than having to copy the images into both local module folders, which is duplicating assets. Currently the <bitmap> tag will not accept @modulename (since Classic never supported that).