Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#1 Old 15th Nov 2011 at 11:41 PM Last edited by Phaenoh : 15th Sep 2012 at 6:42 PM.
Default Bug Houses, with mods and effects
I'm looking at making the ladybug house into a beehive and I was trying to figure out how to recolor the ladybug effect to look like bees instead. I've found the texture files, but I'm not sure how to make my object call the new textures without replacing all the ladybugs in game.

Kinda lost
Advertisement
Theorist
#2 Old 17th Nov 2011 at 11:02 PM
What a cool idea--the ladybug loft would make a great beehive!--but it sounds like the tools needed were never finished/created. According to this thread it's not possible. But in another thread about creating an entirely new effect this was said:

"At the moment the only way to do effects is to use the FX spec on the wiki, and edit the fx file in the effects.package MANUALLY by hand.....which is incredibly hard, and I do mean incredibly hard, but its doable." -Karybdis

Not very helpful I know but if you haven't seen either of those threads maybe it'll give you an idea of how to go about it.

ETA:
I completely forgot about the bee effect that's already in the game. When sims come back from a jog or a hike aren't they sometimes chased by bees? Maybe you can use that effect in place of the EP5_ladybugs effect to create your beehive.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#3 Old 18th Nov 2011 at 1:57 AM
Thanks for the links!

I was planning on including that when a sim pokes at the hive, but its only for BV users isn't it? It seemed like it might be in the basegame code, but I didn't think they did that back then.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#4 Old 19th Nov 2011 at 4:14 AM Last edited by Phaenoh : 15th Sep 2012 at 6:42 PM.
I'm looking into making an object that will control the quality of plants on a lot. I've looked at TwoJeff's Perfect Plants and Perfect Garden mods, but either I'm missing some basic BHAVing know-how or I'm not seeing a way of making it only effect the lot it is on. I'm going back and forth between dealing with the flowers and bushes or the SSN garden plants or both at the same time.

Any suggestions?
Retired Duck
retired moderator
#5 Old 19th Nov 2011 at 12:03 PM
How were you anticipating people controlling this? TwoJeffs' mod is a global mod, so what you'd probably want to do in that case is put some checks into the global BHAVs so that, for example, if a certain object is on the lot it will run the modified code, otherwise it will run the original code. Then, to enable it for a lot, you just put that object on your lot.

Of course, if you're anticipating something more fine-grained than on/off per lot, it can get a bit more complicated.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#6 Old 19th Nov 2011 at 7:57 PM
I'm making a beehive to compliment the ladybug loft. The ladybugs keep the plants bug free, I was hoping to make my beehive keep the flowers from dying and keep the garden plants at a slightly higher base level of happiness. How should I be going about this?
Retired Duck
retired moderator
#7 Old 20th Nov 2011 at 6:13 AM
Find the original BHAVs for each of the ones in TwoJeffs' mods, then copy them out. Renumber both the originals and the modded versions so that they don't conflict with anything. Create a new BHAV with the original instance number, and have them do something like this:

