lfnetwork.com mark read register faq members calendar

Thread: Need help with kotor script
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 09-04-2011, 06:37 PM   #1
moynal
Rookie
 
moynal's Avatar
 
Join Date: Mar 2011
Posts: 19
Need help with kotor script

I need alot of help with decompiling the make jedi script for kotor not TSL but the original. Does anyone know how to decompile scripts or translate the code? I saw a thread by that agent xim dude and thought keeping the base classes would be cool or just to mess with the script a bit.

Last edited by moynal; 09-04-2011 at 06:39 PM. Reason: clearing things up
moynal is offline   you may: quote & reply,
Old 09-04-2011, 09:17 PM   #2
harIII
Veteran
 
harIII's Avatar
 
Join Date: Feb 2008
Posts: 983
Helpful! 
This script should work for you, just remember that a lot of the scripts can be used between KOTOR and TSL, it's just that TSL has a few new functions than KOTOR.

Just change "JEDIGUARDIAN" to whatever class you want and then "Mission" to whatever character you want.



void main () {
AddMultiClass( CLASS_TYPE_JEDIGUARDIAN, GetObjectByTag("Mission"));
}

Last edited by harIII; 09-04-2011 at 10:06 PM.
harIII is offline   you may: quote & reply,
Old 09-04-2011, 10:17 PM   #3
moynal
Rookie
 
moynal's Avatar
 
Join Date: Mar 2011
Posts: 19
Quote:
Originally Posted by harIII View Post
This script should work for you, just remember that a lot of the scripts can be used between KOTOR and TSL, it's just that TSL has a few new functions than KOTOR.

Just change "JEDIGUARDIAN" to whatever class you want and then "Mission" to whatever character you want.



void main () {
AddMultiClass( CLASS_TYPE_JEDIGUARDIAN, GetObjectByTag("Mission"));
}
Thanks but what I really need is the ncs to nss conversion of the pdan make jedi script that is used on dantooine like in that mod that agent xim planned on making I think it had you keeping the base class and all. Sorry if I wasn't clear.
moynal is offline   you may: quote & reply,
Old 09-04-2011, 11:42 PM   #4
harIII
Veteran
 
harIII's Avatar
 
Join Date: Feb 2008
Posts: 983
Helpful! 
Oh, sorry, then I can't help you. I can make scripts but I don't know how to decompile them.
harIII is offline   you may: quote & reply,
Old 09-05-2011, 08:06 AM   #5
moynal
Rookie
 
moynal's Avatar
 
Join Date: Mar 2011
Posts: 19
Do you know who can?
moynal is offline   you may: quote & reply,
Old 09-05-2011, 09:29 AM   #6
harIII
Veteran
 
harIII's Avatar
 
Join Date: Feb 2008
Posts: 983
Helpful! 
You might want to yell at Working Class Hero, I know he's decompiled a script for me in the past.
harIII is offline   you may: quote & reply,
Old 09-05-2011, 10:42 AM   #7
newbiemodder
Gentleman Modder
 
newbiemodder's Avatar
 
Join Date: Feb 2009
Location: Chicago
Posts: 706
Veteran Modder 
Go to this sight here:

http://www.starwarsknights.com/tools.php

Go to the Scripting section. There are a couple decompiling applications that can be used to convert .ncs to .nss


Who's more foolish, the fool or the fool that follows?

Just exactly what is a head-piece to the Staff of Ra?

http://www.lucasforums.com/showthread.php?t=206819

http://www.lucasforums.com/showthread.php?t=206541

http://www.lucasforums.com/showthrea...t=newbiemodder
newbiemodder is offline   you may: quote & reply,
Old 09-06-2011, 08:28 PM   #8
moynal
Rookie
 
moynal's Avatar
 
Join Date: Mar 2011
Posts: 19
I was able to get the script decompiled so now how do I modify it so that you keep your base class through the game. I really want to make a mod like the one that Agent Xim was working on.
moynal is offline   you may: quote & reply,
Old 09-14-2011, 04:32 PM   #9
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,465
Current Game: ME3MP, Arkham Origins
Folder extraordinaire Helpful! Forum Veteran Veteran Modder 
Post the script. Enclose it with "[ code ] & [ /code ]" tags (without the spaces inside the brackets).


Want to play a game of ME3MP?
Qui-Gon_Glenn on the software of which we shall not name.... add me and the enemy shall fall in chunks of crimson salsa
Qui-Gon Glenn is offline   you may: quote & reply,
Old 09-15-2011, 07:39 AM   #10
moynal
Rookie
 
moynal's Avatar
 
