Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Decompile Hardcore Mod1 for Kotor I

Page: 1 of 1
 Carlos1741
08-07-2006, 2:59 PM
#1
Hi guys, I am having trouble decompiling the script k_ai_master.ncs using the DeNCS program. I have the latest Java drivers/files and have the nwscript from Kotor II installed properly. I simply can not decompile the script. What I wanted to do was change the difficulty settings to make it a bit easier.

Dont suppose anyone could give me guidance on how to change the original script from Kotor I (k_ai_master.nss) so that the buffs in Talchia's are halved. Or even better if someone could decompile his script for me.

Thanks for your time.

Tom
 Darth333
08-07-2006, 3:11 PM
#2
I think I have the .nss file at home. I'll verify and if I do I'll post it tonight.
 Carlos1741
08-07-2006, 4:48 PM
#3
Thanks for checking Darth.

I really appreciate this.
 Darth333
08-07-2006, 6:49 PM
#4
It's too long to post here but basically Talchia added this replaced lines 154 to 158 of the original K_ai_master.nss file which were:
if(GN_GetSpawnInCondition(SW_FLAG_EVENT_ON_PERCEPT ION) && GetLastPerceptionSeen())
{
SignalEvent(OBJECT_SELF, EventUserDefined(1002));
}


by this:

////////////>>>>>>HARDCORE MOD V 1.0<<<<<<<<<<////////////////////////////
//Buffs the Target up, based on a script from Preston Watamaniuk/Bioware //
// //
// Note: Boss enemys like Darth Bandon and Malak will get also the //
// increase, so be carefull with tweaks. Also the ability increase //
// is limited to 20, everything above will be ignored and //
// count as 20. //
// //
//::///////////////////////////////////////////////////////////////////:://
//:: Created By: Talchia http://home.t-online.de/home/Talchia/) :://
//:: Created On: December 30, 2003 :://
//::///////////////////////////////////////////////////////////////////:://

//Jedi
if(GetLevelByClass(CLASS_TYPE_JEDICONSULAR) > 0 ||
GetLevelByClass(CLASS_TYPE_JEDIGUARDIAN) > 0 ||
GetLevelByClass(CLASS_TYPE_JEDISENTINEL) > 0)
{
//Set up the effects based on the character level
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 6);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 6);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 6);
eFP = EffectTemporaryForcePoints(25);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 10);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 10);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
eFP = EffectTemporaryForcePoints(50);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 20);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 20);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 20);
eFP = EffectTemporaryForcePoints(100);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = EffectLinkEffects(eStatA, eStatB);
eLink = EffectLinkEffects(eLink, eFP);
eLink = EffectLinkEffects(eLink, eStatC);
}
}
//BEASTS
else if(GetSubRace(OBJECT_SELF) == 2) //SUBRACE_BEAST
{
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 6);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 20);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = eStatA;
}
}
//DROIDS
else if(GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DROID)
{
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 6);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 10);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 20);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = eStatA;
}
}
else
{
//Other Class
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 6);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 6);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 10);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 20);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 20);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = EffectLinkEffects(eStatA, eStatB);
}
}
if(nVP > 0)
{
if(nValid <= 1 && !GetPlayerRestrictMode())
{
nVP = GetMaxHitPoints(OBJECT_SELF) + nVP;
SetMaxHitPoints(OBJECT_SELF, nVP);

}
}
if(nValid <= 1 && !GetPlayerRestrictMode())
{
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, OBJECT_SELF);
}

}
 Carlos1741
08-08-2006, 7:14 AM
#5
Thanks a lot, I'll try this out tonight.
 Carlos1741
08-09-2006, 3:31 PM
#6
Right when I compile the script (now using nwnnscomp) I can now paste my error message.
The Talchia mod is the .nss file called Test.nss
Here it its:





D:\Program Files\LucasArts\SWKotOR>NWNNSSCOMP -co Override\* Override\
'Star Wars: Knights of the Old Republic' Script Compiler/Decompiler
based on 'NeverWinter Nights' Script Compiler/Decompiler
Copyright 2002-2003, Edward T. Smith
Modified by Hazard (hazard_x@gmx.net)

Compiling: k_ai_master.nss
Compiling: test.nss
test.nss(174): Error: Undeclared identifier "nCharLevel"
test.nss(174): Error: Undeclared identifier "nCharLevel"
test.nss(176): Error: Undeclared identifier "eStatA"
test.nss(177): Error: Undeclared identifier "eStatB"
test.nss(178): Error: Undeclared identifier "eStatC"
test.nss(179): Error: Undeclared identifier "eFP"
test.nss(180): Error: Undeclared identifier "nVP"
test.nss(182): Error: Undeclared identifier "nCharLevel"
test.nss(182): Error: Undeclared identifier "nCharLevel"
test.nss(184): Error: Undeclared identifier "eStatA"
test.nss(185): Error: Undeclared identifier "eStatB"
test.nss(186): Error: Undeclared identifier "eStatC"
test.nss(187): Error: Undeclared identifier "eFP"
test.nss(188): Error: Undeclared identifier "nVP"
test.nss(190): Error: Undeclared identifier "nCharLevel"
test.nss(192): Error: Undeclared identifier "eStatA"
test.nss(193): Error: Undeclared identifier "eStatB"
test.nss(194): Error: Undeclared identifier "eStatC"
test.nss(195): Error: Undeclared identifier "eFP"
test.nss(196): Error: Undeclared identifier "nVP"
test.nss(200): Error: Undeclared identifier "nValid"
test.nss(202): Error: Undeclared identifier "nValid"
test.nss(204): Error: Undeclared identifier "eLink"
test.nss(204): Error: Undeclared identifier "eStatA"
test.nss(204): Error: Undeclared identifier "eStatB"
test.nss(204): Error: Required argument missing in call to "EffectLinkEffects"
test.nss(205): Error: Undeclared identifier "eLink"
test.nss(205): Error: Undeclared identifier "eLink"
test.nss(205): Error: Undeclared identifier "eFP"
test.nss(205): Error: Required argument missing in call to "EffectLinkEffects"
test.nss(206): Error: Undeclared identifier "eLink"
test.nss(206): Error: Undeclared identifier "eLink"
test.nss(206): Error: Undeclared identifier "eStatC"
test.nss(206): Error: Required argument missing in call to "EffectLinkEffects"
test.nss(212): Error: Undeclared identifier "nCharLevel"
test.nss(212): Error: Undeclared identifier "nCharLevel"
test.nss(214): Error: Undeclared identifier "eStatA"
test.nss(215): Error: Undeclared identifier "nVP"
test.nss(217): Error: Undeclared identifier "nCharLevel"
test.nss(217): Error: Undeclared identifier "nCharLevel"
test.nss(219): Error: Undeclared identifier "eStatA"
test.nss(220): Error: Undeclared identifier "nVP"
test.nss(222): Error: Undeclared identifier "nCharLevel"
test.nss(224): Error: Undeclared identifier "eStatA"
test.nss(225): Error: Undeclared identifier "nVP"
test.nss(229): Error: Undeclared identifier "nValid"
test.nss(231): Error: Undeclared identifier "nValid"
test.nss(233): Error: Undeclared identifier "eLink"
test.nss(233): Error: Undeclared identifier "eStatA"
test.nss(239): Error: Undeclared identifier "nCharLevel"
test.nss(239): Error: Undeclared identifier "nCharLevel"
test.nss(241): Error: Undeclared identifier "eStatA"
test.nss(242): Error: Undeclared identifier "nVP"
test.nss(244): Error: Undeclared identifier "nCharLevel"
test.nss(244): Error: Undeclared identifier "nCharLevel"
test.nss(246): Error: Undeclared identifier "eStatA"
test.nss(247): Error: Undeclared identifier "nVP"
test.nss(249): Error: Undeclared identifier "nCharLevel"
test.nss(251): Error: Undeclared identifier "eStatA"
test.nss(252): Error: Undeclared identifier "nVP"
test.nss(256): Error: Undeclared identifier "nValid"
test.nss(258): Error: Undeclared identifier "nValid"
test.nss(260): Error: Undeclared identifier "eLink"
test.nss(260): Error: Undeclared identifier "eStatA"
test.nss(266): Error: Undeclared identifier "nCharLevel"
test.nss(266): Error: Undeclared identifier "nCharLevel"
test.nss(268): Error: Undeclared identifier "eStatA"
test.nss(269): Error: Undeclared identifier "eStatB"
test.nss(270): Error: Undeclared identifier "nVP"
test.nss(272): Error: Undeclared identifier "nCharLevel"
test.nss(272): Error: Undeclared identifier "nCharLevel"
test.nss(274): Error: Undeclared identifier "eStatA"
test.nss(275): Error: Undeclared identifier "eStatB"
test.nss(276): Error: Undeclared identifier "nVP"
test.nss(278): Error: Undeclared identifier "nCharLevel"
test.nss(280): Error: Undeclared identifier "eStatA"
test.nss(281): Error: Undeclared identifier "eStatB"
test.nss(282): Error: Undeclared identifier "nVP"
test.nss(286): Error: Undeclared identifier "nValid"
test.nss(288): Error: Undeclared identifier "nValid"
test.nss(290): Error: Undeclared identifier "eLink"
test.nss(290): Error: Undeclared identifier "eStatA"
test.nss(290): Error: Undeclared identifier "eStatB"
test.nss(290): Error: Required argument missing in call to "EffectLinkEffects"
test.nss(293): Error: Undeclared identifier "nVP"
test.nss(295): Error: Undeclared identifier "nValid"
test.nss(297): Error: Undeclared identifier "nVP"
test.nss(297): Error: Undeclared identifier "nVP"
test.nss(298): Error: Undeclared identifier "nVP"
test.nss(298): Error: Required argument missing in call to "SetMaxHitPoints"
test.nss(302): Error: Undeclared identifier "nValid"
test.nss(304): Error: Undeclared identifier "eLink"
test.nss(304): Error: Required argument missing in call to "ApplyEffectToObject"

