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,694
    Daniel (the Eliot developer) wrote and maintains the Love/Hate integration. I totally forgot to add this to the Love/Hate manual. I've made a note to add it to the manual in the next update. Thanks for the reminder!
     
    uberwiggett and wood333 like this.
  2. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    320
    Last edited: Mar 24, 2019
    Regularry likes this.
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @Cartoon-Mania - No official integration is planned, but Love/Hate is designed to easily integrate with other assets by providing all the events and delegates necessary, so you can integrate it with a minimum of programming.
     
  4. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    320
    I am not in a hurry. I hope you will provide integration with Game Creator as well.
     
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    I'll add it to the consideration list. If there's enough demand for it, I'll look into an official integration.
     
    Weblox likes this.
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Love/Hate 1.9.8 Released

    Version 1.9.8 is now available on the Asset Store!

    This maintenance release contains updates to the save system and text tables.
     
  7. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    277
    + 1 for Game Creator Integration here :p
     
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Okay @Weblox & @Cartoon-Mania - I'll try to get Game Creator integration into the next update.
     
    Weblox likes this.
  9. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    277
    @TonyLi - Please no rush at all. I'm still saving up for the Game Creator Plugin. :rolleyes:
     
  10. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    320
  11. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Love/Hate 1.9.9 Released

    Version 1.9.9 is now available on the Asset Store!

    I'll be working on Game Creator support for the next release.


    Version 1.9.9 Release Notes
    • Added: FactionDatabase.personalityTraitChanged event.
    • Text Tables:
      • Added right-click context menu to insert/delete fields.
      • CSV import retains in order from file, now handles blank lines gracefully.
      • Editor window remembers last tab.
    • Save System: Eliminated message on Destructible Saver about missing Save System when exiting playmode.
     
    twobob, hopeful, stlouis4d and 2 others like this.
  12. stlouis4d

    stlouis4d

    Joined:
    Jul 19, 2015
    Posts:
    34
    Yes! Definitely excited about the next update. Much appreciated, Tony!
     
  13. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    This is /THE/ best personlity asset. Hug you.
     
    superwendel, hopeful and TonyLi like this.
  14. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Updated Dialogue System Integration

    The Love/Hate Extras page has an updated integration package for the Dialogue System for Unity. It improves the Lua functions so they can also find faction members by their actor names in your dialogue database or by their faction names, in addition to their GameObject names.

    The ReportDeed() Lua function also accepts "faction=FactionName" as the target. If the target starts with "faction=", then the deed will be reported to all faction members that belong to the faction FactionName.
     
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Out Of Office: May 31 - June 2

    I will be out of the office from Friday, May 31, through Sunday, June 2, 2019.

    When I return on Monday, I'll respond to all messages and emails as quickly as I can. Thanks in advance for your patience!
     
    MD_Reptile likes this.
  16. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Enjoy your time off!
     
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Love/Hate 1.9.10 Released!

    Version 1.9.10 is now available on the Asset Store!

    Version 1.9.10 Release Notes:
    • Fixed: Input Device Manager System.IndexOutOfRangeException when first importing asset if project's Input Manager is not ready.
    • Save System:
      - Improved: Added SaveSystem methods LoadAdditiveScene, UnloadAdditiveScene.
      - Improved: Savers can now implement optional ApplyDataImmediate and OnRestartGame methods.
      - Fixed: Moved DiskSavedGameDataStorer initialization code from Start to Awake so other scripts can check for saved games in their own Start methods.
    • Dialogue System:
      - Name provided to functions such as ReportDeed() can also refer to actor's name in dialogue database or faction name assigned to faction member.
      -In ReportDeed(), name can now optionally be "faction=FactionName".

    Game Creator integration is the goal for the next version.
     
    stlouis4d and superwendel like this.
  18. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Love/Hate 1.9.11 Released!

    Version 1.9.11 is now available on the Asset Store! (The version listed on the store page says 1.9.9, but I'm getting this corrected.)

    This update adds support for Game Creator.
     
  19. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    The version number has been corrected on the Asset Store. So if you've been waiting to update to 1.9.11, now's the time to do it, especially if you've been waiting for Game Creator integration.
     
    stlouis4d likes this.
  20. stlouis4d

    stlouis4d

    Joined:
    Jul 19, 2015
    Posts:
    34
    Excellent! Thank you, @TonyLi. Very much appreciated.
     
    TonyLi likes this.
  21. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    The Pixel Crushers discord server is now open for business: https://discord.gg/FwUaCNt

    The discord server is a place for the community to discuss assets and help each other out with quick questions, but not as a primary support channel. For support questions, please post here or on the Pixel Crushers forum since discord isn't a good way to provide answers that other people can easily find in the future.
     
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Love/Hate 1.9.12 Released

    Version 1.9.12 is now available on the Asset Store!

    NOTE: The next update will set the minimum Unity version to Unity 2017.4. Version 1.9.12 will be the last version that officially supports Unity 5.3 - 2017.3. Unity is ending support for 2017.3 and older, and they're asking publishers to set 2017.4 as the minimum version for assets.

    Release Notes:
    • Improved: Disappear Event's onDisappeared event is now public.
    • Misc. fixes to common code library.
    Reminder: We're now on discord: https://discord.gg/FwUaCNt
     
    hopeful likes this.
  23. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Hi,

    I'm planning to get this asset, but I'm asking if it has something like reputation system built in, like if I complete quests or do other tasks my reputation with a certain faction/clan goes up, starting with hatred -> neutral -> friendly or something like this.

    I also want to combine this with the dialogue system and display different dialogues depending on the current reputation with the certain faction.
     
  24. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @skinwalker - That's exactly what it's for. It's like a faction system on steroids.

    That's what Love/Hate's included Dialogue System integration does. You can also change reputation through dialogue choices, too, of course.
     
    skinwalker likes this.
  25. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Im using the odin serializer for saving and loading, I guess its possible to integrate it with this system and save the characters state?
     
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Yes, you could, but there's generally no need. Love/Hate includes serialization methods (FactionManager.SerializeToString and FactionMember.SerializeToString) and a save system. It's the same save system used by the Dialogue System and Quest Machine. But if you end up using Odin to saving, just call Love/Hate's SerializeToString methods and save those with Odin.
     
    skinwalker likes this.
  27. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    I saw the methods for saving, but Im wondering if I can specify the path where they are exported (in the Appdata) and a custom folder like Saves/Slot1/...
     
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @skinwalker- By default, DiskSavedGameDataStorer saves in Application.persistentDataPath. On Windows, this is in AppData / LocalLow / Company / Game. If you want to save somewhere else, you can make a copy of the DiskSavedGameDataStorer script and replace the GetSaveGameFilename() method. Then add your copy to the Save System GameObject. I'll make this method virtual in a future update so you can subclass DiskSavedGameDataStorer if you prefer. Or you can write your own saved game data storer script (there's a starter template in Common/Templates) and use that instead.
     
  29. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Okay, I would just like to make a folder there called "Saves" and then "Slot1", "Slot2" etc depending on the slot, so I can keep the data easily accessible.
     
  30. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Sure, just copy the script as I mentioned above, or subclass it in the next update.
     
  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Love/Hate 1.10.0 Released!

    Version 1.10.0 is now available on the Asset Store! This is a maintenance release.

    It also sets the minimum Unity version to Unity 2017.4 LTS.


    Release Notes:
    • CHANGED: Minimum version is now Unity 2017.4.1f1.
    • Improved: DiskSavedGameDataStorer methods are now virtual.
    • Improved: UIPanel.OnHidden method is now virtual.
    • Improved: Menu item to set USE_PHYSICS2D now applies to all build targets, not just current.
    • Fixed: WebGL build error with DiskSavedGameDataStorer.
    • Fixed: Save System bug in Position Saver with Multiscene ticked.
     
    Teila and skinwalker like this.
  32. IanItor

    IanItor

    Joined:
    Dec 21, 2017
    Posts:
    12
    Hello TonyLi, I have a question about Trait Alignment Importance option. In manual it says it doubles impact effect if it is set to 100. In my test where i give deed with a impact of 13 and lawfulness trait of 100 to a charater with the same lawfulness - it outputs 52 affinity change, which is quadrupled. Why? I thought it should be doubled. Furthermore if Alignment Importance is set to 0, which should not modify impact at all - it outputs 26 instead of 13, and when Alignment is set to 1 it outputs 200. Where is this numbers are coming from, is this expected behavior? Because i thought in cases like this, when both traits matching - the alignment is 100%, meaning full, unmodified impact of 13. Why value is doubled with a 0 alignment importance and why it is 200 with 1 importance?
     
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @IanItor - The base change in affinity is:

    affinityChange = confidence * impact * affinityToTarget

    If the witness is witnessing the deed directly, it has 100% confidence. (Unless you've assigned your own delegate to its GetTrustInSource delegate.)

    Let's say the witness has 100% confidence, the impact is 13, and the witness has 100% affinity to the target. Then the base affinityChange is 13.

    The base affinityChange can then be modified by Trait Alignment Importance and Arousal Importance. But if both of these are zero, they shouldn't affect it.

    If you tick the Faction Member's Debug Eval Func checkbox, it will log the results of evaluating each deed.

    Do the numbers look correct?

    Does it perhaps log twice? Maybe you're reporting the deed twice.
     
    hopeful likes this.
  34. IanItor

    IanItor

    Joined:
    Dec 21, 2017
    Posts:
    12
    To keep things simple i have no relationships between the characters (but below it says affinity to target is 100, i dont know why), the PAD values are all at zero as well as Arousal Importance. Also when i tried to change princess's relationships to player to different values in a Debug it says affinity is 100 regardless of my input.

    Love/Hate: NPC.EvaluateRumor actor:player tag:MyDeed target:princessimpact:13 aggression:0 source:NPC
    confidence in source: 100%
    affinity to target: 100
    change in affinity to actor based on impact, target & confidence: 13
    + trait alignment modifier: 0 (based on 100% alignment)
    + arousal modifier: 0 (based on 0 arousal)
    = final change in affinity to actor: 13
    power difference: 1(me) - 1(actor) = 0 (adjust dominance change up by 9,767092%)
    P,A,D change: 26, 0, 0

    Love/Hate: NPC.RememberRumor actor:player target:princess affinityChange:26,00

    In Console there is only two logs, one for evaluate and another for remember rumor.
    I directly calling a function of deed comitting via the button to specified character.
     
  35. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @IanItor - A patch is available on the Love/Hate Extra Downloads page that has two relevant changes:
    1. Deed evaluation applies the change in affinity to the relationship. In version 1.10.0, it incorrectly applied the change in pleasure, which is usually similar to the change in affinity but a little more extreme.
    2. The way trait alignment is computed has been improved.
    The patch should make the numbers more in line with what you expect. One additional thing to be aware of is the Power Difference Curve. You may want to set the value at 0 (i.e., same power levels) to be 0:

    upload_2019-9-18_21-49-45.png

    The default curve actually applies a little extra dominance when the power levels are the same, which may throw off the numbers you're expecting:

    upload_2019-9-18_21-50-22.png
     
    hopeful likes this.
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Love/Hate 1.10.1 Released

    Version 1.10.1 is now available on the Asset Store!


    Release Notes:
    • Improved: Trait alignment comparison is more accurate.
    • Fixed: Applies change in affinity, not change in pleasure, to relationship.
    • Fixed: AuraTrigger, StabilizePAD, PlayMaker, Dialogue System, GameCreator now call FactionMember.ModifyPAD instead of member.pad.Modify to ensure events are invoked.
    • Updated dominance formula in manual.
     
  37. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    302
    Hi,

    How would I going about displaying the faction drop down in the inspector of my own scripts. I am referring to the drop down called "faction" that can be seen in the faction member script. It is the drop down showing all the factions I have created.

    What I am doing is trying to set the faction id from my spawner script through the inspector. It works if I manually input the appropriate faction id int into a public variable but I was trying to make it cleaner and less chance of error.

    Thank you,
     
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi,
    I'll add a [FactionPopup] attribute in the next release. In the meantime, you can get the attribute in a patch on the Love/Hate Extras page. This patch adds a [FactionPopup] attribute that you can apply to an int variable to show it as a faction popup menu. It uses the faction database in the current scene. Use [FactionPopup(true)] if the scene doesn't have a faction database.
     
    hopeful and giraffe1 like this.
  39. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    302
    Perfect thanks, that worked.
     
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Happy to help!
     
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Love/Hate 1.10.2 Released!

    Version 1.10.2 is now available on the Asset Store!

    Release Notes:
    • Added: Option to turn off sharing of affinity to player when sharing rumors.
    • Added: [FactionPopup] scripting attribute.
    • Fixed: Setting localized language back to blank string now sets it to the default language.
    • Emerald AI: Added more config options to Love/Hate Emerald AI Faction Member; updated for 2.3.0.2.
     
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Updated Integration Packages: Emerald AI, ORK Framework

    The Love/Hate Extras page has updated integration packages for these products:

    • Emerald AI: This patch adds the following features/workflow to EmeraldLoveHateMember to automatically change Emerald AI faction relations based on Love/Hate affinities. Import it after importing version 1.10.3’s Emerald AI Support package.
      • Inspect the EmeraldAILoveHateMember component’s Faction Relation Thresholds.
      • Tick Set Emerald Faction Relations By Affinity.
      • Set thresholds for enemy (e.g., -20) and friendly (e.g., +20). Anything in between (-20 to +20) is neutral.When the AI’s affinity to another AI changes, it will update or add an Emerald AI faction relation.
      • Automatically set Emerald AI behavior by affinity to player.
      • Automatically set Emerald AI temperament by PAD values.
    • ORK Framework: Updated for ORK Framework 2.27.0.
     
  43. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Love/Hate 50% Off in Black Friday Sale

    Get Love/Hate for 50% off in the Asset Store's Black Friday Sale!

    Love/Hate is a great way to add personality and dynamic relationships to your NPCs.

    Use Emerald AI? The recently updated Emerald AI integration makes your AIs much more dynamic. As they witness the player and other AIs fight and perform other actions, they can automatically update their Emerald factions and behaviors.
     
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Love/Hate 1.10.4 Released + 50 Off in Black Friday Sale!

    Version 1.10.4 is now available on the Asset Store.

    This release has a bug fix and miscellaneous improvements. It also updates the Emerald AI integration with some nice affinity-based features that make your AIs' behaviors and factions more responsive to what's going on in the game.


    Version 1.10.4 Release Notes:
    • Fixed: Edge case in trait alignment function that could cause invalid affinity values.
    • Improved: Exposed UIPanel.deactivateOnHidden property.
    • Save System: Scene Portal now prevents multiple triggerings if interacting GameObject has multiple colliders.
    • Emerald AI: Added affinity-based AI behavior and faction relation options.
    • ORK: Updated for 2.27.0.
     
  45. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Now I finally got all the 3 assets and can't wait to try them next month. One question do they support EasySave3 for saving and loading?
     
    TonyLi likes this.
  46. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Thanks! Yes, all 3 assets use the same save system, so there's no code duplication. And the save system supports EasySave3 without requiring any scripting. Just import Plugins / Pixel Crushers / Dialogue System / Third Party Support / Easy Save Support and add an ESSavedGameDataStorer to your save system instead of the built-in DiskSavedGameDataStorer or PlayerPrefsSavedGameDataStorer. Then it will automatically use EasySave3.
     
    skinwalker likes this.
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Get Love/Hate for 50% before the Black Friday Sale ends today at midnight PST.

    upload_2019-12-1_8-51-23.png
     
  48. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Love/Hate 50% Off in Cyber Week Sale

    If you missed Love/Hate in the Black Friday Sale, not to worry! It's on sale during the Cyber Week Sale.
     
    Last edited: Dec 5, 2019
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Reminder: Love/Hate is 50% Off In Cyber Week Sale

    You can still get Love/Hate at half price through Friday, December 13, in the Cyber Week Sale.
     
    Last edited: Dec 5, 2019
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Integration Available for Opsive Character Controllers

    The Love/Hate integration for Opsive Character Controllers (Ultimate Character Controller, UFPS, Third Person Controller, etc.) has been sent to Opsive to be integrated into their Integrations Manager.

    In the meantime, you can download it from the Love/Hate Extras page.

    ---

    Reminder: Cyber Mega Sale Ends Friday

    The Cyber Mega Sale ends Friday at midnight PST. If Love/Hate is on your list, make sure to get it before the sale ends!