PDA

View Full Version : Spendable Attributes (K2)


Andrei Gijgorev
04-18-2009, 11:45 AM
Is there a way to change the number of attribute points to spend at the start of the game and during level-ups? I browsed several 2da files, but didn't find anything.

Eefluxx
04-18-2009, 04:16 PM
Skills.2da.....You can change how many you get when you hit the recommend button.

As for spending per each level up I know the higher Intelligence the more points you have to spend but it also changes depending on what class you are


I know Sentinel with an INT of 18 gives you 7 points per level up which is basically 1 for each skill.

But if you pick Weaponmaster during the Prestige stage of the game it drops to five.

There may be a way to change how what you choose determines what you get in the game but I haven't looked into it and don't know how right off hand

Hope this helps

Eefluxx

Andrei Gijgorev
04-18-2009, 05:08 PM
Maybe I wasn't clear...

I don't mean the skill points, I mean the attribute points. When you create your character at the beginning of a new game, you have 30 attribute points to spend.

By changing the attribute values in classes.2da I managed to change the "recommended" setting. For test purposes I set all jedi guardian attributes to 10, and when I clicked on "recommended" in the character creation menu, my character had every attribute set to 10 with no points remaining (which basically means 12 points to spend). But if I didn't click on "recommended", there still were 30 points to spend.

What I want is to decrease this number to 22, for every class, without having to click on "recommended". Is there a way to do this?


EDIT:
Another problem... in classes.2da I set "skillpointbase" (which should be the minimum value for skill increases) for several classes to zero, but even with 8 INT I still got 1 skill point per level-up. Is there some parameter in another 2da that overrides this value if set to zero or something?
Oh, and am I correct that "primaryabil" is the attribute the character will choose during level-ups?

Eefluxx
04-18-2009, 08:59 PM
My bad I misunderstood :)

I am not sure how to change the amount of attributes during level up, everything I have looked at and messed with doesn't change that you only get one at every 4 or 5 level ups I think

it is something that might be hardcoded and cannot be changed.

The primaryabil you asked of is the attribute your character will automatically choose if you pick recommend

Eefluxx

Edit: skillpointbase I am not sure of....sorry

RedHawke
04-19-2009, 03:03 AM
I don't mean the skill points, I mean the attribute points. When you create your character at the beginning of a new game, you have 30 attribute points to spend.