Compilation aborted with errors
Total Execution time = 609 ms

D:\Program Files\LucasArts\SWKotOR>pause
Press any key to continue . . .


another message I get is:


Compiling: test.nss
test.nss(1007): Error: Syntax error at "}"
Compilation aborted with errors
Total Execution time = 828 ms

D:\Program Files\LucasArts\SWKotOR>pause
Press any key to continue . . .

But this is obviously when I have too many '}'



Now looking on my kotor tool I know that I dont have those things called 'nCharLevel' or 'estat' in my function filter.

Now I have the latest Kotor Tool v1.0.2210.16738, should I place my nwscript.nss somewhere?
I downloaded the one off your site (however it is for Kotor II so I havent yet placed it anywhere).





Lol, all I wanted to do was convert Talchia's:




Level 8+:
Jedi: Wisdom +6, Dexterity +6, Strength +6, Forcepoints +25, Hitpoints +50
Droid: Dexterity +6, Hitpoints +50
Beast/Creature: Strength +6, Hitpoints +50
Other Classes: Dexterity +6, Strength +6, Hitpoints +50

Level 12+:
Jedi: Wisdom +10, Dexterity +10, Strength +10, Forcepoints +50, Hitpoints +100
Droid: Dexterity +10, Hitpoints +100
Beast/Creature: Strength +10, Hitpoints +100
Other Classes: Dexterity +10, Strength +10, Hitpoints +100

Level 16+:
Jedi: Wisdom +20, Dexterity +20, Strength +20, Forcepoints +100, Hitpoints +200
Droid: Dexterity +20, Hitpoints +200
Beast/Creature: Strength +20, Hitpoints +200
Other Classes: Dexterity +20, Strength +20, Hitpoints +200


to



Level 8+:
Jedi: Wisdom +4, Dexterity +4, Strength +4, Forcepoints +25, Hitpoints +50
Droid: Dexterity +4, Hitpoints +50
Beast/Creature: Strength +4, Hitpoints +50
Other Classes: Dexterity +4, Strength +4, Hitpoints +50

