Jump to content

Recommended Posts

Posted

Hi all, pretty new to modding kotor2, not really new to modding in general (neverwinter nights for example) or coding so I understand the basics.

 

Trying to update the inventory in the security locker in peragus just as a way to practice modding. I found the utp file g_tresmillow010.utp  however merely editing it and placing it in the override folder isn't what i'm looking for since that basic template is used in several other places. Is there any way to easily mod a placeable without extracting an entire rim file (I think thats what they're called) modifying the file and then repackaging it?

 

 

Posted

In a way there is.

 

If you know the location of the specific placeable (which you might need Darth 333's WhereAmI Armband for; SWK is down so try Filefront), you can use this to get the placeable:

 

object oFootlocker = GetNearestObjectToLocation(OBJECT_TYPE_PLACEABLE, Location(Vector(, , ), 0.0));

 

And then you can add items to it with:

 

CreateItemOnObject("

 

for each of the items you want to add.

 

This would all have to be in one script.

Posted

Makes sense... I guess I would need to find a script to hook into?  One of the mods that adds a placable I use hooks into kreia's telepathic warning of the droids in the next room so something like that I guess. 

 

Thanks!

Posted

I prefer just modifying the .utp than using TSLPatcher to place it in the proper location (see "Mission Vao Armband" for example).

 

Alternatively, if there's only one of the type in the module and it has an unique tag you can simply skip the 'searching' part  of Fair Strides post

object oFootlocker = GetObjectByTag("[tag]", 0);
CreateItemOnObject("<template resref of item>", oFootlocker, <how many of the item, defaults to 1.>)

or if you want 1 new line;

 

CreateItemOnObject("<template resref of item>", GetObjectByTag("[tag]", 0), <how many of the item, defaults to 1.>)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines.