Handling groups of objects via script?

Post » Sat May 28, 2011 6:36 am

I'm currently in the planning/design/brainstorming phase for a mod that will require large groups of various statics, furniture, items, and other clutter to be added to one of several rooms. Essentially, the player picks a designation and picks a location, and it populates the room with previously disabled objects for aesthetic effect. I'm going back and forth on how best to implement this setup, however, the major problem being I'd rather not duplicate every setup for every single room.

Note that I'd rather the player NOT be able to pick up or even move the objects in these rooms.

I have two paths I'm currently torn between, and I'd love if someone with more experience (I haven't worked with this engine type since Morrowind) could answer some questions or recommend another way to handle things altogether.

- Place the items in one room, and then link each one to an invisible XMarker as an "enable parent." This strikes me as the easiest solution for quick on/off control, but here's the problem: is there a way to make these objects move relative to said XMarker, as well? Like, if group A was located in room 1, but I wanted them to show up in room 2 and knew the relative x/y/z coordinates, is there a quick-and-easy way to move them over? My current best bet is to store a moveX/y/z variable in the enable parent, then have every single object run the same "move this" script when enabled, but the overhead there seems excessive. I could also duplicate everything for each of the several (5, most likely) rooms, but that's an inelegant solution.

- Combine the objects into a static collection, and just enable/disable/move them directly at once. I'm unsure how well SCOLs work in NV, as they don't seem used very often and the wiki seems to hint that they're deprecated. Plus, as I understand it, non-static objects can't be part of an SCOL - how hard is it to convert random clutter from havok-able objects to simple statics? Will there be collision or lighting problems, having the clutter in a room all be part of the same collection?

Thanks in advance for any insight you can provide.
User avatar
James Potter
 
Posts: 3418
Joined: Sat Jul 07, 2007 11:40 am

Post » Sat May 28, 2011 12:08 am

use enable parent...

scol as you know yet doesnt support activators, clutter, misc items, furniture, etc, ist only useful to group static objects
converting stuff between types is a whole different topic and irrelevant to your question
User avatar
Samantha hulme
 
Posts: 3373
Joined: Wed Jun 21, 2006 4:22 pm

Post » Fri May 27, 2011 6:56 pm

Thanks, I think I am going to go with an enableParent-type relationship. The turning point was realizing that since the GECK builds an entirely new mesh when you create an SCOL, it would make the mod extremely large and drain runtime resources to do it that way. I'll see if I can find a way to automate moving around all of the objects from one room to another, or that's going to be a scripting nightmare. :(

I'm also going to have to, I think, end up converting everything to statics. From what I can tell, it's a matter of unpacking the BSAs and making a new static point at the same mesh. Time consuming for lots of clutter, but not undoable. If I'm going to be building special teleporting clutter to fill rooms based on commands sent elsewhere, I certainly don't want the player picking it up!
User avatar
Amiee Kent
 
Posts: 3447
Joined: Thu Jun 15, 2006 2:25 pm


Return to Fallout: New Vegas