Aller au contenu

Photo

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


9 réponses à 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
TimelordDC

TimelordDC
  • Members
  • 923 messages
The snippet you've posted checks if the number of points being assigned to an attribute is greater than or equal to 13 -> not the total number of assigned points.

Do you want to have a maximum of 13 points to be spent on an attribute? Or the attribute total to be 13?

#3
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
i want the attribute total to be 13.

#4
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
this code makes the maximum attribute be 13 but the player can still spend points even though the attribute doesn't go up when the plus icon is clicked.



case EVENT_TYPE_CHARGEN_ASSIGN_ATTRIBUTES:

{

int nAttribute = GetEventInteger(ev,0);

int nPoints = GetEventInteger(ev,1);

int nMax = GetCreatureAttribute(GetHero(), nAttribute);



if (nMax >= 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;



}


#5
TimelordDC

TimelordDC
  • Members
  • 923 messages
When the engine sends this event, the player is already assigning values to attributes. Since you can't selectively designate attribute points to a particular attribute, you have to live with this solution.
Alternatively, if the attribute cap is a hard one, you can set the maximum value in the properties.xls and see if that works.

#6
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
i don't understand what you're saying.

#7
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.

#8
FergusM

FergusM
  • Members
  • 460 messages

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.


The 2DA will be in your Program Files/.../Dragon Age/Tools/Source folder. You can turn them into GDAs by using the Excel Processor in Tools/ResourceBuild/Processors, and then put the GDAs in your override folder.

See 2DA and 'Compiling 2DAs' on the wiki for more.

#9
Lotion Soronarr

Lotion Soronarr
  • Members
  • 14 481 messages
I have a similar isse.



The thing with the 2DA (or .gda...propeties), is htat it sets the MAXIUMUM for everything - attributes + items.



So if I set it to 20, if I have 19 STR and a item that grants 1 STR, The STR score won't rise.



What I'm personally trying to do is to have 20 as a cap of normal attributes (character physical stats) and 25 with items.



I'm failing miserably so far...

#10
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
Lotion I would suggest creating your own thread about this issue. Since this one is marked as 'Solved' most people (and Bioware) are probably not going to look at it