Aller au contenu

Photo

allowing a score of 13 as the maximum value for an attribute? (solved)


1 réponse à ce sujet

#1
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
this code haven't been working so far. the attributes have all been set to 10 in a m2da.

case EVENT_TYPE_CHARGEN_ASSIGN_ATTRIBUTES:
        {
            int nAttribute = GetEventInteger(ev,0);
            int nPoints    = GetEventInteger(ev,1);
            if (nPoints >= 13)
            {
            }
            else {
                // -----------------------------------------------------------------
            // Subtract from available points to spend
            // -----------------------------------------------------------------
            Chargen_ModifyCreaturePropertyBase(oChar, PROPERTY_SIMPLE_ATTRIBUTE_POINTS, IntToFloat(nPoints*-1));

            // -----------------------------------------------------------------
            // Spend it.
            // -----------------------------------------------------------------
            Chargen_SpendAttributePoints(oChar,nAttribute,nPoints,FALSE);
            }
            break;
            }

Modifié par gordonbrown82, 06 mai 2010 - 11:34 .


#2
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
I think the problem is the interface spends the point before it sends the event to scripting to update the stat. You can change the scripting to not update the stat, but you'll still lose the point. You could try refunding the point if it's capped. I'm not sure if that will work or not, but it might be worth a try.



What TimelordDC is suggesting is modifying the maximum value of the attribute, which seems to be set to 1000 by default for all stats. To do this, you have to find the properties.xls 2da, change the values in the maximum column, save it then export it. I'm not sure how you export in the end user toolset, I presume there is some kind of utility for it. If this method works, it's probably the easiest and safest method.