Sign in to follow this  
Markus Ramikin

Mod - attuning personal crystal without kreia

Recommended Posts

The Workbench Crystal Attunement mod is finished. :) With it, if you have the personal crystal, and enough Wisdom (16 or more), you can attune it yourself at a workbench, without Kreia's help.

 

Find it in the downloads section.

 

You will be able to choose between alternative versions:

A. just adds the attunement option

B. adds the attunement, and also removes the "Learn about using the workbench" option.

 

You can also find it on Kotorfiles, here, however that download only has version A. Nevertheless, if you like the mod, feel free to follow that link and vote.

 

Credits:

- Hassat Hunter: workbench dialog structure

- Markus Ramikin: conditions-checking script, writing

 

 

Original post:

 

It'd be good if the Exile didn't depend entirely on Kreia to attune his personal crystal to himself. There's something deeply unsatisfactory about it.

 

I've tried finding something about this on Kotorfiles, but to no avail. Could one of you smart people write a mod that would allow the crystal to be attuned even after the Enclave confrontation with the Jedi Masters? Maybe even on Malachor?

 

I'm not entirely sure how it'd work, but something simple and not altogether illogical would be nice. How about this:

 

A workbench option would appear on all workbenches, after Kreia's becomes unresponsive because she insists we must go to Dantooine. There's a workbench on Malachor too, so that'd help... I assume all workbenches use the same dialog?

 

Another idea: I don't know if it's possible, but it'd be really cool if instead of waiting on Kreia to become useless, this option simply had a Wisdom check. Say, 15 Wis (including bonuses, so low-Wis chars could still get it). And of course a check on whether you have the crystal. And on whether the crystal is currently unattuned.

 

So you could approach a workbench and see:

 

1. [Learn about using the workbench.]

2. [use the workbench to upgrade items.]

3. [use the workbench to create or breakdown items.]

4. [Wisdom] [Attune the <Player> Crystal to yourself.]

 

What do you guys think? And obviously, it would need to be compatible with TSLRCM.

 

Hm, I see in the Kotor tool that the workbench is a dialog file. Would this mod conflict with the improved dialog.tlk?

Edited by Markus Ramikin

Share this post


Link to post
Share on other sites

You do that. I didn't, so it might not work at all...

 

EDIT: Also it appears with just 15WIS, even if Kreia is still in the party. Was the intention, no?

Edited by Hassat Hunter

Share this post


Link to post
Share on other sites

It works but buggily :) I'd fix the text problems myself but I can't seem to open it in Kotor tool...

 

OK, minor text problems first:

 

"Crystal is in tune with you" - did a definite article kill your parents when you were a child? ;)

 

[WISDOM] - should be [Wisdom], all checks in the game are like that, for instance:

[Repair] That wouldn't be standard procedure in an emergency lockdown.

 

 

Bigger problems:

 

You can do it with any character. For instance I can do it as Kreia and get a neutral crystal even while I'm a LS Jedi Master. Hell, a Wisdom Upgrade and/or Master Valor and I can do it as HK-47 ;). Is there a possible check for this?

 

You can do it even before having the crystal - and it gives you the crystal. I went back to a Peragus save and got it there that way.

Share this post


Link to post
Share on other sites
Also it appears with just 15WIS, even if Kreia is still in the party. Was the intention, no?

Yes. :) It seems more than 15, a 15 Wis char couldn't get it. You probably use a > comparison so it's 16 maybe? But that's fine, 15 was a little low anyway (I forgot how powerful Valor was).

Share this post


Link to post
Share on other sites
but I can't seem to open it in Kotor tool...

Don't use KOTORTool for KOTOR2 .dlg editing...

did a definite article kill your parents when you were a child? :)

How did you know?

Is there a possible check for this?

Not that I know.

You can do it even before having the crystal - and it gives you the crystal. I went back to a Peragus save and got it there that way.

Could add that check though.

Share this post


Link to post
Share on other sites

It's been a while since I've done any scripting and I'm going by memory so I could be wrong here but try this;

 

int StartingConditional() {
object oPC = GetFirstPC();

int int1 = GetHasFeat(FEAT_EMPATHY, oPC);
if ((int1 = 1)) {
	return 1;
}
return 0;
}

 

Replace FEAT_EMPATHY with the feat you want to check.

  • Like 1

Share this post


Link to post
Share on other sites

Hm, wait a minute. If it's possible to do this:

object oPC = GetFirstPC();

 

Then what exactly does oPC contain? doesn't it contain the information we want, what char just accessed the workbench? And couldn't it be used to check if that's the Exile, directly?

Share this post


Link to post
Share on other sites

With all these requirements I would need to write a script (since, you can only check 2 things in the editor).

 

Not so good with that...

Share this post