Join Date: Mar 2011
Posts: 19
Code:
// Globals
	int intGLOB_1 = 1;
	int intGLOB_2 = 2;
	int intGLOB_3 = 3;
	int intGLOB_4 = 4;
	int intGLOB_5 = 5;
	int intGLOB_6 = 6;
	int intGLOB_7 = 3;
	int intGLOB_8 = 4;
	int intGLOB_9 = 5;
	int intGLOB_10 = 6;
	int intGLOB_11 = 7;
	int intGLOB_12 = 1;
	int intGLOB_13 = 2;
	int intGLOB_14 = 3;
	int intGLOB_15 = 4;
	int intGLOB_16 = 5;
	int intGLOB_17 = 6;
	int intGLOB_18 = 7;
	int intGLOB_19 = 8;
	int intGLOB_20 = 9;
	int intGLOB_21 = 10;
	int intGLOB_22 = 11;
	int intGLOB_23 = 12;
	int intGLOB_24 = 13;
	int intGLOB_25 = 14;
	int intGLOB_26 = 15;
	int intGLOB_27 = 16;
	int intGLOB_28 = 17;
	int intGLOB_29 = 18;
	int intGLOB_30 = 19;
	int intGLOB_31 = 20;
	int intGLOB_32 = 21;
	int intGLOB_33 = 22;
	int intGLOB_34 = 23;
	int intGLOB_35 = 24;
	int intGLOB_36 = 25;
	int intGLOB_37 = 26;
	int intGLOB_38 = 27;
	int intGLOB_39 = 28;
	int intGLOB_40 = 29;
	int intGLOB_41 = 30;
	int intGLOB_42 = 59;
	int intGLOB_43 = 0;
	int intGLOB_44 = 1;
	int intGLOB_45 = 2;
	int intGLOB_46 = 29;
	int intGLOB_47 = 30;
	int intGLOB_48 = 34;
	int intGLOB_49 = 35;
	int intGLOB_50 = 36;
	int intGLOB_51 = 37;
	int intGLOB_52 = 38;
	int intGLOB_53 = 39;
	int intGLOB_54 = 41;
	int intGLOB_55 = 42;
	int intGLOB_56 = 46;
	int intGLOB_57 = 47;
	int intGLOB_58 = 15;
	int intGLOB_59 = 10;
	int intGLOB_60 = 5;
	int intGLOB_61 = 2;
	int intGLOB_62;
	int intGLOB_63;
	int intGLOB_64;
	object objectGLOB_1;
	int intGLOB_65;
	int intGLOB_66;
	int intGLOB_67;
	int intGLOB_68;
	int intGLOB_69;
	int intGLOB_70;
	int intGLOB_71 = 1;
	int intGLOB_72 = 2;
	int intGLOB_73 = 3;
	int intGLOB_74 = 20;
	int intGLOB_75 = 21;
	int intGLOB_76 = 22;
	int intGLOB_77 = 23;
	int intGLOB_78 = 24;
	int intGLOB_79 = 25;
	int intGLOB_80 = 26;
	int intGLOB_81 = 27;
	int intGLOB_82 = 28;
	int intGLOB_83 = 31;
	int intGLOB_84 = 32;
	int intGLOB_85 = 33;
	int intGLOB_86 = 40;
	int intGLOB_87 = 43;
	int intGLOB_88 = 44;
	int intGLOB_89 = 45;
	int intGLOB_90 = 48;
	int intGLOB_91 = 49;
	int intGLOB_92 = 50;
	int intGLOB_93 = 51;
	int intGLOB_94 = 52;
	int intGLOB_95 = 53;
	int intGLOB_96 = 54;
	int intGLOB_97 = 55;
	int intGLOB_98 = 56;
	int intGLOB_99 = 57;
	int intGLOB_100 = 58;
	int intGLOB_101 = 60;
	int intGLOB_102 = 61;
	int intGLOB_103 = 62;
	int intGLOB_104 = 63;
	int intGLOB_105 = 64;
	int intGLOB_106 = 65;
	int intGLOB_107 = 66;
	int intGLOB_108 = 67;
	int intGLOB_109 = 68;
	int intGLOB_110 = 69;
	int intGLOB_111 = 70;
	int intGLOB_112 = 71;
	int intGLOB_113 = 72;
	int intGLOB_114 = 1;
	int intGLOB_115 = 2;
	int intGLOB_116 = 3;
	int intGLOB_117 = 4;
	int intGLOB_118 = 0;
	int intGLOB_119 = 1;
	int intGLOB_120 = 2;
	int intGLOB_121 = 3;
	int intGLOB_122 = 4;
	int intGLOB_123 = 5;
	int intGLOB_124 = 6;
	int intGLOB_125 = 7;
	int intGLOB_126 = 8;
	int intGLOB_127 = 9;
	int intGLOB_128 = 10;
	int intGLOB_129 = 11;
	int intGLOB_130 = 12;
	int intGLOB_131 = 13;
	int intGLOB_132 = 14;
	int intGLOB_133 = 15;
	int intGLOB_134 = 16;
	int intGLOB_135 = 17;
	int intGLOB_136 = 18;
	int intGLOB_137 = 19;
	int intGLOB_138 = 1100;
	int intGLOB_139 = (-6);
	int intGLOB_140 = (-5);
	int intGLOB_141 = (-4);
	int intGLOB_142 = (-2);
	int intGLOB_143 = (-1);
	int intGLOB_144 = 0;
	int intGLOB_145 = 4;
	int intGLOB_146 = 1;
	int intGLOB_147 = 7;
	int intGLOB_148 = 1;
	int intGLOB_149 = 2;
	int intGLOB_150 = 3;
	int intGLOB_151 = 1;
	int intGLOB_152 = 2;
	int intGLOB_153 = 3;
	int intGLOB_154 = 4;
	int intGLOB_155 = 5;
	int intGLOB_156 = 6;
	string stringGLOB_1 = "bastila";
	string stringGLOB_2 = "carth";
	string stringGLOB_3 = "dan13_WP_council";
	string stringGLOB_4 = "g_w_lghtsbr01";
	string stringGLOB_5 = "g_w_lghtsbr03";
	string stringGLOB_6 = "g_w_lghtsbr04";
	string stringGLOB_7 = "dan_wanderhound";

