PDA

View Full Version : CaData replacement, how?



Mr Burns
Mar 4 2012, 19:15
I need a bit of help here as my replacement mojo has become a little rusty :confused:

We want to change something in a single script from ca.pbo
(full path: ca.pbo\ca\Ca\data\particleeffects\scripts\muzzle\rifle.sqf)


How? ca.pbo already has 2 config.bin inside which got me very confused, i don´t understand the whole filepath.
What i tried was having the full folder structure (as seen above) in an external addon and putting a rudimentary config in it´s root, containing only cfgpatches with required addons CAData&CAData_ParticleEffects - didn´t work.
Antoher try i only used folder structure down from where the 2nd config.bin is found in the original file, didn´t work either.

Has someone done this before? Any help would be appreciated :)

.kju [PvPscene]
Mar 4 2012, 20:11
1. copy ca.pbo to a new modfolder
2. extract pbo
3. modify stuff
4. repack
5. load modfolder

if the script is launched somehow via a config definition, you can also go for a simply config replacement.

Mr Burns
Mar 4 2012, 20:20
Thx! I´d rather not have a complete duplicate of ca.pbo, just the one or two scripts from it changed.
I searched both original configs in ca.pbo for a rifle.sqf call but there was´nt anything, so i don´t think it´s launched from there .. not entirely sure though.

Do you see any other ways to achieve some simple changes w/o the need for loads of redundant files?

.kju [PvPscene]
Mar 4 2012, 20:40
XEH/CBA with postInitEH:


waitUntil {! isNil "BIS_Effects_Rifle"};
BIS_Effects_Rifle = compile preprocessFileLineNumbers "\yourAddon\modified\rifle.sqf";

Mr Burns
Mar 4 2012, 20:50
Thanks again!

That´ll do the trick nicely. But how do you know that it´s fired by BIS_Effects_Rifle?
I ask because we´ll have to change something in rocket.sqf too, where would we find it´s corresponding trigger value? :)


edit: asked allinone.cpp, guess it´s BIS_Effects_Rocket - love allinone, double thanks! :o

.kju [PvPscene]
Mar 5 2012, 05:37
Check: \ca\Data\ParticleEffects\SCRIPTS\init.sqf