Level 12+:
Jedi: Wisdom +8, Dexterity +8, Strength +8, Forcepoints +50, Hitpoints +100
Droid: Dexterity +8, Hitpoints +100
Beast/Creature: Strength +8, Hitpoints +100
Other Classes: Dexterity +8, Strength +8, Hitpoints +100

Level 16+:
Jedi: Wisdom +16, Dexterity +16, Strength +16, Forcepoints +100, Hitpoints +200
Droid: Dexterity +16, Hitpoints +200
Beast/Creature: Strength +16, Hitpoints +200
Other Classes: Dexterity +16, Strength +16, Hitpoints +200


to make it a little easier for myself on hard difficulty.


I'd appreciate any help, Carlos.
 Darth333
08-09-2006, 4:21 PM
#7
Oops, it looks like I have forgotten something there. I'll check again.

I totally forgot to send you the file yesterday. I'll try to remember to do it tonight.
 Darkkender
08-09-2006, 5:23 PM
#8
Every one of those variables are likely forward declared as global variables at the beginning of Talchia's modded K_ai_master.nss file. So before any of the functions declare some globals any of the above listed variables that start with "n" decalre as int's int nCharLevel; for example and all of them beginning with "e" declare as effect's effect eStatA; this might be able to resolve the compilation problems.
 Carlos1741
08-09-2006, 5:33 PM
#9
Sorry to ask to have put in plain silly speak, but you are saying that if for example part of the code looks like:


else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
nVP = 100;
}


should actually be:



else if(int nCharLevel >=12 && int nCharLevel <=15)
{
effect eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
nVP = 100
}



Right just tried that above and it didnt work. More syntax errors. God I wish I wasnt so stupid at this.
 Darkkender
08-09-2006, 5:51 PM
#10
Sorry to ask to have put in plain silly speak, but you are saying that if for example part of the code looks like:


else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
nVP = 100;
}

should actually be:

else if(int nCharLevel >=12 && int nCharLevel <=15)
{
effect eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
int nVP = 100
}

Right just tried that above and it didnt work. More syntax errors. God I wish I wasnt so stupid at this.

Actually what you would want to do is this.

int nCharLevel;
effect eStatA;
int nVP;

else if(nCharLevel >=12 && nCharLevel <=15)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
nVP = 100;
}

You want to declare the variables type prior to using it since many of your variables are being used all the way down through the script. Also you may have gotten syntax errors from missing semicolons.(bolded above)

So taking Darth333's posting of the snippet from Talchias it should look like this instead. I've Green bolded the parts to add.


////////////>>>>>>HARDCORE MOD V 1.0<<<<<<<<<<////////////////////////////
//Buffs the Target up, based on a script from Preston Watamaniuk/Bioware //
// //
// Note: Boss enemys like Darth Bandon and Malak will get also the //
// increase, so be carefull with tweaks. Also the ability increase //
// is limited to 20, everything above will be ignored and //
// count as 20. //
// //
//::///////////////////////////////////////////////////////////////////:://
//:: Created By: Talchia http://home.t-online.de/home/Talchia/) :://
//:: Created On: December 30, 2003 :://
//::///////////////////////////////////////////////////////////////////:://

int nCharLevel, nVP, nValid;
effect eStatA, eStatB, eStatC, eFP, eLink;


//Jedi
if(GetLevelByClass(CLASS_TYPE_JEDICONSULAR) > 0 ||
GetLevelByClass(CLASS_TYPE_JEDIGUARDIAN) > 0 ||
GetLevelByClass(CLASS_TYPE_JEDISENTINEL) > 0)
{
//Set up the effects based on the character level
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 6);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 6);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 6);
eFP = EffectTemporaryForcePoints(25);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 10);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 10);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
eFP = EffectTemporaryForcePoints(50);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 20);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 20);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 20);
eFP = EffectTemporaryForcePoints(100);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = EffectLinkEffects(eStatA, eStatB);
eLink = EffectLinkEffects(eLink, eFP);
eLink = EffectLinkEffects(eLink, eStatC);
}
}
//BEASTS
else if(GetSubRace(OBJECT_SELF) == 2) //SUBRACE_BEAST
{
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 6);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 20);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = eStatA;
}
}
//DROIDS
else if(GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DROID)
{
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 6);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 10);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 20);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = eStatA;
}
}
else
{
//Other Class
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 6);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 6);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 10);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 20);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 20);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = EffectLinkEffects(eStatA, eStatB);
}
}
if(nVP > 0)
{
if(nValid <= 1 && !GetPlayerRestrictMode())
{
nVP = GetMaxHitPoints(OBJECT_SELF) + nVP;
SetMaxHitPoints(OBJECT_SELF, nVP);

}
}
if(nValid <= 1 && !GetPlayerRestrictMode())
{
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, OBJECT_SELF);
}

}


