OFPEC Forum

Addons & Mods Depot => ArmA - Addons & Mods Discussion => Topic started by: paritybit on 20 Mar 2008, 01:15:36

Title: Difference between "replacement pack" and "addon"
Post by: paritybit on 20 Mar 2008, 01:15:36
I can't seem to find a decent definition, and if I've already got the right idea then I can't find any information about how to make a "replacement pack" rather than an "addon".

I suspect that the difference is a "replacement pack" allows users to play existing missions in a different way (i.e. the default content is replaced by the new content) and that addons require placement into missions.

If this is correct, then I should be able to make the existing M-203 launcher fire projectiles that I've created (HEDP, smoke, white star cluster, etc) through a combination addon/replacement.  Is that right?  If so, how do I go about doing it?  Do I override an existing class similar to the way I would do it in any programming language (i.e. create an entirely new SoldierWG class that somehow replaces the existing SoldierWG)?

Finally, what are the implications for multi-player and a dedicated server?  If I, as a user, want to use a replacement pack, does the dedicated server also have to use that replacement pack for mine to work?  What happens if the server doesn't have the pack but I do?

Thanks.
Title: Re: Difference between "replacement pack" and "addon"
Post by: Callaghan on 20 Mar 2008, 18:43:58
Replacement pack doesnt have one meaning.

An addon will add new content to a game.
A replacement pack will replace the original content of the game with the addon content.

SO

A replacement pack normally contains an addon AND a config which tells the game to use the addon instead of what it normally uses.

Some replacement packs include addons, others require you to download them seperately, it should say in the description.

E.G. RHS SLA replacement pack, i think that is the name anyway. This will replace all default SLA infantry with the RHS modern russian infantry.

99% of replacement packs work fine in MP even if the server doesnt have them, it depends on the content.
Dont be afraid to experiment. If it doesn't give you the desired result, just delete it.
Title: Re: Difference between "replacement pack" and "addon"
Post by: paritybit on 20 Mar 2008, 18:54:55
Thanks.  That answers part of my question, but the implementation piece still remains.  How do I make a "replacement pack" tell the game to replace something with something else? 

I assumed somebody would point me to a page in the BI wiki that I missed.  Maybe no information on how to do this is written down yet?
Title: Re: Difference between "replacement pack" and "addon"
Post by: hamis on 22 Mar 2008, 16:32:08
Well,here is replacement config for SLA AK74:
Code: [Select]
class CfgPatches {
class weapon_replacement_ak {
units[] = {};
weapons[] = {};
requiredAddons[] = {"CAweapons3"};
};
};

class cfgWeapons {
class Default; // External class reference
class RifleCore; // External class reference

class Rifle : RifleCore {
};

class AK74 : Rifle {
model = "\SLA_Weapon\sniper\vss.p3d";
};
};
Title: Re: Difference between "replacement pack" and "addon"
Post by: paritybit on 22 Mar 2008, 19:47:56
So the AK74 has the same name as the original AK74, it inherits all the original properties of the AK74, and then the property specified in the config is overridden?  Is it really that simple?  It seems so simple that somebody should have written it down before, doesn't it?
Title: Re: Difference between "replacement pack" and "addon"
Post by: hamis on 23 Mar 2008, 09:01:43
Well,here is the link to this replacement pack:http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=ffe0036d698514cd3ff01ab91dde33a7;act=ST;f=70;t=72120 (ftp://http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=ffe0036d698514cd3ff01ab91dde33a7;act=ST;f=70;t=72120).