- Site Map >
- Modding and Creation >
- Sims 4 Creation >
- Modding Discussion >
- Replace Sleep Animation by Nap Animation
- Site Map >
- Modding and Creation >
- Sims 4 Creation >
- Modding Discussion >
- Replace Sleep Animation by Nap Animation
Posts: 29
Thanks: 335 in 5 Posts
As the title says, I'd like to replace the Sleep animation by the Nap animation. I thought it would be very straightforward. But for some reason it doesn't work.
So, I'll post the bed_sleep interaction XML file content below. But first let me explain what I've tried already.
There's something called "canonical_animation" in this file and its number (11280) took me directly to the "Bed_Sleep_InteractionIdle_Idle" animation. So I figured if I changed that number to the "Bed_Nap_InteractionIdle_Idle" animation number it would work. Annnnddd... no. There are no other animations with "sleep" or "nap" in their names. Only Bathtub_Nap and so on. Nothing related to Sleep/Nap and Bed.
There's one mod here called "Friendlier Ask To Leave" by ReubenHood that replaces the Ask To Leave animation by the Goodbye (wave) animation. I checked what he did and it's similar. He changed the "animation_ref" number. As you'll see, there's one "animation_ref" in the Bed_Sleep interaction file too, but I see no animation reference numbers to change
This is the first part of the mod - replace the Sleep animation by the Nap animation. The second part will be creating a new pie menu to choose between sleeping with blanket (Sleep animation) or sleeping without blanket (Nap animation), but that's something for later.
So here's the bed_sleep interaction file content. I hope this helps:
<?xml version="1.0" encoding="UTF-8"?> <I c="SuperInteraction" i="interaction" m="interactions.base.super_interaction" n="bed_sleep" s="13094"> <T n="_affordance_key_override_for_autonomy">bed_sleep</T> <V t="participant" n="_icon"> <U n="participant"> <L n="participant_type"> <E>Object</E> </L> </U> </V> <T n="_provided_posture_type">15519</T> <V t="enabled" n="_saveable" /> <T n="allow_autonomous">False</T> <L n="appropriateness_tags"> <E>Appropriateness_Sleeping</E> </L> <T n="attention_cost">0.5</T> <V t="enabled" n="autonomy_preference"> <V n="enabled" t="use_preference"> <U n="use_preference"> <U n="preference"> <E n="tag">BED</E> </U> </U> </V> </V> <V n="basic_content" t="flexible_length"> <U n="flexible_length"> <V t="use_default" n="allow_holster" /> <L n="conditional_actions"> <V t="literal"> <U n="literal"> <L n="conditions"> <V t="stat_based"> <U n="stat_based"> <T n="stat">16654</T> <U n="threshold"> <T n="value">100</T> </U> </U> </V> </L> <E n="interaction_action">LOWER_PRIORITY</E> <L n="loot_actions"> <T>77289</T> </L> <E n="progress_bar_action">FORCE_USE_CONDITION</E> </U> </V> <V t="literal"> <U n="literal"> <L n="conditions"> <V t="buff_based"> <U n="buff_based"> <T n="buff">77288</T> <E n="timing">ON_REMOVE</E> </U> </V> </L> <E n="interaction_action">EXIT_NATURALLY</E> </U> </V> <V t="literal"> <U n="literal"> <L n="conditions"> <V t="wakeup_time_based"> <U n="wakeup_time_based"> <T n="hours_prior_to_schedule_start">0</T> <E n="who">Actor</E> </U> </V> <V t="stat_based"> <U n="stat_based"> <T n="stat">16654</T> <U n="threshold"> <T n="value">50</T> </U> </U> </V> </L> <E n="interaction_action">LOWER_PRIORITY</E> <L n="tests" /> </U> </V> <V t="reference"> <T n="reference">39516</T> </V> <V t="literal"> <U n="literal"> <L n="conditions"> <V t="stat_based"> <U n="stat_based"> <T n="stat">16652</T> <U n="threshold"> <E n="comparison">LESS_OR_EQUAL</E> <T n="value">-85</T> </U> </U> </V> </L> <E n="interaction_action">EXIT_CANCEL</E> <E n="restrictions">NO_RESTRICTIONS</E> </U> </V> <V t="literal"> <U n="literal"> <L n="conditions"> <V t="buff_based"> <U n="buff_based"> <T n="buff">75271</T> </U> </V> </L> <E n="interaction_action">EXIT_CANCEL</E> </U> </V> <V t="literal"> <U n="literal"> <L n="conditions"> <V t="wakeup_time_based"> <U n="wakeup_time_based"> <T n="hours_prior_to_schedule_start">0</T> <E n="who">Actor</E> </U> </V> <V t="stat_based"> <U n="stat_based"> <T n="absolute">True</T> <T n="stat">16654</T> <U n="threshold"> <E n="comparison">GREATER_OR_EQUAL</E> <T n="value">100</T> </U> <E n="who">Actor</E> </U> </V> </L> <E n="interaction_action">EXIT_NATURALLY</E> <L n="loot_actions" /> <E n="progress_bar_action">NO_ACTION</E> <E n="restrictions">NO_RESTRICTIONS</E> <L n="tests" /> </U> </V> </L> <V n="content" t="staging_content"> <U n="staging_content"> <V t="disabled" n="animation_ref" /> <U n="content_set"> <L n="affordance_links"> <T>9230</T> <T>96864</T> </L> <L n="affordance_lists" /> <L n="phase_affordances" /> <V t="disabled" n="phase_tuning" /> </U> <V t="disabled" n="push_affordance_on_run" /> </U> </V> <V n="periodic_stat_change" t="enabled"> <U n="enabled"> <L n="operations"> <V t="statistic_change"> <U n="statistic_change"> <T n="advertise">True</T> <T n="amount">0.311</T> <T n="exclusive_to_owning_si">True</T> <T n="stat">16654</T> <L n="subject"> <E>Actor</E> </L> <L n="tests" /> </U> </V> <V t="statistic_set_max"> <U n="statistic_set_max"> <T n="stat">33350</T> </U> </V> </L> <T n="trigger_gain_on_start">False</T> </U> </V> <V t="disabled" n="progressive_stat_change" /> <T n="start_autonomous_inertial">False</T> </U> </V> <L n="basic_extras"> <V t="set_game_speed"> <U n="set_game_speed"> <V n="game_speed_change" t="try_request_speed"> <U n="try_request_speed"> <V t="enabled" n="allow_super_speed_three" /> <E n="game_speed">SPEED3</E> </U> </V> <V t="at_beginning" n="timing"> <U n="at_beginning"> <V n="offset_time" t="enabled" /> </U> </V> </U> </V> <V t="set_sim_sleeping" /> <V t="buff"> <U n="buff"> <U n="buff_type"> <T n="buff_type">24336</T> </U> <L n="tests"> <L> <V t="inappropriateness" /> </L> </L> </U> </V> <V t="buff"> <U n="buff"> <U n="buff_type"> <T n="buff_type">39303</T> </U> </U> </V> <V t="buff"> <U n="buff"> <U n="buff_type"> <T n="buff_type">8880</T> </U> </U> </V> <V t="buff"> <U n="buff"> <U n="buff_type"> <V n="buff_reason" t="enabled"> <T n="enabled">0x32D2CECC</T> </V> <T n="buff_type">10094</T> </U> </U> </V> <V t="broadcaster"> <U n="broadcaster"> <L n="broadcaster_types"> <T>99813</T> </L> </U> </V> </L> <V t="disable_focus" n="basic_focus" /> <V t="enabled" n="canonical_animation"> <U n="enabled"> <T n="factory">11280</T> </U> </V> <T n="display_name">0xFC45FB15</T> <U n="display_name_text_tokens"> <L n="tokens"> <V t="participant_type"> <U n="participant_type"> <E n="participant">Actor</E> </U> </V> <V t="participant_type"> <U n="participant_type"> <E n="participant">Object</E> </U> </V> </L> </U> <T n="force_exit_on_inertia">False</T> <L n="interaction_category_tags"> <E>Interaction_Sleep</E> <E>Interaction_Super</E> <E>Interaction_All</E> </L> <L n="object_reservation_tests"> <L> <V t="test_set_reference"> <T n="test_set_reference">39304</T> </V> </L> </L> <V n="outcome" t="single"> <U n="single"> <U n="actions"> <L n="continuation"> <U> <T n="affordance">74261</T> </U> </L> <T n="force_outcome_on_exit">True</T> <L n="loot_list"> <T>39546</T> <T>23989</T> </L> </U> </U> </V> <T n="pie_menu_priority">10</T> <V t="enabled" n="route_start_balloon"> <U n="enabled"> <T n="also_show_user_directed">True</T> <U n="balloon"> <L n="balloon_choices"> <U> <V n="item" t="balloon_icon"> <U n="balloon_icon"> <V n="icon" t="participant"> <U n="participant"> <L n="participant_type"> <E>Object</E> </L> </U> </V> </U> </V> </U> </L> <L n="balloon_target"> <E>Actor</E> </L> </U> </U> </V> <E n="scoring_priority">VERY HIGH</E> <V n="sim_affinity_posture_scoring_data" t="enabled"> <U n="enabled"> <L n="my_scoring"> <U> <V t="relationship_based" n="affinity_strategy" /> <E n="running_interaction_tag">Sleeping</E> </U> <U> <V n="affinity_strategy" t="avoid" /> <T n="negate_tag">True</T> <E n="running_interaction_tag">Sleeping</E> </U> <U> <V n="affinity_strategy" t="avoid" /> <E n="running_interaction_tag">Loud</E> </U> </L> <L n="my_tags"> <E>Sleeping</E> </L> </U> </V> <T n="subaction_selection_weight">1</T> <V t="literal" n="super_affordance_compatibility"> <U n="literal"> <V n="default_inclusion" t="exclude_all" /> </U> </V> <E n="target_type">OBJECT</E> <L n="test_autonomous"> <L> <V t="appropriateness" /> <V t="buff"> <U n="buff"> <L n="whitelist"> <T>8847</T> <T>8904</T> <T>36123</T> </L> </U> </V> </L> </L> <L n="test_globals"> <V t="buff"> <U n="buff"> <L n="blacklist"> <T>26171</T> </L> </U> </V> <V t="sim_info"> <U n="sim_info"> <V n="ages" t="specified"> <L n="specified"> <E>TEEN</E> <E>YOUNGADULT</E> <E>ADULT</E> <E>ELDER</E> <E>CHILD</E> </L> </V> <E n="who">Actor</E> </U> </V> </L> <T n="time_overhead">360</T> <E n="visual_type_override">SIMPLE</E> </I>
Posts: 29
Thanks: 335 in 5 Posts
Posts: 3,552
Thanks: 55562 in 750 Posts
The spoiler thing is done by typing it in before and after your text:
[spoiler]
And the ending one needs to be written /spoiler inside those brackets.
MedievalMods and Sims3mods: Dive Cave Reset Fix, Resort Revamp, Industrial Oven Revamp, Will O' Wisp fix, UI Sounds Disabled, No Cars, Gnome Family Planner, Townies Out on the Town, No Martial Arts Clothes, Fast Skilling, etc. http://simsasylum.com/tfm/
Posts: 11,006
Thanks: 422944 in 1121 Posts
Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.
In the kingdom of the blind, do as the Romans do.
Posts: 2,671
Thanks: 62708 in 190 Posts
As the title says, I'd like to replace the Sleep animation by the Nap animation. I thought it would be very straightforward. But for some reason it doesn't work. |
I'm no animation expert at all, but I think the likely culprit is the _provided_posture_type which, to my limited understanding, controls the starting state of the animations. The sleep and nap interactions both reference a different posture type, and in those posture files a different animation state machine and animations are also referenced.
There are also two staging_content affordances referenced in the sleep interaction. I'm not sure what the disabled animation_ref has on those, perhaps that makes the animations in those not matter, not sure and don't have time to reference the tdesc files at the moment, but these thoughts might get you started.
Posts: 29
Thanks: 335 in 5 Posts
Shimrod! Thanks. I'll try something with that when I have time today.
And thanks for fixing my post, plasticbox.
Posts: 29
Thanks: 335 in 5 Posts
Posts: 3,552
Thanks: 55562 in 750 Posts
MedievalMods and Sims3mods: Dive Cave Reset Fix, Resort Revamp, Industrial Oven Revamp, Will O' Wisp fix, UI Sounds Disabled, No Cars, Gnome Family Planner, Townies Out on the Town, No Martial Arts Clothes, Fast Skilling, etc. http://simsasylum.com/tfm/
Posts: 29
Thanks: 335 in 5 Posts
Today, while I was taking a shower to go to work, I actually thought about that - the blanket must have its own animation. So next time I had time to mess with it, I would try to find it. I think it might be easier to just remove the blanket animation and keep the Sleep animations intact, because there are many Sleep animations based on mood, it seems. If I'm able to just make the Sim transition to the Sleep Idle animation without using the blanket, it might be better.
Anyways, thanks for your information again. I'm going to look into it right now I'll keep posting my findings.
Posts: 29
Thanks: 335 in 5 Posts
This is the transition animation: Bed_Sleep_Posture. And this is the same animation for Nap: Bed_Nap_Posture.
I swapped out the clips and now the Sim doesn't go under the blankets. But when they finish transitioning from Bed_Nap_Posture to Bed_Sleep_InteractionIdle, the blanket is over them, hehe. But that I had already solved. Now everything is working.
Next, create a new pie category to choose between sleeping with or without blankets
Posts: 29
Thanks: 335 in 5 Posts
I wasn't able to make my "No Blanket" option appears when selecting a bed
I tried using the injector method; I tried adding my new interaction ID directly to the super_affordance list; Nothing worked.
Do I need an associated SimData file to make the interaction appears? Because, as far as I understand, this interaction is not a pie menu category, but I might be wrong.
Posts: 2,671
Thanks: 62708 in 190 Posts
Do I need an associated SimData file to make the interaction appears? Because, as far as I understand, this interaction is not a pie menu category, but I might be wrong. |
Only the pie menu category (if you created a new one) would require a SimData file. I'm not sure how you're wanting to set it up, so basically if you're creating a new submenu "Sleep..." with selections "Covers" and "No Covers", then you would need a new pie menu category for the Sleep menu and the two interactions would point to that category. But if you're wanting to make where you just click on the bed object and there's a "Sleep No Covers" selection along with Sleep without a submenu choice, then you don't need a category.
In both cases, the interaction needs to be added to the SA list of the bed object, whether by injection or directly editing the object XML.
HTH!
Posts: 29
Thanks: 335 in 5 Posts
Only the pie menu category (if you created a new one) would require a SimData file. I'm not sure how you're wanting to set it up, so basically if you're creating a new submenu "Sleep..." with selections "Covers" and "No Covers", then you would need a new pie menu category for the Sleep menu and the two interactions would point to that category. But if you're wanting to make where you just click on the bed object and there's a "Sleep No Covers" selection along with Sleep without a submenu choice, then you don't need a category. In both cases, the interaction needs to be added to the SA list of the bed object, whether by injection or directly editing the object XML. HTH! |
Thanks for clearing that out. I might try to create a new category later. But for now I just want it to appear along with the Sleep choice.
I added to the SA list of the bed object. I tried adding by injection and directly editing the object XML, none worked
This is the code for the interaction. It's exactly the same as the bed_sleep interaction, but different calls for Posture and Animation.
<?xml version="1.0" encoding="UTF-8"?> <I c="SuperInteraction" i="interaction" m="interactions.base.super_interaction" n="bed_sleep_noBlanket" s="13719376076563101143"> <T n="_affordance_key_override_for_autonomy">bed_sleep</T> <V t="participant" n="_icon"> <U n="participant"> <L n="participant_type"> <E>Object</E> </L> </U> </V> <T n="_provided_posture_type">13916760318181898376</T> <V t="enabled" n="_saveable" /> <T n="allow_autonomous">False</T> <L n="appropriateness_tags"> <E>Appropriateness_Sleeping</E> </L> <T n="attention_cost">0.5</T> <V t="enabled" n="autonomy_preference"> <V n="enabled" t="use_preference"> <U n="use_preference"> <U n="preference"> <E n="tag">BED</E> </U> </U> </V> </V> <V n="basic_content" t="flexible_length"> <U n="flexible_length"> <V t="use_default" n="allow_holster" /> <L n="conditional_actions"> <V t="literal"> <U n="literal"> <L n="conditions"> <V t="stat_based"> <U n="stat_based"> <T n="stat">16654</T> <U n="threshold"> <T n="value">100</T> </U> </U> </V> </L> <E n="interaction_action">LOWER_PRIORITY</E> <L n="loot_actions"> <T>77289</T> </L> <E n="progress_bar_action">FORCE_USE_CONDITION</E> </U> </V> <V t="literal"> <U n="literal"> <L n="conditions"> <V t="buff_based"> <U n="buff_based"> <T n="buff">77288</T> <E n="timing">ON_REMOVE</E> </U> </V> </L> <E n="interaction_action">EXIT_NATURALLY</E> </U> </V> <V t="literal"> <U n="literal"> <L n="conditions"> <V t="wakeup_time_based"> <U n="wakeup_time_based"> <T n="hours_prior_to_schedule_start">0</T> <E n="who">Actor</E> </U> </V> <V t="stat_based"> <U n="stat_based"> <T n="stat">16654</T> <U n="threshold"> <T n="value">50</T> </U> </U> </V> </L> <E n="interaction_action">LOWER_PRIORITY</E> <L n="tests" /> </U> </V> <V t="reference"> <T n="reference">39516</T> </V> <V t="literal"> <U n="literal"> <L n="conditions"> <V t="stat_based"> <U n="stat_based"> <T n="stat">16652</T> <U n="threshold"> <E n="comparison">LESS_OR_EQUAL</E> <T n="value">-85</T> </U> </U> </V> </L> <E n="interaction_action">EXIT_CANCEL</E> <E n="restrictions">NO_RESTRICTIONS</E> </U> </V> <V t="literal"> <U n="literal"> <L n="conditions"> <V t="buff_based"> <U n="buff_based"> <T n="buff">75271</T> </U> </V> </L> <E n="interaction_action">EXIT_CANCEL</E> </U> </V> <V t="literal"> <U n="literal"> <L n="conditions"> <V t="wakeup_time_based"> <U n="wakeup_time_based"> <T n="hours_prior_to_schedule_start">0</T> <E n="who">Actor</E> </U> </V> <V t="stat_based"> <U n="stat_based"> <T n="absolute">True</T> <T n="stat">16654</T> <U n="threshold"> <E n="comparison">GREATER_OR_EQUAL</E> <T n="value">100</T> </U> <E n="who">Actor</E> </U> </V> </L> <E n="interaction_action">EXIT_NATURALLY</E> <L n="loot_actions" /> <E n="progress_bar_action">NO_ACTION</E> <E n="restrictions">NO_RESTRICTIONS</E> <L n="tests" /> </U> </V> </L> <V n="content" t="staging_content"> <U n="staging_content"> <V t="disabled" n="animation_ref" /> <U n="content_set"> <L n="affordance_links"> <T>9230</T> <T>96864</T> </L> <L n="affordance_lists" /> <L n="phase_affordances" /> <V t="disabled" n="phase_tuning" /> </U> <V t="disabled" n="push_affordance_on_run" /> </U> </V> <V n="periodic_stat_change" t="enabled"> <U n="enabled"> <L n="operations"> <V t="statistic_change"> <U n="statistic_change"> <T n="advertise">True</T> <T n="amount">0.311</T> <T n="exclusive_to_owning_si">True</T> <T n="stat">16654</T> <L n="subject"> <E>Actor</E> </L> <L n="tests" /> </U> </V> <V t="statistic_set_max"> <U n="statistic_set_max"> <T n="stat">33350</T> </U> </V> </L> <T n="trigger_gain_on_start">False</T> </U> </V> <V t="disabled" n="progressive_stat_change" /> <T n="start_autonomous_inertial">False</T> </U> </V> <L n="basic_extras"> <V t="set_game_speed"> <U n="set_game_speed"> <V n="game_speed_change" t="try_request_speed"> <U n="try_request_speed"> <V t="enabled" n="allow_super_speed_three" /> <E n="game_speed">SPEED3</E> </U> </V> <V t="at_beginning" n="timing"> <U n="at_beginning"> <V n="offset_time" t="enabled" /> </U> </V> </U> </V> <V t="set_sim_sleeping" /> <V t="buff"> <U n="buff"> <U n="buff_type"> <T n="buff_type">24336</T> </U> <L n="tests"> <L> <V t="inappropriateness" /> </L> </L> </U> </V> <V t="buff"> <U n="buff"> <U n="buff_type"> <T n="buff_type">39303</T> </U> </U> </V> <V t="buff"> <U n="buff"> <U n="buff_type"> <T n="buff_type">8880</T> </U> </U> </V> <V t="buff"> <U n="buff"> <U n="buff_type"> <V n="buff_reason" t="enabled"> <T n="enabled">0x32D2CECC</T> </V> <T n="buff_type">10094</T> </U> </U> </V> <V t="broadcaster"> <U n="broadcaster"> <L n="broadcaster_types"> <T>99813</T> </L> </U> </V> </L> <V t="disable_focus" n="basic_focus" /> <V t="enabled" n="canonical_animation"> <U n="enabled"> <T n="factory">11764788461978548158</T> </U> </V> <T n="display_name">0xF6E0C90C</T> <U n="display_name_text_tokens"> <L n="tokens"> <V t="participant_type"> <U n="participant_type"> <E n="participant">Actor</E> </U> </V> <V t="participant_type"> <U n="participant_type"> <E n="participant">Object</E> </U> </V> </L> </U> <T n="force_exit_on_inertia">False</T> <L n="interaction_category_tags"> <E>Interaction_Sleep</E> <E>Interaction_Super</E> <E>Interaction_All</E> </L> <L n="object_reservation_tests"> <L> <V t="test_set_reference"> <T n="test_set_reference">39304</T> </V> </L> </L> <V n="outcome" t="single"> <U n="single"> <U n="actions"> <L n="continuation"> <U> <T n="affordance">74261</T> </U> </L> <T n="force_outcome_on_exit">True</T> <L n="loot_list"> <T>39546</T> <T>23989</T> </L> </U> </U> </V> <T n="pie_menu_priority">10</T> <V t="enabled" n="route_start_balloon"> <U n="enabled"> <T n="also_show_user_directed">True</T> <U n="balloon"> <L n="balloon_choices"> <U> <V n="item" t="balloon_icon"> <U n="balloon_icon"> <V n="icon" t="participant"> <U n="participant"> <L n="participant_type"> <E>Object</E> </L> </U> </V> </U> </V> </U> </L> <L n="balloon_target"> <E>Actor</E> </L> </U> </U> </V> <E n="scoring_priority">VERY HIGH</E> <V n="sim_affinity_posture_scoring_data" t="enabled"> <U n="enabled"> <L n="my_scoring"> <U> <V t="relationship_based" n="affinity_strategy" /> <E n="running_interaction_tag">Sleeping</E> </U> <U> <V n="affinity_strategy" t="avoid" /> <T n="negate_tag">True</T> <E n="running_interaction_tag">Sleeping</E> </U> <U> <V n="affinity_strategy" t="avoid" /> <E n="running_interaction_tag">Loud</E> </U> </L> <L n="my_tags"> <E>Sleeping</E> </L> </U> </V> <T n="subaction_selection_weight">1</T> <V t="literal" n="super_affordance_compatibility"> <U n="literal"> <V n="default_inclusion" t="exclude_all" /> </U> </V> <E n="target_type">OBJECT</E> <L n="test_autonomous"> <L> <V t="appropriateness" /> <V t="buff"> <U n="buff"> <L n="whitelist"> <T>8847</T> <T>8904</T> <T>36123</T> </L> </U> </V> </L> </L> <L n="test_globals"> <V t="buff"> <U n="buff"> <L n="blacklist"> <T>26171</T> </L> </U> </V> <V t="sim_info"> <U n="sim_info"> <V n="ages" t="specified"> <L n="specified"> <E>TEEN</E> <E>YOUNGADULT</E> <E>ADULT</E> <E>ELDER</E> <E>CHILD</E> </L> </V> <E n="who">Actor</E> </U> </V> </L> <T n="time_overhead">360</T> <E n="visual_type_override">SIMPLE</E> </I>
Posts: 2,671
Thanks: 62708 in 190 Posts
This is the code for the interaction. It's exactly the same as the bed_sleep interaction, but different calls for Posture and Animation. |
If you could attach a zip of your package file, with the string table and new posture type, that would be much easier to check out.
Also, check your lastException.txt file, sometimes some bad XML will trigger an exception in there that can help track down what the problem is.
Posts: 29
Thanks: 335 in 5 Posts
I've attached my package. I've included the object XML in this one. But before publishing I wanna use the injection method.
Thanks :D
MaximiliumM_NoBlanketMod_Package.zip (8.8 KB, 86 downloads) - View custom content | ||||||||||
8883 02-06-2015 06:32 MaximiliumM_NoBlanketMod.package --------- ------- 8883 1 file |
Posts: 2,671
Thanks: 62708 in 190 Posts
I've attached my package. I've included the object XML in this one. But before publishing I wanna use the injection method. |
OK, I got the menu item to appear - you need to add the SA to all the beds. However, it doesn't appear to be working. The sim will get in a bed, under covers, lie there for a few sim minutes, then get back out of bed. Here's the variables I used for the SAs in script, might be easier to just use this than edit all the bed XML files:
beds_sa_instance_ids = (13719376076563101143, ) beds_object_ids = (14833, 14834, 36211, 36212, 36213, 36214, 36215, 36216, 36217, 36218, 36220, 36221, 36222, 36223, 36224, 36225, 36226, 36227, 36228, 38249, 38283, 77150, 77153, 77156)
EDIT: The GetPut_Fridge_Get exception I was seeing wasn't related to your package or wrong object IDs, it's a known fridge bug. Looks like I have to do a game repair from what I'm reading.
Posts: 29
Thanks: 335 in 5 Posts
OK, I got the menu item to appear - you need to add the SA to all the beds. However, it doesn't appear to be working. The sim will get in a bed, under covers, lie there for a few sim minutes, then get back out of bed. Here's the variables I used for the SAs in script, might be easier to just use this than edit all the bed XML files:
Code:
My guess is that I got some of the wrong object ids in there though, as I'm seeing a weird error in my lastException.txt file that I'd never seen until I ran this referencing GetPut_Fridge_Get. I generated the list of object instance numbers pretty quick and dirty and typed them in from another window, but I did get at least the two beds that were on the that lot correct. No time to look further into it now as I gotta get to work, but hopefully this can help you out in the meantime.
beds_sa_instance_ids = (13719376076563101143, ) beds_object_ids = (14833, 14834, 36211, 36212, 36213, 36214, 36215, 36216, 36217, 36218, 36220, 36221, 36222, 36223, 36224, 36225, 36226, 36227, 36228, 38249, 38283, 77150, 77153, 77156) |
Hmm! Ok, thanks. I'll look into it.
The weird thing is: I did exactly what you did. I added the SA to all the beds, but using the injection method. One thing I got wrong though is I put one last comma after all beds IDs.
Like (14833, 14844,)
Maybe that's why it wasn't working.
I'm gonna try more later today. Thanks for now :D
Posts: 29
Thanks: 335 in 5 Posts
OK, I got the menu item to appear - you need to add the SA to all the beds. However, it doesn't appear to be working. The sim will get in a bed, under covers, lie there for a few sim minutes, then get back out of bed. Here's the variables I used for the SAs in script, might be easier to just use this than edit all the bed XML files:
Code:
beds_sa_instance_ids = (13719376076563101143, ) beds_object_ids = (14833, 14834, 36211, 36212, 36213, 36214, 36215, 36216, 36217, 36218, 36220, 36221, 36222, 36223, 36224, 36225, 36226, 36227, 36228, 38249, 38283, 77150, 77153, 77156) EDIT: The GetPut_Fridge_Get exception I was seeing wasn't related to your package or wrong object IDs, it's a known fridge bug. Looks like I have to do a game repair from what I'm reading. |
Hmm. I see.
Unfortunately I didn't have the time to try to fix my mod. Actually, I got sick and ended up in the hospital
But it's ok. I'll be back soon hehe.
Posts: 2,671
Thanks: 62708 in 190 Posts
Unfortunately I didn't have the time to try to fix my mod. Actually, I got sick and ended up in the hospital But it's ok. I'll be back soon hehe. |
Oh my, hope you get well and back on your feet soon
Posts: 29
Thanks: 335 in 5 Posts
About the mod! I was able to make the pie menu work, but as you said they lie there for a few seconds and then get up, haha. I'll check that now Also, the animation should be working
Thanks for your help :D
Posts: 29
Thanks: 335 in 5 Posts
I was unable to fix that issue And now I have to do some other stuff, so I will report everything I tried and I'll attach the current state of my mod so if you or anyone else want to play with it, I'd appreciate.
First, if I simply replace the animation clips of both Jazz files (Bed_Sleep_Posture and Bed_Sleep_InteractionIdle) and use the "Sleep" interaction, it works. But that's not what I want to do, right? So now I have another interaction called (for now) "No Blanket" when you click on a bed. This new interaction can't simply call the same Jazz files as "bed_sleep" interaction, so I created new Jazz files.
My first question is - Should I name this new interaction something else rather than "bed_sleep"? Right now, it's like this: n="bed_sleep_noBlanket"
Also, in this same file, there is this line: <T n="_affordance_key_override_for_autonomy">bed_sleep</T>. Should I change it here too?
Ok, next. The new animation and posture files. The animation is called "Bed_Sleep_InteractionIdle_Idle" and this is the file that calls one of the Jazz files. Let me post the full code of this one:
<?xml version="1.0" encoding="UTF-8"?> <I c="AnimationElement" i="animation" m="interactions.utils.animation" n="Bed_SleepNoBlanket_InteractionIdle_Idle" s="11764788461978548158"> <T n="asm_key" p="InGame\StateMachines\Bed_SleepNoBlanket_InteractionIdle.statemachine">02d5df13:00000000:8941e4667f143adb</T> <L n="begin_states"> <T>Bed_SleepNoBlanket_InteractionIdle</T> </L> <T n="target_name">bedIKRef</T> </I>
As you can see, I also changed the name here "Bed_Sleep_InteractionIdle_Idle" to "Bed_SleepNoBlanket_InteractionIdle_Idle". Should I really do that? The Jazz file is called from that "asm_key" line. So, here's my second question:
Should I really change that "p" from that line?
Also, there's the posture file that I created.
<?xml version="1.0" encoding="UTF-8"?> <I c="Posture" i="posture" m="postures.posture" n="posture_BedSleepNoBlanket" s="13916760318181898376"> <T n="_asm_key" p="InGame\StateMachines\Bed_SleepNoBlanket_Posture.statemachine">02d5df13:00000000:9528daf75d21b5f4</T> <T n="_enter_state_name">get_in</T> <T n="_state_name">Bed_SleepNoBlanket_Posture</T> <L n="_supported_postures">
As you can see, I also changed the "n" of this file.
Then we have the Jazz files.
<ASM name="Bed_SleepNoBlanket_InteractionIdle">
and
<ASM name="Bed_SleepNoBlanket_Posture">
I tried running the mod without any name modifications, only changing the IDs etc, but it had the same effect. The Sim would get in bed then get out after some seconds. Oh, and the using the sleep animation rather than the nap animation.
So what's the proper way of creating new Jazz files?
MaximiliumM_NoBlanketMod_Script&Package.zip (9.9 KB, 59 downloads) - View custom content | ||||||||||
7643 02-27-2015 21:33 MaximiliumM_NoBlanketMod.package 2384 02-27-2015 21:35 MaximiliumM_NoBlanketMod.zip --------- ------- 10027 2 files |
Posts: 2,671
Thanks: 62708 in 190 Posts
My first question is - Should I name this new interaction something else rather than "bed_sleep"? Right now, it's like this: n="bed_sleep_noBlanket" |
Also, in this same file, there is this line: <T n="_affordance_key_override_for_autonomy">bed_sleep</T>. Should I change it here too? |
As for the Jazz questions, I know diddly-squat about all that Jazz. Hopefully someone who knows their animation will chime in on that.
Posts: 29
Thanks: 335 in 5 Posts
I mean, I called it "bed_sleep_noBlanket", but my instance ID was generated from some string like "maximiliumm:noblanketmod_posture" or something like that (I don't remember anymore, sorry )
Who Posted
|