marker 1 Posted October 11, 2013 Can anyone show me the correct way to pull an icon from the config using rank? Tried _rank = rank player; _rank = getText (configFile >> "Cfgvehicles" >> "rank" >> _rank >> "Icon"); And if possible, is there a page I can visit that will show me the paths available for grabbing stuff from configfile? Thanks Share this post Link to post Share on other sites
blackmamb 2 Posted October 11, 2013 _rIcon = getText (configfile >> "CfgRanks" >> "3" >> "texture"); will give you the path to the texture for a lieutenant. 0 is private, 1 is corporal, 2 is sergeant, etc. You can find all the paths in the config Viewer, in game. Share this post Link to post Share on other sites
Mattar_Tharkari 10 Posted October 11, 2013 Made a quick script the other day to get a list: [[config.bin/CfgRanks,"Private","0","","","\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa",""],[config.bin/CfgRanks,"Corporal","1","","","\A3\Ui_f\data\GUI\Cfg\Ranks\corporal_gs.paa",""], [config.bin/CfgRanks,"Sergeant","2","","","\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa",""], [config.bin/CfgRanks,"Lieutenant","3","","","\A3\Ui_f\data\GUI\Cfg\Ranks\lieutenant_gs.paa",""], [config.bin/CfgRanks,"Captain","4","","","\A3\Ui_f\data\GUI\Cfg\Ranks\captain_gs.paa",""], [config.bin/CfgRanks,"Major","5","","","\A3\Ui_f\data\GUI\Cfg\Ranks\major_gs.paa",""], [config.bin/CfgRanks,"Colonel","6","","","\A3\Ui_f\data\GUI\Cfg\Ranks\colonel_gs.paa",""], [config.bin/CfgRanks,"General","7","","","\A3\Ui_f\data\GUI\Cfg\Ranks\general_gs.paa",""]] One thing to note is if you click on the .paa in the config viewer then on the preview button - it displays the picture for you. 2 Share this post Link to post Share on other sites
tonic-_- 53 Posted October 11, 2013 (edited) Depends on how you are doing it. If you are fetching the rank of a player and want to display his rank icon you can do: _rankIcon = [player,"texture"] call BIS_fnc_rankParams; Or if you are just wanting the rank without passing a player object: _rankIcon = ["PRIVATE","texture"] call BIS_fnc_rankParams; BIS_fnc_rankParams description: /* Author: Karel Moricky Description: Return information about military rank. Parameter(s): 0: NUMBER - rank ID STRING - rank system name (e.g. "PRIVATE", "CORPORAL", ...) OBJECT - person whos rank is checked 1: STRING - requited data, can be one of following: "displayName" - full localized name (e.g. "Major") "displayNameShort" - short localized name (e.g. "Maj.") "classname" - system name (e.g. "MAJOR") "texture" - path to rank insignia Returns: STRING */ No sense in reinventing the wheel when Moricky already did it inside of ARMA 3. Edited October 11, 2013 by Tonic-_- Share this post Link to post Share on other sites
marker 1 Posted October 11, 2013 Much obliged guys... Will give them a try when I get home from work.. Many thanks again. Share this post Link to post Share on other sites
marker 1 Posted October 11, 2013 Thanks Tonic. Works perfectly.. Need to remember the config viewer :) Share this post Link to post Share on other sites
Sir Nutty Walrus 9 Posted May 25, 2017 Hold on, im confused ccan someone help me out? Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted May 25, 2017 7 minutes ago, TopNinjaGaming said: Hold on, im confused ccan someone help me out? Here you go. Cheers 1 Share this post Link to post Share on other sites
crewt 31 Posted May 25, 2017 9 minutes ago, TopNinjaGaming said: Hold on, im confused ccan someone help me out? Kind of depends what confused you. Share this post Link to post Share on other sites
Sir Nutty Walrus 9 Posted May 25, 2017 On October 11, 2013 at 10:37 AM, tonic-_- said: _rankIcon = [player,"texture"] call BIS_fnc_rankParams; In player do I put in the variable name or what and in the texture part I put in the past but when I hit enter it brings up and error box BTW thanks for the quick response Share this post Link to post Share on other sites
Sir Nutty Walrus 9 Posted May 25, 2017 Can yu just copy and paste a one of the scripts so i can have a better under standing Share this post Link to post Share on other sites
crewt 31 Posted May 25, 2017 This is only to return the icon, the image of the rank. Nothing else. What is your goal? Change the rang? Set the insignia? We can't guess... Share this post Link to post Share on other sites
crewt 31 Posted May 25, 2017 So the basic values: try a hint or copytoclipboard : Hint/copytoclipboard (format["%1",[player,"texture"] call BIS_fnc_rankParams)]; But I would recommend to put that in the debug console. This way the path will be in your clipboard or will be shown in a hint. But: way up, there already is a list of the .paa's Share this post Link to post Share on other sites
Midnighters 152 Posted May 25, 2017 Have you risen from the grave? @tonic-_- Share this post Link to post Share on other sites
Mokka 29 Posted May 25, 2017 Quote Posted October 11, 2013 (edited) Yes, indeed he has. Share this post Link to post Share on other sites
Midnighters 152 Posted May 25, 2017 6 minutes ago, Mokka said: Yes, indeed he has. I would hope you can see the difference between a joke which is pretty easy to follow as I ended with an emote and a serious suggestion. Looks like you need to stop this whole god eye thing on my posts. Share this post Link to post Share on other sites