Faction Urgency Function

Announcements, support questions, and discussion for Quest Machine.
Post Reply
fbit
Posts: 30
Joined: Fri Nov 30, 2018 9:30 am

Faction Urgency Function

Post by fbit »

Hello!

I'm not sure if I'm missing something (maybe a bug?), but why does the faction urgency function return the negative affinity towards the other faction?

Code: Select all

public class FactionUrgencyFunction : UrgencyFunction
    {

        public override string typeName { get { return "By Faction"; } }

        public override float Compute(WorldModel worldModel)
        {
            var observerFaction = worldModel.observer.entityType.GetFaction();
            var otherFaction = worldModel.observed.entityType.GetFaction();
            return worldModel.observed.count * -observerFaction.GetAffinity(otherFaction);
        }

    }
User avatar
Tony Li
Posts: 22106
Joined: Thu Jul 18, 2013 1:27 pm

Re: Faction Urgency Function

Post by Tony Li »

My thinking on that one was that it's like the Threat but without the entity count scaled by a curve.

After thinking about it, in the next update I'll add an entity count curve and an option to specify negative or positive. In its current form, I don't think it provides any benefit over Threat.
fbit
Posts: 30
Joined: Fri Nov 30, 2018 9:30 am

Re: Faction Urgency Function

Post by fbit »

Tony Li wrote: Fri Nov 30, 2018 11:28 am My thinking on that one was that it's like the Threat but without the entity count scaled by a curve.
Ah, now I see. I thought this urgency function should express the affinity to the other faction, like for example helping allies first or keeping an eye on the enemy.
Tony Li wrote: Fri Nov 30, 2018 11:28 am After thinking about it, in the next update I'll add an entity count curve and an option to specify negative or positive. In its current form, I don't think it provides any benefit over Threat.
I would appreciate this, thank you!
User avatar
Tony Li
Posts: 22106
Joined: Thu Jul 18, 2013 1:27 pm

Re: Faction Urgency Function

Post by Tony Li »

You may see version 1.1.1 on the Asset Store soon. This is just a quick update version to address API changes in uMMORPG 1.148. The urgency function change will be in 1.1.2.
fbit
Posts: 30
Joined: Fri Nov 30, 2018 9:30 am

Re: Faction Urgency Function

Post by fbit »

Tony Li wrote: Mon Dec 03, 2018 11:06 am The urgency function change will be in 1.1.2.
I have just updated to version 1.1.2, thank you for revising this issue!
User avatar
Tony Li
Posts: 22106
Joined: Thu Jul 18, 2013 1:27 pm

Re: Faction Urgency Function

Post by Tony Li »

I was glad to make that change. It's much more intuitive now. Thanks for the suggestion!
fbit
Posts: 30
Joined: Fri Nov 30, 2018 9:30 am

Re: Faction Urgency Function

Post by fbit »

Tony Li wrote: Fri Dec 21, 2018 7:35 am I was glad to make that change. It's much more intuitive now. Thanks for the suggestion!
Glad to hear that! No need to thank me :)
Post Reply