Made first try at player housing

Moderator: Event DM

Post Reply
tizmo
Head of Development
Head of Development
Posts: 3315
Joined: Thu May 19, 2005 2:53 pm
Timezone: GMT-4
Location: GMT-4

Made first try at player housing

Post by tizmo » Mon Nov 09, 2015 3:45 am

I spent this weekend getting the NWN Toolset going and learning how to use it to make player housing. I created an area that I think is close to meeting the requirements of player housing. I'd really appreciate it if anyone has a little spare time and would be willing to look at what I made and give me some feedback: especially pointing out any things that I've done improperly or at least non-standard.

The only thing that I still have to figure out is how to make the Char lay down on the cot. I found the script for sitting, so have that active right now and the Char will sit on the cot. I don't see anything in the radial menu to lay down and I don't see a script that hints at causing the lay down action onclick.

If you are savvy on player housing and the toolset and have time, please let me know. It's only a 2x6 tile, single level area, so hopefully won't require much time.

I've posted both the .erf and .mod to my dropbox:

https://www.dropbox.com/s/3gi0scpx0fdof ... s.erf?dl=0
https://www.dropbox.com/s/sk1vemfyd7xr3 ... e.mod?dl=0


Thanks!

Tizmo
User avatar
silverfields2
Master Sage
Posts: 6992
Joined: Tue Jun 28, 2005 2:16 am
Timezone: GMT -5
Location: Ohio

Re: Made first try at player housing

Post by silverfields2 » Mon Nov 09, 2015 1:25 pm

I think the only way I've seen anyone make any bed that can be laid down on is if it is made part of the floor and the player selects laydown.
“Moderation in all things healthful; total abstinence from all things harmful.”
― Xenophon (1564–1642)
Commander Morgan
Scholar of Fools
Posts: 495
Joined: Wed Jan 11, 2006 1:17 pm
Timezone: 0
Location: The Grand Halls of the Fiddlesticks

Re: Made first try at player housing

Post by Commander Morgan » Mon Nov 09, 2015 1:40 pm

Im pretty sure there is a bioware script that allows a pc to "sleep" including the "zzzz" on click- im away from my pc at the moment to check. In fact, there are dozens of usefulnoriginal bioware scripts that can be played with if you have the time to look.
User avatar
Gorgon
Father of Avlis EE
Posts: 6636
Joined: Fri Oct 17, 2003 10:14 pm
Timezone: PST -8
Location: Vancouver, BC, Canada

Re: Made first try at player housing

Post by Gorgon » Mon Nov 09, 2015 6:26 pm

If it was a bedroll or something on the ground, yes. Housing has a liedown script in the file you can download, but you need to add a waypoint for where the center of the liedown should be, and sometimes another invisible chair to change the facing, since it goes by the facing of the object you "use". Don't use invisible objects. They don't have walkmeshes, and suck for "usable" objects. There isn't an animation in the standard character models that allows you to lie down above the ground level. There are some ways to hack that, but not for housing that I remember atm. If someone can think of one, I'd love to hear it (I forget way too much about this game lately).

You can use the sitdown script to sit on it*, and you can add an invisible chair placeable to face a different direction. You can also use tags for chairs that allow you to sit with the emote menu or "/emote sit chair", which don't even need a script or usable point to click (The tag must be the exact word "sit", or contain one of the following words: "chair", "seat", "stool", "couch", "bench" or "throne", all case insensitive). You can't test that before it gets into Avlis unfortunately, since you don't have the scripts for it, so best stick with usable scripted ones. Keep an eye out for all the current placeable chairs and benches that already use those tags though, since they will already work (as long as they aren't static).

*The zep_use_chair script you currently have on them doesn't check for anyone already sitting in the "chair". All of the CEP script are horrible IMO. Always use the Avlis housing ones when possible. *edit* Remember to "build" your test mod at least once after adding the housing scripts, or they won't be compiled - meaning won't work.

I only took a really quick look at it, so I'll get back to you on that when I get back home and have more time. Just long enough to do my first test of anything for housing I make, which is hellballing/ice storming the crap outta it, to see what should be made static or plot, but isn't.
:feuer:

*You can change the lighting from "interior bright" if you want to get fancy, and even go nuts with tile and area lighting. The standard "bright light everywhere" is fine if you don't want to change it, but extra tweaks like that can make a big difference (if you have the patience to fiddle with them).
"God not only plays dice, he throws them in the corner where you can't see them."
-- Stephen William Hawking (1942-2018) --


