Jump to content
TroyT

Point to an image in an addon from within the mission file?

Recommended Posts

Is there a way to specify the path to an image in a mod addon from within the mission file?  As an example, I'm using a mission file script that adds custom vehicle skins.  Currently, the skin images are contained within the mission file itself, so the path looks like:

	hiddenSelectionsTextures[] = {"mpmissions\__cur_mp.Altis\BSF\Skins\SDV_Rusty.jpg"};

I'd like to move the images to our community addon to reduce the size of the mission file.  Paths to Arma textures work as expected from within the mission file, such as:

	hiddenSelectionsTextures[] = {"A3\Air_F_Heli\Heli_Transport_04\Data\Heli_Transport_04_base_01_co.paa"};

I've tried many variations of paths to our mod such as:

	hiddenSelectionsTextures[] = {"@BSF\addons\BSF_Skins\data\SDV_Rusty.paa"};
	hiddenSelectionsTextures[] = {"\BSF\addons\BSF_Skins\data\SDV_Rusty.paa"};
	hiddenSelectionsTextures[] = {"A3\BSF_Skins\SDV_Rusty.paa"};

I've tried a dozen variations but none seem to work. 

The mod structure is:

ArmA3(root)\@BSF\addons\BSF_Skins\data\SDV_Rusty.paa

 

The vehicle in question appears with no skin. Some versions of the path throw "file not found" errors and others don't.  The fact that some don't throw the error leads me to think that maybe something else is amiss, but I can't think of what.

Share this post


Link to post
Share on other sites

"\BSF_Skins\data\SDV_Rusty.paa"  you need to 1) consider the "base folder" is the addon itself (not the @mod dir) and 2) put a "\" at the beginning of the path.

Share this post


Link to post
Share on other sites
31 minutes ago, killzone_kid said:

Addons are loaded first when mission doesn’t exist, so no.

Wasn't his question, atleast according to titles.

 

You need to use the proper INTERNAL path. Which uses the pbo prefix.

 

Let's say you have coconut.pbo with prefix "myCoconut" and the file "texture.paa" inside it.
Then your internal game path will be "\myCoconut\texture.paa"
As you didn't know that, I'm gonna assume you didn't know about prefix either.

If your pbo doesn't have a prefix (you should change that immediately and pack your pbo's properly) then it will fallback to the pbo's filename, in my case:

"\coconut\texture.paa"

in your case that means it's probably in

"\BSF_Skins\data\SDV_Rusty.paa"

 

The "A3" that you write there is part of the prefix of all Arma pbo's.

 

Share this post


Link to post
Share on other sites

Thank Dedmen, that fixed it.  I've been curious about those files and now that sheds light on other questions that I've had about script and PBO structure.  Is there a difference between $PREFIX$ and $PBOPREFIX$? Also,  can you shed light on the use of the following?

   $MIKERO$ - contents: DePbo.dll   I this legacy from before PBO Project?  I use the paid version on Mikero's Tools.

   $VERSION$ - Seems obvious, but where is the data inside reflected?

   $HASH$ - encryption?

   

 

 

Share this post


Link to post
Share on other sites
On 9/13/2019 at 6:33 PM, TroyT said:

Is there a difference between $PREFIX$ and $PBOPREFIX$?

Never heard about $PREFIX$

 

On 9/13/2019 at 6:33 PM, TroyT said:

 $MIKERO$ - contents: DePbo.dll   I this legacy from before PBO Project?  I use the paid version on Mikero's Tools.

   $VERSION$ - Seems obvious, but where is the data inside reflected?

   $HASH$ - encryption?

Where did you get these from? Never seen any of these.
They seem to just be pbo properties.
hash is probably git hash.

 

the mikero depbo.dll property is what all of mikeros tools add to all pbo's they pack.

version is shown in game RPT on mod load.

Share this post


Link to post
Share on other sites

PBO_Files.png

 

All of the RHS PBO's that I've poked around in have those files.  I was using $PREFIX$ at first with no luck because I see it fairly often.  As soon as I switched it to $PBOPREFIX$ it worked.  In looking around, I see the $PREFIX$ file in 80% of all the different mod PBO's that I look in.  I wonder if this is just a case of mass disinformation because we learn from dissecting other mods and copy how they were done.  If a few prominent mods do it "wrong", or non-standard, then it becomes common.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×