Author Topic: Door Edits Request  (Read 7510 times)

Offline JC Bailey

  • Keeper
  • Administrator
  • Decked in Promeus
  • *****
  • Posts: 415
Door Edits Request
« on: February 17, 2014, 08:51:02 pm »
Hello all, I'm in dire need of smaller versions of SOM's own secret doors and jail cell door to fit 2x2 (1 tile wide) doorways. To be clear, SOM by default comes with secret doors for tile sets 1-1 through 1-5 and 4-1 through 4-5 (the blue and purple sets), but they are two tiles wide. All I need is for them to be shortened to one tile wide while still matching their respective textures when placed in doorways. Also, like I said before, I need the same thing for the barred jail door if possible. Thanks in advanced to anyone that can help me. :smile:
« Last Edit: February 18, 2014, 12:08:35 am by MasterTaffer »
🎮 Indie RPG developer.

Twitter: twitter.com/JC_Bailey1112

Offline HwitVlf

  • Dark Slayer Destroyer
  • ****
  • Posts: 1667
Re: Door Edits Request
« Reply #1 on: February 18, 2014, 03:01:15 pm »
The secret doors are animated a little differently than regular doors; in order to avoid glitch looking overlapping polygons, the hidden doors move back a little bit before opening.  Ben and me are the only two people who might have the knowledge to make a completely new door and I'm just too busy right now to do it.  Retexturing is considerably easier than making one from scratch. Would it work to have re-textured copies of the existing 1m door?

If not, your best be would probably be to make non-animated door Objects and then add a simple move object event to raise/lower them when examined.

Offline JC Bailey

  • Keeper
  • Administrator
  • Decked in Promeus
  • *****
  • Posts: 415
Re: Door Edits Request
« Reply #2 on: February 18, 2014, 03:07:49 pm »
Oh yes, one of the stone doors could be retextured and that'd work just as well. Could something similar be done for a jail cell type door though?

Also, what program would I use to do this, and how difficult would it be for a newbie like me?
« Last Edit: February 18, 2014, 03:50:21 pm by MasterTaffer »
🎮 Indie RPG developer.

Twitter: twitter.com/JC_Bailey1112

Offline HwitVlf

  • Dark Slayer Destroyer
  • ****
  • Posts: 1667
Re: Door Edits Request
« Reply #3 on: February 19, 2014, 12:24:48 pm »
Retexturing the stone door is relatively easy.  On MDL models the textures are embedded and in TIM format. Just scan the MDL with a TIM extractor/inserter and then reinsert the new TIM texture. There was a tutorial about how to do it with Timviewer somewhere on these forums.

As far as making new doors, the door model itself is just a regular animated model. The unknown part is the collision data.  The theory is that a door's collision data is in the door's CP file and is outlined by a series of "CP Triangles" (with special vertex coloring) in the corners. You would use x2mdl and cpgen to scan a door's MDL/CP and check its CP Triangle's color values. Then recreate those in the new door model.

If you can get by with a normal large collision shape on your new small door, You could try to make a new small door and combine it with an existing door's CP file.

Offline JC Bailey

  • Keeper
  • Administrator
  • Decked in Promeus
  • *****
  • Posts: 415
Re: Door Edits Request
« Reply #4 on: February 19, 2014, 02:39:43 pm »
I found the tutorial you mentioned here: http://www.swordofmoonlight.com/bbs/index.php?topic=245.msg2747#msg2747.

I followed it perfectly, but on the last step when I try to "Insert TIM File(s)" on the door's MDL, I select timextracts.txt and a message pops up saying "TIM files have been inserted!". However, the texture on the door still remains the same as it was before. Not sure what I did wrong.
« Last Edit: February 19, 2014, 02:49:56 pm by MasterTaffer »
🎮 Indie RPG developer.

Twitter: twitter.com/JC_Bailey1112

Offline Verdite

  • VIP
  • Dark Slayer Destroyer
  • *****
  • Posts: 1624
Re: Door Edits Request
« Reply #5 on: February 20, 2014, 09:29:08 am »
MT, most of the time the texture doesnt show up in the preview, have you checked it in-game? If its definately not working, use that hidden realm door I sent you. You'l need to replace its texture with your own, so use hwtvlfs PRF editor, go to the last tab on the right, and drag and drop your texture onto the texture converter.

Now rename your texture to the one assigned to my door, it should be something like ST-hidden-wall

Let me know how you get on.

Offline HwitVlf

  • Dark Slayer Destroyer
  • ****
  • Posts: 1667
Re: Door Edits Request
« Reply #6 on: February 20, 2014, 12:43:32 pm »
Ben's talking about a re-texturing procedure that uses an external TXR texture to override the internal MDL texture. I didn't know doors supported external textures so he's smarter than me!

But if you're using timviewer to swap the internal texture, it should show up in all the previews just like the original texture did. If it is not, and timviewer says "TIM files have been inserted" then you either reinserted the original texture, or didn't overwrite the original door in SoM's folder. Rescan the door MDL with timviewer and see if the new textures show up.

Offline JC Bailey

  • Keeper
  • Administrator
  • Decked in Promeus
  • *****
  • Posts: 415
Re: Door Edits Request
« Reply #7 on: February 20, 2014, 02:34:57 pm »
I've made a recording of myself attempting to replace 346.MDL's texture with 365.MDL's texture in TIM Viewer as directed in HwitVlf's tutorial. Maybe this will help one of you pinpoint what exactly I'm doing wrong.

http://www.youtube.com/watch?v=M7rMuKF1RsE
🎮 Indie RPG developer.

Twitter: twitter.com/JC_Bailey1112

Offline HwitVlf

  • Dark Slayer Destroyer
  • ****
  • Posts: 1667
Re: Door Edits Request
« Reply #8 on: February 20, 2014, 03:22:49 pm »
The problem is that when you do "Save Multiple Files" the second time on the large door MDL, it overwrites the small door's timextracts.txt. Therefore, when you use that timextracts.txt to reinsert the TIM, it just reinserts the large door texture back into the large door model. Use "Save TIM File" for the second door instead like this:

ScanRAW > O345.mdl (small door)
    Save Multiple Files >1 (generates "1.tim" and "timextracts.txt")

ScanRAW > O365.MDL (large door)
   Save TIM File > Save as "1.tim" (overwrites "1.tim" with LargeDoor texture)

Insert TIM File(s) > timextracts.txt (inserts LargeDoor 1.tim into SmallDoor O345.mdl)

 :smash2:
« Last Edit: February 20, 2014, 03:25:07 pm by HwitVlf »

Offline JC Bailey

  • Keeper
  • Administrator
  • Decked in Promeus
  • *****
  • Posts: 415
Re: Door Edits Request
« Reply #9 on: February 20, 2014, 03:42:23 pm »
Ah, thanks! I see what I was doing wrong and it worked. Going to delete the video now that it's been solved.

What I need to do now is add the ten new retextured doors into my obj folder so I can use them all. I tried copying the 0346.mdl, .cp and .prf files and renaming them all to DoorTest just to see if it would work, (it didn't work). :drool:
🎮 Indie RPG developer.

Twitter: twitter.com/JC_Bailey1112