[aps]gnat 28 Posted January 11, 2009 Prompted by Q 1) While ingame and in a script, is there a way to read the detail of an known addons config. i.e. If addon XYZ_Heli is running, what is the driver model definition or what is the number of cargo positions or what is the path to the p3d 2) While ingame and in a script, is there a way to read the detail of an known addons LOCATION. i.e. Addons get saved many different places on a users computer, but can I in a script find the full (ArmA) path to say the p3d of known addon XYZ_Heli ? The reason for asking. I'd like to make my ships allow various choppers to sit on the back of them while moving. The only real way to do it is to lock a p3d proxy of each on the back. For known BIS addons, its easy. For community addons, the p3d is know, but the path to it can vary too much. Share this post Link to post Share on other sites
eble 3 Posted January 11, 2009 would a simple way round it be have the addon/mod folder @Gnat and if anyone wants to use a helo with the ships it has to be in that folder? Share this post Link to post Share on other sites
[aps]gnat 28 Posted January 11, 2009 would a simple way round it be have the addon/mod folder @Gnat and if anyone wants to use a helo with the ships it has to be in that folder? Sure Southy ..... but you know how many problems you get when people don't read the Readme's ... Plus its a lot restrictive for Online play and servers and custom missions. Be much better if the ship addon itself could find the nessisary info. Share this post Link to post Share on other sites
t_d 47 Posted January 11, 2009 you can read config like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">getText(configFile >> "CfgVehicles" >> "AddonClassname" >> "model") This would give you the path of the model like it was defined in the config. Share this post Link to post Share on other sites
poweruser 10 Posted January 11, 2009 Just a side note: Depending on the data type of the config entry you have to use different parse commands: getText / getNumber / getArray Share this post Link to post Share on other sites
UNN 0 Posted January 16, 2009 Quote[/b] ]For known BIS addons, its easy. For community addons, the p3d is know, but the path to it can vary too much. As T_D said you can read configs easy enough. But once you have the path to the p3d. I’m not sure what you can do with it, when it comes to changing your ships p3d or config? AFAIK You can't change a P3D's content using scripts, only turn stuff on and off. Which is probably a good thing from the aspect of a potential cheat? Certain config values can be influenced using scripts during Arma's startup. Scope being one of them. But your limited to numeric values only AFAIK. If the engine expects a string (like the path to a p3d) it will read it as a string and will not execute a function. Share this post Link to post Share on other sites
.kju 3245 Posted January 16, 2009 sorry missed that one before Gnat. Config_Parser EVAL EXEC PreProcessor_Commands LINE FILE Might be useful as well. If you share more details on your goal, it would be easier to help. Â Share this post Link to post Share on other sites