Jump to content

Home

Adding in a new door


Pavlos

Recommended Posts

Is there anyway to add in a new door into a module? I'm making some modifications to 204TEL as a bit of practice, I wonder if it'll amount to anything one day. Does anyone know how you can or even if you can add in a new door?

 

Do you mean a door of a totally new design, or just one that already exists in the game?

 

You're in luck if it is the second choice. Since you're working with a Kotor Tool-supported module, why not use the Module editor and just drag one off of the standard palette from the K2 Doors subtree? Click, drag, drop... new door!

 

If you like doing things the hard way, you can use a low-level editor like KGff to create one. Here's the fields you'll need:

 

Struct- Type:8  Field count: 12
       Label: TemplateResRef           Field- Type: CResRef       Value: door_droid02a
       Label: Tag                      Field- Type: CExoString    Value: empty
       Label: LinkedToModule           Field- Type: CResRef       Value: empty
       Label: LinkedTo                 Field- Type: CExoString    Value: empty
       Label: LinkedToFlags            Field- Type: byte          Value: 0
       Label: TransitionDestin
          CExoLocString- Substring count: 1
             Substring: 0  ID: 0 Value: none
          End of CExoLocString-          Field- Type: CExoLocString Value: 
       Label: X                        Field- Type: float         Value: -61.14679
       Label: Y                        Field- Type: float         Value: 7.889908
       Label: Z                        Field- Type: float         Value: 0
       Label: Bearing                  Field- Type: float         Value: 0
       Label: UseTweakColor            Field- Type: byte          Value: 0
       Label: TweakColor               Field- Type: dword         Value: 16777215
End of struct

Link to comment
Share on other sites

It is the latter, thanks for telling me this as it will mean I can start adding in new possibilities, KotOR Tool is great btw. Also is there anyway to have the door automatically close, not lock, everytime you walk through it?

 

P.S. Fred, you seem to be getting me out of all situations caused by my stupidity. Now if we were to talk about the inside of computers or a good novel, perhaps some Virgil, now then I wouldn't appear so stupid.

 

Edit: I hate to sound incredibly ignorant (Really I do, it goes against my personality- I'm having spasms of pain as I don't understand this ;) ) but how do I use the module editor, and first of all how to I create a module project?

Link to comment
Share on other sites

It is the latter, thanks for telling me this as it will mean I can start adding in new possibilities, KotOR Tool is great btw. Also is there anyway to have the door automatically close, not lock, everytime you walk through it?

 

You could place a trigger just outside of a door (past where you'd stand to open it) and have it run a script to close the door. Sort of the opposite of those sensor mats they used to have for automatic doors before microwave presence detectors came into widespread use. If I were coding the script, I'd take into consideration:

 

1) which way is the PC facing, so you don't close the door in the players face when they walk up to it.

2) decide whether or not NPCs can trigger the door close, so if you have an NPC on a walk route that passes through/near the door, they don't close right after the PC opens it (Doh!)

 

Maybe you want to write a script that opens the door if you're facing it or closes it if not, then put that script in the OnEnter field of 2 triggers, one on each side of the door. Poof! Star Trek doors!

 

 

P.S. Fred, you seem to be getting me out of all situations caused by my stupidity. Now if we were to talk about the inside of computers or a good novel, perhaps some Virgil, now then I wouldn't appear so stupid.

 

Not stupidity, you're just new to the subject matter. I've been working on Kotor Tool for 22 months now, and I know less about modding than a lot of people, because I spend almost all of my time coding and very little modding, except to test things for the Module editor. As for the inside of computers, I have had my hands inside of everything from a DEC PDP-8 to a modern PC, since I started when 8" floppies and 8 KB memory boards were the hottest things since stringing your own core memory; I started in computer repair about 26 years ago :)

Link to comment
Share on other sites

Edit: I hate to sound incredibly ignorant (Really I do, it goes against my personality- I'm having spasms of pain as I don't understand this ;) ) but how do I use the module editor, and first of all how to I create a module project?

 

See this thread, where I explain how to extract a module for editing:

 

http://www.lucasforums.com/showthread.php?p=1908448#post1908448

 

The second posting has the details. Just ask if you need more info; I really need to update the documentation, but I have been so busy fixing things I don't like in the Module editor, I haven't had time! :)

 

BTW, wouldn't it be cool if you set NPCs to walk through the auto-door described above and it opened and closed for them? More interesting than people just wandering about as aimlessly as they do on 204TEL.

Link to comment
Share on other sites

I remember 8" floppies, my Dad's office computer had them. Ahhh nostalgia, how fast computer technology has moved *Hugs Computer with newly installed Geforce 7800GTX Extreme Edition* Ahhh GDDR3 memory- how did I ever live without you?

Link to comment
Share on other sites

See this thread, where I explain how to extract a module for editing:

 

http://www.lucasforums.com/showthread.php?p=1908448#post1908448

 

The second posting has the details. Just ask if you need more info; I really need to update the documentation, but I have been so busy fixing things I don't like in the Module editor, I haven't had time! :)

 

BTW, wouldn't it be cool if you set NPCs to walk through the auto-door described above and it opened and closed for them? More interesting than people just wandering about as aimlessly as they do on 204TEL.

 

Thanks for the help, and your idea is a nice one. I may look at how to do it at some point but what with HUGELY IMPORTANT EXAMS looming I doubt I'll get a chance to do anything terribly time consuming.

Link to comment
Share on other sites

Maybe I'll have to do it then :)

 

Ok, so here's a quick script that should unlock and open a door in your module whose tag is MyDoorsTag:

 

void main() {
SetLocked(GetObjectByTag("MyDoorsTag", 0), 0);
DelayCommand(0.5, AssignCommand(GetObjectByTag("MyDoorsTag", 0), ActionOpenDoor(GetObjectByTag("MyDoorsTag", 0))));
}

 

You can also replace ActionOpenDoor with ActionCloseDoor.

Link to comment
Share on other sites

Here's a link to a sample module that shows how the auto open/close door could work. It doesn't check the state of the door before issuing commands, so there is some double-close triggering, but you get the idea.

 

http://kotortool.home.comcast.net/204autodoor.zip

 

One key discovery is that the tag referred to in the script (for the door) that actually makes this work is the one in the .GIT file, not the one in the .UTD for the door itself as you might think. There are a number of instances where this behavior is seen; waypoints for example.

Link to comment
Share on other sites

Strangely, when I add in my new door and compile the module and plonk it into the Override folder, the module wont load, it just gives me a rather nice black screen with the cursor. I'm now annoyed. What I do is I drag TelosDoor14 out into the space separating the reception area with the Onderon Diplomat and the area with all the beds in it. I add I add into it properties to give it a name that will show up in the game then compile it with the name of the module. I've tried not editing the properties of the door and it makes no difference. Ahh I think I'll use the low-level editor. ANy help would be appreciated

 

Edit: Stupid me, I put it in the Modules folder and now it works fine. Does anyone know how to create a custom item such as a key.

Link to comment
Share on other sites

Fred, i tried out your little module thingy and the door is really cool, though what I was originally aiming for would have been you open it normally and then it closes automatically behind you. Though your idea is really cool, I may edit it slightly and use it, if you don't mind of course.

Link to comment
Share on other sites

Fred, i tried out your little module thingy and the door is really cool, though what I was originally aiming for would have been you open it normally and then it closes automatically behind you. Though your idea is really cool, I may edit it slightly and use it, if you don't mind of course.

 

To alter the module I made to work like you described, just remove the opendoor script from the two triggers' OnEnter field.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...