I declared all of the variables of the same type on one line rather than multiple lines.
 Darth333
08-09-2006, 6:10 PM
#11
Actually what you would want to do is this.

int nCharLevel;
effect eStatA;
int nVP;


it was rather:

int nCharLevel = GetHitDice(GetFirstPC());
effect eStatA, eStatB, eFP, eVP, eLink, eStatC, eStatD, eLink2;
int nVP;


And there's more to it than this. In fact there were quite a few more edits to the file than I initially thought but they were uncommented so I thought they were part of the original k_ai_master.nss file.

Carlos, check your PMs for the original file.
 Carlos1741
08-09-2006, 6:25 PM
#12
I dont believe it, it works or it compiles.

I'll try this out tomorrow night.

Again thanks a lot.
 Pavlos
08-09-2006, 6:46 PM
#13
You may want to look at k_def_buff. I recognise this script as being based off it.
 Agent Xim
08-09-2006, 10:40 PM
#14
it was rather:
And there's more to it than this. In fact there were quite a few more edits to the file than I initially thought but they were uncommented so I thought they were part of the original k_ai_master.nss file.

Carlos, check your PMs for the original file.

Darth, would you be able to PM the NSS file to me as well?
 Darkkender
08-10-2006, 1:38 AM
#15
You have to admit Darth333 that my answer was spot on for an off the cuff response since I didn't have access to the k_ai_master.nss from Talchia's mod. I had based by response upon the script compiler's error's. Also you missed "int nValid;" in your correction for me. :p
 Carlos1741
08-10-2006, 5:07 PM
#16
Right gang I'm back.

Okay, now


//Jedi
if(GetLevelByClass(CLASS_TYPE_JEDICONSULAR) > 0 ||
GetLevelByClass(CLASS_TYPE_JEDIGUARDIAN) > 0 ||
GetLevelByClass(CLASS_TYPE_JEDISENTINEL) > 0)
{
//Set up the effects based on the character level
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 4);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 4);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 4);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 4);
eFP = EffectTemporaryForcePoints(25);
nVP = 25;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 8);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 8);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 8);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 8);
eFP = EffectTemporaryForcePoints(50);
nVP = 50;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 12);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 12);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 12);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 12);
eFP = EffectTemporaryForcePoints(100);
nVP = 100;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = EffectLinkEffects(eStatA, eStatB);
eLink = EffectLinkEffects(eLink, eFP);
eLink = EffectLinkEffects(eLink, eStatC);
}
}
//BEASTS


that compiles correctly. However do I need to place another eLink for eStatD; because I have now added a constitution effect - it wasnt there originally.

for example:

eLink = EffectLinkEffects(eStatA, eStatB);
eLink = EffectLinkEffects(eLink, eFP);
eLink = EffectLinkEffects(eLink, eStatC);
eLink = EffectLinkEffects(eLink, eStatD);



because even though it compiles without the above adjustment, the constitution effect may not take place. So if I then do the above adjustment it still compiles however will constitution effect now take place?

This is earlier in the file:


SetLocalNumber(OBJECT_SELF, SW_NUMBER_LAST_COMBO, nValid);
int nCharLevel = GetHitDice(GetFirstPC());
effect eStatA, eStatB, eFP, eVP, eLink, eStatC, eStatD, eLink2;
int nVP;
object oPerceived = GetLastPerceived();
if(GetCommandable() && !GN_GetSpawnInCondition(S

so there is an eStatD thing already.

Basically all I'm asking is, how do I get my constitution effect to work.
 Carlos1741
08-10-2006, 5:19 PM
#17
Also now with beasts:

currently:

//BEASTS
else if(GetSubRace(OBJECT_SELF) == 2) //SUBRACE_BEAST
{
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 4);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 20);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = eStatA;
}
}


