Heed's ActionSit is a package that includes custom content, scripting as well as a toolset plugin. The aim is to provide sitting functionality similar to that of NWN1 in NWN2. It comes with a custom placeable blueprint seat that actually does all of the work. The custom placeable is a simple model used to represent a place to sit. This placeable coupled with some sort of object can then be used to create sitting spots. The package comes with prefabs for all standard seat objects (chairs, stools, benches), so creating spots to sit is very simple -- place down a prefab. Only the custom seat object itself is interacted with, so the actual models for chairs, stools, bnenches, etc. are set to be environmental objects. If not using a prefab, then you can place your seats where desired and set the accompanying object as an environmental object.
The seat placeable bakes into the walkmesh by cutting a square around itself which cannot be pathed through, but it leaves a walkable area in the centre. What this means is that the seat is solid in-game and cannot be walked through, but if an object is jumped to its location it can be placed squarely in the centre. Sometimes you may want to use a walkmesh cutter instead of having many seats each individually bake down. This is perfectly fine if done properly so as to leave walkable areas at the seat's location but not allow pathing through them (open the demo module in the toolset to see examples).
To sit down a player simply needs to click on a seat object. The player with pathfind (walk) to the seat, decide to either stand in front or behind the seat, assume the correct orientation, play a sitting in a chair animation and jump to the seats location. A small GUI icon appears on the players screen which is used (clicked on) to cancel the sitting operation and return to a standing position. Also, a player can change seats while sitting: if already seated and another seat within range is clicked on the player will cancel the current sit action, stand up, path to the new seat and sit.
All races will sit at the same height. This means only one standard is needed for a seat's height and its corresponding object's scale. The seat placeable's visible geometry sits just above this height, so you can easily measure if your environmental object is scaled properly by placing a seat object near or on it. In other words, a halfling and a half orc can both sit in the same sized seat.
If a player crashed or logs out while sitting in a seat that seat will not become invalid or "unsittable".
Heed's ActionSit Seat Tool:
This toolset plugin is provided with the package in order to ease and simplify the workflow when working with seats. The system works by baking the seat objects, but then removing the static property on the seats so they can be used (clicked on in-game). This means when you bake your area you want all seats set to static first, but after baking your area you need to set all seats to non-static. The plugin handles this workflow for you. By selecting the Run checkbox and then clicking on the Bake button all seats in the open area are set to static and the area is baked. You then need to click the Save button to set all seats in the area to non-static and save the module. The area and module are now ready for use. Sometimes you will want to use a walkmesh cutter instead of the seat's walkmesh and in these cases you select the seats and click the Bake/NoBake button. You don't need to only select the seats themselves -- you can just draw a selection box as the plugin will sort, find and only operate on seats. Clicking the button will change the seat's tag so it is ignored by the Bake and Save operations and also set it's properties to be non-static. If you find you want to use the seat's walkmesh again, then just select the seats again and hit the Bake/NoBake button again.
If you make changes to an area conataining seats that requires a rebake, remember to use the plugin to bake that area following the correct workflow. If baking manually (no Run checkbox selected) , then you still need to use the plugin to set the seats, but you must then bake the area as you would normally from the File menu. You also must remember to use the Save button after baking manually in order to set seats to be useable in-game -- don't forget to save your mod or area after doing so.
Basic Workflow:
1) Place prefabs seats along with any tables, etc.
2) Launch the plugin.
3) Select the Run checkbox and hit the Bake button.
4) Check all tiles baked properly. If not, reposition or switch some seats to be NoBake and use a walkmesh cutter.
5) Repeat step four until the area bakes properly.
6) Hit the Save button with the Run checkbox selected.
7) The area is now ready for use and your module has been saved.
Version 1.1:
Forgot to include the sit animations for dwarves -- files now added to the hak. Apologies to all the stout hearted little buddies out there. :)
Files changed: Heed_ActionSit.hak -- just replace the v1.0 of the hak with the hak in this package -- no need to reimport the erf or anything.
Version 1.2:
Update to workaround an engine bug with PlayCustomAnimation() whereby only other players in the same area as the sitter would see the animation playing. The animation is now called every 12 seconds while seated in order to update PC's who move into the area of the sitter.
Files Changed: Heed_ActionSit.hak (updated the GUI), Heed_ActionSit.erf (updated gui script) and Heed_ActionSit_Demo.mod.
Replace hak with hak from this package. Builders, import the .erf from this package overwriting gui_hss_actionsit.nss.
Version 1.4:
Fixed bug where you could jump to unpathable seats.
Sit action can now be canceled en route by cancelling the moveto action
from the action queue.
Files Changed:
gui_hss_actionsit and Heed_ActionSit_Demo.mod.
Import the .erf, overwrite gui_hss_actionsit and compile.
Thanks to Viconius for the bug reports. Bugs can only be fixed if they are reported.
Posted by E.C.Patterson at 2008-10-12 06:50:31 Voted 9.00 on 06/03/08
Hi Heed,
I�ve been making use of this in my SP mod, but here�s a bit of an issue: when a player clicks on a seat when controlling a companion, that companion won�t sit. The owned character on the other hand will go into the sitting animation then and there where he stands and won�t stand up even when the GUI button is clicked.
Let me know if you need more info. Hope you can fix this.
Posted by EGoldstein at 2008-10-11 18:38:51 Voted 10.00 on 10/11/08
Just installed V1.41 and gave it a try. Works great now! This package is a *Must Have* for any world builder. Awsome work Heed. It's really inspirational to the NWN2 Development community.
Yeah, I think you mailed me about that error. Sorry I just had a chance to doublecheck the hak and it looks like I packaged the wrong one for v1.4.
v1.41 is up now with the correct hak.
Anyone who is using the hak from v1.4 should replace it with the hak from v1.41.
Sorry about that. _________________________ Thought thinks itself.
Posted by EGoldstein at 2008-10-09 18:10:26 Voted 10.00 on 10/11/08
Okay I gave this a try. I set up and imported the proper items into a module. I save the module and then reload it, and then attempt to open an area to work on in the module. Thats when I almost immediately get the following;
"Error while opening tab: System.Exeption: Wrong file version"
That of course is followed by a large list of information. Not sure at the moment what the problem may be. Could by I have an out of date library file or something. One of the things it seems to mention is "Crownwood.DotNetMagic"..
For anyone getting the "string input" error message when moving seats or trying to place them, the problem is not with the hak.
It appears that the toolset is now reading content from any directory that happens to be under the C:\Documents and Settings\YOUR_LOGIN\My Documents\Neverwinter Nights 2 path. If you have a placeables.2da file in ANY directory under that path the error will occur.
I actually started seeing this error myself after this update and it had me puzzled for a while. I had a back up of my override I use for development named override_bak with a placeables.2da file in there from developing the hak. It turns out that this directory interfered with the hak and caused the error -- even after I renamed it to "cheese".
So, I conclude that the toolset is reading any directory regardless of name.
_________________________ Thought thinks itself.
Posted by kemo at 2008-10-04 09:47:21 Voted 9.75 on 10/04/08
Updated to v1.4 -- see package description above for details.
Viconius, the arrow isn't visible by default because when I first developed the seat object the intention was to have it visible, but somewhat transparent. Due to issues with transparency in the engine I switched to making it transparent using a visual effect. It then seemed too visible (kinda ugly), so it's almost completely invisible now (it still will glow slightly when you hit tab, but it's almost not noticeable. So, the arrow was put in originally when I had some different functionality in mind. _________________________ Thought thinks itself.
Posted by smachkem bashem at 2008-09-29 11:51:45 Voted 7.75 on 09/29/08
Certainly usefull and adds to the role play of a PW, can I suggest someone attempt to make beds that players can lie on? _________________________ Midgardsaga - Link
Posted by Viconius at 2008-09-12 14:16:20 Voted 9.00 on 07/28/08
Neat thanks that solves the issue, although is there a reason not to have it visible by default? Its not like the model is visible while playing.
Yes, NWN2 is really weak on this stuff in multiplayer. It's a real shame multiplayer was a second thought when Obsidian made their changes to the engine.
If I get some time I will have a look at the problem.
If you enable the C2 or C3 collision view in the toolset (hehe, I can't reacall which one I used right now) you will see a little arrow showing the orientation of the seat object. _________________________ Thought thinks itself.
Posted by Viconius at 2008-09-11 10:38:39 Voted 9.00 on 07/28/08
Good to have you back. I have been done some multiplayer experimenting, and modified the script a bit to my own use. Mainly the problem is facing, for some reason NWN2 doesn't always get facing right on other people's screens. I have done two solutions, free rotation and automatic rotation to face certain way. If anyone have better ideas to make sure facing is right, I would be all ears.
By the way, would be possible to include an arrow (much chairs have) on your seat object, so we could see instantly in the toolset which way it is facing when you sit on it.
Posted by Viconius at 2008-08-12 10:23:56 Voted 9.00 on 07/28/08
Could we have an update for 1.13?
Posted by Viconius at 2008-07-28 07:02:17 Voted 9.00 on 07/28/08
Awfully sorry to post so much here, I hope it won't sound like monologue. I am really impressed by the usefulness of this hak.
I made module specific change from distance of 20 to 2 distance, which seems to prevent most of the issues. However ability to cancel the order to sit, before sitting occurs, would be good. Something in lines of clear all action or such...
Posted by Viconius at 2008-07-28 06:46:26 Voted 9.00 on 07/28/08
I think I finally managed to get rid of the error, by deleting placeable.2da from different haks and having one seperate one. It does not explain why I got it at the test module too, however perhaps toolset does some weird cache or something I am unaware of. But if anyone runs into something similar, please check your 2da files.
I do love the tool and the function. However there seems to be one bigger problem:
If you try to sit on a chair which walk path is blocked it will jump to it over long distances even. Would it be feasible to do some sort of distance check?
Secondly, which is a bit more problematic is that once you select to sit on something, and if there is something like a close door in between, the character keeps trying to reach the chair and there is no time-out or ability to cancel sitting action.
Would it be possible to add "cancel Sit" to GUI, that would immediately stop character from reaching the chair?
Posted by Viconius at 2008-07-22 16:58:26 Voted 9.00 on 07/28/08
The problem is odd, while it is tile specific it also depends on camera angle. I figure it has to be something on my computer as no one else is complaining, but what could be so specific that it affects only me and in this way?
Posted by Viconius at 2008-07-21 13:56:00 Voted 9.00 on 07/28/08
Argh, it happens over certain tiles. I see no logic why it happens, and the popup error comes everytime I move or try to create seat object on those tiles.
Posted by Viconius at 2008-07-21 07:39:54 Voted 9.00 on 07/28/08
I get this in demo.mod too, so it might be the cursed Microsoft localization again... something to do with decimals being "." in US and "," in EU. However I edited SEF file and no luck, any idea what my problem is?
Posted by Viconius at 2008-07-21 06:41:29 Voted 9.00 on 07/28/08
When I move your seat object in an area in the toolset, I get the following popup-error (couldn't paste, so rewrote it here, hopefully not too many typos in it). Any idea what it means?
Input string was not in correct format. At System.Number.StringToNumber(String str, NumberStyles options, NumberBffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32 (String s, NumberStyles style, NumberFormatInfo info)
NWN2Toolset.NWN2.Data.Instances.NWN2PlaceableInstance.get_HookableInstanceType()
;
Any idea what this means?
Posted by Lomby at 2008-06-28 23:16:06 Voted 7.25 on 06/28/08
Ok, i think i solved the problem. I had another hak including more placeables, overwriting twice the file "placeables.2da".
Thanks!
Posted by Ziroonderel at 2008-06-27 05:33:30 Voted 10.00 on 06/27/08
You rule, Sir.
Posted by Silk D at 2008-06-03 18:19:14 Voted 9.00 on 06/03/08
We use this system very with pleasure. has still it to something Optimizes about over that Icon also directly matching animations to the possession to put. @Heed you have a Mail
Posted by E.C.Patterson at 2008-06-03 08:32:29 Voted 9.00 on 06/03/08
There is a problem with the current file, which first made the system inoperable for me. This may also (or may not) be the cause of some of the reported errors.
The problem is that the erf file in the download does not include the hss_actionsit.nss script.
What I did was export the script from the demo mod and import it in mine, along with the erf.
Once I figured that out, the system worked very well and allowed me to quickly create sitting places anywhere.
I would have preferred however if it had been possible to do without the situp gui, but if that's necessary, then it's a small price to pay for ease of use.
Thanks Heed for making and sharing. _________________________ E.C.Patterson Gaming Parents Studios
I agree with Zamora, the tool to make ones own sittable chairs is great, but looks like a huge amount of work. Just a cataloge of placeables already set up would be ideal.
I was unable to get ActionSit to work in the tool set, so I as well tried to export the working ones in the demo. Got about 100 errors from the toolset.
I get many many error messages in the TS when trying to click on that placable or exporting or importing your work.
Posted by Zamora at 2008-05-19 20:24:26 Voted 10.00
I tried to export an area that has your seats in it (the seats work properly), but get many error messages when doing so. Is there a way to export these without error messages? I exported the area from the mod you supplied and get the same error messages.
Posted by PoisonTheMonkey at 2008-05-13 15:09:19 Voted 9.00 on 05/13/08
Awesome, unfortunately it doesn't work for me, just makes a bunch of errors whenever I try to use it, but that's probably my fault, not yours. :P _________________________ Obsidian Shore, a HoF 9.8 heavy roleplaying PW. Dark and gritty fairytale world with the opportunity to do and change the world as you wish. Link
Greycliff, a brand new NWN1 heavy roleplaying PW. A broken kingdom is all that remains from a bloody civil war. Link
Does this work with MoTB races as well? that is the problem I'm having with the script I am currently working.... the seats resize for the shorter races but gensai and half-drow cannot sit.... it it DOES work, you have just solved my problem.
10 - A Masterpiece, Genuinely Groundbreaking 9 - Outstanding, a Must Have 8 - Excellent, Recommended to Anyone 7 - Very Good, Deserves a Look 6 - Good, Qualified Recommendation 5 - Fair, Solid yet Unremarkable 4 - Some Merit, Requires Improvements 3 - Poor Execution, Potential Unrealized 2 - Very Little Appeal 1 - Not Recommended to Anyone