0: Stack Object Id := 0
1: Set To Next (Phae's beehive) (t->2, f->3)
2: Call modded BHAVs (then finish)
3: Call original BHAVs (then finish)

You will need to do this for all the modified BHAVs you want to use. It will be a global mod.
Instructor
#8 Old 13th Dec 2011 at 7:19 PM
There is already a 'bees' (fxBees) and a 'bees and bugs' (fxBeesAndBugs) effect in the game.
I have an updated older beehive object here.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#9 Old 14th Dec 2011 at 8:35 PM
This is driving me crazy now. I started by cloning the ladybug loft, but I can't seem to find the globals that its linked to. I don't want it to have all the bug-eating bhavs the normal one does, but without the semi-globals I can't yank them out. Then I tried cloning a sculpture and put my mesh on top of that, but it looked weird for some reason. Then I tried cloning a flower because I want it to have the fxBees and to deal with other flowers on the lot. That one had problems with having different states- which I don't want. It's been a while since I wasn't even able to figure out where to start on a project. :/
Retired Duck
retired moderator
#10 Old 22nd Dec 2011 at 11:16 AM
The ladybug loft doesn't have any semiglobals, it's pretty much just a decorative object. The plants, on the other hand, check for the presence of a loft in their BHAVs, and behave differently if they find it. Regarding the different states... I might need more information on that one!
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#11 Old 22nd Dec 2011 at 2:03 PM
Does it check for guid, or back up, or something else? I don't want that function at all.
Sesquipedalian Pisciform
retired moderator
#12 Old 22nd Dec 2011 at 9:50 PM
So maybe you could do a decorative beehive with the BeesFX on it? Add an effects slot to your cres, and in the text strings add a new text string instance 143 and link to the effect in there. Then in your BHAV you will need to call the effect using this opcode 000A000000000117050000000A000000 (or something similar) on primitive 0x0070.

More downloads by Leesester, BoilingOil and others at Leefish.nl | My Stuff at Leefish.nl | LeeFish RSS | Sims4 News Blog | TumblinLeefish
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#13 Old 22nd Dec 2011 at 10:12 PM
I tried that direction and it made the mesh look weird. I swear I copied over the mat def perfectly, but the bottom half of the post looked rounded when I cloned a vase instead of the birdhouse. Janky. Imma try replacing both guid and backup with my own and a sculpture, see what that does.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#14 Old 3rd Sep 2012 at 3:11 AM Last edited by Phaenoh : 3rd Sep 2012 at 7:38 AM.
Ok, so recoloring an effect is not so much an option it appears. To sidestep that problem, I'm trying to make a list of all the insect effects. So far I have ladybugs, bees, butterflies, moths, flies, and fireflies. Does anyone know of any others? Is there a list somewhere?
*shrugs*
retired moderator
#15 Old 3rd Sep 2012 at 3:29 AM
There may be some overlap here and not everyone of these may be useful to you....

"Bees, BeesMoths, Flies, Moths, SloppySimFlies" from Sophie-David's Apocalyptic Effects

"fxBeesAndBugs, fxBees, fxButterFlies, cockroachFloorStart, cockroachFloorSquish, cockroachFloorStart2, cockroachFloorDying" from the only effect list that I know of.

I hope that helps.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#16 Old 3rd Sep 2012 at 7:39 AM
It did eventually work:


And now I'm expanding the project to include other insects, but I still haven't 'gotten all the bugs out' of the perfect plant mod stuff. I'm a little more confident and clear about how to proceed though. Keep your fingers crossed!
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#17 Old 4th Sep 2012 at 1:32 AM
Ok, I still seriously fail at BHAVs. There are only 6 in twoJeff's Perfect Plants SSNs mod from here: http://www.simbology.com/smf/index.php?topic=13.0

Somehow, according to his rtfm (which I actually did read) it does three things. Keeps flowers nice, keeps shrubs nice, and keeps weeds from spreading. I want to break this up into those three pieces. You'd think this would be simplier. I have managed to crash my game a few times trying this already. I was able to get the flowers to stay nice while removing the weed code, but on reverse, it crashed my game. Someone want to help me figure out which ones are for which? I'm not sure if its possible to fail harder... >.<
Test Subject
#18 Old 5th Sep 2012 at 5:57 AM Last edited by xiaoyun : 5th Sep 2012 at 7:06 AM.
Hi all
Unfortunately i found this thread just at moment while im going to bed so cant do much research rite now, (but after i rest i can look at it more closely if you want)

But i see it clearly how it can be done, it should be simple and no global mods required.

You can make your object loop in main something like :
1. idle 10 min,
2. invoke your BHAV
3. goto 1

This BHAV invoked in line 2 will :
1. iterate throught all objects on current lot,
2. select object of type (flowers, shrubs, whatever) by type 0x0106
or if not possible then by guid.
3. When have this object ID you can (read/write) operate on his atributes!
(so i believe make it bloom, or wither, or watered ect)

For example :
Shrubs attributes are
0, Overgrown (No/Yes) = 0 <- i guess you can write here always 0
1, daysOvergrown = 0 <- and also here write 0
2, placed? = 1 <- dont change
3, Trimmer ID = 0 <- this can be objSim who interact with it, or tracker object, dont change

Now, lets look at flowers object, here it is :
Attributes:
0, state = 0 <- no idea, try write 1 2 3 4 and look what hapen,
i assume it can be something like, 0 - small, 1 bloom, 2 withered (but not must to be exacly like this, just guessing,
can test it by 1 2 3 4 or look for some related constants)
1, water = 40 <- as name say, i believe 40 is watered rite. (too small or too high may make them wither), so write always 40
2, placed? = 1 <- nah, dont change it
3, watering can id = 0 <- dont change, can be ID for some tracker object
4, time offset = 3 <- no idea but sounds interesting, it needs testing (write different values or observe how it change)
5, spawn weeds? = 0 <- now this obviously says 'keep it 0' if you want no weeds,
but... i think theres no point to manipulate this one. It will be probably overwriten forcefuly to 1 when water attribute-1 will be 0 or high value. Just write 40 to water and i think this one shouldnt 'change itself'.
6, = 0
7, = 0

Semi Global Attributes:
0, Effect Playing? = 0 <- can be fun to play with, (but not much related to topic)
1, Half Tile? = 0 <- dont change
2, Pet Chew Loops = 0 <- dont change
3, Season State = 0 <- rather not change
4, Season State Anim In Progress = 0 <- better leave

So, should be simple - Just iterate throught flowers from time to time in your object
main and write to its atributes that they are good. (have water, no weeds ect)
You can also add for more realism check for distance betwin your object and flower and if distance > 7 tiles then not process this flower - he will wither because his too far from your beehive, aww poor flower... ect ect.
...and ofcourse it is 'lot specific' because you iterate throught objects within current lot

Although im not english native, it does not exempt me from caring about my grammar, which is usually main reason for editing my posts after submitting.
Test Subject
#19 Old 6th Sep 2012 at 2:19 AM Last edited by xiaoyun : 6th Sep 2012 at 3:05 AM.
(Next day)
Ok, Tested it and here are 2 'proof of concept' objects. Both are NON global.

First object (TestObject_Flamingo_ManipulateFlowers.package) is flamingo with menu,
which may force flowers within 2 tiles distance around it to wither or bloom, to show that it work.
- It writes to flowers attribute 0,1,5 and call some functions to trigger animation,
because flowers objects seems lazy and not update his appearance by itself
on attribute change, and we want to see it works.

Next object (TestObject_Flamingo_BloomAroundMe.package) is flamingo which keep flowers
within range of 3 tiles around self, in good health.
It invokes every fiew minutes function which writes to flowers attributes 0,1,5
and additionaly remove weeds if any.
(It do not update flowers graphics because it will be eventualy updated
by anything which will interact with them and will follow what was in attributes)

Attribute 0 is flower state. 0 - good 1,2,3,4 worse, 5 dead.
Attribute 1 is how much water it have
Attribute 5 trigger weeds to spawn if set to > 0


Its not about crops like strawberies ect, but i think the same technique can be used with plants.
Just look for plants around your object and write to its attributes the same as these objects do with flowers.
I believe it can be even more easy than flowers because plants attribute 14 make me believe it will update self after attribute change.
Heres plants attributes :

Semi Global Attributes :
0, Quality = 46 <- here is what we want to overwrite every fiew minutes
1, Quality Level = 5 <- can also be useful
2, Current State = 1 <- i think its 'grow phase' (dont change)
3, Hours Left in State = 3 <- nah..
4, Hours Until Untended = 13 <- if 0 will spawn weeds ? then keep high
5, Water Level = 21 <- mmm... dont make it self watering lol
6, Has Bugs? = 0 <- this ones interesting
7, Crop ID = 0
8, Weeds ID = 0 <- oh nice, is it objID of object which we want to delete if its not 0 ?
9, Plant Type = 0
10, Accessory ID = 0
11, Produce Yield = 10 <- lol, change for genetically modified plant ?
12, Has Quality Changed? = 0 <- maybe we can set it to 1 after writing to attribute 0 to trigger GFX change ?
13, Previous Quality = 46 <- may be wise to put here whats in attribute 0 decreased by 1
14, Delete Me? = 0 <- this attribute make me feel like plants are more easy than flowers because it looks like plants update self when you write to its attributes and may not need to call any functions.

Hope it gave you some ideas
Screenshots
Attached files:
File Type: zip  TwoObjects_TestFlowersFlamingo.zip (57.9 KB, 5 downloads) - View custom content
Description: proof of concept - test objects - Operate on flowers within 2 tiles distance around object.

Although im not english native, it does not exempt me from caring about my grammar, which is usually main reason for editing my posts after submitting.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#20 Old 15th Sep 2012 at 4:57 AM Last edited by Phaenoh : 15th Sep 2012 at 6:39 PM.
Ok, I haven't gotten around to testing xiaoyun's suggestions yet because I'm stuck on what I thought were simpler problems. I've cloned the flamingo and my bug houses are now kickable, but when they get knocked over, I want the effects they are playing to stop. I think I figured out where to put that stuff and I'm pretty sure it is getting called, but I think I've got a number wrong somewhere. When I had it at the normal 'My Object ID' I ended up getting butterflies on top of my sim's head, instead of them over the bug house. Then I tried 'My target ID' and that just errored out. Now I'm at 'Stack Objects ID' and that didn't seem to do anything. What should it read when a sim is doing an interaction to an object and that object needs to trigger an effect?

I also want these effects to stop and start at particular times during the day. I want my butterflies to go to sleep at night and I want my fireflies and moths to come out at night. Any thoughts on how to achieve that?
Screenshots
Test Subject
#21 Old 18th Sep 2012 at 7:21 AM
Something like this one ?
Butterlyes came around 6am and fireflyes come around 8pm
Look at Function Main() how its done.
Screenshots
Attached files:
File Type: zip  test_ladybug.zip (57.1 KB, 5 downloads) - View custom content
Description: testobject - with FX at certain hours

Although im not english native, it does not exempt me from caring about my grammar, which is usually main reason for editing my posts after submitting.
Test Subject
#22 Old 18th Sep 2012 at 10:08 PM Last edited by xiaoyun : 19th Sep 2012 at 3:00 AM.
Ok, here it is.
Nice working demo object that utilizes manipulating surrounding object's by writing to its attributes.

- It spawn butterlyes at day and fireflyes at night,
- and care for plants within predefined distance around self.

(Object working distance is set to 1 tile around it - for demo screenshots.
It can be changed to any distance by altering parameter in 'function - Main' line 4)

Screenshots
Attached files:
File Type: zip  test_ladybug_plus.zip (57.5 KB, 6 downloads) - View custom content
Description: demo object - utilizes various FX depending on hour, and manipulates surrounding objects within distance of X tiles around self

Although im not english native, it does not exempt me from caring about my grammar, which is usually main reason for editing my posts after submitting.
Back to top