question-circle How the heck do I alter textures in levels?

  • ataeaf
  • ataeaf's Avatar Topic Author
  • Offline
  • New Marbler
  • New Marbler
More
23 Jul 2015 18:14 #1 by ataeaf
I've searched left and right and up and down for tips on altering the textures in levels, but so far I've found absolutely nothing. All I know is that I need Quake Army Knife to do it? Help me! :blush:

Please Log in or Create an account to join the conversation.

  • Frostfire
  • Frostfire's Avatar
  • Offline
  • Senior Marbler
  • Senior Marbler
  • Multiplayer Mastery
More
23 Jul 2015 20:23 #2 by Frostfire
Replied by Frostfire on topic How the heck do I alter textures in levels?

ataeaf wrote:
I've searched left and right and up and down for tips on altering the textures in levels, but so far I've found absolutely nothing. All I know is that I need Quake Army Knife to do it? Help me! :blush:


Not sure how to add custom textures, but if you delete textures, put in new ones, and rename the new ones what the ones you deleted were named, it should show with the new ones.

Example:

Level has the texture pq.png
You want mbp.png

delete pq.png
put mbp.png where pq.png was
rename mbp.png as pq.png
You should be good with that.

Please Log in or Create an account to join the conversation.

  • Three
  • Three's Avatar
  • Offline
  • Lead Developer
  • Lead Developer
  • level designer
More
23 Jul 2015 20:27 - 23 Jul 2015 20:29 #3 by Three
You can't edit the textures on a pre-existing level (the .dif file) as it is encrypted in a way that Quark would find it useless. However, if you replace a texture (like Frostfire said), it will change in-game. Make sure to back up the old texture files, because MBP Online probably doesn't like it when you modify the texture files.

EDIT: If you mean "how do I add textures to a .map file I made myself in Quark", then it's very do-able, but I don't know how as I am a Constructor user.

Follow me on twitter at @threefolder
Last edit: 23 Jul 2015 20:29 by Three.

Please Log in or Create an account to join the conversation.

  • whirligig
  • whirligig's Avatar
  • Offline
  • Professional Marbler
  • Professional Marbler
More
23 Jul 2015 23:24 #4 by whirligig
Replied by whirligig on topic How the heck do I alter textures in levels?

Threefolder wrote:
You can't edit the textures on a pre-existing level (the .dif file) as it is encrypted in a way that Quark would find it useless.


That's not entirely true. You can't edit .dif files in QuArK, but you can still edit them. Download a hex editor like XVI32 and use it to open the .dif file in question. Do an ASCII search for the texture name, and write it over with the new texture name. If the new name is the same length, you're done. If the new name is shorter, pad it with 00 bytes (fill in the rest of the bytes with 00 in hexadecimal mode). If the new name is longer, some more manipulation is needed to ensure that the byte counts are all correct, which I don't know how to do in XVI32. What I do know is that HiGuy has an unreleased utility program that can directly edit .dif files, display them, and change the textures on them. I'm pretty sure this is how they made some of the winter versions of multiplayer levels. So, bug HiGuy to release his program.

Please Log in or Create an account to join the conversation.

More
24 Jul 2015 04:00 #5 by ProMarbler
Replied by ProMarbler on topic How the heck do I alter textures in levels?
Higuy's Dif program may actually already be on GitHub, for all those who dare try and compile his code while it lacked certain include headers... ;) Nothing usable for you members at this moment. He also has other Dif-related projects...

Perhaps the question you were asking was the wrong one? Did you mean that you wanted to create interiors? If so, then using QuArK or Constructor is the way to go. I'd recommend Constructor for its more straightforward usability, if you discount all the bugs it has.

If you simply want to make levels, you can enable the level editor and press F10 while in-game. Only in singleplayer! You'd want to copy the mission template file, so you can edit it.

A good way to find textures in a Dif is by searching for "NULL" in the binary file. The byte before each texture name indicates the name length. Just get the unsigned 8-bit integer value of it. You can use that to help you make sure the length is the same. If the name is too long, you can shorten the texture file's name! Just make sure it's unique, so it doesn't conflict with other files.

Please Log in or Create an account to join the conversation.

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
24 Jul 2015 05:17 - 24 Jul 2015 05:18 #6 by HiGuy

ProMarbler wrote:
Higuy's Dif program may actually already be on GitHub, for all those who dare try and compile his code while it lacked certain include headers... ;) Nothing usable for you members at this moment. He also has other Dif-related projects...

Not in a form that the public can use. Your best bet is to do what Whirligig says: change the names in the file. Note that the byte before the name is the length, so you can add longer names in.

Just a quick note that DIFs are essentially final exported files. The original brush data is reduced to triangle lists and points; you can't actually change a lot, geometry-wise. Editing them is a pain and you'd be much better off making something in QuArK / Constructor, especially if the interior is really simple. If what you need is complicated / requires a DIF file (that you can't recreate) then your options are limited.

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}
Last edit: 24 Jul 2015 05:18 by HiGuy.

Please Log in or Create an account to join the conversation.

Moderators: Kalle29AayrlRegislian