Simblesse Oblige Forum Index Simblesse Oblige
Forums for serious Simmers to share knowledge about The Sims 1
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to delete superfluous sprites

 
Post new topic   Reply to topic    Simblesse Oblige Forum Index -> Object Creation and Recolor Shop
View previous topic :: View next topic  
Author Message
Andrasta
Member
Member


Joined: 14 Sep 2012
Posts: 616
Location: Franconia, Germany

PostPosted: Fri Aug 08, 2014 7:16 pm    Post subject: How to delete superfluous sprites Reply with quote

I am working on a pantry which has no doors, which means, I have the same graphic for closed state and the various open states.
Just the graphic for empty, third full, two thirds full and three thirds full.

Therefore of 16 images in the original pantry I do need only four graphic states.

Is there a way to get rid of the superfluous graphics, and how and where do I tell the object that it shall use the same one sprite for all the opening and closing procedure of the pantry, instead of using four different sprites?

Here a preview of my custom pantry, that works with custom crops I've created for my hunter gatherer theme - all works well, but I'd like to reduce the size of the pantry (where I still have to put some custom food - Ruth has made such great food which will be perfect!)
smile



andra_hgpantry.jpg
 Description:
 Filesize:  13.85 KB
 Viewed:  4264 Time(s)

andra_hgpantry.jpg



_________________
* Whenever life gives you poison, learn how to transform it into medicine *
Back to top
View user's profile Send private message Visit poster's website
DamonDamore
Moderator
Moderator


Joined: 26 Mar 2007
Posts: 2650

PostPosted: Fri Aug 08, 2014 8:36 pm    Post subject: Reply with quote

I thought about giving a flowchart here but instead...

BHAV side:
I think the pantry is made fro ma fridge which has an 'Open' BHAV that changes the graphics. Just route around the graphic state updates. Any time the graphic state is set, also you don't need to refresh the graphic, since it never is supposed to change anyway. Additionally, you could skip around the sim animating to open the fridge.

