Jump to content

Modifying static objects


gigantibyte

Recommended Posts

I'd like to change the nature of a certain static object so they become searchable containers. For example, modding a pool table so it can be opened as a container with a chance to find extra pool balls. The mod 'Scavangable Vehicles' on Fallout nexus makes all cars in the world searchable, but I can't see how it was done in GECK. Could someone point me in the right direction?

 

Which begets another question: When in GECK after loading a mod, is there a way to see only the objects contained within a particular mod? Any single mod I load in GECK also loads the associated .esm objects, like contained in the main fallout3.esm file. I need a way filtering items in the object window so it only shows objects affected and created by the mod. If that can be done, reverse engineering someone else's mod might be easier.

Link to comment
Share on other sites

I suggest F03edit, which partions content depending on which file it was loaded from.

As for how it was done...the only way I can figure out is that he created the new containers in the GECK using the same model, added some numbers to the static object ID's, and named the containers after the object ID's. So, for example, let's say he's replacing the static car01 with a container. He sets up the container with the same model and everything, and gives at temporary name--say, temp001. He then renames car01 to car01OLD and renames temp001 to car01. The only catch is that it would have to be done in a way that didn't remove car01 from the cell when he changed the ID.

Or you could hand replace every static object with the new container.

Link to comment
Share on other sites

...replacing the static car01 with a container.

 

Darn. It seems that's what was done. Thanks for the tip on F03Edit. I was only using it to make a merged patch.

 

It's disappointing that there isn't more generality between object form types. It would be nice to be able to add scripts to static objects, or allow certain containers to be picked up. I definitely like playing the game more than modding it. :) Anyone know if New Vegas will have it's own GECK?

Link to comment
Share on other sites

Ok, I'm trying a different approach using FOSE, but I need to work out some other kinks first. For testing purposes, I created a quest script I hoped would add a tin can to the player's inventory every time the player swung a melee weapon.

 

begin GameMode

if IsPlayerActionActive 1 == 1
	player.additem 22104 1
endif

end

 

 

However because of the default script delay of 5 seconds, this approach only adds a tin can on every 4 to 5 swings of the weapon. Most times if I only swing once, the script misses the event and nothing is added to inventory. The GECK documentation recommends not lowering the quest script time delay "to prevent the quest scripts from taking up an excessive amount of processor time".

 

So what I really need is something like a OnSwing blocktype that I could script into the weapon itself, rather than running a check every few seconds to see if the player is swinging the weapon. Any ideas? I'm pretty stumped at this point...

 

EDIT

 

If I can't modify a particular static object, my goal is to add a condition (using GetCrosshairRef and GetBaseObject) that if certain type of object is being swung at, a script runs.

Link to comment
Share on other sites

In the GECK with your mod loaded go the the Containers list. Right click to make a new item. Navigate to the pool table...or whatever you want to make in to a container...and set it up as a container giving it a unique ID...like your initials plus a descriptor like pooltablecontainer.

 

Drag it into your mod...load it up and check it out. Your pool table is now a container, and does not effect any other pool table in the game.

Link to comment
Share on other sites

...and does not effect any other pool table in the game.

 

But I do want to affect every object of a certain base ID. :) Anyway, I'm working on having the base object available as a condition in the script, rather than changing the base object itself.

 

On further investigation of other mods that have an instant activation hotkey, like "FPS Grenade Hotkey", I see that the quest delay time was indeed lowered to 0.1. Once I did that in my test mod to add tin cans, with some extra script code, it worked accordingly. I should have a working concept mod soon.

Link to comment
Share on other sites

I've noticed that one get set the ownership on references to static objects through a script, as long as the player is in the same cell (the non persistent reference is in memory). The ownership can be set to any faction too. Since changing ownership of most static objects doesn't affect gameplay, (the object cannot be stolen or picked up anyway), this could be useful for setting a flag on the object for other purposes.

 

Does anyone know any other "useless" settings one can make on a static object through a script? I have tried things like SetScale, SetPos, and SetAngle, but the static object will not accept the changes, even though it is accepted in the script without error.

 

 

Edit - a explanation of my problem

------

I'm making a mod that harvests a certain type of static object, and with the ownership flag I can flag the object as "harvested". However, I really have my heart set on making the object harvestable again after a game week. The only thing I've come up so far, would be to make a Form List of factions, and set the ownership on the object to the faction in the list that corresponds to what game week it is. So for week 5, the ownership would be set to the 5th faction in the list. If the player came back to the object and the ownership faction was different than the current one, the object would be harvestable.

 

The problem with this solution is that even with a list of 100 factions, the system would only work for about 2 game years.

Link to comment
Share on other sites

I don't have a suggestion to do what you want, but as far as "useless" settings, all the Lock functions (Lock, GetLocked, GetLockLevel, and Unlock) can be used on any reference. With these you could potentially do a lot more than a simple on/off flag. As long as you exclude Doors, Containers, and Terminals, there would be no effect on gameplay.

 

EDIT:

Actually, I guess I do have suggestions to create the effect you're going for (that doesn't involve anything mentioned so far). PM me for details.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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