Jump to content


Photo

is it possible to use unpacked pk4 content?


  • Please log in to reply
10 replies to this topic

#1 Skaruts

Skaruts

    Member

  • Member
  • PipPip
  • 233 posts

Posted 01 October 2018 - 08:45 PM

It used to be possible (at least up to some 4 years ago, last time I was around here), but now it doesn't seem to work. I keep having to pack stuff into the pk4s every time I change a custom texture or model or else DR and TDM don't see the changes, and that's quite a bit annoying and unwieldy. More so because it forces me to shut down the game and DR before packing, because they seem to lock the pk4s while running and 7z goes kaput if I try to use them while locked.

 

Is it still possible to do?


Edited by Skaruts, 01 October 2018 - 08:47 PM.


#2 Epifire

Epifire

    Advanced Member

  • Active Developer
  • PipPipPip
  • 540 posts

Posted 01 October 2018 - 10:32 PM

Are you trying to modify the existing core PK4's? I haven't tried to alter them directly but if you're working out of your own FM project directory you wont need to compress it. However I'd imagine altering the official PK4 would be very problematic. Mainly considering that they will be overwritten with any update that comes later.


You need a model? Epi does you a model.

 

Toss me a PM I promise I don't bite.

 

 


#3 freyk

freyk

    Advanced Member

  • Member
  • PipPipPip
  • 683 posts

Posted 01 October 2018 - 10:59 PM

Its possible only if you use the same filestructure like in the pk4.
Move the content from the pk4, outside the pk4.
Or copy the files from the pk4 and delete the pk4.
Its not wise to edit files "inside" the pk4. move it outside the pk4, edit the file and move it to the pk4.

Tip:
use totalcommander.
Also when you quickedit files "inside" the pk4.

Edited by freyk, 01 October 2018 - 11:17 PM.


#4 Skaruts

Skaruts

    Member

  • Member
  • PipPip
  • 233 posts

Posted 01 October 2018 - 11:51 PM

If I delete the pk4 and just keep the folder with its content it doesn't work. DR doesn't detect any of it. 

 

I'm keeping the folder (in this case tdm_models01) in my darkmod folder, right next to the prefabs folder. Also tried renaming the folder to have the .pk4 extension itself, but also didn't work. Same results for the tdm_textures_base01 folder.

 

I'm not trying to change any of the game's files, I'm doing a custom texture/material and a custom model, but the only way DR and TDM seem to recognize that they exist is if I pack them into the pk4...

 

 

Or maybe I don't have to put them in a folder with the name of the pk4? Hmm.. gonna try that.


Edited by Skaruts, 01 October 2018 - 11:53 PM.


#5 Skaruts

Skaruts

    Member

  • Member
  • PipPip
  • 233 posts

Posted 01 October 2018 - 11:58 PM

Or maybe I don't have to put them in a folder with the name of the pk4? Hmm.. gonna try that.

Well, that worked. So that was my mistake, I was unpacking everything into folders with the name of the pk4s, but it's the folders inside them that have to be in the darkmod folder.

No need to delete the pk4 though. Whatever is in the folders seems to override them.
 

Tip:
use totalcommander.
Also when you quickedit files "inside" the pk4.

Thanks. That'll be useful indeed.

Edited by Skaruts, 02 October 2018 - 12:16 AM.


#6 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1593 posts

Posted 02 October 2018 - 12:20 AM

You don't need to modify the contents of pk4 files at all, even if you want to change something. Pk4s are just zips, and they all contain a directory structure of a game. You need to set up a project folder (fms/myfmname) and set t in DR project settings. Now inside that folder you need to mimic the directory structure found in pk4s. If you want to modify stock TDM resources, you need to unzip it and place it in the same directory structure inside your project folder, and then modify the asset. You don't need to put it back into base pk4. When you use project folder, game will recognize your new assets and stock TDM assets you try to modify, and will use your version instead of stock version. It's much cleaner and safer this way.



#7 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1567 posts

Posted 02 October 2018 - 12:44 AM

It may be useful to know the priorities TDM uses: files as they are inside the pk4 are overwritten by changes made to extracted files in the same folder (but they need the same folder stucture found inside the pk4 files, as you already found out). These files, in turn, are overwritten by files in the folder you have set as your project folder as described by Judith. Make sure that TDM is set up correctly, as this is the most common reason people have problems with missing /not updated assets. I just noticed that the setup described on the Wiki is still from a previous version, so I will change it this evening.


  • Judith likes this

#8 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1593 posts

Posted 02 October 2018 - 01:00 AM

Also, a major downside of modifying stock content inside pk4s is that all other missions will be using it as default. AFAIK, you could use the game directory structure in TDM main folder, the game will read both unpacked content and stuff zipped in pk4s. In fact, you can unzip all pk4s in root TDM directory and the game will read it correctly. But, in case of any updates, the updater will notice missing pk4s and will start downloading them again.

 

All in all, using project folders is less complicated or error-prone, and you can always copy assets from stock pk4s to modify them for your mission.


  • Destined likes this

#9 Skaruts

Skaruts

    Member

  • Member
  • PipPip
  • 233 posts

Posted 02 October 2018 - 02:01 AM

That's all good to know. I myself though it would be better to just extract whatever single files I needed. Extracting all the pk4s would take too long, and I generally prefer keeping the integrity of the original files intact.

 

I modified some editor "tool textures" to be translucent (clips, nodraw, visportal, etc), which I had tried a long time ago and failed, so I'm only overriding those. I also created a new one for sealing brushes behind modules, that stands out more among everything else, so it's easier to spot gaps between geometry and models. I'm also mocking about with 3D models, but none of this is project specific. 



#10 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1567 posts

Posted 02 October 2018 - 06:11 AM

Why did you not just use filters in DR? With these you can hide textures, so they won't bother you while working. Much less work than the replacing all the textures... You can even define new filters for stuff (models, entities, textures, etc) that are not contained in the basic filter set. The only downside is that you have to remember to turn them on, as soon as you move brushes that use these textures.

For sealing brushes behind models, I usually use the caulk texture. This is sealing, invisible in the game, and the magenta colour makes it hard to miss, while searching for gaps.



#11 Skaruts

Skaruts

    Member

  • Member
  • PipPip
  • 233 posts

Posted 02 October 2018 - 03:34 PM

On one hand it's down to habituation, as I used to make some mapping on the Source engine and you have transparent tool textures there, but it's also quite annoying to me when, for example, I'm covering a bunch of props with monster clips, and it starts getting hard to travel around the map and see where is what. Filtering off monster clips at that point might make me forget where I already placed some of them. 

 

On the other hand I'm also a bit averse to having to access menus for things I can have to use frequently. 

 

It's also useful for studying other people's maps, though: 

 

(me studying Melan's Fauchard map with some experimental textures on)

i3JVm4Y.png


Edited by Skaruts, 02 October 2018 - 03:34 PM.

  • Abusimplea likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users