Welcome to
Mod The Sims
Online: 2457
News:
Have an account? Sign in:
pass:
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki
Reply  Replies: 13 (Who?), Viewed: 2217 times.
Search this Thread
Old 7th Oct 2011, 01:01 AM DefaultMaking Object Portable #1
lorenrose1013
Original Poster

Instructor

Join Date: Mar 2011
Posts: 513
Thanks: 163 in 1 Posts
3 Achievements


I'm trying to make a few objects portable but I'm not sure which values to change in S3OC or the OBJD. I just want to make it so I can drag it into the inventory, which I think is possible.

Thanks in advance for any help!
Old 7th Oct 2011, 09:27 PM #2
Sims MX
Instructor

Join Date: Oct 2009
Posts: 471
Thanks: 14712 in 75 Posts
16 Achievements

View My Journal


You have to change the "ObjectTypeFlags." If you're using s3pe, click the Grid button and set "LiveDraggingEnabled" (0x00010000) to true. If you're using s3oc, just open the object and tick the "LiveDraggingEnabled" checkbox.
Old 7th Oct 2011, 10:46 PM #3
lorenrose1013
Original Poster

Instructor

Join Date: Mar 2011
Posts: 513
Thanks: 163 in 1 Posts
3 Achievements


I can move the object now, but I can't put it in the inventory. Is there anything else to check?
Old 8th Oct 2011, 07:20 AM #4
ellacharmed
Disenchanted



Join Date: Nov 2007
Posts: 7,095
Thanks: 5715 in 26 Posts
17 Achievements

View My Journal


What is the base object you cloned from? It is not originally portable?
Old 8th Oct 2011, 09:53 AM #5
lenglel
Instructor

Join Date: Sep 2010
Posts: 574
Thanks: 526 in 2 Posts
5 Achievements


The objects script would need an inventory component as part of it's class definition, so you can't just enable live dragging to turn it into an inventory object.
I ran into the same thing when I was making the pillbottle for the ts3 pharmacy. It was cloned from the stack o'mags.
Old 8th Oct 2011, 10:04 AM #6
twallan
Top Secret Researcher

Join Date: Jun 2009
Posts: 1,646
2 Achievements


It actually requires an "ItemComponent" .

"InventoryComponent" provides an object with an inventory. "ItemComponent" allows for the object to be placed in an inventory.

The confusion is understandable, considering the names.


NRaas Industries: Sims 3 Mods for the Discerning Player, hosted by The Wikispaces.
Old 8th Oct 2011, 02:42 PM #7
lorenrose1013
Original Poster

Instructor

Join Date: Mar 2011
Posts: 513
Thanks: 163 in 1 Posts
3 Achievements


So how would I go about adding the 'ItemComponent'?
By the way, the item is ATS Fisher's Basket Chest-Like.

http://aroundthesims3.com/objects/f...e_misc_02.shtml

^There;s a link
Old 8th Oct 2011, 05:19 PM
Odistant
This message has been deleted by Odistant. Reason: Wrong info, sorry
Old 9th Oct 2011, 12:05 AM #8
lorenrose1013
Original Poster

Instructor

Join Date: Mar 2011
Posts: 513
Thanks: 163 in 1 Posts
3 Achievements


I took the file from the site and made it into a package file, but how do I edit the script of the package file? (I'm quite clueless)
Old 9th Oct 2011, 11:31 AM #9
lenglel
Instructor

Join Date: Sep 2010
Posts: 574
Thanks: 526 in 2 Posts
5 Achievements


The script is in the s3sa resource of the object. Extract it with S3PE and export with net reflector. Open it in MS
visual studio and add the ItemComponent, making sure to properly initialize it in the object's OnStartup method.

Okay, I just dl'ed and looked at the item in question. It doesn't have an s3sa resource, just uses the wa script Sims3.Gameplay.Objects.TombObjects.TreasureChestEgypt, which I'm guessing is a largish object that can't
be dragged into a sim's inventory. I think what you need to do in order to achieve what you're after is to add
a new script to the object, because if you override the original script it would affect all objects that use that
script, not just yours.
Last edited by lenglel : 9th Oct 2011 at 11:43 AM. Reason: more info
Old 9th Oct 2011, 02:15 PM #10
Sims MX
Instructor

Join Date: Oct 2009
Posts: 471
Thanks: 14712 in 75 Posts
16 Achievements

View My Journal


Follow the instructions in this tutorial: Tutorial:Sims_3_Object_Moddingwiki and create a script class for the object.

Your script will look something like this:
Code:
namespace LorenRose1013
{
    class TreasureChest : TreasureChestEgypt
    {
        public override void OnStartup()
        {
            base.AddComponent<ItemComponent>(new object[] { ItemComponent.SimInventoryItem });
            base.OnStartup();
        }
    }
}
Note that if you want the interactions to work from the Sim's inventory, you would have to rewrite them.
Old 9th Oct 2011, 10:23 PM #11
lorenrose1013
Original Poster

Instructor

Join Date: Mar 2011
Posts: 513
Thanks: 163 in 1 Posts
3 Achievements


Thank you all so much! I got it to work!
Never mind, I got it
Last edited by lorenrose1013 : 10th Oct 2011 at 11:16 PM.
Old 11th Oct 2011, 01:30 PM #12
lenglel
Instructor

Join Date: Sep 2010
Posts: 574
Thanks: 526 in 2 Posts
5 Achievements


So, where can it be downloaded?
Old 11th Oct 2011, 04:58 PM #13
birdyfly
Forum Resident

Join Date: May 2005
Posts: 819
Thanks: 153 in 9 Posts
4 Achievements

View My Journal


Quote:
Originally Posted by lenglel
So, where can it be downloaded?


I second this.
I have been desperately needing something like this for a while.

Also, I'm happy that you managed to get it to work.
Old 11th Oct 2011, 10:25 PM #14
lorenrose1013
Original Poster

Instructor

Join Date: Mar 2011
Posts: 513
Thanks: 163 in 1 Posts
3 Achievements


I made all 19 of ATS Sandy's Chest-likes portable, and I gave all of the files to her. I think she is going to post them on her website, (with due credit to Sims MX for the code), but if you really want it this second you can pm me.
They are all package files, not sims3packs, but you won't get two instances of the object if yo already had the portable one.

(I plan on making other objects portable, and I know exactly how to edit the script to do so, so if you have a request, you can also pm me)
Reply


Section jump:


Powered by MariaDB Some icons by http://dryicons.com.