7Y-Loki 10 Posted September 20, 2016 Good afternoon! So, I am making a retexture mod for the RHS - Russian Federation Armed Forces about the Crimea Crisis, and am having trouble with the decals... (want to change russian decals to ukranian/separatist forces decals) My decals .pbo has the same structure as RHS's, however I get an error when Arma menu pops up saying an .sqf cannot be found, and so the decals do not work. It is there, so I haven't a clue of where the problem resides. I'm not great with scripting, so there's been a bunch of copy-pasting and changing paths and names. params ["_vehicle"]; if(local _vehicle)then{ private _class = typeOf _vehicle; //diag_log format ["Init running. Class: %1", _class]; private _cfgParams= getArray (configFile >> "CfgVehicles" >> _class >> "dnr_decalParameters" ); if(count _cfgParams > 0)then{ { _cfgParams set [_forEachIndex, call compile _x]; }foreach _cfgParams; [ _vehicle, _cfgParams ] call dnr_fnc_decalsInit; //diag_log format ["Params: %1", _cfgParams]; }; }; These are the contents of my readParams.sqf, copy-paste from RHS, only "rhs_decalParameters" and "rhs_fnc_decalsInit" are changed for "dnr_..." PS: I know all the effort for these scripts belongs to Red Hammer Studios for their excellent mod, and if I ever make this mod work, all credit will go to them. Thanks! Share this post Link to post Share on other sites
riten 153 Posted September 20, 2016 I think yout path should looks like (start at pbo): file = "dnr_decals\scripts\script.sqf" please use code next time instead of screenshots... Share this post Link to post Share on other sites
jshock 513 Posted September 20, 2016 A leading \ may be important: file = "\dnr_decals\scripts\script.sqf"; Share this post Link to post Share on other sites
7Y-Loki 10 Posted September 21, 2016 Thank you both for your help. That problem is solved, although another now arises. Thanks for your time! PD: the destination was wrong... "/dnr_decals/etc..." NOT "/dnr_decals/addons/dnr_decals/etc...", which is how it works for RHS :/ Share this post Link to post Share on other sites
Grezvany13 64 Posted September 21, 2016 Thank you both for your help. That problem is solved, although another now arises. Thanks for your time! PD: the destination was wrong... "/dnr_decals/etc..." NOT "/dnr_decals/addons/dnr_decals/etc...", which is how it works for RHS :/ The reason why it works like that for RHS (and many other mods), is because it uses $PBOPREFIX$ (see: https://community.bistudio.com/wiki/PBOPREFIX). 1 Share this post Link to post Share on other sites
7Y-Loki 10 Posted September 21, 2016 hmm.. I'll look into that see what I can find, thanks ps: (no info in that wiki) Share this post Link to post Share on other sites
ecurb 0 Posted September 24, 2016 To reiterate , the leading "\" indicates the context of Arma and the PBO or addon you are wanting to access. Share this post Link to post Share on other sites
Grezvany13 64 Posted September 24, 2016 hmm.. I'll look into that see what I can find, thanks ps: (no info in that wiki) The use $PBOPREFIX$ is relatively easy, although not well explained (at BIKI or forums), and is mostly useful on larger or more complex mods. eg. you have a mod called @MyMod, with the following structure (before packing to PBO files): - @MyMod - addons/ - main/ - config/ - CfgFunctions.hpp - functions/ - fn_SomeScript.sqf - fn_OtherScript.sqf - $PBOPREFIX$ - config.cpp - data/ - images/ - image_128.paa - image_256.paa - image_512.paa - $PBOPREFIX$ - config.cpp - mod.cpp As you can see the mod (@MyMod) has 2 addons (main and data), which will be 2 PBO's (main.pbo and data.pbo). Each addon has it's own $PBOPREFIX$ file, to indicate the path prefix of the addon, which can be used inside the pbo, inside the mod, but also outside the mod (eg. in other mods). To follow the standards (both by BI and CBA), you can use the following: x\mymod\addons\main x\mymod\addons\data This means: x MAINPREFIX This is standard to inducate it's a mod (ArmA3 uses 'a3') mymod PREFIX Name of mod (lowercase without spaces to make it easier) addons SUBPREFIX To indicate it's a addon within the mod main COMPONENT Name of addon (lowercase without spaces to make it easier) When using this, you can simply call your scripts or access files with this prefix, without having to worry that you won't be able to find them (eg. "where does the root start?" or "how can I find the path inside another mod or addon?"). eg. // CfgFunctions.hpp class CfgFunctions { class MyMod { class Common { // include files within the functions/ directory // of the main addon inside mymod file = "\x\mymod\addons\main\functions"; class SomeScript; class OtherScript; }; class Core { // include files within the \A3\functions_f\ prefix // and the Combat directory, or 'functions_f.pbo' of ArmA3 core file = "\A3\functions_f\Combat"; class enemyTargets; class enemyDetected; }; }; }; I hope this gives an idea on how to use the $PBOPREFIX$ and how it can help you structure you're code a bit more. If you plan to use a lot of scripting, I found it useful to implement CBA features (like macro's, functions, etc.). Although this probably isn't always needed or wanted. 1 Share this post Link to post Share on other sites
7Y-Loki 10 Posted September 26, 2016 I hope this gives an idea on how to use the $PBOPREFIX$ and how it can help you structure you're code a bit more. Thanks a lot mate! I will try to use this in the future and understand how these large mods work. I am currently trying to retexture the Russian Vehicles from RHS mod, for a mod of the Ukranian Crisis, but can't find where to change the numberplates, so they all say "RUS" Gonna try and find answers, and if I don't (when I don't) I'll open a new thread in search for BI Forums' wisdom. Thanks again! Share this post Link to post Share on other sites