PDA

View Full Version : [TSL] Globals


glovemaster
07-22-2007, 05:22 AM
I was wondering if it is possible to add custom globals to the game?
I tryed editing Globalcat.2da and i kind of screwed things up, and the HUD disappeared.. :lol:

Thanks in advance :D
~GM

stoffe
07-22-2007, 06:50 AM
I was wondering if it is possible to add custom globals to the game?
I tryed editing Globalcat.2da and i kind of screwed things up, and the HUD disappeared.. :lol:


Yes it is possible, and as you said it's done by adding new lines to globalcat.2da. (If you try to use a global without it first being declared in this file nothing you assign to it will be stored and it will always return the default value for the data type.)

Be careful to set the data type to a valid value (see the existing lines), and that the name of each global is unique, or things will get messed up.

glovemaster
07-22-2007, 07:23 AM
Okay then thanks ;)

glovemaster
07-24-2007, 05:25 AM
I didn't want to start a new thread so i just tagged it onto this one:
I've come to the stage where i need to add characters and creatures to my modules and its never really been a problem before because i've never needed to be specific. But when the WhereAmI Armband generates to Orientation, what do i do with it? Because i've tryed putting it in the "XOrientation" and then the "YOrientation" and neither of them work.

Thanks in advance :D
~GM

stoffe
07-24-2007, 07:02 AM
I've come to the stange where i need to add characters and creatures to my modules and its never really been a problem before because i've never needed to be specific. But when the WhereAmI Armband generates to Orientation, what do i do with it? Because i've tryed putting it in the "XOrientation" and then the "YOrientation" and neither of them work.


I haven't used whereami in a while so I don't remember exactly what it outputs, but the XOrientation/YOrientation fields are, IIRC, a direction vector that produces the angle the object is facing.

Setting proper facing angles tends to be a pain since Bioware apparently couldn't settle for a single method of specifying it and use a bunch of different ways in different places. :roleyess:

e-varmint
07-24-2007, 07:23 AM
.......the XOrientation/YOrientation fields are, IIRC, a direction vector that produces the angle the object is facing.

Setting proper facing angles tends to be a pain since Bioware apparently couldn't settle for a single method of specifying it and use a bunch of different ways in different places. :roleyess:

Has anyone put a tutorial together that explains how to use the X and Y orientations? I can understand how the [censored] radians work, but not these.........

glovemaster
07-24-2007, 07:26 AM
I haven't seen a tutorial...
Thanks then :D

Edit: I was just giving this some thought and i came up with this:

In the d3_location.nss script it has the line
string Orientation=FloatToString(GetOrientation, 5, 5);
And i thought that if we need a vector shouldn't this actually be:

vector Orientation=AngleToVector(GetOrientation);
string XOrientation = FloatToString(Orientation.x, 5, 5);
string YOrientation = FloatToString(Orientation.y, 5, 5);

And then in the Printing Part:

string PlayerPosition ="> " + X_Coordinate + "> " + Y_Coordinate + "> " + Z_Coordinate + "> " +"Orientation: " + Orientation + "> " +"Bearing: " + Bring;
string NplayerPosition ="> " + X_Coordinate + "> " + Y_Coordinate + "> " + Z_Coordinate + "> " +"Orientation: " + Orientation + "> " +"Bearing: " + Nbring;

Should be:

string PlayerPosition ="> " + X_Coordinate + "> " + Y_Coordinate + "> " + Z_Coordinate + "> " +"XOrientation: " + XOrientation + "> " +"YOrientation: " + YOrientation + "> " +"Bearing: " + Bring;
string NplayerPosition ="> " + X_Coordinate + "> " + Y_Coordinate + "> " + Z_Coordinate + "> " +"XOrientation: " + XOrientation + "> " +"YOrientation: " + YOrientation + "> " +"Bearing: " + Nbring;


Can some one check this through for me? Thanks.

EDIT: Compiled and tested the script and it works, i just need to se if the values it give me work properly.

Edit: Woo! It worked! I'll post to Darth333 about it.

Anywho, another problem i would like help with! :D
It seems that all of my modules like to autosave as you enter them. I've looked through the ARE, GIT and IFO files but i can't find anything other than Mod_IsSaveGame and they are all set to 0 anyway. What do i have to change?

Thanks again ;)
~GM

stoffe
07-24-2007, 11:30 AM
It seems that all of my modules like to autosave as you enter them. I've looked through the ARE, GIT and IFO files but i can't find anything other than Mod_IsSaveGame and they are all set to 0 anyway. What do i have to change?


It's set in the modulesave.2da file, in the autosaveonenter column:
yes = autosave if it hasn't been done in a while
no = never autosave
force = autosave regardless of when it was last done

glovemaster
07-24-2007, 11:33 AM
Ah thank you, more 2da editing.. :( :lol:

glovemaster
07-24-2007, 11:48 AM
Last question (I say that but never mean it :D)
I remember reading a thread somewhere about someone constructing the minimaps for the droid modules, if they actually finished it, where can i download them and who was the author?

Thanks again!

tk102
07-24-2007, 01:38 PM
Woo! It worked! I'll post to Darth333 about it.
:thumbsup: Thanks glovemaster for making the armband more user-friendly. I've uploaded the new version (2.0.6) with your changes to SWK.

I'll let Darth333 handle the French version. :p

glovemaster
07-24-2007, 01:47 PM
:p No Probs :D

DarthStoney
07-24-2007, 02:17 PM
Last question (I say that but never mean it :D)
I remember reading a thread somewhere about someone constructing the minimaps for the droid modules, if they actually finished it, where can i download them and who was the author?

Thanks again!

I have created some mini maps for the droid planet except for 806&807
if you pm me and give me an email address I can e-mail them to you if
you want them.They will also only work with the propersettings in the
.are files which I can send you also.

Master Zionosis
07-24-2007, 03:08 PM
I have created some mini maps for the droid planet except for 806&807
if you pm me and give me an email address I can e-mail them to you if
you want them.They will also only work with the propersettings in the
.are files which I can send you also.

Maybe you could just zip them up and host it so it is accessible to anyone that wants them.

Also, if you don't have anywhere to host the zip I can host it for you, I have PLENTY of space.

I'll PM you my email if you want me to host them for you.

tk102
07-24-2007, 03:26 PM
Also, if you don't have anywhere to host the zip I can host it for you, I have PLENTY of space.
As does kotortool.starwarsknights.com...

glovemaster
07-25-2007, 05:29 AM
Thanks DSTONEY I've just recived the files. And thanks for premission to edit and distibute, it will be part of the Ark Angel mod so they won't be stand-alone and of course credit will go to you for that.

Thanks again! :D