Jump to content


Photo

Fair Strides' Script Shack


  • Please log in to reply
112 replies to this topic

#101 Fair Strides

Fair Strides

    Aurora Engine Operator

  • Administrators
  • 2,214 posts
  • LocationOregon, USA

Posted 14 August 2017 - 05:57 PM

Thank you! But now it says the error is at ";"


Try adding one more ) in front of the ");" at the very end.

(By the way, if you ever want to ask about one of the quotes, feel free to send me a PM)

 

My personal, made-up quote: "To know is good, but to act is better."

"Words are just words, thoughts thoughts, but actions...actions are progress." - Fair Strides

"Intelligence and respect are all it takes to get along fine. Not a bad trade off, huh?" - EwigD from GameFaqs

"And regarding butchering the language, I have been to the internet. The language is well butchered regularly." - Malkior

 

"You can either live with the lies or die with the truth. Who would rather lie to live than die for telling the truth?" - Fair Strides


#102 Guingamor

Guingamor

    Jedi Initiate

  • Registered
  • Pip
  • 5 posts

Posted 14 August 2017 - 06:31 PM

Thanks for your help!! I fixed it by changing it to this:

ActionMoveToLocation(Location(Vector(-77.5775390625, -51.8112106323242, 0.0), 213.749927975663), 0));

I don't know if it actually works as intended but it compiled, so.



#103 Reztea

Reztea

    Jedi Apprentice

  • Members
  • PipPip
  • 48 posts
  • LocationFlorida, USA

Posted 22 August 2017 - 02:04 PM

How would I go about starting a conversation after killing a group of people? Like when Canderous and his mercenaries along with Revan and his party killed the Rakghouls in the Undercity before Canderous joined them.

 

(K1 Script).

 

Another thing, how can I "lock" a party member and make them required to be in your party for the time being?



#104 Fair Strides

Fair Strides

    Aurora Engine Operator

  • Administrators
  • 2,214 posts
  • LocationOregon, USA

Posted 23 August 2017 - 10:22 PM

@Reztea: You've already asked for help in a new thread on everything in your post, so I will simply say to check the latest replies in that topic. :)


(By the way, if you ever want to ask about one of the quotes, feel free to send me a PM)

 

My personal, made-up quote: "To know is good, but to act is better."

"Words are just words, thoughts thoughts, but actions...actions are progress." - Fair Strides

"Intelligence and respect are all it takes to get along fine. Not a bad trade off, huh?" - EwigD from GameFaqs

"And regarding butchering the language, I have been to the internet. The language is well butchered regularly." - Malkior

 

"You can either live with the lies or die with the truth. Who would rather lie to live than die for telling the truth?" - Fair Strides


#105 DarthRevan101

DarthRevan101

    World's most unoriginal forum name....

  • Members
  • PipPipPipPip
  • 214 posts

Posted 30 August 2017 - 08:28 PM

How could I go about creating a Pazaak game with a custom character?



#106 Hassat Hunter

Hassat Hunter

    TSLRCM / M4-78EP Developer

  • Administrators
  • 4,554 posts

Posted 09 September 2017 - 12:51 PM

Kreia uses the animation during the Jedi Enclave Scene so I'll hope it's a General Animation.

It has a bunch of requirements. You should probably check Visas' entry on the Ravager (with 1.8.5) to see them, it alters a bunch of stuff if failing to prevent the scene from looking really stupid, so whatever you do, it runs proper. Took a bit of tweaking to make both look good, but I'm confident it was successful and paid of that work.

#107 N-DReW25

N-DReW25

    GenoHaradan Legacy Developer

  • Members
  • PipPipPipPipPip
  • 690 posts
  • LocationSuper Secret GenoHaradan Base

Posted 09 September 2017 - 01:30 PM

It has a bunch of requirements. You should probably check Visas' entry on the Ravager (with 1.8.5) to see them, it alters a bunch of stuff if failing to prevent the scene from looking really stupid, so whatever you do, it runs proper. Took a bit of tweaking to make both look good, but I'm confident it was successful and paid of that work.

So what type of requirements are these? If it matters I am trying to get the Batu Rem imposter to do it with a Vibrosword when he reaches 1HP then immediately after he does the seppuku he dies and grenn runs in and does his usual conversation (Painfully obvious what this is for). 



#108 Hassat Hunter

Hassat Hunter

    TSLRCM / M4-78EP Developer

  • Administrators
  • 4,554 posts

Posted 09 September 2017 - 02:31 PM