However I want to again change the dex, wis & constitution. Ergo:



//BEASTS
else if(GetSubRace(OBJECT_SELF) == 2) //SUBRACE_BEAST
{
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 4);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 4);
eStatC = EffectAbilityIncrease(ABILITY_WISDOM, 4);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 4);
nVP = 25;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 8)
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 8);
eStatC = EffectAbilityIncrease(ABILITY_WISDOM, 8);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 8);
nVP = 50;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 12);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 12);
eStatC = EffectAbilityIncrease(ABILITY_WISDOM, 12);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 12);
nVP = 100;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = EffectLinkEffects(eStatA, eStatB);
eLink = EffectLinkEffects(eLink, eStatC);
eLink = EffectLinkEffects(eLink, eStatD);
}
}




Talking of which am I missing an eLink for nVP???
 Q
08-12-2006, 3:42 PM
#18
I've been viewing this thread with great interest...

I, too would like to tweak the integar values of this mod for my own purposes, but I can't get past the byte code part (it's Greek to me), and Torlock's page is MIA. Any suggestions, anyone?

Any help would be greatly appreciated.


Q
 Carlos1741
08-19-2006, 1:15 PM
#19
Right I'm back,

this is what Talchia's hardcore Mod normally looks like:


////////////>>>>>>HARDCORE MOD V 1.0<<<<<<<<<<////////////////////////////
//Buffs the Target up, based on a script from Preston Watamaniuk/Bioware //
// //
// Note: Boss enemys like Darth Bandon and Malak will get also the //
// increase, so be carefull with tweaks. Also the ability increase //
// is limited to 20, everything above will be ignored and //
// count as 20. //
// //
//::///////////////////////////////////////////////////////////////////:://
//:: Created By: Talchia http://home.t-online.de/home/Talchia/) :://
//:: Created On: December 30, 2003 :://
//::///////////////////////////////////////////////////////////////////:://

//Jedi
if(GetLevelByClass(CLASS_TYPE_JEDICONSULAR) > 0 ||
GetLevelByClass(CLASS_TYPE_JEDIGUARDIAN) > 0 ||
GetLevelByClass(CLASS_TYPE_JEDISENTINEL) > 0)
{
//Set up the effects based on the character level
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 6);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 6);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 6);
eFP = EffectTemporaryForcePoints(25);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 10);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 10);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
eFP = EffectTemporaryForcePoints(50);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 20);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 20);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 20);
eFP = EffectTemporaryForcePoints(100);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = EffectLinkEffects(eStatA, eStatB);
eLink = EffectLinkEffects(eLink, eFP);
eLink = EffectLinkEffects(eLink, eStatC);
}
}
//BEASTS
else if(GetSubRace(OBJECT_SELF) == 2) //SUBRACE_BEAST
{
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 6);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 20);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = eStatA;
}
}
//DROIDS
else if(GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DROID)
{
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 6);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 10);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 20);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = eStatA;
}
}
else
{
//Other Class
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 6);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 6);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 10);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 10);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 20);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 20);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = EffectLinkEffects(eStatA, eStatB);
}
}
if(nVP > 0)
{
if(nValid <= 1 && !GetPlayerRestrictMode())
{
nVP = GetMaxHitPoints(OBJECT_SELF) + nVP;
SetMaxHitPoints(OBJECT_SELF, nVP);

}
}
if(nValid <= 1 && !GetPlayerRestrictMode())
{
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, OBJECT_SELF);
}
}




Now I've changed because I want all the enemies to have increases to defense, saving throws, damage, to hit, force points and hit points.


