PDA

View Full Version : Orientation


Billthemailman
04-28-2006, 11:36 AM
How do I figure out Orientation in KOTOR 1?

Pavlos
04-28-2006, 12:04 PM
Erm, you could do something like this:

Getting the orientation in KotOR I could be done in the following manner:


void main() {

object oPC = GetFirstPC();
float Orientation = GetFacing(oPC);

string sOrient = FloatToString(Orientation, 10, 10);
ActionStartConversation(oPC, "GetOrientation");
SetCustomToken(3000, sOrient);
}


Then attach that to an armband and in the dialogue file, as the first entry, you can put: Orientation = <CUSTOM3000>.

I forget whether or not the <CUSTOM3000> needs a space between the 3000 and the custom, try both.

Fire it from an armband or something else similar...
If you don't want to waist time going into a dialogue then:

void main() {

object oPC = GetFirstPC();
float Orientation = GetFacing(oPC);

string sOrient = FloatToString(Orientation, 10, 10);
SendMessageToPC(oPC, sOrient);
}

Fire that from an armband and it should give the orientation in the feedback screen. These should work... I can't find the one that I use specifically right now and I don't have enough time to go on a search. Anyway, I hope these two hacked together scripts help you. :)

Billthemailman
04-28-2006, 12:13 PM
Um I haven't worked with equipable items yet besides retextuing, how do I go about adding a script to one?

Pavlos
04-28-2006, 01:07 PM
Alright... I'll try and explain this - I've found my explanations to be... long though.

Open KotOR Tool. Done? That is good… I don’t want to have to threaten you with a nailed rolling pin now, do I? Under the KotOR I tab open “BIFs” (BIFs basically contain all the game’s universal data). Under this click on templates, then on items. You will be presented with a huge list that would take you forever to wade through. Luckily, I can tell you what file you will want to look at! Scroll down to “g_i_frarmbnds01” and double click it to open up the .uti in the KT GFF editor.

http://img68.imageshack.us/img68/2264/orientation5wl.jpg

Since you are doing orientation we will change the data in the ResRef and the tag to “pav_orientation” (This is an example – name it to whatever you like!).

Now that you have done this click on the properties tab. Double click the grey section next to the first line you see in the table there to bring up another screen. Go to the pull down box which is titled with the wonderfully inventive “Value.” Scroll downwards until you are faced with “Unlimited” this will mean you can continue to use the armband forevermore… the screen should look like this:

http://img68.imageshack.us/img68/1415/properties0uq.jpg

Good! Right, now this step isn’t necessary but if you want to be able to find your armband quickly and equip it then this is something you will want to do. Simply change the name field to something that you want it to be… we will say “Orientation Band” and then give it a short description – in the “Identified Description” field.

http://img146.imageshack.us/img146/8968/description2vp.jpg

Excellent! Save your file to the same name as your ResRef – In this case “pav_orientation.” Now plonk that in your override. Go back into KT’s main screen and expand the .2da field of the BIFs. Open up “Spells.2da” by double clicking on it. Scroll down to a blank spot and make a new entry.

This tutorial should guide you through the rest: http://www.lucasforums.com/showthread.php?t=130898
Though not strictly for new items... it should help you. If it doesn't then just ask for help again. It is the worst feeling to not understand something - so don't suffer in silence.

REDJOHNNYMIKE
04-28-2006, 02:19 PM
OR, you could use Darth333's Whereami armband to give you coordinates, nearest objects, unlock doors, and Orientation and Bearing:lol:

Pavlos
04-28-2006, 02:37 PM
OR, you could use Darth333's Whereami armband to give you coordinates, nearest objects, unlock doors, and Orientation and Bearing:lol:

It isn't available for KotOR I which is what he wants it for.

Det. Bart Lasiter
04-28-2006, 02:42 PM
Um I haven't worked with equipable items yet besides retextuing, how do I go about adding a script to one?
There's also the option of sending the orientation to the debug/messages screen:

void main() {
object oPC = GetFirstPC();
float Orientation = GetFacing(oPC);

SendMessageToPC(oPC, FloatToString(Orientation, 10, 10));
}
That way you just have to check the messages screen and not edit 2DAs and whatnot ;)

***Edit***
Does anyone know if KotOR has an "ExecuteScript" cheat like in NWN?

Billthemailman
04-28-2006, 02:45 PM
@ Pavlos: Ty for your help, I'll read that guide and see if I can finish this thing, the guide you posted was very helpful.

@ RedJohnnyMike I was under the impression that the Whereami armband was for KOTOR II, not Kotor I

Pavlos
04-28-2006, 02:45 PM
Where would that be fired from though, Jmac? I don't understand how the data would get to the player... you would still have to fire it from an armband or some other equivalent...

Det. Bart Lasiter
04-28-2006, 02:47 PM
Where would that be fired from though, Jmac? I don't understand how the data would get to the player... you would still have to fire it from an armband or some other equivalent...
I didn't really think about that part, but either way, it wouldn't involve creating a new custom token or dialog file. The messages screen is part of the pause menu, it's one of the screens you can get to from the combat messages screen.

Pavlos
04-28-2006, 02:50 PM
I gave him the option to do that ;)... but never mind :). Erm, I don't think there is an ExecuteScript cheat, no. Which is a shame - it would make testing things a lot easier than it is now.

Billthemailman
04-28-2006, 02:51 PM
No it doesn't have an executre script function that I know of which is a real bummer, and I'm not understanding this 2da thing

Det. Bart Lasiter
04-28-2006, 02:56 PM
No it doesn't have an executre script function that I know of which is a real bummer, and I'm not understanding this 2da thing
I always found that the easiest way to edit spells.2da was to copy a row that has a similar "spell" attached to it, then edit the TLK and impactscript fields for whatever I'm adding.


I gave him the option to do that ... but never mind . Erm, I don't think there is an ExecuteScript cheat, no. Which is a shame - it would make testing things a lot easier than it is now.
Heh, I didn't see that part... but the inability to execute a script from the debug console is a bit of a pain in the a**.

Billthemailman
04-28-2006, 03:17 PM
Ok I'm not seeing orientation appear anywhere, and how do I take screenshots outside of the game to show you what I did?

Det. Bart Lasiter
04-28-2006, 03:21 PM
Just hit print screen and paste it into any image editor, MSPaint (Start->Run->"mspaint") will work. Then just upload it to an image host (imagebucket.net, photobucket.com) and post a link.

Billthemailman
04-28-2006, 06:49 PM
Um ok, I copied the warp band and changed the name and script to my own, but it won't work. I used the bottom option btw. All it says in feedback is, <name> used the Orientation Armband!