# Remove some .pk3 from "sv\_ReferencedPakNames"

**URL:** <https://discourse.ioquake.org/t/remove-some-pk3-from-sv-referencedpaknames/1042>\
**Category:** ioquake3\
**Created:** [December 22, 2017, 2:03pm UTC](https://discourse.ioquake.org/t/remove-some-pk3-from-sv-referencedpaknames/1042 "2017-12-22T14:03:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RateX7](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@RateX7](https://discourse.ioquake.org/u/RateX7)\
**Post date:** [December 22, 2017, 2:03pm UTC](https://discourse.ioquake.org/t/remove-some-pk3-from-sv-referencedpaknames/1042/1 "2017-12-22T14:03:10Z")

</div>

Is there a way to remove certain .pk3 files from the “sv\_ReferencedPakNames” ? When fs\_game set to “osp” or any other folder name, all the paks inside become referenced, even those which i don’t want my clients to download.

---

<div class="post-metadata">

**Author:** ![zturtleman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.ioquake.org/zturtleman/32/718_2.png) [@zturtleman](https://discourse.ioquake.org/u/zturtleman)\
**Post date:** [December 23, 2017, 5:25am UTC](https://discourse.ioquake.org/t/remove-some-pk3-from-sv-referencedpaknames/1042/2 "2017-12-23T05:25:24Z")

</div>

It requires changing the engine source code. Remove the basegame check in [FS\_ReferencedPakChecksums()](https://github.com/ioquake/ioq3/blob/7166a3cd3934ae743c4259768d44a90c4ab7923a/code/qcommon/files.c#L3709) and [FS\_ReferencedPakNames()](https://github.com/ioquake/ioq3/blob/7166a3cd3934ae743c4259768d44a90c4ab7923a/code/qcommon/files.c#L3784) in code/qcommon/files.c.

---

<div class="post-metadata">

**Author:** ![RateX7](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@RateX7](https://discourse.ioquake.org/u/RateX7)\
**Post date:** [December 23, 2017, 3:21pm UTC](https://discourse.ioquake.org/t/remove-some-pk3-from-sv-referencedpaknames/1042/3 "2017-12-23T15:21:41Z")

</div>

Thanks for the reply.  
When i remove the basegame check, sv\_referencedPakNames becomes empty at all in baseq3 or  
fs\_game osp. I just want to remove special .pk3, not all of them.

Updated: Solved with fs\_game / fs\_basegame. Now it only puts to referenced the required .pk3s

---

<div class="post-metadata">

**Author:** ![RateX7](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@RateX7](https://discourse.ioquake.org/u/RateX7)\
**Post date:** [January 1, 2018, 5:30pm UTC](https://discourse.ioquake.org/t/remove-some-pk3-from-sv-referencedpaknames/1042/4 "2018-01-01T17:30:12Z")

</div>

Now i’m trying to make specific pak names to be always referenced (e.g: pakX.pk3 settings.pk3 etc.)

Any help would be appreciated.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![zturtleman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.ioquake.org/zturtleman/32/718_2.png) [@zturtleman](https://discourse.ioquake.org/u/zturtleman)\
**Post date:** [January 2, 2018, 12:13am UTC](https://discourse.ioquake.org/t/remove-some-pk3-from-sv-referencedpaknames/1042/5 "2018-01-02T00:13:07Z")

</div>

An indirect option is to run `touchFile filename` in the console/exec where is “filename” is a filename in the pk3 you want referenced. (models/players/sarge/animation.cfg, not pak0.pk3) Though it doesn’t work with [some filenames](https://github.com/ioquake/ioq3/blob/7166a3cd3934ae743c4259768d44a90c4ab7923a/code/qcommon/files.c#L1263-L1271).

Otherwise check the pk3 filename somewhere such as FS\_LoadZipFile and mark it as a general reference using `pack->referenced |= FS_GENERAL_REF;`.
