Abramul Posted September 19, 2006 Share Posted September 19, 2006 I'm making a mod that lets you buy a house that belonged to a certain IC criminal, 'A'. The script to assign ownership to the PC should be working now (accidentally used player.getgold<=x), which leaves me with two questions: A) Do I need to do anything to prevent NPCs from stealing items in the house, or is a cell owned by the player automatically immune to this? B) Is it necessary to make any changes to containers so they don't 'disappear' stuff that's stored in them after a given amount of time? Link to comment Share on other sites More sharing options...
WarKirby3333 Posted September 19, 2006 Share Posted September 19, 2006 A) I'm not sure. Personally, I would give the player the ability to lock the door upon leaving. Maybe GBHis can help... B) Have a look at all the containers in the house, and see if any have the respawn flag checked. To avoid messing things up, you should create new containers with the same contents that are non respawning, rather than just unticking the flag. Just clone the existing ones, change the editor ID's and untick respawn on the new copies. Then you have to replace the old ones in the cell. If there are many of the same object, then use the search and replace to do it fast. Note that this will make the containers safe to use from the start. If you want them to only be safe once the player owns the house, you'll probably need to place your new objects in the same place, initially disabled. Then, in the ownership changing script, have the old ones disabled and the new ones enabled. Yes that's a lot of work. I suggest only making some of the containers safe and either removing the rest or warning the player about them beforehand. Most houses have plenty of unnecessary containers like bags of corn, boxes of string and calipers etc. WarKirby Link to comment Share on other sites More sharing options...
lyth Posted September 19, 2006 Share Posted September 19, 2006 I'd approach this slightly differently. Instead of making everything in Agarmir's house part of the purchase, duplicate the cells and rename them 'My Imperial Condominium' or whatever you want to call it. Remove all the doors and containers and replace them with empty containers. Also remove all the items. Governments will usually auction off this stuff in such circumstances so there's no reason to leave it. Actually they'd auction off the furniture too, but maybe they decided to bundle it with the house. Regardless, now that you have a new cell, make it player owned. Use a door from another player house to create a second door to the house which leads to the new cell. Now when the house is purchased either enable the new door and disable the old door, or move the new door into position and the old door out. (As is done with the Temple Door for the end-game) The downside of this is the duplicate cell, the upside is that it's probably easier and less prone to issues. Link to comment Share on other sites More sharing options...
Abramul Posted September 19, 2006 Author Share Posted September 19, 2006 OK, I've replaced all the containers with non-respawning clones (added 1 before the name to make selecting them in Search and Replace... easier), gonna go playtest now. Hmm, that didn't quite work...got some grain-sacks replaced with barrels...think I'll just put in some additional containers, and warn the player that the others might or might not eat their stuff. Link to comment Share on other sites More sharing options...
GBHis Posted September 19, 2006 Share Posted September 19, 2006 Yeah! Why am I always seeing topics AFTER WK has posted? ;) No need for a key ;)(Or, make a quest item for the look of it)scn PimpMyDoor ref hand Begin OnActivate set hand to getactionref if (trig == 0) messagebox "What should I do?" "Lock the door!" "Unlock the door!" "Open the door! (Go through)" set trig to 1 endif end End Begin Gamemode if (trig == 1) set trig to GetButtonPressed if (trig == 0) lock elseif (trig == 1) unlock else activate unlock endif set trig to 0 endif End Whew! Try that ;) Link to comment Share on other sites More sharing options...
Abramul Posted September 19, 2006 Author Share Posted September 19, 2006 Nah, I think I'll just make Agarmir's key a quest item, and have the door automatically reset to 'needs a key'. Link to comment Share on other sites More sharing options...
GBHis Posted September 19, 2006 Share Posted September 19, 2006 Damn it! Why do modern people have such a hate for overkill? :) Link to comment Share on other sites More sharing options...
Abramul Posted September 19, 2006 Author Share Posted September 19, 2006 Damn it! Why do modern people have such a hate for overkill? :)Ehh, in Unreal Tournament, my motto is "If at first you don't succeed, use overwhelming force!". But the more complex something is, the better the odds of it breaking are. Link to comment Share on other sites More sharing options...
GBHis Posted September 20, 2006 Share Posted September 20, 2006 Aye, you're right :) But you should stick to "setownership" -- no duplicated cells. Link to comment Share on other sites More sharing options...
Povuholo Posted September 20, 2006 Share Posted September 20, 2006 Ehh, in Unreal Tournament, my motto is "If at first you don't succeed, use overwhelming force!". But the more complex something is, the better the odds of it breaking are. Exactly. In my quest mod the npc Alex has to travel from bravil to some place, and get some stuff equipped. Instead of scripting and making A.I. packages, I just created a new Alex right on the spot I wanted him to travel to, with the armors on, and when the quest reached a certain stage the original Alex would be disabled and the new one would be enabled. Worked fine. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.