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!
Quick Reply
Search this Thread
Inventor
Original Poster
#1 Old 29th May 2016 at 11:50 AM Last edited by Arsil : 2nd Jun 2016 at 9:24 AM.
Default [MOD] Hanami
Hello ^^

These info are outdated now, see later posts to see how the mod developed

This mod was inspired by douglasveiga coconutpalm and by the PartyStatue from UL limited edition.
For the title (not sure if completely fitting) see https://en.wikipedia.org/wiki/Hanami

So, this is a special tree (BuyCatalog/Function/Entertainment/Misc) that you can "activate".
When active the tree will start to loose petals (no animation, they just appear on the ground
near the tree) and give a moodlet to Sims in proximity forcing them to wear a special outfit.

The outfits require BG clothes and also "Japanese Inspired CAS Set" from the store and the WA EP.
The mod works even without them and eventually I could make it tunable so you can use CC.

ISSUES / TODO

Child outfit "conflicts" with Generations costumes: when a child wears a yukata/kimono, she acts like she's wearing the princess costume.
EDIT2: aaand fixed! Attachment updated.

When children pick up a petal the animation stretches (missing child animation) Fixed

petals covering the ground can make it harder to click on the terrain (for GoHere or things like that)
Note that petals automatically disappear after 24 hours (xml tunable) to not become a burden.
I made petals draggable (not too happy about it but when they were in inventory I couldn't move/delete
them if not using cheats/mods) so if they are troublesome you can move them.
EDIT: Anyway, this can only be an issue for using GoHere since Sims can route over the petals
without terrain clicking.

At the moment is better not to use more than one tree per lot.
I know it's a moronic limitation and I'll handle it soon.

Should be fixed.

How the mod should interact with the features of Seasons EP is still undefined.
ATM I've only put a condition to activate the tree only on spring and use the
winter look on winter.

Keep in mind that the mod is not finished yet. I should be able to refine it and fix the current problems,
but I'd also like some help with the following:

