Jump to content

Pre-Owned House


Abramul

Recommended Posts

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

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

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

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

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

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

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...