Search Unity

[RELEASED] Love/Hate: The Emotion-Driven Relationship System

Discussion in 'Assets and Asset Store' started by TonyLi, Mar 24, 2015.

  1. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Black Friday Sale Ends @ Midnight PST

    The Asset Store's Black Friday Sale ends tonight at 11:59:59 PM PST.

    If you have sale items in your cart, including Love/Hate, Quest Machine, or the Dialogue System for Unity, remember to check out before then!

    upload_2021-12-4_8-44-19.png
     
    twobob likes this.
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 50% Off!

    upload_2021-12-13_8-37-56.jpeg
    upload_2021-12-13_8-46-10.png

    Love/Hate is 50% off in the Asset Store's final sale of the year.

    I designed Love/Hate to solve a specific issue. In too many games -- including AAA games -- NPCs only react to player actions in specific circumstances that authors have hard-coded in advance. If you do the same action somewhere else, the NPC doesn't react, which breaks immersion. With Love/Hate, your NPCs can react automatically to gameplay actions without having to hard-code specific circumstances, and they'll update their relationships and emotional states in response.

    The Dialogue System for Unity and Quest Machine are on sale, too, and they all have integration with each other.

    If your cart totals $150+, use coupon code HELLO2022 for an extra 5% off everything.
     
    twobob likes this.
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.0.22 Released

    Version 1.0.22 is now live on the Asset Store!

    Release Notes:
    • Added: FactionMember.factionName convenience property.
    • Improved: CanSeeAdvanced now has See Through Layer option to ignore other characters that are blocking line of sight.
    • Improved: UIPanel waitForShowAnimation property is now public.
    • Fixed: Input Device Manager inspector could report error with mixed input modes when an input definition was invalid.
    • Save System: SaveSystemMethods methods are now virtual.
    • Save System: SpawnedObjectManager can now save unique saver data on spawned entities of the same type.
    • Save System: Added overrideable method SceneTransitionManager.OnLoading.

    Reminder: Love/Hate, the Dialogue System for Unity, and Quest Machine are on all 50% off in the Asset Store's New Year Sale.

    If your cart totals $150+, use coupon code HELLO2022 for an extra 5% off everything.
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    New Year Sale Ends Tomorrow - Love/Hate 50% Off

    Love/Hate is 50% off in the Asset Store's New Year Sale!




    The Dialogue System for Unity and Quest Machine are on sale, too, and they all have integration with each other.


    Love/Hate 1.10.23 Released

    Version 1.10.23 is now live on the Asset Store.

    Release Notes:
    • Improved: Added optional DeedCategory to Deeds and DeedTemplateLibrary.
    • Improved: Added Deed.GetNew(DeedTemplate) initializer that accepts DeedTemplate.
    • Improved: public and protected FactionMember methods are now virtual.
    • Improved: UI panels that enforce button focus for key/joystick navigation now re-select previous selection after opening & closing other UIs.
    • Fixed: Wrapped SubsystemRegistration methods in #if UNITY_EDITOR to prevent error message in builds in certain Unity versions.
    • Save System: Now handles case where saver's ApplyData removes other savers from scene while loading saved game.
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.10.24 Released

    Love/Hate 1.10.24 is now available on the Asset Store!

    Release Notes:
    • Fixed: Rumors now inherit their original deed's DeedCategory.
    • Improved: FactionDatabaseEditor methods are now virtual.
    • Improved: Added utility component ShowCursorWhileEnabled.

    We'll be working on RPG Builder integration and updating the ORK Framework integration to the just-released ORK 3 in the next release.
     
    hopeful likes this.
  8. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
    @TonyLi facing issues integrating all three packages love hate, dialogue system & quest machine, there should be a tutorial for that thank you
     
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Hi! Keep an eye out later this week for the Quest Machine + Love/Hate integration tutorial video, which you can view as a sequel to the Quest Machine + Dialogue System video.

    In the meantime, you can find Quest Machine + Love/Hate integration instructions in LoveHate_Support.pdf when you import Quest Machine / Third Party Support / LoveHate Support.unitypackage and Dialogue System + Love/Hate integration instructions in the Love/Hate manual.
     
    Last edited: Feb 14, 2022
    khushalkhan and hopeful like this.
  10. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
    @TonyLi i am waiting for the video my friend
     
  11. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    We had some delays. I'll post it here when it's online.

    In the meantime, if you have any questions, please feel free to ask here, or on the Pixel Crushers forum, or on discord.
     
    Last edited: Mar 9, 2022
    khushalkhan likes this.
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.10.25 Released

    Version 1.10.25 is now live on the Asset Store. This is a small bug fix release.


    (The Love/Hate + Dialogue System + Quest Machine integration tutorial video is in the works.)
     
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Dialogue System + Love/Hate + Quest Machine Video Tutorial Series

    The 3-part series on integrating the Dialogue System, Love/Hate, and Quest Machine is now available. Start here:



    @khushalkhan
     
    khushalkhan likes this.
  14. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    khushalkhan likes this.
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate will be in the next Flash Deal in just under 30 minutes. Act quickly to get it for a whopping 80% off.



    Video tutorials start here:




    If you're using Quest Machine or the Dialogue System for Unity, the integration video tutorial series starts here:

     
    khushalkhan likes this.
  16. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.10.27 Released

    Version 1.10.27 is now live on the Asset Store.

    Release Notes:
    • Added SaveSystem.framesToWaitBeforeSaveDataAppliedEvent; added SpawnedObjectList asset type.
    • Fixed positioning issue in KeepRectTransformOnscreen component.
    • StringAsset text area now expands to accommodate large text passages.
    • Corgi Engine: Added PixelCrushersMMLoadingSceneManager to tie save system to Corgi scene loader.
    • TopDown Engine: Added PixelCrushersMMLoadingSceneManager to tie save system to TDE scene loader.
     
  18. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Asset Store Minimum Version 2019.4 Starting July 20

    On July 20, Unity will require all Asset Store assets' minimum versions to be Unity 2019.4. This is just a heads-up for any Love/Hate users still on older versions of Unity.
     
  19. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Thanks for the heads up.
     
  20. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.10.28 Released

    Version 1.10.28 is now live on the Asset Store!
     
  21. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    Hello Tony. A have a question

    I want a system UI like This (image)

    i did this with this code

    "public FactionManager loveHateManager"
    " int aux=loveHateManager.factionDatabase.GetFactionID("Iasmin");"
    "loveHateManager.GetFaction(aux).GetPersonalRelationshipTrait(0, 0);"

    I can get the values, but my question is this the best method to do that? (the are many character)
    there is event with RelationshipTrait?

    Thanks

    Claudio
     

    Attached Files:

    Last edited: Jul 25, 2022
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Hi @claudius_I - I assume you want to get the NPC's faction to the player. If so, here's simpler code:

    Code (csharp):
    1. float affinity = FactionManager.instance.GetAffinity("Iasmin", "Player");
    If you want to loop through all NPCs, you can do this:

    Code (csharp):
    1. foreach (Faction faction in FactionManager.instance.members.Values)
    2. {
    3.     if (faction.name != "Player")
    4.     {
    5.         float affinity = FactionManager.instance.GetAffinity(faction.name, "Player");
    6.     }
    7. }
    If you want to know when an NPC has witnessed an event or heard about it from a friend, you can add a Faction Member Events component (detailed on page 36 of the manual) or add a script that implements IWitnessDeedEventHandler, IShareRumorsEventHandler, and/or IGossipEventHandler (detailed on page 37). However, given that all of your NPCs are listed in the UI, you probably want to loop through them all when you show the UI.
     
    claudius_I likes this.
  23. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    Thanks Tony, this really helpme. I have a error in foreach (the list return FactionMember).



    it is possible to know or differentiate when a character is unknown?

    Thank Again :)
     

    Attached Files:

    Last edited: Jul 25, 2022
  24. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Glad to help! What do you mean by "unknown"? If you mean that the character has a personal affinity to the player, rather than just inheriting an affinity value from its parents, then you can check FactionMember.faction.HasPersonalRelationship() or FactionMember.FindPersonalAffinity(). Example:

    Code (csharp):
    1. float affinity;
    2. if (GetComponent<FactionMember>().FindPersonalAffinity(playerFactionID))
    3. {
    4.     Debug.Log($"I know the player and have affinity value {affinity} to the player.");
    5. }
     
    claudius_I likes this.
  25. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    is different, I mean that the protagonist still does not meet the character personally. but i think i can do this with a property in a script

    Thanks Again Tony :)
     
    TonyLi likes this.
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Happy to help!
     
    claudius_I likes this.
  27. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    Sorry for ask again, but i can't fix this. is weird

    Thanks

    ****************************
    update
    I fix with this
    foreach (KeyValuePair<Faction, List<FactionMember>> faction in FactionManager.instance.members)
    {

    if (faction.Key.name != "player")
    {
    }}

    my problem is only return 1 faction (the player faction)
     

    Attached Files:

    Last edited: Jul 25, 2022
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    If the other factions aren't represented by FactionMembers in your scene, you can still iterate through them in your faction database like this:

    Code (csharp):
    1. foreach (Faction faction in FactionManager.instance.factionDatabase.factions)
    2. {
    3.     Debug.Log(faction.name);
    4. }
     
    claudius_I likes this.
  29. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate On Sale

    upload_2022-8-9_9-30-33.jpeg

    Love/Hate is on sale in the Asset Store's Indie Innovation Sale!

    Innovate the way relationships and emotional states are handled in your games.

    The Dialogue System for Unity and Quest Machine are also in the sale, and they all integrate nicely with each other. (Integration video tutorial series)

    upload_2022-8-9_9-32-56.png
     
  30. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Best of Indie Innovation Sale Ends Soon - Love/Hate On Sale

    The Best of Indie Innovation sale ends in just a couple of days. If Love/Hate is on your wishlist, make sure to get it before the sale ends. You can also get the Dialogue System for Unity on sale. And remember to use coupon code BESTOF2022 to get an extra discount at checkout.

    upload_2022-8-29_11-40-51.png
     
  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.10.30 Released

    Version 1.10.30 is now available on the Asset Store!

    Release Notes:
    • Improved: Love/Hate now clamps traits to [-100,100].
    • Improved: Added SaveSystem.validSceneName delegate.
    • Added: Localized Fonts.
    • Added: ListExtensions.Shuffle.
    • Fixed: DiskSavedGameDataStorer.RetrieveSavedGameData checks if save file is empty.
    • Makinom: Updated support to Makinom 2.x.
    • ORK Framework: Updated support for ORK Framework 3.x.
     
  32. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    New Year Sale - Love/Hate On Sale

    upload_2022-12-19_11-9-27.png

    Love/Hate is 50% off in the New Year Sale! Last chance of the year to get the relationship and emotional state simulator that automatically reacts to the player's gameplay actions for half price.

    You can also get the Dialogue System for Unity and Quest Machine for 50% off.
     
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
  35. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.10.33 Released!

    Version 1.10.33 is now available on the Asset Store!

    Note: If you use the FactionMemberDebugger UI and are using your own UI prefab instead of the one the Templates folder, you will need to reassign your Text/TextMeshProUGUI elements. This change was necessary to allow FactionMemberDebugger to support TextMesh Pro.


    Release Notes:
    • Changed: FactionMemberDebugger UI now supports TextMesh Pro (you must reassign UI Text/TMPro fields), reads InputDeviceManager.IsKeyDown instead of Input class.
    • Improved: Added Min/Max Affinity Effect to deeds.
    • Improved: Added optional No-repeat timeframe to deeds.
    • Improved: LocalizeUI now localizes TMP_Dropdown components.
     
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    upload_2023-3-3_15-16-36.png

    Going to GDC 2023? Pixel Crushers is hosting a lunch at Oren's Hummus on Thursday, March 23!

    Do you use Love/Hate or other Pixel Crushers assets? Come join us and share tips with fellow asset users, ask any questions you have, and enjoy some good food to fuel you through the rest of the day's activities at GDC.

    Space is limited, so please RSVP early by getting a free ticket on Eventbrite.


    Note: This event is hosted by Pixel Crushers and is not affiliated with the Game Developers Conference (GDC).
     
    khushalkhan and blueivy like this.
  37. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.10.34 Released

    Version 1.10.34 is now available on the Asset Store!

    Release Notes:
    • Improved: Added customData field to TraitDefinition.
    • Fixed: LocalizeUI components on inactive GameObjects wouldn't update when changing languages unless the GameObject had previously been active.



    Going to GDC? Use Love/Hate or interested in using it in the future? Come join us for lunch on Thursday. There are a few seats still available! Please RSVP for free.
     
    Homicide likes this.
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    blueivy likes this.
  39. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    A Model Society - Christian King

    Christian King published an interesting video detailing how he's using the OCEAN and PAD models in Love/Hate to model NPCs in his project A Model Society (patreon) and then manage their AI decisions using utility in Opsive's Behavior Designer:



    Love/Hate is available on its own or in the Time Travel Mega Bundle where you can get Love/Hate and 17 other great assets for less than the price of Love/Hate alone.
     
    trustpivot and slippyfrog like this.
  40. slippyfrog

    slippyfrog

    Joined:
    Jan 18, 2016
    Posts:
    42
    Thanks for posting this. This simulation is eerily similar to what I've been building over the last year. Talk about Convergent evolution.
     
    TonyLi likes this.
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.10.36 is now live on the Asset Store!
     
  43. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.10.37 is now live on the Asset Store!
     
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.10.38 is now live on the Asset Store!
     
  45. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.10.38.2 is now live on the Asset Store!

    This version updates some API calls for compatibility with Unity 2023.
     
  46. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 50% Off in Summer Sale

    Love/Hate is 50% off in the Asset Store's Summer Sale.

    Love/Hate, the Dialogue System for Unity, and Quest Machine are all 50% off, and they have integration with each other. This is the first video in the tutorial series on integrating them:

     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 43% Off

    Love/Hate is 43% off in the Asset Store's $20 Asset Sale.

    If you're a Game Creator user, the next release will extend Game Creator support to include Game Creator 2. Love/Hate also has a long list of other assets that it integrates with.
     
  48. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate On Sale in $20 Sale + Game Creator 2 Integration Asset Available

    Love/Hate is 43% off in the Asset Store's $20 Asset Sale.

    upload_2023-11-4_8-44-6.png

    Love/Hate has Game Creator 1 integration. Many people have been asking about Game Creator 2 integration, and independent developer and Game Creator 2 integration specialist Arawn has obliged with a separately-available Integration of Love/Hate Faction System into Game Creator 2 asset. (Pixel Crushers is not affiliated with Arawn. Support questions for the Game Creator 2 integration should be directed to Arawn.)

     
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699
    Love/Hate 1.10.42 Released

    Version 1.10.42 is now live on the Asset Store! It's also 50% off in the New Year Sale.

    This version adds support for Blink's RPG Builder.

    Release Notes:
    • Added: FactionManager.ResetAll() and FactionMember.ResetAll().
    • Improved: Can now export multiple text tables to CSV in one operation.
    • Improved: Added UILocalizationManager.languageChanged event.
    • Fixed: Corrected code comments mentioning trait alignment range [-1,+1]. Correct range is [0,+1].
    • Localization Package: Added integration.
    • Odin Inspector: Disabled drawing of HelpBoxes in custom inspectors until stack overflow bug in Odin is fixed.
    • RPG Builder: Added integration.
     
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,699