What I want is to decrease this number to 22, for every class, without having to click on "recommended". Is there a way to do this?
I looked into this myself a long time ago and could find nothing that can be edited to alter the beginning attribute point buy system, it looks to be a hard-coded element of the game (one of many I'm afraid).

The attribute point you get every 4 levels is indeed hard-coded and can't be changed.

DarthParametric
04-19-2009, 03:29 AM
You could always manually adjust your stats with KSE if you feel they are too high.

Andrei Gijgorev
04-19-2009, 03:44 AM
This is for a mod, so I don't think KSE will be of any help here.

It seems I'll have to somehow force the player to click on "recommended" first... Gotta write in the readme "If you don't click on 'recommended', several super duper cool bonus feats won't apply" or something...

Is it also hardcoded that you always get at least 1 skill point per level-up?

DarthParametric
04-19-2009, 05:08 AM
Ah. Might have been an idea to mention it was for a mod you were working on in the first post. I would imagine that skill points are also hardcoded.

Andrei Gijgorev
04-19-2009, 10:43 AM
I see.

I hope it is ok if I just collect all questions I have in this thread instead of opening 5 other threads. If not, just say so.

Other questions are:
- There are feats for making cross class skills class skills, except for persuasion. Is it possible to create a feat for that skill as well? If so, what would have to be done for that? I only found the feat.2da where it is specified which class can use which feat, but not what the feats themselves actually do.
- In the *_list columns there are values 0, 1, 3, and 4. I found out that 4 means "not in list" and 1 means "in list", but what about the rest? Is 3 "in list, but not pickable"? And what's with the zeros?
- Apparently it is possible to relate the availability of feats to attribute points. I've tested it and it works, but the requirements do not show. Do I have to manually enter those into the dialog.tlk?
- I want to completely remove the automatic health points regeneration. Where can I do that?
- In which 2da are the force power effects specified? To be precisely, I want to change the "heal" powers so that their effectiveness doesn't depend on the character level, but on the treat injuries skill instead.

Thanks in advance.

DarthParametric
04-19-2009, 11:14 AM
Persuasion is a PC-only skill, which would be why there isn't a feat for it. It should already essentially be cross-class.

For Force Heal, a starting point would be spells.2da. You can see that the script k_sp1_generic is listed for every force power. Looking at that script, it calls k_inc_force. Looking at that script, you'll see the following relevant section:


/*
HEAL
*/
//MODIFIED by Preston Watamaniuk March 28
// Remove cure poison and reduced the amount by 5
case FORCE_POWER_CURE:
{
SWFP_HARMFUL = FALSE;

// DJS-OEI 3/29/2004
// The Regeneration Consular Forms increase the relevance of
// the Wisdom and Charisma modifiers.
int nMultiplier = 1;
// DJS-OEI 7/20/2004
// Form/Stance re-design.
/*
if( IsFormActive( OBJECT_SELF, FORM_CONSULAR_REGENERATION_I ) ) {
nMultiplier = 2;
}
else if( IsFormActive( OBJECT_SELF, FORM_CONSULAR_REGENERATION_II ) ||
IsFormActive( OBJECT_SELF, FORM_CONSULAR_REGENERATION_III ) ) {
nMultiplier = 3;
}
*/

int nHeal = ( ( GetAbilityModifier(ABILITY_WISDOM) + GetAbilityModifier(ABILITY_CHARISMA) ) * nMultiplier ) + 5 + GetHitDice(OBJECT_SELF);

effect eVis = EffectVisualEffect(VFX_IMP_CURE);
int nCnt = 0;

object oParty;
if(IsObjectPartyMember(OBJECT_SELF))
{
oParty = GetPartyMemberByIndex(nCnt);
}
else
{
oParty = OBJECT_SELF;
}

while(nCnt < 3)
{
if(GetIsObjectValid(oParty) &&
GetRacialType(oParty) != RACIAL_TYPE_DROID &&
GetDistanceBetween(OBJECT_SELF, oParty) < 15.0)
{
SignalEvent(oParty, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
//Sp_RemoveSpecificEffect(EFFECT_TYPE_POISON, oParty);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oParty);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHeal), oParty);
}
nCnt++;
if(IsObjectPartyMember(OBJECT_SELF))
{
oParty = GetPartyMemberByIndex(nCnt);
}
else
{
oParty = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, nCnt);
}
}
}
break;

/*


I'm no scripter/coder, but looking at the int nHeal section, I'd say it is primarily tied to a character's WIS and CHA stats, but hit dice (which is tied to level and class) also plays a part. I imagine you would need to change this to reference the Treat Injury skill modifier instead. Someone with a thorough knowledge of scripting will be required to help you with this. There are also sections for Improved Heal and Master Heal.

Andrei Gijgorev
04-19-2009, 11:45 AM
That looks an awful lot like c++ code... so this is indeed helping me a lot.

As I see it, nMultiplier is the level of the power (Heal, Improved Heal, Master Heal), but what does GetHitDice return? Also, judging from the in-game description text, shouldn't there be something like "GetLevelByPosition(1, OBJECT_SELF) + GetLevelByPosition(2, OBJECT_SELF)" ?


I know that persuasion is PC-only, but I have set persuade as a cross-class skill for any classes because I want to force players to sacrify a feat if they want to use persuasion a lot. As you may have noticed, my mod aims to increase the difficulty of the game by decreasing the potency of the characters and forcing players to rely more on their companions.

DarthParametric
04-19-2009, 01:51 PM
nMultiplier is only for the Consular's regeneration Force Form. I usually play Guardian-based classes so I don't have any first-hand knowledge of it, but I gather that Consular's get a Form that improves the effect of Heal by the nMultiplier (which scales based on the level of the Form they have).

Each level of Heal has its own section in k_inc_force. Improved Heal increases the base amount of healing by 5, Master Heal increases it a further 5 and also removes any Stun status effects. Other than the base amount, the impact of the character's stats remains the same.

Andrei Gijgorev
04-20-2009, 06:30 PM
Alright, I tried to modify the first Heal power to heal only party members within 5 meters by 5 vitality points + base treat injury level of the Force user. Also, I figured nMultiplier is not relevant at all since it has been commented out and was always set to 1. Is that correct so?
case FORCE_POWER_CURE:
{
int nHeal = GetSkillRankBase(7, OBJECT_SELF) + 5;
effect eVis = EffectVisualEffect(VFX_IMP_CURE);
int nCnt = 0;

object oParty;
if(IsObjectPartyMember(OBJECT_SELF)) oParty = GetPartyMemberByIndex(nCnt);
else oParty = OBJECT_SELF;

while(nCnt < 3)
{
if(GetIsObjectValid(oParty) &&
GetRacialType(oParty) != RACIAL_TYPE_DROID &&
GetDistanceBetween(OBJECT_SELF, oParty) < 5.0)
{
SignalEvent(oParty, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oParty);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHeal), oParty);
}
nCnt++;
if(IsObjectPartyMember(OBJECT_SELF)) oParty = GetPartyMemberByIndex(nCnt);
else oParty = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, nCnt);
}
} break;


I would also be grateful if someone could answer some more of my questions posted above:
- There are feats for making cross class skills class skills, except for persuasion. Is it possible to create a feat for that skill as well? If so, what would have to be done for that? I only found the feat.2da where it is specified which class can use which feat, but not what the feats themselves actually do.
- In the *_list columns there are values 0, 1, 3, and 4. I found out that 4 means "not in list" and 1 means "in list", but what about the rest? Is 3 "in list, but not pickable"? And what's with the zeros?
- Apparently it is possible to relate the availability of feats to attribute points. I've tested it and it works, but the requirements do not show. Do I have to manually enter those into the dialog.tlk?
- I want to completely remove the automatic health points regeneration. Where can I do that?

Malxados
04-21-2009, 05:58 PM
- I want to completely remove the automatic health points regeneration. Where can I do that?

Wow. I randomly found this while looking for a different script function. It seems oddly specific :) :

// 858
// RWT-OEI 09/06/04
// This function turns off the innate health regeneration that all party
// members have. The health regen will *stay* off until it is turned back
// on by passing FALSE to this function.

void DisableHealthRegen(int nFlag = FALSE);

Hope it helps

Andrei Gijgorev
04-21-2009, 06:13 PM
That looks nifty, thanks!

dholm
04-23-2009, 06:10 PM
GetHitDice returns either of two things: Current number of Hit Dice (which is what I'm assuming, due to the wording), or the Hit Die of the class (though I would guess that should be "GetHitDie", not "Dice"). Meaning it is either either "Level" or "Class" -- Soldier is d10, for instance (I think), and level is equivalent to the number of Hit Dice.

I have no idea how to edit or create feats except that it's done via scripting, but I don't see why it would be impossible to do so with Persuade. I'd look into it, but I know nothing about scripts. :( I found a list of feats in nwscript, but that's about it.

As for tooltips, they are intelligent -- if you change the damage a blaster does, for instance, it is reflected in the in-game tooltip. I would imagine the same holds true for attribute requirements, or at least could be changed to be so. Perhaps it was edited out because attribute requirements weren't used? I dunno.

Andrei Gijgorev
04-25-2009, 08:06 AM
It seems GetHitDice(object) does indeed return the level of the object.
I've decided to not make Persuade pickable as a class skill, so I probably won't have to add new feats after all.
Feat descriptions aren't intelligent, alas, so I had to go through the dialog.tlk and change most prerequisite blocks.

The WIP thread of my mod can be found here (http://www.lucasforums.com/showthread.php?t=197239), in case someone's interested (80% finished).