(OR: maybe swap out that animation for one of the sim looking thoughtfully as through they're selecting something from the pantry? Maybe a browse animation from HD or MM? Just put it in the a2o and/or c2o... you could even overwrite the open line with the browse string for maximum lazines.)

Anyway, once the fridge is no longer animated in the BHAV...
--
DGRP side:
Look at the DGRP resources. Are the doors in the same DGRP as the back pantry?

If they are, use the DGRP editor to remove those sprites from the DGRP.

If not, remove the DGRPs for the doors.

Next you can just remove the sprites, since no DGRP uses them now.
You can also probably clean out any unused PALTs, but I would export them first in case you accidentally remove one you need.

_________________
Feel free to PM me. If you've already posed in a thread feel free to link me. Sometimes I miss posts in threads for whatever reason. :)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Andrasta
Member
Member


Joined: 14 Sep 2012
Posts: 616
Location: Franconia, Germany

PostPosted: Fri Aug 08, 2014 8:58 pm    Post subject: Reply with quote

Thanks Damon, I'll work through what you said tomorrow; it's late here and I am going to sleep now sleep

Yes, I changed the animations in part, simmies will stand there and nod, and then grab the food instead of opening the doors - I'm still working on suitable animations though.

In case you want to have a look, I can send you the pantry with suitable crops; just tell me smile

I hope to finish soon and put it on my homepage then.

_________________
* Whenever life gives you poison, learn how to transform it into medicine *
Back to top
View user's profile Send private message Visit poster's website
DamonDamore
Moderator
Moderator


Joined: 26 Mar 2007
Posts: 2650

PostPosted: Fri Aug 08, 2014 9:06 pm    Post subject: Reply with quote

Well send it if you can't figure it out. I don't want to do it "for" you since I'm sure you're capable. smile

I just looked at the maxis one before I typed that, at least sofaras changing the BHAV. Also 'Open when Empty' is a different BHAV which I am not sure if the pantry uses or not. It could be left over from the fridge.

_________________
Feel free to PM me. If you've already posed in a thread feel free to link me. Sometimes I miss posts in threads for whatever reason. :)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Andrasta
Member
Member


Joined: 14 Sep 2012
Posts: 616
Location: Franconia, Germany

PostPosted: Sat Aug 09, 2014 9:23 pm    Post subject: Reply with quote

OK, I'll see to that tomorrow. Today I've created and added custom meals to the pantry.

Now everything is ready:
the custom crops (some deco plants, too), the pantry which can store them and make custom meals, and the custom meals based on Ruth's ones. smile

A big Thankyou to Ruthml of Bag of Tricks! thumbsup

Tomorrow to the final refinements like cutting the pantry size.
Good night sleep

_________________
* Whenever life gives you poison, learn how to transform it into medicine *
Back to top
View user's profile Send private message Visit poster's website
Andrasta
Member
Member


Joined: 14 Sep 2012
Posts: 616
Location: Franconia, Germany

PostPosted: Sun Aug 10, 2014 5:01 pm    Post subject: Reply with quote

First of all: the pantry is cloned from the "pantry - modern".

DamonDamore wrote:

BHAV side:
I think the pantry is made fro ma fridge which has an 'Open' BHAV that changes the graphics. Just route around the graphic state updates. Any time the graphic state is set, also you don't need to refresh the graphic, since it never is supposed to change anyway.


I deleted the graphic refreshs (rerouting) (and some sounds at that occasion, too) and it still works.
But I did not gain much bytes this way laugh

DamonDamore wrote:

DGRP side:
Look at the DGRP resources. Are the doors in the same DGRP as the back pantry?


What do you mean by "back pantry" - the pantry itself, without doors?
Anyway, the pantry itself and the doors are one bmp, they are not in separate bmps/sprites (see attachment) and drawgroups. Therefore there is no way to delete the door graphics, as there are none.

My idea was to delete drawgroups #201, 202 and 203, #205, 206, 207 and so on (for the three opening stages relative to the filling states) and only use the close stage per filling status (empty, 1/3full, 2/3full, 3/3 full).
Is that possible (quite easily, as it's only a question of getting rid of superfluos, nothing crucial)?

But as far as I have understood, the graphics are set by a global, and I have no idea of messing with globals.

The BHAV #4110 "set graphic by state" says:

0 Temporary Storage 0 Assign To: Stack Obj's Attribute 0 1,error
1 (glob:) set object graphic true, error

Damon, I am lost here, as I have also no idea what attribute 5 means in BHAV #4100 (open) and 4101 (close):

"Stack Object's graphic Assign To: Stack Obj's Attribute 5"

Any idea how to reduce the sprites and the size?



DGRP_pantry.jpg
 Description:
 Filesize:  68.65 KB
 Viewed:  4226 Time(s)

DGRP_pantry.jpg



_________________
* Whenever life gives you poison, learn how to transform it into medicine *
Back to top
View user's profile Send private message Visit poster's website
Andrasta
Member
Member


Joined: 14 Sep 2012
Posts: 616
Location: Franconia, Germany

PostPosted: Sun Aug 10, 2014 6:10 pm    Post subject: Reply with quote

UPDATE! jump

I managed to delete 8 drawgroups of 16 without damaging the graphic work in the game; leaving only the open and close graphics, and cancelling the 1/3 and 2/3 open stage. That cuts the size to nearly a half; and I am satisfied with the result. I had to add a catalog thumbnail, which doesn't hurt anyway.

I have no idea how to tell the file that it could use the same graphic for open and close.

Damon, in case you want to try, I send you the file per PN.
But don't worry about it; just try if you want to. You are the first one to have the final result, however yes

You can use it for having a strawberry snack, as it won't work with the standard Maxis crops (I've thought of leaving them, but I think there are enough pantries around for the standard crops *g*

Thanks for your help so far, as always, you managed to guide me to the right direction.

_________________
* Whenever life gives you poison, learn how to transform it into medicine *
Back to top
View user's profile Send private message Visit poster's website
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Wed Oct 01, 2014 3:42 pm    Post subject: Reply with quote

Andrasta wrote:

"Stack Object's graphic Assign To: Stack Obj's Attribute 5"


An attribute is one of the four types of variables. Graph gives a description of each of them at the beginning of her intermediate lesson.
http://woobsha.com/SimsCollegeArchive/ILH-01/index.html
(Attributes are described on pages 3 and 4)

That particular attribute is used to keep track of the graphic state of the pantry. Other attributes will keep track of how much food is in there (so it knows whether to show empty shelves or not). One of the attributes probably keeps track of which pantry it is (since Maxis bundled the 2 of them together and allowed them to share the same coding).

_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain


Last edited by Raeven on Tue Jul 14, 2015 10:04 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Wed Oct 01, 2014 3:58 pm    Post subject: Reply with quote

I assume you kept the 4 graphics indicating how much food is in the pantry Empty, 1/3, 2/3, Full)

You can delete the remaining "Open" DRGP for each state and then copy the corresponding "closed" DRGPs giving it the DRGP number that the "Open" had. You are essentially replacing the Open DRGP with a copy of the Closed so Both graphic states (open and closed) show the same graphic.

The 4 (now unused) Open sprites can be deleted.

The same can be done with 1/3rd and 2/3rd open doors (when the coding demands those graphic states)

_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain
Back to top
View user's profile Send private message Visit poster's website
Andrasta
Member
Member


Joined: 14 Sep 2012
Posts: 616
Location: Franconia, Germany

PostPosted: Sun Oct 05, 2014 9:07 am    Post subject: Reply with quote

Raeven, thanks for your answers!
I've seen you have been quite active here these days, nice to meet you! smile

Yes, I wanted to know about that particular attribute.

I succeeded with the 13 and 23 open draw groups indeed, but then I was afraid to destroy everything with going further.
Well, weekend was over and I had no more time for further exploration.

Wow, Graph's lessons are so extensive I sometimes get lost in them and find and try different things than I originally was looking for. laugh

_________________
* Whenever life gives you poison, learn how to transform it into medicine *
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Simblesse Oblige Forum Index -> Object Creation and Recolor Shop All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group