How to make a patch PK3
Started by Tig
avatar
Tig Rep. 2422
#1   28 Feb 2016
There are many maps on ..::LvL that have small errors like missing textures, sounds, .arena files or even bot files. This is the preferred way that you as a player or fellow developer can fix these issues.

  1. Find the issue and locate a suitable fix.
  2. Create a PK3 that contains ONLY your fix. Do NOT touch the original PK3 at all. It will be explained below why.
  3. Name your patch PK3 something like z-original-filename.pk3. The z- prefix makes sure that your PK3 is loaded last and will override anything from the original PK3. With missing files this is not so important but is still a good habit to have.
  4. Include a simple text file that includes details about what has changed or been added. This helps others work out if they even want to use the patch PK3.
Now you can play the map with your fixes and so can other players.

Why not update the original map?
There are a number of reason however the most important is you do not want to create a conflicting PK3. For example, at a LAN game or online a number of security and anti-cheat checks are performed. If you have a PK3 that is different to that of the game server you will not be able to join that match.

Another reason is you are not the author of the original work. It is not your job and you should NOT touch the released version of someone's work. While different, it is a little like going around the neighbourhood and fixing someone's house because you see a problem without asking the owner first.

The next reason is once a modified version of a map is available to others (via a download link for example) you have polluted the Internet with an invalid version of a release. It now becomes harder to work out which is the correct version.

While all this is not a problem at home playing bots, it is an issue with online and LAN matches.

Correctly compiled patches are welcome to be submitted to ..::LvL as well. Use the contact page - lvlworld.com/contact - to submit them. I'll add patch files to the bottom of the review for others to download.

avatar
FistMarine Rep. 2527
#2   03 Mar 2016
Thanks for the guide Tig. It should clear confusion for people who want to create fixes.
avatar
Colton Rep. 397
#3   03 Mar 2016
I requested this be made FistMarine. So some of the credit automagically goes to me because of that... hugs myself
avatar
Colton Rep. 397
#4   06 Mar 2016
I request that this thread be stickied for the people looking for tutorials on how to do this... and their questions could be posted on this thread...
avatar
FistMarine Rep. 2527
#5   20 Sep 2016
My bad Colton, I didn't know you requested this.

Anyway I could try to make some patches myself and submit here because there are some issues I noticed with some maps.

avatar
Neon_Knight Rep. 434
#6   29 Feb 2020
Just for the record, maps released under the GPLv2 license or similar do allow other people to modify the map (freedom #2) and distribute the modified version (freedom #4). In order to do so, however, access to the source of said map (the .map file) and a license file are required to be packaged in the same archive the map is located, and the derivative must follow the same rules.
Edited 2.15 minutes after the original posting.
avatar
Whatscheiser Rep. 682
#7   25 Jan 2024
Bit of a necrobump, but I do have a question...
I have a CTF map pack installed that includes a player model. I'd like to remove that model from the player model selection menu within the game. I'd like to patch this out without editing the original archive, but my understanding is that the patch must overwrite existing files, it can't be deductive. If I also understand correctly the game "sees" a model to add to the menu when the following folder structure exists: "models\players\nameofmodel" as long as this is in the archive, the game will create an entry for it in the menus.

Given what I think I understand... I'm coming up with a blank on how to prevent that folder structure from existing within the archive. I'm wondering if I'm just S.O.L, or am I just missing something obvious?

avatar
Tig Rep. 2422
#8   25 Jan 2024
EDIT: Long day! I completely missed read your post. The only option I have come up with is to replace the contents of the player model with those of another player model. Copy a suitable replacement player model to the same directory, replacing same name files. The "base" name files will need to renamed.

This will give you two visually same models in the menu, but with two different names. You can use this method with a patch file and it will work the same as the any other patch (the original is replaced with the contents of the patch pk3).

Removing a bot is simple (and what I thought you wanted to do). Original post about removing a bot is below. This will not work for a player model (as it seems you already know).

@Whatscheiser - You can remove the bot by removing the bot name from the main scripts/bots.txt or scripts/*.bot file. It will depend on what kind of a mod it is.

You can test this with the base game like this:

  1. Extract the scripts/bots.txt to a temp location.
  2. Remove a bot from the list and save. As a test, let's remove Xaero (which should be at the top).
  3. Create a pk3 with the edited file and the scripts folder called z-no-xaero.pk3 in the baseq3
  4. Load up a map and try to add a bot. Notice Xaero is missing from the list.
Why does this work? The game engine does not load or read the original data file at all because an update file has been identified. Only the updated file is read.
avatar
Whatscheiser Rep. 682
#9   26 Jan 2024
Thanks for the reply Tig!
I did actually come to the same conclusion you mentioned here for a "fix". I'm not a huge fan of that solution, so I think I'll just live with it for now. Depends on how desperate I get for space in my menu's when I'm done raiding the Polycount player model dump. Maybe by the time I'm done I'll see something obvious I can throw over top of it that'll keep me from having a redundant entry.

Thanks again though, I appreciate the input.

avatar
Neon_Knight Rep. 434
#10   30 Mar 2024
Bump!
I've made patches for nodm7 (can now be properly selected in Skirmish/Create Server) and kineterra1 (rogue symbol in .arena file). I hope to have done them as requested!
EDIT: Oh, I was supposed to send a message. -.-
Edited 1.65 minutes after the original posting.
avatar
Tig Rep. 2422
#11   30 Mar 2024
@Neon_Knight - All good. No real rules, just guides :)

Both patches have been added to the reviews and uploaded to the server. Thanks heaps!

Only registered members can post a reply.
Already registered? Sign in.

mbctf3
Clear