theend3r 83 Posted April 11, 2016 I'm creating a simple ORBAT for my mision and everything works well except the game requires full path for some textures, which won't work for obvious reasons. Example from wiki (https://community.bistudio.com/wiki/ORBAT_Viewer): insignia = "\ca\missions_f\data\orbat\7thInfantry_ca.paa"; Works as expected with full path: insignia = "C:\Users\...\Mission%Name.Altis\GhostSkullL.paa"; Doesn't work: insignia = "GhostSkullL.paa"; //doesn't work but texture = "GhostSkullS.paa"; //works and doesn't require full path Full class: class Recon //the whole class stucture, insignia works, texture doesn't (2nd pic) { id = 4; idType = 0; side = "West"; size = "Squad"; type = "Recon"; commander = "Ghost"; commanderRank = "Lieutenant"; insignia = "GhostSkullL.paa"; texture = "GhostSkullS.paa"; text = "Ghost Unit"; textShort = "Ghost"; description = "'The Ghosts' are an elite recon operatives specialized in solo insertions deep behind enemy lines."; }; error: No path: Full path: How come the insignia (2048x2048) works but the texture (128x128) doesn't? I may get it to work with partial path in the Arma 3 folder when the mission is exported (although I do not know what path to set), but is there no way to shortcut Arma into the missions folder (e.g. like you can %appdata% in Windows)? Share this post Link to post Share on other sites
sarogahtyp 1109 Posted April 11, 2016 try KKs ArmA Scripting Tutorials: Mission Root Share this post Link to post Share on other sites
theend3r 83 Posted April 11, 2016 try KKs ArmA Scripting Tutorials: Mission Root Thanks. Solved it with: texture = __EVAL((__FILE__ select [0, count __FILE__ - 15]) + "GhostSkullS"); But such a complicated solution for such simple thing. :rolleyes: I wouldn't want to debug games. 1 Share this post Link to post Share on other sites
corralesid 12 Posted May 3, 2020 For those seeking a complete info: Yes, sure, see KK's blog for more reference, but let's recap particullary of this case: by doing in the init.sqf: Quote MISSION_ROOT = call { private "_arr"; _arr = toArray __FILE__; _arr resize (count _arr - 8); toString _arr }; You'll be substracting the string "init.sqf" to your mission path that will be %Root%\mymissionMP.Altis\init.sqf. So now a lot of things can be called by this path. what you'r doing in Quote texture = __EVAL((__FILE__ select [0, count __FILE__ - 15]) + "GhostSkullS"); is also substracting the string but of description.ext which is 15 character length and so on you can do it for any file in missionfolder to get the path. BIS is recomending you in https://community.bistudio.com/wiki/Arma_3_ORBAT_Viewer to do it via the next preprocessed command: Quote texture = __EXEC (MISSIONLOCATION = __FILE__ select [0, count __FILE__ - 15]) but this to work, you'll need to do first; declare a variable name MISSIONLOCATION (or whatever you want to call it) in description.ext The only problem with this kind of method (even theend3r method), is that if you're gonna #include a file in another folder the variable even thou needs to be declare in description.ext, cause if you do it inside an .hpp it will not work the path or what KK's talking about: So lets put an E.G. mymissionfolder\xfolder\orbat,hpp Quote __EXEC (MISSIONLOCATION = __FILE__ select [0, count __FILE__ - 18]); class CfgORBAT { class HQ { .... texture = __EVAL(MISSIONLOCATION + "xfolder\orbat,hpp" }; won't work, while: Quote ////description.ext __EXEC (MISSIONLOCATION = __FILE__ select [0, count __FILE__ - 18]); #include mymissionfolder\xfolder\orbat,hpp; ////mymissionfolder\xfolder\orbat,hpp class CfgORBAT { class HQ { .... texture = __EVAL(MISSIONLOCATION + "xfolder\orbat,hpp" }; will work. Share this post Link to post Share on other sites
Dedmen 2728 Posted May 7, 2020 Oh man, so complicated... https://community.bistudio.com/wiki/getMissionPath texture = __EVAL(getMissionPath "xfolder\orbat.hpp"); 1 Share this post Link to post Share on other sites