Page 1 of 1

Faction Urgency Function

Posted: Fri Nov 30, 2018 9:59 am
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);
        }

    }

Re: Faction Urgency Function

Posted: Fri Nov 30, 2018 11:28 am
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.

Re: Faction Urgency Function

Posted: Mon Dec 03, 2018 10:53 am
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!

Re: Faction Urgency Function

Posted: Mon Dec 03, 2018 11:06 am
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.

Re: Faction Urgency Function

Posted: Fri Dec 21, 2018 4:42 am
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!

Re: Faction Urgency Function

Posted: Fri Dec 21, 2018 7:35 am
by Tony Li
I was glad to make that change. It's much more intuitive now. Thanks for the suggestion!

Re: Faction Urgency Function

Posted: Mon Jan 07, 2019 12:10 pm
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 :)