You really need to check the dialogue and script, it's been like 3 years ago when I did that :/

#109 Qyzen_Hunter

Qyzen_Hunter

    Jedi Apprentice

  • Members
  • PipPip
  • 58 posts
  • LocationOdessen

Posted 13 September 2017 - 07:11 AM

Umm, any idea how I could warp the player in the Hawk and trigger a conversation? 


Currently working on TSL: Crisis on Corellia


#110 Kexikus

Kexikus

    Jedi Master

  • Members
  • PipPipPipPipPip
  • 1,405 posts

Posted 13 September 2017 - 09:05 AM

To warp the character you just need

void main(){

SetGlobalBoolean("EH_WARP", TRUE);
StartNewModule(<name of the ebon hawk module with quotes>, <optional waypoint tag with quotes>);

}

Replace <...> with the appropriate string. This will warp the player to the specified waypoint on the Ebon Hawk. If you don't specify a waypoint, it'll use the default one. The setting of the global boolean is necessary to make sure that the conversation is triggered only in this case. Replace it's name with something you like and add it to globalcat.2da

 

Then we need to start the conversation on board the Ebon Hawk. To do that, you can either modify the OnEnter script or create your own trigger. In any case, the added script part would look something like this:

object oEnter = GetEnteringObject();
object oDialogPartner = GetObjectByTag(<Add dialog partner tag with quotes>);

if(oEnter == GetFirstPC() && GetGlobalBoolean("EH_WARP")) {
AssignCommand(oDialogPartner, ActionStartConversation(GetFirstPC(), <dialog tag with quotes>));
SetGlobablBoolean("EH_WARP", FALSE);
}

This of course needs to be inside the void main() {} of either the OnEnter or the trigger script. Once again, replace the <...> with the appropriate strings and the boolean name.

The two conditions are to make sure that the dialog only starts when the player enters and that it only starts when warped here with the first script.



#111 Qyzen_Hunter

Qyzen_Hunter

    Jedi Apprentice

  • Members
  • PipPip
  • 58 posts
  • LocationOdessen

Posted 16 September 2017 - 08:54 AM

To warp the character you just need

void main(){

SetGlobalBoolean("EH_WARP", TRUE);
StartNewModule(<name of the ebon hawk module with quotes>, <optional waypoint tag with quotes>);

}

Replace <...> with the appropriate string. This will warp the player to the specified waypoint on the Ebon Hawk. If you don't specify a waypoint, it'll use the default one. The setting of the global boolean is necessary to make sure that the conversation is triggered only in this case. Replace it's name with something you like and add it to globalcat.2da

 

Then we need to start the conversation on board the Ebon Hawk. To do that, you can either modify the OnEnter script or create your own trigger. In any case, the added script part would look something like this:

object oEnter = GetEnteringObject();
object oDialogPartner = GetObjectByTag(<Add dialog partner tag with quotes>);

if(oEnter == GetFirstPC() && GetGlobalBoolean("EH_WARP")) {
AssignCommand(oDialogPartner, ActionStartConversation(GetFirstPC(), <dialog tag with quotes>));
SetGlobablBoolean("EH_WARP", FALSE);
}

This of course needs to be inside the void main() {} of either the OnEnter or the trigger script. Once again, replace the <...> with the appropriate strings and the boolean name.

The two conditions are to make sure that the dialog only starts when the player enters and that it only starts when warped here with the first script.

Thanks!


Currently working on TSL: Crisis on Corellia


#112 Kexikus

Kexikus

    Jedi Master

  • Members
  • PipPipPipPipPip
  • 1,405 posts

Posted 23 October 2017 - 03:23 PM

Two questions from me today:

 

First of all, in the documentation for GetPartyMemberByIndex(int nIndex) it is stated that this should return the party leader for nIndex = 0 and the two party members for nIndex = 1 & 2:

// 577: Returns the party member at a given index in the party.
// The order of members in the party can vary based on
// who the current leader is (member 0 is always the current
// party leader).
// GetPartyMemberByIndex
object GetPartyMemberByIndex(int nIndex);

However, this seems to be wrong as I've been using it to get party members 1 and 2 and it only gives a useful result (the second party member) for nIndex = 1. To get the first party member, I need to use nIndex = 0. I was wondering if anyone knows if that's how it always works as I doubt that it's intended. I'm assuming that as this is the reason for the second party member spawning in the main hall in the hostile Korriban academy instead of in it's appropriate position.

 

