how to custom the FactionMember‘s Traite?

Announcements, support questions, and discussion for Love/Hate.
Post Reply
mengliang010800
Posts: 6
Joined: Thu Jul 29, 2021 11:43 pm

how to custom the FactionMember‘s Traite?

Post by mengliang010800 »

I have a faction, but faction members don't have exactly the same Traite,
For example,the farmers faction have same traite value:Lawfulness,Lawfulness should be>10,but other traite value Not the same,example,Some are bold, some are timid,Some are clever, some are clumsy.But I don't want to add too many factions, it will be hard to manage
Can I customize FactionMember's Traite?like the Add Traite Component,FactionMember can select a custom Traite Component,Will this requirement be added to the next version? Thank you very much!!!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: how to custom the FactionMember‘s Traite?

Post by Tony Li »

A faction is a collection of traits (personality traits and relationship traits). If a character is different (for example, clumsy), it should have its own faction.

To help keep them organized, you can use "/" to group them into submenus:

lhSubmenu1.png
lhSubmenu1.png (39.98 KiB) Viewed 4426 times
lhSubmenu2.png
lhSubmenu2.png (54.3 KiB) Viewed 4426 times

You can also use Excel spreadsheets if you want:

lhSubmenu4.png
lhSubmenu4.png (13.76 KiB) Viewed 4426 times
lhSubmenu3.png
lhSubmenu3.png (5.16 KiB) Viewed 4426 times
mengliang010800
Posts: 6
Joined: Thu Jul 29, 2021 11:43 pm

Re: how to custom the FactionMember‘s Traite?

Post by mengliang010800 »

Hi Tony,Thank you for quick response as always,I have a few different opinions,No two leaves in the world are exactly the same,In an RPG game, there are thousands of NPCS,Maybe I can customize some fuzzy conditions to randomly generate traite,The same faction only has some of the same traite,other traite randomly generate or other traite manual to value,How can this requirement be implemented more easily?
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: how to custom the FactionMember‘s Traite?

Post by Tony Li »

Hi,

The Love/Hate API lets you create factions at runtime, or you write a script to generate a CSV file with thousands of randomized factions and import that into your faction database.

Although RPG games often have thousands of NPCs, not all of those NPCs have unique values. This is why multiple faction members can point to the same faction. Each faction member can have their own second-to-second emotional state but share the same faction traits.

However, if you want every NPC to have unique values, Love/Hate does support it. One of the QA performance tests is 10,000 simultaneous faction members, with zero garbage collection.
mengliang010800
Posts: 6
Joined: Thu Jul 29, 2021 11:43 pm

Re: how to custom the FactionMember‘s Traite?

Post by mengliang010800 »

Hi Tony,I've added custom traits
private Traits customTraits;
private void Register()
{
if (m_started && !m_registered && FindResources())
{
m_registered = true;
factionManager.RegisterFactionMember(this);
customTraits=GetComponent<Traits>();
if (customTraits)
faction.traits = customTraits.traits;

}
}

And add the Traits Value Panel in the Inspector,Easy to view traite value, do not return to the database to view traite, also easy to change the traite value immediately
微信截图_20210801012835.jpg
微信截图_20210801012835.jpg (68.98 KiB) Viewed 4418 times
Attachments
FactionMemberEditor.zip
(3 KiB) Downloaded 244 times
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: how to custom the FactionMember‘s Traite?

Post by Tony Li »

Thanks for sharing! I'll try to incorporate this idea into the next version so you won't have to reapply your customizations when you update Love/Hate.
rahulp411
Posts: 1
Joined: Sun Aug 08, 2021 3:52 am

Re: how to custom the FactionMember‘s Traite?

Post by rahulp411 »

Maybe I can customize some fuzzy conditions to randomly generate traite,The same faction only has some of the same traite.This is why multiple faction members can point to the same faction. Each faction member can have their own second-to-second emotional state but share the same faction traits. spicemoneylogin.in myfiosgateway.one
Post Reply