Sprucing up ye olde NWN | NWN:EE Wiki | ~Avlis Theme Song~
User avatar
silverfields2
Master Sage
Posts: 6992
Joined: Tue Jun 28, 2005 2:16 am
Timezone: GMT -5
Location: Ohio

Re: Made first try at player housing

Post by silverfields2 » Tue Nov 10, 2015 2:17 am

I had a quick look. Looks nice and simple. My only advise is to make sure your comfortable logs are not 'lockable'.
“Moderation in all things healthful; total abstinence from all things harmful.”
― Xenophon (1564–1642)
tizmo
Head of Development
Head of Development
Posts: 3315
Joined: Thu May 19, 2005 2:53 pm
Timezone: GMT-4
Location: GMT-4

Re: Made first try at player housing

Post by tizmo » Wed Nov 11, 2015 1:40 am

Thank you all for the feedback!

I've uploaded updated versions of the .erf and .mod based on changes I made.

- I found the tile lighting and adjusted the mood lighting throughout the area
- I removed the ability to lock the logs
- I changed all of the chairs to the Avlis sit script.
- I added the autoclose and autocloselock to the doors

I've decided to ignore the laying down on the cots issue.

Should be the same links, but if not here they are again:
https://www.dropbox.com/s/sk1vemfyd7xr3 ... e.mod?dl=0
https://www.dropbox.com/s/3gi0scpx0fdof ... s.erf?dl=0

Cheers,
Tizmo
User avatar
silverfields2
Master Sage
Posts: 6992
Joined: Tue Jun 28, 2005 2:16 am
Timezone: GMT -5
Location: Ohio

Re: Made first try at player housing

Post by silverfields2 » Wed Nov 11, 2015 4:00 am

Couldn't load it that time.
“Moderation in all things healthful; total abstinence from all things harmful.”
― Xenophon (1564–1642)
User avatar
Gorgon
Father of Avlis EE
Posts: 6636
Joined: Fri Oct 17, 2003 10:14 pm
Timezone: PST -8
Location: Vancouver, BC, Canada

Re: Made first try at player housing

Post by Gorgon » Wed Nov 11, 2015 8:18 pm

Which couldn't you load? The erf or the mod? Both work here.

