Dusty Posted April 26, 2014 Share Posted April 26, 2014 So, I want to add an NPC to a map, that is holding a key, that unlocks a door. And I need to do it using only entity modding. The door normally is unlocked, so I would need to edit the door entity to require the key the player picks up from a nearby stormie NPC. Can anyone help me get the ball rolling? I have GTK 1.4 installed, the map decompiled, and I found the spot/coordinates roughly where I want the new NPC. Can't find a tutorial on using keys on google. Also, I'm a complete n00b at anything mapping related, however I understand the bare basics of ent-modding. Thanks for any help! Link to comment
MoonDog Posted April 26, 2014 Share Posted April 26, 2014 Making an admin key is exactly the same thing, so you could simply follow that tutorial. You just need a door run by a trigger, that will only activate if a parameter is set to a certain integer(or string) on the player. In Icarus, that is the simplest way to get the job done. Getting the NPC to drop something that sets the parameter will take a little doing. Icarus is very weak in this regard. I'll have to think about this, look through my library of scripts and see if I did it in the past. Link to comment
Asgarath83 Posted April 26, 2014 Share Posted April 26, 2014 On jedi outcast, after yu rescue Jan on doomgiver starship, there is a part of level with Jan that hold the button for open the doors... Edit. No no, ROTFL, sorry, yu need simply to place the misc_security_panel near the door with message "keyname" the same messag commanda and same "keyname" parameter are on your enemy NPC that drop the security key. The door be unlocked by activation of Misc_security panel with the key Link to comment
MoonDog Posted April 26, 2014 Share Posted April 26, 2014 On jedi outcast, after yu rescue Jan on doomgiver starship, there is a part of level with Jan that hold the button for open the doors... Edit. No no, ROTFL, sorry, yu need simply to place the misc_security_panel near the door with message "keyname" the same messag commanda and same "keyname" parameter are on your enemy NPC that drop the security key. The door be unlocked by activation of Misc_security panel with the key Multiplayer. Link to comment
Dusty Posted April 26, 2014 Author Share Posted April 26, 2014 ^Are you implying it only works in MP, or that that's not how it's normally done in SP levels? I mean, I could just try and cheat off Raven and see how they did it I guess... Link to comment
MoonDog Posted April 26, 2014 Share Posted April 26, 2014 ^Are you implying it only works in MP, or that that's not how it's normally done in SP levels? I mean, I could just try and cheat off Raven and see how they did it I guess... I don't think it works properly in MP. You can try however. Link to comment
Dusty Posted April 26, 2014 Author Share Posted April 26, 2014 Actually Asgarath, looking at the decompiled maps, that does seem to be how Raven did it. Few quick questions though:1. When I select an entity in Radiant 1.4, how do I pull up it's stats? I can manually go through the Entity Info list and select the entity from there to see its info, but that's extreeeeemely round about. 2. How do I connect the misc_security_panel with the door telling it to unlock? I understand how to connect the NPC with a key to the panel, but I'm unsure of how to make that work. Link to comment
MoonDog Posted April 27, 2014 Share Posted April 27, 2014 Actually Asgarath, looking at the decompiled maps, that does seem to be how Raven did it. Yes. In single player. It's been a long time, but I do not think you are going to get the results you are looking for in MP. 1. When I select an entity in Radiant 1.4, how do I pull up it's stats? I can manually go through the Entity Info list and select the entity from there to see its info, but that's extreeeeemely round about. Select the entity and press N. Link to comment
Dusty Posted April 27, 2014 Author Share Posted April 27, 2014 ^Thanks Moondog! (Still waiting on question 2, but maybe Asgarath can answer that) I guess I didn't make it clear though, this IS for SP, not MP. Sorry for the confusion lol! Link to comment
MoonDog Posted April 27, 2014 Share Posted April 27, 2014 Give the func_door spawnflags 16. Which is locked. Give it a targetname. Make a misc_security_panel and target it at the door. Give it a "message" key with whatever value you want. Such as, door_01_key. Create the NPC entity you wish the player to kill in order to acquire the key. Also give it the message key, of the same value. Link to comment
Asgarath83 Posted April 27, 2014 Share Posted April 27, 2014 Actually Asgarath, looking at the decompiled maps, that does seem to be how Raven did it. Few quick questions though:1. When I select an entity in Radiant 1.4, how do I pull up it's stats? I can manually go through the Entity Info list and select the entity from there to see its info, but that's extreeeeemely round about. 2. How do I connect the misc_security_panel with the door telling it to unlock? I understand how to connect the NPC with a key to the panel, but I'm unsure of how to make that work.1: L key it's the entity list if i remember correct. N key it's the parms of the selected entity. if you have not entity select but it's select a brush, it's worldspawn parameters.2: Select Misc_security_panel, after select the door brushes and use CTRL + K. yu need to make for every door brush. Yu can see a blue line that connect panel to the brushes. Otherwise:select misc_security_panelKey "target" value "doorname"Select the brushes of the door.Key "targetname"value "doorname" Link to comment
Dusty Posted April 27, 2014 Author Share Posted April 27, 2014 ^So, is the "otherwise" for if I'm doing this in text? Or do I need to add another step to "connect" the entities? Remember, I can't actually use GTK Radiant except for reference, I'm actually just doing text ent-modding. And before it comes up, I'm not decompiling some modder's work and ent-modding it, I'm really just editing Raven's SP levels, if anyone is worried about that If I could just do this in GTK radiant I would, but you know, decompiling a .bsp fudges everything up so I don't want to do that, just some sneaky ent-modding is all. Link to comment
MoonDog Posted April 27, 2014 Share Posted April 27, 2014 1: L key it's the entity list if i remember correct. N key it's the parms of the selected entity. if you have not entity select but it's select a brush, it's worldspawn parameters.2: Select Misc_security_panel, after select the door brushes and use CTRL + K. yu need to make for every door brush. Yu can see a blue line that connect panel to the brushes. Otherwise:select misc_security_panelKey "target" value "doorname"Select the brushes of the door.Key "targetname"value "doorname" L is the mapinfo list. N is the entity list. Also, you do not need to individually select the brushes of a func_door and set their values... that takes forever. If your entity has multiple brushes, you can select them all at the same time much the same way you'd select a func_group. Also, you need the message key on the security panel, and the NPC. Like I said above... As well as the proper spawnflags on the door indicating that the entity is "locked". You need to give proper and complete directions when offering help. It's not cool to give incomplete information... Link to comment
MoonDog Posted April 27, 2014 Share Posted April 27, 2014 ^So, is the "otherwise" for if I'm doing this in text? Or do I need to add another step to "connect" the entities? Remember, I can't actually use GTK Radiant except for reference, I'm actually just doing text ent-modding. And before it comes up, I'm not decompiling some modder's work and ent-modding it, I'm really just editing Raven's SP levels, if anyone is worried about that If I could just do this in GTK radiant I would, but you know, decompiling a .bsp fudges everything up so I don't want to do that, just some sneaky ent-modding is all. Let's say this is your door. {"classname" "func_door""origin" "0 0 0""angle" "-1""targetname" "the_door_01" "spawnflags" "16" // This NEEDS TO BE SET. Indicates the door is "Locked"} That's how that'd be setup. This would be your security panel: {"classname" "misc_security_panel""origin" "0 0 0""angles" "0 0 0""target" "the_door_01""message" "the_door_01_key" // The key that will open the door} Then you need the NPC that drops the "key" {"classname" "NPC_imperial""origin" "0 0 0""angles" "0 0 0""message" "the_door_01_key" // This needs to correspond with the misc_security_panel you want the player to be able to unlock after killing the NPC and getting the key} Link to comment
Dusty Posted April 27, 2014 Author Share Posted April 27, 2014 ^And the messages for the security panel saying "You need the security key" and walking over the stormie's body who has the key should say "You picked up a security key" etc. should already be built in correct? No modding by me? Or that's a whole other deal with ICARUS or something? Link to comment
MoonDog Posted April 27, 2014 Share Posted April 27, 2014 ^And the messages for the security panel saying "You need the security key" and walking over the stormie's body who has the key should say "You picked up a security key" etc. should already be built in correct? No modding by me? Or that's a whole other deal with ICARUS or something? Should work like that, no Icarus required. Link to comment
Asgarath83 Posted April 27, 2014 Share Posted April 27, 2014 mmm, it's not necessary Icarus script for keys and doors. i am sorry for incomplete info. Today i have a lot of headache. yes, need also to check the spawnflawg door as locked. for func_group... Mmm, thanks, @@MoonDog. i confess i never used that function. Sometime i ask to myself "what is func group?" now it's clear. it's for group more entity with the same functions. Edit: it's a very large time i not mapping, becuase i am making efx at the moment. But i now i remeber.for make a door, i created square brushes, cutted in two part in half way with clipper tool, and textured.After all i remember that i convert in func door selecting all the brush that make the door. not one by one. so i never used the func_Group function also for that.O.o Thanks for the lesson. Link to comment
MoonDog Posted April 27, 2014 Share Posted April 27, 2014 mmm, it's not necessary Icarus script for keys and doors. i am sorry for incomplete info. Today i have a lot of headache. yes, need also to check the spawnflawg door as locked. for func_group... Mmm, thanks, @@MoonDog. i confess i never used that function. Sometime i ask to myself "what is func group?" now it's clear. it's for group more entity with the same functions. Edit: it's a very large time i not mapping, becuase i am making efx at the moment. But i now i remeber.for make a door, i created square brushes, cutted in two part in half way with clipper tool, and textured.After all i remember that i convert in func door selecting all the brush that make the door. not one by one. so i never used the func_Group function also for that.O.o Thanks for the lesson. Yeah, if you have a group of brushes you turn into a func_door, selecting them individually isn't necessary. You are working harder than you have to, lol. Asgarath83 likes this Link to comment
eezstreet Posted April 27, 2014 Share Posted April 27, 2014 Make them a CLASS_IMPERIAL, and give them the same 'rank' value as imperials. If you assign them the same 'rank' as a commander, they'll have burst-fire too. I would recommend making a custom skin (or perhaps stitching the model) to have a keycard. Even though they have no visible keycard, they will still give you one if you walk over that area on their corpse, and their body won't disappear. Use a misc_ something for the lock (misc_security_panel, maybe? Check Radiant. There's a few on t2_rancor, which is included as a sample) All of these edits can be done with entity modding, no ICARUS needed. Asgarath83 likes this Link to comment
MoonDog Posted April 27, 2014 Share Posted April 27, 2014 Make them a CLASS_IMPERIAL, and give them the same 'rank' value as imperials. If you assign them the same 'rank' as a commander, they'll have burst-fire too. Class and rank is completely irrelevant. Any NPC should work with a misc_security_panel. A more difficult NPC is advisable though. Adds a bit of extra challenge. Not much though. It's pretty weird how they implemented this mechanic. It's not exactly... flushed out in my opinion. Use a misc_ something for the lock (misc_security_panel, maybe? Check Radiant. There's a few on t2_rancor, which is included as a sample) All of these edits can be done with entity modding, no ICARUS needed. Give the func_door spawnflags 16. Which is locked. Give it a targetname. Make a misc_security_panel and target it at the door. Give it a "message" key with whatever value you want. Such as, door_01_key. Create the NPC entity you wish the player to kill in order to acquire the key. Also give it the message key, of the same value. Let's say this is your door. {"classname" "func_door""origin" "0 0 0""angle" "-1""targetname" "the_door_01" "spawnflags" "16" // This NEEDS TO BE SET. Indicates the door is "Locked"} That's how that'd be setup. This would be your security panel: {"classname" "misc_security_panel""origin" "0 0 0""angles" "0 0 0""target" "the_door_01""message" "the_door_01_key" // The key that will open the door} Then you need the NPC that drops the "key" {"classname" "NPC_imperial""origin" "0 0 0""angles" "0 0 0""message" "the_door_01_key" // This needs to correspond with the misc_security_panel you want the player to be able to unlock after killing the NPC and getting the key} Should work like that, no Icarus required. Link to comment
eezstreet Posted April 27, 2014 Share Posted April 27, 2014 Yes, but note that he needs a stormtrooper, not an imperial, to drop the key. I'm saying he'll need to make a new NPC for that. Link to comment
MoonDog Posted April 27, 2014 Share Posted April 27, 2014 The AI he uses is completely up to him. Note I put 0 0 0 as origins in my examples, but obviously he's going to replace those values with "what he needs". Link to comment
eezstreet Posted April 27, 2014 Share Posted April 27, 2014 Only CLASS_IMPERIALs and human_mercs (by name) can drop keys. Link to comment
MoonDog Posted April 27, 2014 Share Posted April 27, 2014 Only CLASS_IMPERIALs and human_mercs (by name) can drop keys. I'll take your word for it. I have neither of these games installed, nor do I have the source code on this machine. Link to comment
Dusty Posted April 28, 2014 Author Share Posted April 28, 2014 ^Good to know Eezstreet. And thanks for the help Moondog and Asgarath! Very generous and well-explained of you guys Another quick question though, just because I'm too lazy to check. In entities, you can modify their NPC stats no? Like I can set a stormtrooper to have class_imperial inside a map on the fly right? Just the .npc file determines the default stats to use for that NPC assuming you don't force any new values for that particular NPC in the map? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now