Jump to content

Home

Open starport visa


Recommended Posts

Alright, after hunting around in Kotor Tool, I found that there are four .uti's for starport visas:

 

Name: firstnamesstarpo.uti

Tag: pc_visa

Modules: 501OND

Title: <FullName>'s Starport Visa

Description: This is your Starport Visa for the city of Iziz. If you lose this you won't be able to leave the city.

 

Name: pl_bh_visa.uti

Tag: pl_bh_visa

Modules: 502OND, 503OND, 512OND

Title: Bounty Hunter's Starport Visa

Description: This Starport Visa is useless to you at present because it is keyed to the identity of the Twilek Bounty Hunter you obtained it from.

 

Name: pl_visa.uti

Tag: pl_visa

Modules: 502OND, 503OND

Title: Open Starport Visa

Description: You obtained this Starport Visa from Bakkel. It is an open visa, meaning anyone can use it.

 

Name: pl_visa_sliced.uti

Tag: pl_visa_sliced

Modules: 502OND, 503OND

Title: Sliced Open Starport Visa

Description: This is the Starport Visa you acquired from a Twi'lek bounty hunter. Kiph sliced it for you so that it can be used by anyone.

 

Title and Description are how the item appear in game. The name is the actual name of the file, and the tag is how you would get another one in game. The module is where it appears in the Kotor Tool if you want to extract it.

 

Alright, so then I went through the Kotor Tool and had a look at the dialog node of one of the people you can give a starport visa to. So here's the conditional script for the dialog node "I've got a starport visa" (the script is called c_visa_have):

 

int StartingConditional() {
if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "pl_visa"))) {
	return 1;
}
if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "pl_visa_sliced"))) {
	return 1;
}
return 0;
}

 

What you would need to do is then add the tag of a new starport visa. Basically grab the .uti of one of the starport visas, change the tag, name, description, etc, and put the line in the above code, recompile and add it to your override. You may also need to add a line to this script (named a_visa_quest):

 

void sub2(object objectParam1, int intParam2);
void sub1(object objectParam1);

void sub2(object objectParam1, int intParam2) {
int nAlign = GetGoodEvilValue(objectParam1);
int int3;
if ((((intParam2 == intGLOB_22) || (intParam2 == intGLOB_23)) || (intParam2 == intGLOB_24))) {
	int3 = 3;
}
else {
	int3 = 2;
}
int int4;
int int5;
if ((nAlign >= 85)) {
	int5 = 1;
}
else {
	if (((nAlign < 85) && (nAlign > 60))) {
		int5 = 2;
	}
	else {
		if (((nAlign <= 60) && (nAlign >= 40))) {
			int5 = 3;
		}
		else {
			if (((nAlign < 40) && (nAlign >= 15))) {
				int5 = 4;
			}
			else {
				int5 = 5;
			}
		}
	}
}
int4 = ((int5 + intParam2) * 2);
if ((int4 < 0)) {
	int4 = (int4 * (-1));
}
if ((int4 == 0)) {
	int4 = 1;
}
if (((int5 == 1) && (intParam2 == intGLOB_25))) {
	int4 = 1;
}
else {
	if (((int5 == 5) && (intParam2 == intGLOB_24))) {
		int4 = 1;
	}
}
AurPostString(("Hit = " + IntToString(int4)), 5, 5, 4.0);
AdjustAlignment(objectParam1, int3, int4, 0);
}

void sub1(object objectParam1) {
sub2(objectParam1, intGLOB_27);
}

void main() {
int nParam1 = GetScriptParameter(1);
int int3;
switch (nParam1) {
	case 1:
		if ((GetGlobalNumber("502OND_First_Visa") == 0)) {
			int3 = 30;
		}
		else {
			int3 = 91;
		}
		sub1(GetPCSpeaker());
		break;
	case 2:
		if ((GetGlobalNumber("502OND_First_Visa") == 0)) {
			int3 = 40;
		}
		else {
			int3 = 92;
		}
		break;
	case 3:
		if ((GetGlobalNumber("502OND_First_Visa") == 0)) {
			int3 = 50;
		}
		else {
			int3 = 93;
		}
		break;
	case 4:
		if ((GetGlobalNumber("502OND_First_Visa") == 0)) {
			int3 = 60;
		}
		else {
			int3 = 94;
		}
		break;
	case 5:
		if ((GetGlobalNumber("502OND_First_Visa") == 0)) {
			int3 = 70;
		}
		else {
			int3 = 95;
		}
		break;
}
AddJournalQuestEntry("starportvisa", int3, 0);
SetGlobalNumber("502OND_First_Visa", 1);
if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "pl_visa"))) {
	DestroyObject(GetItemPossessedBy(GetFirstPC(), "pl_visa"), 0.0, 0, 0.0, 0);
}
else {
	DestroyObject(GetItemPossessedBy(GetFirstPC(), "pl_visa_sliced"), 0.0, 0, 0.0, 0);
}
}

 

But I don't have the willpower at the moment to work out what that script actually does.

 

N.B. While the two scripts listed above appear in both 502OND_s.rim and 503OND_s.rim, they are identical, and I believe if you put the replace script in the override, it will override both scripts.

 

Alright, see what you can do! If you have problems, don't hesitate to call!

Link to comment
Share on other sites

Re: My mod...

 

There was a problem when I made it - It did add a couple more pl_visa_sliced items onto Onderon, however, the whole quest was scripted oddly when the game was made.

 

What I'm trying to say is that the script in the dialog when you're trading the visa or giving away the visa just removes all items with the tag pl_visa_sliced in your inventory.

 

IIRC, I even tried to get around it by just spawning a bunch of unsliced visas to see if you can slice them one at a time, but that also doesn't work.

 

You'd need to change the two scripts that Robespierre gave above... and I'm not even sure if that would completely do the trick.

 

Sorry.

 

_EW_

Link to comment
Share on other sites

Well I was going to add some massive side-quests, dialog and probably rescript most of the quest. But if you were going to do that, you'd have to somehow avoid the problem that EnderWiggin had where all of his starport visas got given to whoever he gave it to.

Link to comment
Share on other sites

I just thought of something.

 

What about a console in the docs office that can give you 1 extra visa at a time?

 

Is that a good or bad idea?

 

If that was the case, and you had the console limit you to one at a time through a check script, it would totally work.

 

Good idea, Payne. :D If you wanted to script a terminal it should avoid the problem I encountered.

 

_EW_

Link to comment
Share on other sites

  • 1 month later...

u can get 2 i now of now one from te deaad bounty hunter and another one from the girl how u have to kill after freeing the doctor

1. i was play on the xbox

2. i gave the first to the spy (=

Link to comment
Share on other sites

  • 7 years later...

If anyone is wondering, the id for giveitem cheat of the sliced open visa item is pl_visa_sliced.

 

As people previously said, whenever you give a visa to someone, the whole stack gets removed. However you can still add as many visas as you like even after the quest is removed from your journal and you will still receive any rewards that you should have gotten from the npc.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...