////////////>>>>>>HARDCORE MOD V 1.0<<<<<<<<<<////////////////////////////
//Buffs the Target up, based on a script from Preston Watamaniuk/Bioware //
// //
// Note: Boss enemys like Darth Bandon and Malak will get also the //
// increase, so be carefull with tweaks. Also the ability increase //
// is limited to 20, everything above will be ignored and //
// count as 20. //
// //
//::///////////////////////////////////////////////////////////////////:://
//:: Created By: Talchia http://home.t-online.de/home/Talchia/) :://
//:: Created On: December 30, 2003 :://
//::///////////////////////////////////////////////////////////////////:://

//Jedi
if(GetLevelByClass(CLASS_TYPE_JEDICONSULAR) > 0 ||
GetLevelByClass(CLASS_TYPE_JEDIGUARDIAN) > 0 ||
GetLevelByClass(CLASS_TYPE_JEDISENTINEL) > 0)
{
//Set up the effects based on the character level
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 4);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 4);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 4);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 4);
eFP = EffectTemporaryForcePoints(25);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 8);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 8);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 8);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 8);
eFP = EffectTemporaryForcePoints(50);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 12);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 12);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 12);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 12);
eFP = EffectTemporaryForcePoints(100);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = EffectLinkEffects(eStatA, eStatB);
eLink = EffectLinkEffects(eLink, eFP);
eLink = EffectLinkEffects(eLink, eStatC);
eLink = EffectLinkEffects(eLink, eStatD);
}
}
//BEASTS
else if(GetSubRace(OBJECT_SELF) == 2) //SUBRACE_BEAST
{
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 4);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 4);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 4);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 4);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 8);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 8);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 8);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 8);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 12);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 12);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 12);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 12);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = EffectLinkEffects(eStatA, eStatB);
eLink = EffectLinkEffects(eLink, eStatC);
eLink = EffectLinkEffects(eLink, eStatD);
}
}
//DROIDS
else if(GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DROID)
{
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 4);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 4);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 4);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 4);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 8);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 8);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 8);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 8);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_DEXTERITY, 12);
eStatB = EffectAbilityIncrease(ABILITY_WISDOM, 12);
eStatC = EffectAbilityIncrease(ABILITY_STRENGTH, 12);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 12);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = EffectLinkEffects(eStatA, eStatB);
eLink = EffectLinkEffects(eLink, eStatC);
eLink = EffectLinkEffects(eLink, eStatD);
}
}
else
{
//Other Class
if(nCharLevel >= 8 && nCharLevel <= 11)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 4);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 4);
eStatC = EffectAbilityIncrease(ABILITY_WISDOM, 4);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 4);
nVP = 50;
}
else if(nCharLevel >= 12 && nCharLevel <= 15)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 8);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 8);
eStatC = EffectAbilityIncrease(ABILITY_WISDOM, 8);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 8);
nVP = 100;
}
else if(nCharLevel >= 16)
{
eStatA = EffectAbilityIncrease(ABILITY_STRENGTH, 12);
eStatB = EffectAbilityIncrease(ABILITY_DEXTERITY, 12);
eStatC = EffectAbilityIncrease(ABILITY_WISDOM, 12);
eStatD = EffectAbilityIncrease(ABILITY_CONSTITUTION, 12);
nVP = 200;
}
else
{
nValid >= 2;
}
if(nValid <= 1)
{
eLink = EffectLinkEffects(eStatA, eStatB);
eLink = EffectLinkEffects(eLink, eStatC);
eLink = EffectLinkEffects(eLink, eStatD);
}
}
if(nVP > 0)
{
if(nValid <= 1 && !GetPlayerRestrictMode())
{
nVP = GetMaxHitPoints(OBJECT_SELF) + nVP;
SetMaxHitPoints(OBJECT_SELF, nVP);

}
}
if(nValid <= 1 && !GetPlayerRestrictMode())
{
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, OBJECT_SELF);
}
}




Now it compiled correctly and when I use the above script, beasts, or other jedi for instance to appear to have more health, and be harder to hit, etc. However could a scripter check my modifications to make sure they are right.

I'm a little worried that the eLink = eStatA is not right, and that the effects arent working. Or that since Strength is eStatA it has to be for the rest of the creatures.

Thank you.
Page: 1 of 1