BetterDeadThanZed 1006 Report post Posted March 23, 2017 (edited) Is there an easy way to get all of the class names of items that a mod has? I know I can go into the game, open the infistar menu and get the classnames that way but is there an easier way to get all of them, preferably into a text file for easy reference when adding items to loot tables, etc? *EDIT* This has been solved: Edited March 24, 2017 by BetterDeadThanZed 1 Share this post Link to post Share on other sites
Woeful_Wolf 9 Report post Posted March 23, 2017 Made a small script yesterday, will send once I get home in a bit. 3 Share this post Link to post Share on other sites
speedweasel 276 Report post Posted March 23, 2017 6 hours ago, BetterDeadThanZed said: Is there an easy way to get all of the class names of items that a mod has? I know I can go into the game, open the infistar menu and get the classnames that way but is there an easier way to get all of them, preferably into a text file for easy reference when adding items to loot tables, etc? ...and *still* cant search the 3den objects using classnames. It's like no one at BIS has ever seen a modern app UI. It's still 2002 in Prague. 2 Share this post Link to post Share on other sites
Woeful_Wolf 9 Report post Posted March 23, 2017 4 hours ago, Woeful_Wolf said: Made a small script yesterday, will send once I get home in a bit. Sorry, day is really busy. But should be home before tonight. Share this post Link to post Share on other sites
Woeful_Wolf 9 Report post Posted March 23, 2017 (edited) Okay here's the script. https://drive.google.com/open?id=0ByfqTLjco6LeZXBVeHNYYldEbmc I don't have a .dll ready right now so outputting to .rpt should do for now. Run the cfggen.sqf in your server/local Mission File. You can do this by adding it to the mission file in a folder called "custom". (mpmissions\Exile.Altis\custom\cfggen.sqf) And running the script by adding: [] execVM "Custom\cfggen.sqf"; To the start of your init.sqf in your mission file's root. Repack your mission file into a .pbo Run your server/mission. Wait a while for it to completely start up and finish printing and look in your .rpt The start of the list should be indicated by: "=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=" "# Config Generator Starting...#" "=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=" "--- Printing list now: ---" And end marked by: "--- End of list. ---" Look inside the script and there should be a variable you can change to fit the configFile you're looking for. To filter out all the stuff you don't want (like filter it to only one mod) I suggest using Notepad ++ and its "Replace" functionality. Edited March 23, 2017 by Woeful_Wolf 4 Share this post Link to post Share on other sites
BetterDeadThanZed 1006 Report post Posted March 23, 2017 Thank you @Woeful_Wolf. That works perfectly. Share this post Link to post Share on other sites
Z80CPU 527 Report post Posted March 23, 2017 While that will work for placed units, it will not do for those not placed. For placed units - just place unit on a blank map and give a name such as UP1, UP2, etc. (UP = Unit Piece). Save mission then open up the mission.sqm in a text editor and then search for the 'UP' names. Using UP or some other 'weird' combo makes search a LOT easier - sorta like a 'key'. For unplaced units, what I do is to un-PBO the files then using ARMA Tools, find and convert the 'config.bin' file and open the converted file with a text editor. You'll then see the class name. As an example, I took the EVW_v.099 pbo and unzipped it. Then I took the sud_gw_air and unzipped it Then I went into the su25 folder and converted the 'config.bin' file Then I opened converted 'config.bin' file in NotePad++: class CfgPatches { class SUD_SU25 { units[]= { "SUD_SU25" }; weapons[]={}; requiredVersion=0.1; requiredAddons[]= { "A3_Air_F" }; }; }; Class name is SUD_SU25! A little work, but it will get the names without having to place them on a map. What I did for a lot of items, I just placed them on a map as listed in the first method, then saved, then opened mission in NotePad++. Quick and simple. Share this post Link to post Share on other sites
tinboye 219 Report post Posted March 23, 2017 i had opened a thread last week about getting weapons classnames and their magazines. there were a couple examples, this 1 worked well for me for the weapons Spoiler ===================================================== to get weapons with classes run this in debug console ===================================================== _allWeapons = []; { _weapon = configName _x; _itemInformation = [_weapon] call BIS_fnc_itemType; switch (_itemInformation select 0) do { case ("Weapon"): { if ((_weapon find "Exile_") > -1) then { _allMags = getArray(configFile >> "CfgWeapons" >> _weapon >> "magazines"); _allWeapons pushBack [_weapon, _allMags]; }; }; }; } forEach ('(getNumber(_x >> ''scope'') isEqualTo 2) && {!(getText(_x >> ''picture'') isEqualTo '''')}' configClasses (configFile >> 'CfgWeapons')); copyToClipboard str(_allWeapons); All i had to do was change Exile_ to the other mod, so example for RHS weapons I changed Exile_ to rhs_weap_ because i was able to see 1 classname and knew this is what the class started with. A person could change this up a bit to also export classnames of CfgVehicles, CfgAmmo, CfgMagazines, CfgWeapons, CfgGroups, CfgVehicleClasses, CfgFactionClasses etc Share this post Link to post Share on other sites
BetterDeadThanZed 1006 Report post Posted March 23, 2017 1 hour ago, Z80CPU said: While that will work for placed units, it will not do for those not placed. What do you mean by "placed units"? Share this post Link to post Share on other sites
Z80CPU 527 Report post Posted March 24, 2017 Hello Zed, #1 - You just open up any map in the editor. #2 - Place the units down that you want to use or might use. #3 - Give each unit a unique name (have to anyway - unique name that is) like QZ1, QZ2, QZ3, or BV1, BV2, BV3, etc. #4 - Once done, save mission. #5 - Then using some text editor, open the mission file. #6 - Then search for the name you used, such as QZ or BV. All units that you gave that name too will show in the search results. #7 - Cut-n-paste class names from mission file into ??? #8 - Done! PS - Went back and re-read a tad better. What I meant is for example, CUP has 25 tanks, you use one on your map. That script (and my first method) will show only that one tank and not the other 24. My second method will show all 25 if there is no list with this info already, which I do think exist for CUP and RHS stuff. My first method does not require any server, script, any type of PBO's, no exec this or exec that, or anything to get class names. The second method will get you all the names if a list does not already exist. All three will work for ya! Six of one, half a dozen of the other! Share this post Link to post Share on other sites