// Prototypes
void sub2();
void sub1();

void sub2() {
	int int1 = GetGlobalBoolean("DAN_EXTRA");
	int int3 = ((GetGlobalNumber("DAN_EXTRA_XP2") + 128) << 8);
	int int5 = (GetGlobalNumber("DAN_EXTRA_XP") + 128);
	int int7 = (int3 | int5);
	if (int1) {
		GiveXPToCreature(GetFirstPC(), int7);
	}
	SetGlobalNumber("DAN_EXTRA_XP", 0);
	SetGlobalNumber("DAN_EXTRA_XP2", 0);
	ShowLevelUpGUI();
}

void sub1() {
	object oPC = GetFirstPC();
	int nGlobal = GetGlobalNumber("DAN_PATH_STATE");
	if ((nGlobal > 0)) {
		if ((nGlobal == intGLOB_148)) {
			AddMultiClass(3, oPC);
		}
		else {
			if ((nGlobal == intGLOB_149)) {
				AddMultiClass(5, oPC);
			}
			else {
				if ((nGlobal == intGLOB_150)) {
					AddMultiClass(4, oPC);
				}
			}
		}
	}
	CancelPostDialogCharacterSwitch();
	NoClicksFor(0.6);
	DelayCommand(0.5, sub2());
}

void main() {
	object oPC = GetFirstPC();
	if ((((GetLevelByClass(4, oPC) == 0) && (GetLevelByClass(3, oPC) == 0)) && (GetLevelByClass(5, oPC) == 0))) {
		sub1();
	}
	ClearAllActions();
}

I think it is not complete or something.

Last edited by moynal; 09-15-2011 at 07:40 AM. Reason: N/A
moynal is offline   you may: quote & reply,
Old 09-15-2011, 01:19 PM   #11
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,465
Current Game: ME3MP, Arkham Origins
Folder extraordinaire Helpful! Forum Veteran Veteran Modder 
^^^No, the script is complete.

Now, I am at a loss as to what Agent Xim was wanting to do that you are trying to follow up on.... can you provide a link to what you are talking about?

EDIT:

Ok, so perhaps it was a mod that would allow you to *not* be a jedi, and instead keep your normal class for the whole game? I think, due to hardcoding and a great deal of scripts that require certain things of the PC at certain points of the game, that it would be near impossible to not multi-class your PC.

Just changing this script is simple enough though. The subroutine script sub1 is asking the global variable DAN_PATH_STATE what class you chose at the computer, whether guardian sentinel or consular. You would need to change the dialog and scripting for that computer console choice, adding a new value for DAN_PATH_STATE, perhaps we can call it intGLOB_157 (which would need to be declared in the variable list and given a value), and add that to the if/else tree here.

sub2 is a simple subroutine for adding some math derived XP to the PC.

The main script calls asking if the PC is not a Guardian AND is not a Sentinel AND is not a Consular. If this is the case, the PC is none of those things yet, then sub1 checks your choices, multi-classes you accordingly, then calls sub2 to dole out the XP bonuses.

So, there is what is going on in the script


Want to play a game of ME3MP?
Qui-Gon_Glenn on the software of which we shall not name.... add me and the enemy shall fall in chunks of crimson salsa

Last edited by Qui-Gon Glenn; 09-15-2011 at 05:36 PM.
Qui-Gon Glenn is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Need help with kotor script

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:27 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.