COLLABORATION / HELP / SUGGESTIONS
The mesh used for the petal is temporary and I need help (I can't mesh any more because reasons).
I also had to use a object with no complates/presets because creating the object from the mod ignores presets
(not sure if because I was using an object with technical issues, the TXTC resource wasn't referenced anywhere),
I faced this problem before but I'm not really expert in this field.
Keep in mind that the texture's color of the petal must match the one of the petals on the tree (more white than pink).
Maybe use a black or anyway dark border, so the petal is visible also on a light terrain/tile.
If possible, I would like 3 sizes, so I can see which one looks better in game and/or make it tunable which one to use.
Take inspiration from "sakura rug" from TSR (but I think that object has technical flaws, the missing TXTC reference I mentioned before)

Somehow, painfully and time-consumingly, I'm taking care of it myself.

I would also appreciate a custom mesh for the tree (I'm using a a simple retextured clone of the harvestable one)
to make it a bit bigger and more sakura-like.
I'm not currently using Seasons EP, so I didn't give too much tough to the integration with the seasonal changes.
I've used the material state related textures to:
- "default" (spring?): fully blooming
- "fall": lacking some petals
- "dead" : naked braches
- "winter" : used for winter
I could use the "withered" (?) material state to add another middle step between "default" and "fall" or "fall" and "dead"
to make the transition more smooth between "default" and "dead" (fully blooming and naked).
The related material definition of material states also change the "color" (shader?) of the texture (a dead tree is darker
that a healthy one despite using the same texture) and I'm not sure how to edit them with S3PE.
If you are confused by the fact that when you place the tree it has no leaves, that's because the code forces it to use the
"dead" material state.
I'm still thinking about how to show the tree when it's not active. How does a sakura looks like when it's not spring? I made a quick
research but I haven't found much info/pictures.

if you know of an animation or a special effect that can be used to "show" the petal falling let me know.
EDIT: the "confetti" special effect somehow resemble a leaf/petal falling, but I doubt I can
edit it (I can't event export a single effect from the resource that collects them because
_S3PE_ crashes - it's an issue with my computer, nothing to do with _S3PE_).

Use CC clogs as requirements/references? Are they available for all genre and age categories?

missing male/female teen/elder kimono/yukata (is it possible to "convert" the adult one? would that be legal
considering they are store items?). I've used WA ones.

For male child there's no kimono/yukata and I didn't find anything suitable (or that I liked)
on BG/WA clothes, so atm they don't change clothes. Any suggestions?

Summary of CASP items used:
- all shoes are from the BaseGame
- adult male/female kimono and child female kimono are from Japanese Inspired CAS Set (Store)
- teen/elder kimono from WA (EP)

For females I made 3 possible outfit (chosen randomly), for males only one but mostly because the
items used had only 1 preset and I didn't know how to use "CASTED ones" with SimOutfitter
(the tool by CmarNYC used to create SIMO resources) or how to edit them with S3PE.

EDIT: attachment removed. The mod should be ready soon.
Advertisement
Mad Poster
#2 Old 29th May 2016 at 4:26 PM
Sounds very promising!

Sakuras are cherry trees so they turn green for the summer season.

Similar to Aminovas's wildflower mod: http://aminovas.tumblr.com/post/100...he-sims-3-these



The flowers would bloom in spring and fade away come summer.
Inventor
Original Poster
#3 Old 30th May 2016 at 9:36 AM Last edited by Arsil : 30th May 2016 at 11:51 AM.
Oh my, how can I get rid of the "red background" on the texture in the attachment?
I know it comes from the alpha channel, but I'm getting crazy trying to fix it.
Does it only depends by the texture or also by the parameters on the mesh?

Does TSRW has a tool to easily add a material state section (and the related MATD blocks)
to a mesh that doesn't have any to start with?
It's probably doable with S3PE or Object Tool by Wesley Howe, but that seems painful
to do and to learn. With material states I can easily switch the texture used from the
code in order to make the size of the petal xml tunable (it's the texture that gives the
petal shape to object, since the mesh is simply a double square, double so it is double-faced
and not invisible when Sims pick it up).

Anyway, I'm making progress with the code but all this meshing stuff is distracting me.

EDIT: problem fixed, attachment removed.
Screenshots
Icy Spicy
#4 Old 30th May 2016 at 10:12 AM Last edited by icemunmun : 30th May 2016 at 10:48 AM.
Quote: Originally posted by Arsil
Oh my, how can I get rid of the "red background" on the texture in the attachment?
I know it comes from the alpha channel, but I'm getting crazy trying to fix it.
Does it only depends by the texture or also by the parameters on the mesh?

Does TSRW has a tool to easily add a material state section (and the related MATD blocks)
to a mesh that doesn't have any to start with?
It's probably doable with S3PE or Object Tool by Wesley Howe, but that seems painful
to do and to learn. With material states I can easily switch the texture used from the
code in order to make the size of the petal xml tunable (it's the texture that gives the
petal shape to object, since the mesh is simply a double square, double so it is double-faced
and not invisible when Sims pick it up).

Anyway, I'm making progress with the code but all this meshing stuff is distracting me.


1.Select the red background ----> Inverse selection --------> copy the petal image----> paste on a transparent background of a similar size-------> add an alpha.
2. Set the material as 'Phong alpha' from the dropdown menu instead of 'Phong' in TSRW
3. If you want an object to have material states,it is best to use an object with material states as a base
4.Do you want the petal to be recolourable?

Are you using a plane instead of a petal mesh to keep the poly counts down ?
Screenshots
Inventor
Original Poster
#5 Old 30th May 2016 at 11:18 AM Last edited by Arsil : 30th May 2016 at 11:47 AM.
I can't use TSRW for some technical reason.
I was able to set "Phong alpha" with S3PE and that fixed the problem.
Thank you, thank you, thank you!

### If you want an object to have material states,it is best to use an object with material states as a base

Yeah, that makes sense. ATM I don't have the strength nor the interest to experiment with that
(and changing the size the of the petal is as easy as re-texturing it).

### Do you want the petal to be recolourable?

I'm not sure. Since the petal is created by the code, it will use (I guess) the settings defined in the TXTC
resource instead of those defined in the default preset. So I don't know if it makes it sense to make it complatable.
And the color of the petal (as an object) must match the color of the petals (the flowers) on the tree.
Now I'm too tired and distracted to think about it.

### Are you using a plane instead of a petal mesh to keep the poly counts down ?

Hihihihi. I'm using exactly 8 vertices. Originally I used 4 so the texture covered only one side
and the other side was invisible in the picking animation.
Inventor
Original Poster
#6 Old 30th May 2016 at 1:15 PM Last edited by Arsil : 31st May 2016 at 11:36 PM.
I've re-uploaded the updated version of the mod in the first post.

Code-wise the mod is pretty much done, but there are still some conceptual and logical
things I'm concerned about. I'd like to hear some suggestions.

So few downloads so far... at this point the mod is safe to use (maybe make sure that all
trees are deactivated before uninstalling the mod) but maybe the store set is too heavy
of a requirement (I repeat, the mod will work even without it and the whole outfit changing
can be disabled from the xml). Anyway, all the SIMO resources (the ones that contain the
references to the single CASP resources) can be replaced or overridden with others that
only use WA clothes (it's just an example, you can use CC clothes if you prefer) to make
the requirement lighter. Of course someone should do new SIMO resources and that
someone preferably will not be me because I found that step pretty boring (and let's not
talk about my fashion sense).
EDIT: I made an override mod that uses WA CASP items.

The interactions' names aren't still translated, but, aside that, isn't "Activate tree" too much
mechanical? Should I use something like "Start Sakura (or Hanami) Festival"?

The petals falling makes sense I guess (by the way the scattering distance depends on the wind
intensity if Season is installed - assuming that the wind intensity is really implemented, I haven't
looked into it too much) and, as far as I'm concerned, is the main feature of the mod, but the tree
is supposed to be blooming (let's suppose it is the Spring season) so probably the tree shouldn't
become completely naked. Another important point is to make clear, visually, the difference between
an active tree and an inactive one (this is currently very clear since an inactive one looks like a dead
tree), how can I do that? If I use a normal tree with green leaves (I wonder how a Japanese cherry
looks like in the various seasons, I tried to research it but without much luck) it will be identical to an
harvestable tree and that would be bad.
Icy Spicy
#7 Old 30th May 2016 at 3:30 PM
It makes sense not to make it recolourable. Also it is clever of you to only have an oblong/rectangle with 8 vertices as i am guessing there will be many petals on the ground ( and the vertices do tend to add up!)

I looked at various pictures and it appears to me that : Spring - Pink ; Summer -Green ; Autumn - orangish/brownish ; Winter - White(? flowers). But Changing colours for each season seems to much of an hassale to me!is it possible to link/reference the different seasonal appearances to 4 different textures?

I will check it out tonight and report with some pictures.
Inventor
Original Poster
#8 Old 30th May 2016 at 3:57 PM
### is it possible to link/reference the different seasonal appearances to 4 different textures?

If I understand correctly what you mean then yes, that's exactly what harvestable plant do
(and that's the reason I've cloned one to make mine).

I'm positive that with some S3PE's magic I could add more material states if needed,
but considering that the "dead" and the "withered" (not completely sure about the name)
material states aren't used by my tree I think I'm good, since it doesn't make much sense
to have different textures representing a gradually getting naked tree. So I think I can
keep the usual material states to represent the seasonal look.

Thanks again for your interest ^^
Mad Poster
#9 Old 30th May 2016 at 6:18 PM
For the animations and meshes, you could use the leaf falling animations from Seasons and the Base Game Cherry Tree.
Icy Spicy
#10 Old 30th May 2016 at 6:31 PM
Yes thats what i mean about texture referencing! Just saw in game that you have used the harvestable 'PlantLargeTree' as a base.It looks totally fine in my opinion.

Did some testing and I have attached some pictures. It is currently summer in my game and I have to test out the remaining seasons. What are the triggers for falling petals to fall ?
Screenshots
Inventor
Original Poster
#11 Old 30th May 2016 at 7:00 PM Last edited by Arsil : 31st May 2016 at 6:10 AM.
Loved that last screenshot :D
Petals fall every 29 sim-minutes IIRC (probably the first one should fall immediately
after activation, I see that you and your Sim were confused by the lack of petals).
There are 20 petals (reached half the material state changes, reached 0 changes
again to "dead" which is the naked tree), so the tree stays active for almost 10 sim-hours
(I'll make both those two values tunable with warnings about not using dangerous values).
Oh, and I spot a bug or two: the "only on spring" should appear when you try
to activate it, not deactivate it :P

Thanks jje1000.
Leaves falling are probably a special effect and they are hard to understand and edit
(I did some experimentation with the "confetti" one and even if I was starting to get
the hang of it after a while I gave up, that's not what I want to focus at).
[EDIT: I've checked and the falling leaves aren't part of the visible code of the game]
The basegame cherry tree is a speedtree, so there's no real mesh or anyway I can't turn it into a "real" object.
EDIT2: but speedtrees have textures too and I'm gonna use the one for the bark! Thanks jje1000.
Top Secret Researcher
#12 Old 30th May 2016 at 10:56 PM
I tried this mod, it is a wonderful idea! I started a test game and put it on a community lot. My starting settings: summer (I have seasons installed). I used cmomoney's Time/Weather Change Mod here on MTS to change the seasons.

My results:
- I could activate the tree in summer (but for deactivating it said "Only in spring")
- a papparazi came by, she changed into different clothing but it was base game
- I don't have the store set, so my sim wears WA clothes
- she picks up flowers autonomously
- moodlet is there (+10)
- in winter the tree looked as expected like the dormant cherry tree.
- changed the season to spring and everything seemed to work fine. Although her mobile phone was much more attractive than the tree, but that is EA's fault >.<

Looks good so far!

Why didn't you want to use the base game cherry tree? It is not harvestable but in my opinion it looks better for hanami and is fully compatible with seasons already (but I have no clue about scripting and modding :-) ).

Also, have the German stbl if you want.
Screenshots
Attached files:
File Type: zip  Hanami_ger.zip (762 Bytes, 21 downloads) - View custom content
Inventor
Original Poster
#13 Old 30th May 2016 at 11:20 PM
Thanks for your feedback and contribution ^^

See my previous post about the BG cherry tree.
Icy Spicy
#14 Old 31st May 2016 at 10:12 PM
Quote: Originally posted by Arsil
Loved that last screenshot :D
Petals fall every 29 sim-minutes IIRC (probably the first one should fall immediately
after activation, I see that you and your Sim were confused by the lack of petals).
There are 20 petals (reached half the material state changes, reached 0 changes
again to "dead" which is the naked tree), so the tree stays active for almost 10 sim-hours
(I'll make both those two values tunable with warnings about not using dangerous values).
Oh, and I spot a bug or two: the "only on spring" should appear when you try
to activate it, not deactivate it :P



Both of us were a bit confused with the lack of petals but now both of us(me and my sim) are happy that I can see the petals on the ground, Pick them up, and also got a nice moodlet.

I am little unsure as to what triggers the moodlet, the cherry tree on bloom anywhere on the lot? Or do we get it only from viewing it? Same about the dress change!

I was inside my house and the cherry blossom was outside in my garden and I got the moodlet and the change into costume.Maybe it was because of the momentary glimpse my sim had of the tree when she walked through the garden into the house

Attached some pictures.Sorry about the darkness...it was night time!
Screenshots
Inventor
Original Poster
#15 Old 31st May 2016 at 10:47 PM Last edited by Arsil : 31st May 2016 at 11:36 PM.
Sims get the moodlet and are forced to change clothes by the proximity of the tree: it's a thing
called reaction broadcaster. The broadcaster sends a signal at some intervals of time trying to
"catch" some of the Sims at range and making them do stuff (many objects use it).
I'll talk more about this later because it needs some explanations:
- If you have a very big lot and maybe the tree is not at the center then not the whole lot is covered,
which could be a problem (using the 20 tiles radious that is the default value). Using more than one
tree may not solve this because, for performance's sake, only one tree per lot has a broadcaster
(but this too is xml tunable)
- All the parameters of the broadcaster are tunable but using weird values (like sending the
signal too often or extending the radius of the broadcaster outside the lot) may lead to performance issues.

Even if I am distracted (and frustrated) by another modding idea, I made some progress:
- More integration with Seasons
- Now the mod is much more tunable so that can be better tailored to the player preferences.
- I won't even dare to try to re-mesh the tree, but I've changed the textures (now sure how much it
can be considered an improvement...) and I made the tree placeable on a slot so that placing it on a
"scaling slot" it looks bigger. I made my own version of the object with the scaling slot but the original
one belongs to a set downloadable here on MTS. I couldn't find it to put a link.

Note that in the screenshot the sakura tree is still using the old textures.
A bigger tree stands out more and seems different from normal harvestable trees.
Having to use an extra object may be a bit inconvenient though.

I'm still testing it, but if there aren't issues I may upload it soon.
EDIT: I also made an override mod (that goes into the Override folder)
so that every outfit uses only BG and WA resources.
Screenshots
Inventor
Original Poster
#16 Old 2nd Jun 2016 at 8:41 PM Last edited by Arsil : 3rd Jun 2016 at 12:51 AM.
A bit of technical documentation, so I don't have to put it in the upload page.

Material states usage
- "leavesMoney" for blooming
- "wilted" for 1/3 blooming
- "default" for spring and summer
- "fall" for fall
- "winter" for winter (not sheltered tree)
- "dead" for winter (sheltered tree: inside a greenhouse or under a roof/floor)

TraitNames
http://nraas.wikispaces.com/EA+Scri...ants+TraitNames

Animation Player http://modthesims.info/download.php?t=441682 by cmomoney
With S3PE, put CLIP as Tag filter and open FullBuild0.package to see a list of all animations
Make sure there's both the adult and children version.
Note that not all animations are usable by the mod (just like with animation player).
Usually those that start with a_ (or c_), a2a (c2c) are good.
Those with a2o usually involve IKTargets and may not work or look weird.
Ofc you can also use custom animations.

SimOutfitter http://modthesims.info/t/440057 by CmarNYC
I only created one for each male age categories, for laziness and because they often had only
1 preset, but I believe the tool supports also user made presets (I haven't re-read its documentation)

Vanishing Object script http://www.modthesims.info/download.php?t=406614 by Buzzler
If you want the scaling slot object to become invisible while in Live mode then make sure you have this.
Since the object is so small it's not really necessary though, at least with my tree.
This is the original set that used scaling slots http://modthesims.info/download.php?t=407242 by sims_reality
(or at least that's where I found out that scaling slots were a thing)

If someone helps me I'd like to test something: clone and isolate the visual effect "bedwoohoopetals"
so I can try to edit it and possibly remove or reduce the very loud sound.
WIth S3PE, you put _SWB as tag filter then open FullBuild0 and right click on the resource
and select "Effect cloner" and then save the single effect on a new package.
Since it's a very big file, my low end computer can't handle it (it freezes) and even if I succeed
(with smaller _SWB resources) something goes wrong and I can't edit the new resource with S3PE (it freezes again).
Inventor
Original Poster
#17 Old 3rd Jun 2016 at 6:16 AM Last edited by Arsil : 3rd Jun 2016 at 6:45 AM.
If possible, I'd like this thread to stay open for a little while, for getting more technical
feedback and keep the comment section of the uploaded mod cleaner.

Last night I stayed up until very late to finish the mod description (as usual, I've edited
it a few dozen times) and then I've slept 1 hour tops because I was feeling too anxious.
That's not healthy.

icemunmun, to go back to your question about the line of sight, I just remembered that
there are a few settings in the broadcaster tuning to allow that. If you move into that
direction, I'd also suggest to set a timeout for the moodlet, otherwise I feel like it would
come and go without having a real impact (not that it can really have any deep impact).
Inventor
Original Poster
#18 Old 3rd Jun 2016 at 10:52 AM Last edited by Arsil : 4th Jun 2016 at 5:50 AM.
I don't understand why the base of the trunk is so dark in the "wilted" material state.
The material definition uses the same settings of the "default" state and the texture
should be the same: in theory only some of the leaves/flowers should differ between
the two images, but maybe I fucked up the alpha channel with several editing and
copy/cut pasting because I can't really use Gimp well.

By the way, working on the tree I discovered that not only the material definition
links to a specific image, the diffuse map, but it (may) also links to only the alpha
channel of a (possibly different) image, the alphaMap. This is probably trivial
information for any serious mesher but I'm a noob when it comes to this stuff.
EDIT: well, maybe I haven't explained that well. The thing that surprised me was
that the same image was used a diffuseMap for a material state and as a alphaMap
(to make the texture darker I believe, for the dead state of a plant) for another
material state which uses a different diffuseMap.
Back to top