The second question is somewhat weird. I've been testing that scene where you enter the hostile Korriban academy to find what's causing the incorrect spawn point and as stated above, I found the culprit. However, I thought the issue was somewhere else for a while which is why I had a closer look at the script spawning the party members upon entering the academy after retrieving the starmap. It's the OnEnter script for korr_m35aa, called kor35_enter. Here's the relevant part:

int nGlobal = GetGlobalNumber("KOR_FINAL_TEST");
		if (((nGlobal > 3) && (!sub6()))) {
			SetGlobalBoolean("KOR_ADD_PARTY", 1);
			sub8(1);
			int int18;
			int int19;
			string string1;
			int18 = 0;
			while ((int18 < GetGlobalNumber("KOR_REMOVE_PCS"))) {
				int19 = GetGlobalNumber(("KOR_REMOVE_PC" + IntToString(int18)));
				sub5(((("KOR_REMOVE_PC" + IntToString((int18 - 1))) + ":") + IntToString(int19)), (6 + int18), (6 + int18), 5.0);
				switch (int19) {
					case 0:
						string1 = "Bastila";
						break;
					case 1:
						string1 = "Cand";
						break;
					case 2:
						string1 = "Carth";
						break;
					case 3:
						string1 = "HK47";
						break;
					case 4:
						string1 = "Jolee";
						break;
					case 5:
						string1 = "Juhani";
						break;
					case 6:
						string1 = "Mission";
						break;
					case 7:
						string1 = "T3M4";
						break;
					case 8:
						string1 = "Zaalbar";
						break;
				}
				AddPartyMember(int19, GetObjectByTag(string1, 0));
				(int18++);
			}

You can ignore all the subX() functions as they are either for debugging or not related to spawn NPCs. As you can see, the game will check KOR_REMOVE_PCS which should be the number of party members that got removed when leaving for the final tomb. It's set in k_pkor_partyleav and it's actually incorrectly set to the number of removed party members + 1, but that's not the issue here. The game will then go through KOR_REMOVE_PC0 to KOR_REMOVE_PC2 depending on the number of NPCs that got removed (although, it goes one step to far due to the incorrect KOR_REMOVE_PCS). These three globals are also set in k_pkor_partyleav and contain the party member indices of the removed NPCs and KOR_REMOVE_PC2 is just 0 as there is no third NPC to remove from the party (which makes me wonder, if at some point you had three companions at once). The game will then save this index in int19 and assing the proper string in string1 to spawn the NPC with AddPartyMember.

Now, this is obviously working, but as soon as I change the values of KOR_REMOVE_PC0 or KOR_REMOVE_PC1 with KSE, that NPC just won't spawn for some reason. The only two party members that will spawn are Canderous and Juhani, the two party members that should spawn in my playthrough without tinkering. However, they also spawn if I switch their positions in the globals, which makes me wonder what the hell is going on here. All I can confirm is that both the index and the string are assigned correctly, so it seems that it's the AddPartyMember that fails. I just don't know why...

Then again, it's not actually a problem as it seems to work fine in vanilla and when not using KSE to alter these two globals and I have no intentions of altering that part of the script. I'd just like to know what's going on.

 

Thanks for any help :)



#113 HK-47

HK-47

    Jedi Padawan

  • Members
  • PipPipPip
  • 108 posts

Posted 24 October 2017 - 04:41 AM

Regarding the nindex numbers, though I don't do modding or scripting, I gather from what you posted that it has to do with how the code (script maybe) sees numbers. I've learned a little bit of Python, so someone correct me if I'm wrong. In code, 0 is considered a number and, I think, is considered the first number in numerical sequence. I think it's due to Binary. But I can't remember the exact reason. I've been trying to Google it, and can't find the answer.

 

If I'm right, then the answer is "Yes. That's how it always works."

 

The other part is beyond me. My only guess is there is something else resetting the global that you are changing. I had something similar happen to me. I kept trying to change something, but the game just wouldn't have it.


"So long as you continue to be so predictable I need not face you at all. You are your own worst enemy".- Tassadar

~Observation: And if you did master, I could not prevent you. I would suggest that if my words are difficult to hear, then it is long past time someone said them to you. Speaking from the perspective of one who suffers considerable memory problems, repressing such horrific acts of slaughter, seems like such a waste. It is better to drag such delightful memories kicking and screaming into the open where they may be examined and replayed again and again savoring each beautiful moment. -HK-47 to the Exile KotOR2~

 

This is what I dream of when I see people whining about things, ignoring the facts. This is what whiny people look like. All I can say to whiny people on the internet is this, just not in so few words. If you don't like it, fill out this form.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users