ZNorQ 0 Posted September 4, 2007 Is it possible to use graphics from BIS'es addons, like "ui.pbo" without having to extract them and put them into my misison folder? (I want to display pda_blok.paa located in ui.pbo/data folder.) ZNorQ Share this post Link to post Share on other sites
fasad 1 Posted September 4, 2007 here is how I used some BI artwork in a dialog. I don't know if you could use them in other places such as mission notes in a similar manner. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">... switch _selectedType do { case "M119": {ctrlSetText [9005,"\ca\weapons\data\ico\m119_ca.paa"]}; case "D30": {ctrlSetText [9005,"\ca\weapons\data\ico\d30_ca.paa"]}; case "Truck5t" : {ctrlSetText [9005,"\ca\weapons\data\ico\5t_closed_ca.paa"]}; case "Ural" : {ctrlSetText [9005,"\ca\weapons\data\ico\ural_ca.paa"]}; }; ... Share this post Link to post Share on other sites
ZNorQ 0 Posted September 5, 2007 Ah, yeah that worked - thanks! But I'm abit confused, because, when I look in the ca.pbo file, there is no "weapons" directory. But I did discover that I had to check the weapons.pbo file instead, and found the file in your example. So, why 'ca' (as in "\ca\weapons\..", do you know? ZNorQ Share this post Link to post Share on other sites
fasad 1 Posted September 5, 2007 I'm not exactly sure to be honest. I'm under the impression the CA prefix is used for BI (or maybe just signed) content, but I don't really know. Share this post Link to post Share on other sites
weedomatic 0 Posted September 5, 2007 [...]But I'm abit confused, because, when I look in the ca.pbo file, there is no "weapons" directory. [...] Edit: Wrote total nonsense in this context, apologies. You don't find these inside ca.pbo. The "things" you put behind the root-element ca are to be found under addons: Just use the addons' file names. To find out the rest in order to reuse BIS stuff you can unpack the addon-pbo's to check the contained folder hierarchy/-ies for correct pathing in your custom addons or missions. My guess is that ca stands for combined arms, which would at least make sense as a root element here . Share this post Link to post Share on other sites
ZNorQ 0 Posted September 5, 2007 I'm not exactly sure to be honest. I'm under the impression the CA prefix is used for BI (or maybe just signed) content, but I don't really know. Ok. Atleast it works! Edit: Wrote total nonsense in this context, apologies. NP, I never got around to read your 'nonsense' before you edited it away anyway. You don't find these inside ca.pbo. The "things" you put behind the root-element ca are to be found under addons: Just use the addons' file names. To find out the rest in order to reuse BIS stuff you can unpack the addon-pbo's to check the contained folder hierarchy/-ies for correct pathing in your custom addons or missions. Yeah, I found out that, but I was abit confused since there already was a ca.pbo, but no "weapons" folder. I then tried looking in the weapons.pbo, and voila - found it . So I guess I have to use \ca\ca\.. to re-use resources within the ca.pbo - I got that now. My guess is that ca stands for combined arms, which would at least make sense as a root element here . Sounds like a good guess, but Im wondering if it is THE root element, or if there are other elemets in that same level... Anyway, folks, thanks for great help! ZNorQ Share this post Link to post Share on other sites
weedomatic 0 Posted September 5, 2007 How many "root" or rather biological fathers do you have on the same level? Quote[/b] ]NP, I never got around to read your 'nonsense' before you edited it away anyway. Hopefully noone else did, too ... Share this post Link to post Share on other sites
zyklone 1 Posted September 5, 2007 This is due to the new prefix system. Prefixes are 'hidden' paths saved in the PBO header, they control where in the ArmA filespace the files in the PBO end up. weapons.pbo has a prefix of 'ca\weapons' but ca.pbo has a prefix of jst 'ca'. This means that to adress something in the ca.pbo you only have to do '\ca\', not '\ca\ca\' Nothing prevents other addon makers from using the prefix system. Share this post Link to post Share on other sites
ZNorQ 0 Posted September 5, 2007 How many "root" or rather biological fathers do you have on the same level? You don't want to know! Anyway, I understand, but I just wasn't sure if you guys could confirm that this is actually a 'root' level.. Just forget I asked! Share this post Link to post Share on other sites
ZNorQ 0 Posted September 5, 2007 This is due to the new prefix system.Prefixes are 'hidden' paths saved in the PBO header, they control where in the ArmA filespace the files in the PBO end up. weapons.pbo has a prefix of 'ca\weapons' but ca.pbo has a prefix of jst 'ca'. This means that to adress something in the ca.pbo you only have to do '\ca\', not '\ca\ca\' Nothing prevents other addon makers from using the prefix system. Aah, that is actually a good idea! But, if I where to create my own addon, and PBO it, how would I go about creating this prefix? ZNorQ Share this post Link to post Share on other sites
weedomatic 0 Posted September 5, 2007 But, if I where to create my own addon, and PBO it, how would I go about creating this prefix? During the pbo-process of the addon (e.g. myAddon.pbo) the necessary header is created automatically (just a semi-intelligent guess). Hence, folders created inside the addon's working directory will be used to access files inside them later (in missions, other addons) by using myAddon as the root of the path you provide, e.g. "myAddon/sounds/eek.ogg". No more "ca" as the root, since your custom addon is not nested inside ArmA/addons and the association to ca is mono-directional, i.e. custom addon -> ca. Share this post Link to post Share on other sites
ZNorQ 0 Posted September 5, 2007 During the pbo-process of the addon (e.g. myAddon.pbo) the necessary header is created automatically (just a semi-intelligent guess). Hence, folders created inside the addon's working directory will be used to access files inside them later (in missions, other addons) by using myAddon as the root of the path you provide, e.g. "myAddon/sounds/eek.ogg". No more "ca" as the root, since your custom addon is not nested inside ArmA/addons and the association to ca is mono-directional, i.e. custom addon -> ca. Ok, But that wouldn't explain weapons.pbo, which probably wasn't compiled with the name 'ca'... Anyway, this was abit out of topic, and I'm not around to start creating my addons just yet.. Thanks for the feedbank. ZNorQ Share this post Link to post Share on other sites
weedomatic 0 Posted September 5, 2007 Ok, But that wouldn't explain weapons.pbo, which probably wasn't compiled with the name 'ca'... Correct, not only folder structure plays a role in this case. That's what I somewhat implied with directionality. You access BIS addons via an interface (not that GUI-stuff), which in this case can only be the root "ca". Being able to use e.g. "weapons" as the root would make custom addons indistinguishable from BIS addons. Well, I guess you know that already. Share this post Link to post Share on other sites
.kju 3245 Posted September 5, 2007 it should work this way: create a text file rename it to $PBOPREFIX$ (WITHOUT .txt ending) open with notepad / some other texteditor add your prefix like <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ca\ui save (located in the root / highest level of your addon) Share this post Link to post Share on other sites