Resizing or Scaling Objects

Place to discuss history, story, character development, questlines for factions and other specifics.

Moderators: Haplo, Lead Developers

Locked
Seneca37
Lead Developer
Posts: 912
Joined: Mon Feb 10, 2014 1:04 pm

Resizing or Scaling Objects

Post by Seneca37 »

What is the general consensus on resizing or scaling items that the player can pickup?

Here is my opinion:
I do not like to resize or scale items that the player can pickup, simply due to the fact that when the player puts the object down, the item reverts back to a scale=1.0. It may "look" nice, but is pointless from the players perspective. Resizing or scaling an item to fit into a particular location is ok, provided no other identical items are in the vicinity to indicate the change in scale.

Now, I'm all for giving the player as much variety as possible. So I've written the following script, that could be applied to already existing items (TR_misc_potion.. etc.),or be applied to new items, that would allow the player to have these resized or rescaled objects available to them.

Code: Select all

begin TR_Keep_Scale
;
float keep_scale
short OnPCDrop
short OnPCAdd

if ( MenuMode == 1 )
   if (OnPCDrop == 1)
      ;Change the scale when the player picks the item from the menu
      SetScale keep_scale
      set OnPCDrop to 0
      Return
   endif
   Return
endif 

;Must use OnActivate - If you use OnPCAdd the scale is reset to 1.0 before I can keep it.
if ( OnActivate == 1 )
   set keep_scale to GetScale
   Activate
   Return
endif

;Just incase there is a way for the player to drop the item without using the menu
if (OnPCDrop == 1)
   SetScale keep_scale
   set OnPCDrop to 0
   Return
endif

end TR_Keep_Scale
Edit: Added end to script (got cut off when I pasted it)
Last edited by Seneca37 on Fri Nov 07, 2014 3:16 pm, edited 1 time in total.
Miraclestone
Developer
Posts: 108
Joined: Tue Aug 05, 2014 7:52 am

Post by Miraclestone »

Very nice, was wondering about this issue myself just a little while ago. Don't understand the syntax well but it looks pretty simple.

Tested it out my self and worked great. Remember to add "end TR_Keep_Scale" at the last line or else CS wont let you save the script. All items work but equipped items still scale to your character when equipped so this should not be used on lights, armor, clothing, and weapons. Tried to break the script any way I could think of with no luck ;), the items stay to their set scale.

Evidently we need to make new variants of the items to use the script, should we include the scale in the new ID for organizational purposes: "TR_ ... _scl_X" where X is scale number?

Very nice job all the same!
User avatar
Yeti
Lead Developer
Posts: 2061
Joined: Sun Feb 15, 2009 11:50 pm
Location: Minnesota: The Land of 11,842 Lakes

Post by Yeti »

I see it as a non-issue. Re-sizing objects is necessary to vary clutter layouts and make them less repetitive. I don't think it matters if objects revert to the standard size when they go into the players inventory.

As impressive as your script is, we would have to apply it to vanilla items if we were to use it for consistency. Doing so would open a door to all kinds of problems and conflicts, I imagine.
-Head of NPCs: [url=http://www.shotn.com/forums/]Skyrim: Home of the Nords[/url]
rot
Lead Developer
Posts: 696
Joined: Sun Oct 21, 2012 10:34 pm

Post by rot »

I don't mind the rescaling issue *on generic items*, potions and the like. I very much mind it on decorative or otherwise peculiar items, which you're more likely to remember looked different when you'd picked them up - eg guar toys.

That said, too many scripts on items that are likely to be picked up and set back down at a player's base is much more problematic because of performance issues. It should be exceptional (and if it's truly necessary and exceptional, a dedicated model for the item in question would be the ideal solution)
Locked