Jump to content

Home

Orientation


Recommended Posts

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. :)

Link to comment
Share on other sites

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.

 

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:

 

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.

 

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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**.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...