The "Storage Chest" has treasure drop scripts OnDeath and OnOpen, and the non-plot door has an OnDeath script. Always check any non-static (even if they aren't usable) placeables and doors for scripts they might have. Player Housing will double check them, but you are supposed to do it yourself. They all should be removed in most cases. Static items don't load scripts, but Player Housing rules say to remove treasure scripts from any containers (which is "anything that is usable by default" e.g. the "Book Piles"), and always remove heartbeat scripts from anything non-static (I remove even static ones). They fire every 6 seconds, which is really bad in a PW this big. The Player Housing rules also say to remove any OnDeath scripts for doors (even plot ones).

Some placeables have standard NWN scripts that aren't bad (as far as I know; Player Housing decides) e.g. the candelabra using nw_02_onoff, so it glows when you activate it. I would always ask them before submitting something with a non-housing script (or use housing scripts to replace them, if they will do the same thing).

There are a bunch of things to check for before submitting, and it is hard to remember them all. I have a moneo script to check for most stuff in mine, but I still go through the Housing Rules, one line at a time, to check everything again before submitting. :wink:

*edits* It is also a good idea to check any placeables that have inventory for items inside them. Some of the palette blueprints have things like weapons and other stuff inside of them, which will spawn every time the module loads (e.g. several of the custom battlefield containers).
"God not only plays dice, he throws them in the corner where you can't see them."
-- Stephen William Hawking (1942-2018) --


Sprucing up ye olde NWN | NWN:EE Wiki | ~Avlis Theme Song~
User avatar
silverfields2
Master Sage
Posts: 6992
Joined: Tue Jun 28, 2005 2:16 am
Timezone: GMT -5
Location: Ohio

Re: Made first try at player housing

Post by silverfields2 » Thu Nov 12, 2015 1:50 am

I most likely goofed in putting files in the right place.
“Moderation in all things healthful; total abstinence from all things harmful.”
― Xenophon (1564–1642)
tizmo
Head of Development
Head of Development
Posts: 3315
Joined: Thu May 19, 2005 2:53 pm
Timezone: GMT-4
Location: GMT-4

Re: Made first try at player housing

Post by tizmo » Fri Nov 13, 2015 3:28 am

I have a question that may be obvious to the experienced tool builder. How do I know which .hak or .erf a script came from? Is there an easy way in the UI? Or do I have to do something else?

Thanks for the pointers about the OnDeath and other scripts. I missed those.

Cheers,
Tizmo
User avatar
Gorgon
Father of Avlis EE
Posts: 6636
Joined: Fri Oct 17, 2003 10:14 pm
Timezone: PST -8
Location: Vancouver, BC, Canada

Re: Made first try at player housing

Post by Gorgon » Fri Nov 13, 2015 6:23 am

You can check all hak resources, including ones in multiple haks, by using the "Hak Pak Conflict Analysis" tool. Open your module in the toolset, select Edit > Module Properties. Click the "Custom Content" tab, and then "Check For Conflicts". Say yes when it asks if you really want to check so many files, and let it chug away. You'll get 3 lists. The Complete Resource List shows everything in all haks, and their locations (more than one if there are duplicates, but we got rid of most conflicts last time the haks were updated). If you sort that by type, you can find all .nss (script source) files in the haks.

To make your life easier, I've copied all the info from that procedure to an Excel file with sortable tables here. I would have also included an .xls version for older Excel, but it can't handle all the rows in the complete list, so there is no point. The free MS Excel viewer (Google it) should still be able to read this one if you don't have a spreadsheet program (Google Sheets might too, but it can be very slow).
* The _ext haks were removed when I made that because they are empty for players, but mine have stuff in them.
** Those lists don't include the module scripts btw (like the housing ones you added), since the checker only checks haks.

If the script you are looking for isn't there, then it is a standard Bioware script. You can view all resources a few ways, though the toolset doesn't say which are from where, besides the method above. One way is to open the script editor, then click "Open an existing file", and then select "All Resources" (same idea with conversation editing and other stuff). That will list every .nss from Bioware and the haks. You can also have it only show ones in haks (it doesn't say which), or the default is just in the module itself (probably just the housing ones).

There are a few others in the toolset that aren't as direct, and also some external tools for searching NWN files. One is called BioSearcher, which can search all the core scripts, and even specific haks. It is part of a collection of tools on the Vault here, but you can download the biosearcher169win32.7z on its own from the list (or the Linux version). It has some issues with missing things in earlier expansions if they aren't also in the latest, but I don't run into that often (I don't have the proper compiler to fix it, but the error in the source is easy to spot).

One of my favorite tools for navigating around in haks and the .bif files (they are standard content) is NWN Explorer (the 163 version at the bottom is better than the dev link with 160 there - old repost from the dead vault). It has very limited searching, and does it from the top down, which is annoying when the bottom .bifs are used first, but it is still a great help.

Whatever you use, good luck and have fun. :good:
"God not only plays dice, he throws them in the corner where you can't see them."
-- Stephen William Hawking (1942-2018) --


Sprucing up ye olde NWN | NWN:EE Wiki | ~Avlis Theme Song~
User avatar
Gorgon
Father of Avlis EE
Posts: 6636
Joined: Fri Oct 17, 2003 10:14 pm
Timezone: PST -8
Location: Vancouver, BC, Canada

Re: Made first try at player housing

Post by Gorgon » Fri Nov 13, 2015 8:27 am

I had to update the excel sheet in the previous post to fix a few files in the complete list. Same link as before. The tool I used to copy the lists from the toolset windows must not like having to export and tab delimit over 77,000 lines at one time. :oops:
"God not only plays dice, he throws them in the corner where you can't see them."
-- Stephen William Hawking (1942-2018) --


Sprucing up ye olde NWN | NWN:EE Wiki | ~Avlis Theme Song~
User avatar
GunnJ
Sage
Posts: 2885
Joined: Tue Jun 05, 2007 6:05 am

Re: Made first try at player housing

Post by GunnJ » Fri Nov 13, 2015 10:52 am

When filling out your housing submission spreadsheet and letter make note of placeables that you are going to add extra scripts to, so QA knows to test it to make sure it works when combined with the rest of the mod.

For example, if you want to be able to light the candles - some of which also becomes a light source, which is nice - then make note of that. You can do the same with fires in the fireplace. Or if you would rather use the fire as a garbage can and burn your refuse, PH will add that script for you. You just need to let them know.

In my PH I turned out all the local lighting effects so that only the candles placed round the room provide light. It has led to some fun RP as my PC usually has TS cast 94% of the time and often forgets that others don't, so every once in a while she will be happily walking round her house as whichever guest RP's trying not to crack their shins on a chair or walk into a pillar or whatnot until she gets the candles lit. Even in Off position the fire still has a slight glow, so there is some light, but barely.
“People speak of hope as if it is this delicate, ephemeral thing made of whispers and spider's webs. It's not. Hope has dirt on her face, blood on her knuckles, the grit of cobblestones in her hair, and just spat out a tooth as she rises for another go.”
Post Reply