Link to post
Share on other sites

Yeah I can see why now. I'm not giving up though!

 

EDIT: Progress is being made. :)

EDIT2: Aaalmost there, please don't post the solution and ruin my fun!

 

(I love scripting)

(when it actually works)

Edited by Markus Ramikin

Share this post


Link to post
Share on other sites

So here's what worked:

 

// c_wrkb_crys, by Markus Ramikin
// Conditions to let you attune the <Player> crystal at a workbench:
// - you have the player crystal
// - the user of the workbench is Exile (has War Veteran feat),
// - the user of the console has 16 or more Wisdom

int StartingConditional() {
int NotEnuffWisdom = GetScriptParameter( 1 );
if( GetGlobalNumber("604DAN_PC_Crystal") ) {
	if( GetGlobalNumber("000_Quest_Crystal") ) {
		if (GetAbilityScore( GetPCSpeaker(), ABILITY_WISDOM ) > NotEnuffWisdom ) {
			if (GetFeatAcquired(FEAT_WAR_VETERAN, GetPCSpeaker())) {
				return TRUE;
			}
		}
	}
}
return FALSE;
}

 

I got the first two conditions from Kreia's dialogue. I have no idea what those globals stand for really, and the 604 one seemed to work well enough on its own, but included both to be safe.

 

I'm not 100% happy about it because of that war veteran feat hack. If this is ever used in combination with a hypothetical mod that gives War Veteran to someone else (for instance I was considering giving it to Atton, Kreia and Bao, they are Mandalorian War vets too), the condition will stop serving its purpose. Anyone got any better idea for how to check that the person using the workbench is in fact the Exile?

 

For now though, this seems to work:

script

workbench dialogue

 

Woo I did it :)

Thanks, Hassat. And Doctor.

Edited by Markus Ramikin

Share this post


Link to post
Share on other sites

Well you can always run a check to make sure their tag is not "Atton", "Handmaiden", "VisasMarr",... No other ideas..

Share this post


Link to post
Share on other sites

Hm, that won't work with a hypothetical (I seem to remember they exist, though) mod that adds different recruitable party members. Trying to be universal here. ;)

 

Really, I'm pretty happy here :) this is definitely Good Enough. I'm just curious if there's a way to make that check it more directly.

Edited by Markus Ramikin

Share this post


Link to post
Share on other sites

Hm, I actually find it pretty liberating to have, from the start of the game. Not having to think about getting every last scrap of XP out of the game in order to get a crystal-upgrading level before Kreia becomes unresponsive.

Share this post


Link to post
Share on other sites

Oh yeah, I was going to investigate in the nwscript.nss listing for that. Thank you, GetIsPlayerMadeCharacter sounds exactly like what we need. I'm using GetPCSpeaker to get the object, though, not GetFirstPC. That checks for the person currently interacting with the workbench. GetFirstPC does not quite do what we want here (I know, I tested).

 

Here we go...:

// c_wrkb_crys, version 1.1, by Markus Ramikin
//
// Conditions to let you attune the <Player> crystal at a workbench:
//  - the character using the workbench is the Exile
//  - you have obtained the crystal
//  - you meet a Wisdom check
//

int StartingConditional() {
int NotEnuffWisdom = GetScriptParameter( 1 );
if (GetIsPlayerMadeCharacter(GetPCSpeaker())) {
	if( GetGlobalNumber("604DAN_PC_Crystal") ) {
		if( GetGlobalNumber("000_Quest_Crystal") ) {
			if (GetAbilityScore( GetPCSpeaker(), ABILITY_WISDOM ) > NotEnuffWisdom ) {				
				return TRUE;
			}
		}
	}
}
return FALSE;
}

Compiled and tested thoroughly, it does the job.

 

This is a seriously awesome mod, I'm downloading it and keeping it in my override PERMANENTLY!

 

Thank you, Markus! :D

You're welcome :) I'm always happy to hear about it when others find my stuff useful.

Share this post


Link to post
Share on other sites

Same script, different way to write it out, for learning's sake.

 

// c_wrkb_crys, version 1.1, by Markus Ramikin
//
// Conditions to let you attune the <Player> crystal at a workbench:
//  - the character using the workbench is the Exile
//  - you have obtained the crystal
//  - you meet a Wisdom check
//

int StartingConditional() {
int NotEnuffWisdom = GetScriptParameter( 1 );

if (GetIsPlayerMadeCharacter(GetPCSpeaker()) && 
GetGlobalNumber("604DAN_PC_Crystal") && 
GetGlobalNumber("000_Quest_Crystal") &&
GetAbilityScore( GetPCSpeaker(), ABILITY_WISDOM ) > NotEnuffWisdom ) {	
		
	return TRUE;

}
return FALSE;
}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this