Jump to content


Photo

Create A Jedi Trainer

NPC Forces Jedi powers Blasters Mods Lightsabers Zaalbar Endar Spire

  • Please log in to reply
30 replies to this topic

#1 ALPHA000102

ALPHA000102

    Jedi Padawan

  • Members
  • PipPipPip
  • 112 posts

Posted 07 November 2017 - 05:06 AM

I have tried posting this request for help in the general section but I have not received any luck so I chose to try again in mod requests. I hope that will not be a problem. I am looking to make two Jedi Trainers. I know there are mods created by Redhawke that allow you to make other members of your party into Jedi such as Carth, Canderous, and Mission. You can find them yourself at the 1st link below. The YouTube video link will show you how they work. However there is no such option for Zaalbar.

I want to be shown how to make a Jedi Trainer for myself and Zaalbar. I ask to be shown how to design to characters, set their positions, and dialogue and script in the game, and how to get them to give me specific item.. I have created the dialogue and the .utc files that I want to use for both characters. You can see them in the attached files below. Now I just need to finish the rest.

I have seen instructions on how to make an NPC at the final link below but I cannot understand them fully and they are not enough anyway. Besides they are decided to show you how to create a NPC to join your party when I want to just speak to an individual and receive training.

Furthermore I know there is a mod that allows each party member to be a Jedi as they join your party. I do not wish to use that. With mods that can turn each other party member into Jedi incorporated into the story of the game I would like one for Zaalbar as well. I can for all the help anyone can provide. I have pasted examples of the mod I would like to have to this thread. Thank you in advance.

http://www.jumpstati...Hawke/mods.html





https://www.youtube.com/watch?v=yLtDzmtoWi4

http://z6.invisionfr...6965/ar/t57.htm

Attached Files



#2 Qui-Gon Glenn

Qui-Gon Glenn

    Jedi Padawan

  • Members
  • PipPipPip
  • 118 posts
  • LocationAtlanta

Posted 07 November 2017 - 01:40 PM

Darkkender made a Zaalbar to Jedi mod, and there is another one on the Nexus that seems a little cheesy in implementation, but works.

Zaalbar is one of the easiest chars to mod, because his VO is easy to copy and paste. You just need to decide what triggers the event that Zaalbar is convinced to be or asks you to be a Jedi.

It could be alignment dependent, it could be Global variable dependent, it could be more simple and just a conversation option that is always there with Big Z until it is talked about with him.

You could take the scripting from the mods you have posted, and make 99% of your mod from just cutting and pasting.

Your request needs to be more deeply thought out for any of us to act on it. I have given you some things to think about - make some decisions about how you would like this thing to work, and explain it, and I might be willing to do the scripting portion (since it's the easiest part :P) and then you could get someone to edit Z's dialog, and it would be done.

As far as this being a problem here, I think this is where the request belonged in the first place, so you're fine here. You may wish to ask a moderator to lock your old thread, so that it can leave the front page now that it is obsolete.

#3 Sith Holocron

Sith Holocron

    M4-78

  • Administrators
  • 3,986 posts
  • LocationKodiak, AK (Hoth)

Posted 07 November 2017 - 03:35 PM

 You may wish to ask a moderator to lock your old thread, so that it can leave the front page now that it is obsolete.

Old thread is now deleted.


"Release dates are for those that don't care about quality in mods." - Me
 
Here are my mods. Please rate and leave some feedback if you've liked any of them in your game!

Not approving mods.  PM one of these other folks if you mod is not reviewed within 24 hours.


#4 ALPHA000102

ALPHA000102

    Jedi Padawan

  • Members
  • PipPipPip
  • 112 posts

Posted 08 November 2017 - 09:23 AM

Thank you for removing my original thread.

 

I will try and update my description post as best I can. First of all thank you for even replying to me. It was the first reply that I think meant something to me. I have tried posting this thread before without success.

 

I guess the first thing I need to bring up is that I trying to spawn 2 characters. This has been done in the mod videos I attached to my original post. They each created a character to speak to that turned Carth, Canderous, and Mission into Jedi. I am trying to do the same thing. I am looking to create same thing for me and Zaalbar.

 

I have created the uti files for both characters and gotten the dialogue files ready. Now I need to be shown how to establish where the characters will occur in the game. To help I want the trainer for me to appear in the hallway after the first room where I first speak to Trask. For the Trainer for Zaalbar I want him to appear in the far side of the Dantoonie Courtyard behind the trainer for Carth. How do I get them to appear there?

 

Once I get the characters to spawn how do I setup their dialogue files? Furthermore with the dialogue files how to the camera to change between each character as they speak? I have attached both the uti and dialogue files to this post so you can take a look at them.

 

This is about the best I can do in updating my post because these points have to be taken care of before I can worry about Jedi Training. However once they are taken care of the next thing I will need to know is how to set them to give me and Zaalbar items. (So it becomes an “items received” situation like on the Endar Spire where Trask hands you an advanced medpak.) I hope that this helps you out. Thank you in advance.

Attached Files



#5 Qui-Gon Glenn

Qui-Gon Glenn

    Jedi Padawan

  • Members
  • PipPipPip
  • 118 posts
  • LocationAtlanta

Posted 08 November 2017 - 01:34 PM

You need the whereami armband, so you can get the location pinned down that you want to spawn your NPC at. Go to the places you want them to spawn in in-game, and use the armband to get those coordinates.

The dialog editor is pretty simple, and the game handles the basic camera moves for you. In general, the camera will automatically focus on the speaker unless you tell it to do something else.

Having the NPC give you items is simply attaching a giveitem script to the end of your .dlg file, so that it runs when the conversation is over and gives you the goods.

I am not willing to do any .dlg editing. I hate doing it for my own mods - I have never really liked how the editor works and it confuses me more than it should.

So, focus on editing DLG. Everything else here is absurdly simple.

When you have that .dlg file, send that to me and I will attach the scripts, or let me know and I will send you the scripts and tell you where they go.

I am pretty old school when it comes to modding. To learn enough to not annoy the veterans and not ask stupid questions, I had to study a lot of this on my own. That's how we all did. What this means is - if you want to make this mod, I will help you, but only in my specific area of expertise.

#6 ALPHA000102

ALPHA000102

    Jedi Padawan

  • Members
  • PipPipPip
  • 112 posts

Posted 10 November 2017 - 12:59 AM

First of all thank you for helping me with this. I am still very new to modding so I am trying to learn myself through trial and error and by asking for help. I hope you are right about the camera on the dialogue files working for themselves as I am going to move forward on that. I guess I will find out when I test the mods. Although I could not find the whereami armbands I do have the utility armbands which do the same thing.

I already have the dialogue files created and ready to go. However the first thing I will need to is get the characters to spawn in the areas I want them to. I need to get the characters up and running before I worry about the scripts. The coordinates that I want the characters to have are below. I do not believe the nearest creature point is necessary is it? I have finished the .utc files for both characters and have linked their dialogue files to them. Can you please help me get the characters to spawn in those places?

 

I believe there is a tool I can use to input these coordinates into but is that all that is necessary to make a character spawn? If so, do you know the tool that I need and/or anything else I need to make a character spawn? Once I have gotten the characters themselves done I should be ready to start working on the script. Thank you in advance.

My Jedi Trainer

Player Location: 27.53410, 22.04087, -127500
Current Location: end_molaa
Angle Orientation: 324.79160
X Orientation: 0.81706
Y Orientation: -0.57655
Bearing Orientation: -0.59935
Nearest Creature: end_trask 2.00654
Nearest Door: end_door01 6.54779
Nearest Placeable: power conductor 4.91575
Nearest Trigger: end_trig02 3.44956
Nearest Waypoint: end_wp_flame01 2.91077

Zaalbar Jedi Trainer

Player Location: 123.94198, 190.52289, 1.49416
Current Module: Dantoonie
Angle Orientation: 156.09872
X Orientation: -0.91424
Y Orientation: 0.40516
Bearing Orientation: 4.30253
Nearest Creature: Mission 6.16813
Nearest Door: man14aa_door02, 16.87875
Nearest Placeable: bench 46.11776
Nearest Trigger: dan14aa_joninit 56.38543
Nearest Waypoint: wp_dan14_jedim_06 1.45403



#7 Qui-Gon Glenn

Qui-Gon Glenn

    Jedi Padawan

  • Members
  • PipPipPip
  • 118 posts
  • LocationAtlanta

Posted 11 November 2017 - 12:44 AM

Wow... That armband gives a lot of info!

Ok, so you need to establish the conditions under which these trainers will appear in the module.

The old way to do this is with override script injection to the on_enter script to the module, and that's how I will get you started.

The main thing you need is your player's location coordinates, and you have them! They are the first ones listed. These are the coordinates you will use to spawn your NPC. The orientation we can use, and you can play with the numbers once we have a script that compiles and functions properly, as then it will be simple substitution and recompile if you want to tweak position/orientation.

In that on_enter script we build, we will check for your conditions, like "Is Zaalbar in the party?" or "Is the PC level high enough for this trainer?" or whatever you are thinking of.

If those conditions are met, we will spawn your creature at those coordinates, and it will wait there for you. If you want to get fancy, we can script some behaviors for that NPC so it isn't lifeless while it waits for you.

Work you need to do - build your .utc's for the trainers. These are Unique Character Templates, and what we will spawn in to that location. They include what the NPC is wearing, what weapons and special items it might have, its attributes, HP, etc.

If you have the dialogs done, you are really most of the way there. I will write up something that is close to what you want for the on_enter scripts, post them here tomorrow, and then we can tweak and you can test.

Edit:

Just writing the algorithm now, will sit down with the editor, look at my old mods, and remember the correct syntax :P

On_Enter
void main()

object oTrainer = yourtrainer;

If (your conditionals) == TRUE
 Spawn oTrainer;
ExecuteScript(on_enter_old);
 ‎;
On_perception event
void main()

object oPC = GetFirstPC();

If perceived oPC, 
  Init action sequence and start dialog;
;


#8 ALPHA000102

ALPHA000102

    Jedi Padawan

  • Members
  • PipPipPip
  • 112 posts

Posted 12 November 2017 - 09:00 AM

I thank you for helping me with this and I look forward to getting the script from you. Is there any-way you could give me some details on where I can go to learn about scripts myself so I will hopefully be able to do this myself in the future? I have finished getting the details finished for the .utc files for my characters and their dialogue files are ready. I have attached the files so you can use them if you need them.

 

On a side-note I have changed the orientation coordinates as I believe the original positions may be wrong in the direction the characters are facing. I do not know if that will be a problem but I decided to act to make sure. I have listed the new coordinates below. Please let me know if these will create any problems. Thank you in advance.

 

My Jedi Trainer

 

Player Location: 25.16541, 22.92172, -1.27500

Current Module: end_m01aa

Angle Orientation: 173.48952

X Orientation: -0.99355

Y Orientation: 0.11338

Bearing Orientation: 4.60687

Nearest Creature: end_trask 5.46561

Nearest Door: end_door01 4.60709

Nearest Placeable: power conductor 7.16052

Nearest Trigger: end_trig02 1.04678

Nearest Waypoint: end_wp_flame01 5.43141

 

Zaalbar Jedi Trainer

 

Player Location: 126.16801, 190.99931, 1.49342

Current Module: Dantoonie

Angle Orientation: 282.34961

X Orientation: 0.21388

Y Orientation: -0.97686

Bearing Orientation: -1.34208

Nearest Creature: dan14_setf 13.31372

Nearest Door: man14aa_door02 19.10776

Nearest Placeable: bench_47.18838

Nearest Trigger: dan14aa_jonint 56.74955

Nearest Waypoint: wp_dan14_jedim_06 3.71934

Attached Files



#9 Qui-Gon Glenn

Qui-Gon Glenn

    Jedi Padawan

  • Members
  • PipPipPip
  • 118 posts
  • LocationAtlanta

Posted 12 November 2017 - 03:08 PM

I thank you for helping me with this and I look forward to getting the script from you. Is there any-way you could give me some details on where I can go to learn about scripts myself so I will hopefully be able to do this myself in the future? I have finished getting the details finished for the .utc files for my characters and their dialogue files are ready. I have attached the files so you can use them if you need them.

On a side-note I have changed the orientation coordinates as I believe the original positions may be wrong in the direction the characters are facing. I do not know if that will be a problem but I decided to act to make sure. I have listed the new coordinates below. Please let me know if these will create any problems. Thank you in advance.

My Jedi Trainer

Player Location: 25.16541, 22.92172, -1.27500
Current Module: end_m01aa
Angle Orientation: 173.48952
X Orientation: -0.99355
Y Orientation: 0.11338
Bearing Orientation: 4.60687
Nearest Creature: end_trask 5.46561
Nearest Door: end_door01 4.60709
Nearest Placeable: power conductor 7.16052
Nearest Trigger: end_trig02 1.04678
Nearest Waypoint: end_wp_flame01 5.43141

Zaalbar Jedi Trainer

Player Location: 126.16801, 190.99931, 1.49342
Current Module: Dantoonie
Angle Orientation: 282.34961
X Orientation: 0.21388
Y Orientation: -0.97686
Bearing Orientation: -1.34208
Nearest Creature: dan14_setf 13.31372
Nearest Door: man14aa_door02 19.10776
Nearest Placeable: bench_47.18838
Nearest Trigger: dan14aa_jonint 56.74955
Nearest Waypoint: wp_dan14_jedim_06 3.71934


It looks like you have most of what I need there in that zip.

I will cook up a real script in the next couple hours, get something that compiles, and you can test.

The one thing I would still like you to tell me, is if the trainer should always appear in this module, if the trainer should only appear if you have a certain party composition, if your PC or Zaalbar has a certain XP level, etc. These are the conditionals we can use to have the trainer appear when you deem the time is right. For now, I will do the simplest thing and just instantiate them.

#10 ALPHA000102

ALPHA000102

    Jedi Padawan

  • Members
  • PipPipPip
  • 112 posts

Posted 13 November 2017 - 10:54 AM

I would like the characters to always appear. The question that brings up for me is do I need to alter the dialogue for if I talk to them and I do not have Zaalbar with me? If so, how do I set it to collect the right speech? Also I have found some KOTOR script tutorials so once I get the spawning scripts back from you I want to try making the scripts that give the party member items myself. If I get stuck or cannot figure it out myself I will let you know. Thank you in advance.



#11 Kexikus

Kexikus

    Jedi Master

  • Members
  • PipPipPipPipPip
  • 1,405 posts

Posted 13 November 2017 - 12:39 PM

To Change The Dialog depending on who is in your Party, You simply add a different entry in your Dialog File that has The alternate Dialog. For example You could have The NPC say hello to your PC and then his next Line would depend on whether or not Zalbaar is in The Party. Then you'd just have both options as different entries connected to The Same reply (in This case an empty one after The initial NPC line). Then You just Need to use The proper conditoonal Script for whichever option is listed first. Luckily there Are scripts for both cases and all Party members in The Game that You Can use. They're names something like k_con_juhanipm or k_con_juhaninpm for Juhani being in The Party or not. The Zalbaar Version should follow The Same naming convention. You Can check by looking at the compiled scripts in scripts.bif with Kotor Tool. Once You found The correct Script, add its name (without Extension) as the conditonal Script for The First option in The dlg.

#12 Qui-Gon Glenn

Qui-Gon Glenn

    Jedi Padawan

  • Members
  • PipPipPip
  • 118 posts
  • LocationAtlanta

Posted 13 November 2017 - 03:24 PM

Here are your instructions, as well as the uncompiled scripts that are 99% ready to compile.

First is the new On_Enter for the Endar Spire using the coordinates for Weston (you can re-use this exact script for Zaalbar's trainer by substituting trainer's name and coordinates.)

I am not fiddling with orientation at this time, as the NPC will move to you On_Perception
void main ()
{
   if  (!GetIsObjectValid(GetObjectByTag("endar01_weston")))
   {
	      CreateObject(OBJECT_TYPE_CREATURE, "endar01_weston", Location(Vector(25.16541, 22.92172, -1.27500), 0.0));
    }
   ExecuteScript("al_pend_1b_area", OBJECT_SELF);
}
For the above script to work, you will need to rename the original On_Enter for the Endar Spire, "k_pend_1b_area", to "al_pend_1b_area" or something else. Keep your filename under 16 characters though.
This new script will be saved as .nss in Notepad and compiled as "k_pend_1b_area" by KotOR Tool and will result in a .ncs file.
 
(For Zaalbar's, obviously the on_enter script will also need to be changed, and you may need to find that script. Rename the old script to al_kash_old or something, and your edited version of k_pend_1b_area.nss that we just made to whatever the old one was actually called.)

Second is the On_Perception Event. Using CONVERSATION_TYPE_CINEMATIC makes the camera focus on the speaker, so you don't need to do any camera work unless building a cut-scene.
void main()
{
  int nEvent = GetUserDefinedEventNumber();   // OnPerception
 
  if (nEvent == 1002)	   
  {
	 object oPC=GetFirstPC();
	 object oTrainer=GetObjectByTag("endar01_weston");
 
	 DelayCommand(0.5, AssignCommand(oTrainer, ActionMoveToObject(oPC)));
	 DelayCommand(3.0, AssignCommand(oTrainer,ActionStartConversation(oPC,"end_trask999",CONVERSATION_TYPE_CINEMATIC)));
  }
}
This script can be modified for your Zaalbar trainer with simple tag substitution. You will save this version as al_westpercp.nss, compile, and it will go in your override.

Third, User Defined On_Spawn, to enable the perception event - using a spoiler here, because it is a large script from the vanilla game with one commented section activated
Spoiler
You can save this one, as al_westspawn.nss and compile, it will also go in override. There are some other things here you might want to play with, as you can uncomment the ambient behaviors, which will make your trainer do some ambient animation until the perception event. This I leave to your discretion - it is very easy to play with this script, recompile, and see results in-game. (Again, this script will be lightly edited to work for your Zaalbar trainer, you can name it al_johclispawn.nss or something)

Fourth, RedHawke's Multiclass script, altered by me, to be inserted into a Dialog node or run via checking some Global variables that we haven't made (ergo - do it in a dialog node)
 
For the PC-
void main()
{
    object oPC = GetFirstPC();

    AddMultiClass(3, oPC)); //this allows you to use the same script to multiclass both players, with just a name change
    CreateItemOnObject("asaberperhaps", oPC);
    CreateItemOnObject("sometastyrobes", oPC);
}
The above needs to have tags substituted, for the character in question for any items you wish to bestow upon the multiclassing of your PC. It can be saved as jedifyPC.nss and compile, and place in override.

Fifth, for Zaalbar:
void main()
{
    object oPC = GetFirstPC();

    AddMultiClass(3, GetObjectByTag("Zaalbar"));
    CreateItemOnObject("asaberperhaps", oPC);
    CreateItemOnObject("sometastyrobes", oPC);
}
Again, substitute tags for something you like, and save as jedifyZaalbar.nss. It will also be compiled and placed in override.

Final Point: These scripts need to be used in various places. They must be compiled and placed in override. The spawn and perception scripts also must be attached to your creature using the KotOR Tool Creature Editor and inserting them in the correct script slots.
The other places are in dialog files, that you have. They need to fire upon certain places in your dialog, which I have not looked at.

#13 Qui-Gon Glenn

Qui-Gon Glenn

    Jedi Padawan

  • Members
  • PipPipPip
  • 118 posts
  • LocationAtlanta

Posted 13 November 2017 - 05:44 PM

The above post has been heavily edited. One, because there was an error or two, second because I wanted it to be a post more in the fashion of an old LucasForums tutorial.
 
I post this in a second post, mostly for the OP in case he was failing to compile any of the scripts that came from the original version of this post. My apologies, but it seems the proper thing to do in this case :D\

EDIT: Go here to see how to compile the scripts I have provided using KotOR Tool.

#14 LucyTheAlien

LucyTheAlien

    Jedi Master

  • Members
  • PipPipPipPipPip
  • 802 posts
  • LocationNorthern Ireland

Posted 13 November 2017 - 06:47 PM

JRWuuXL.png

How about fixing the vanilla one first?

One will make the choice- all will make the journey.


#15 Qui-Gon Glenn

Qui-Gon Glenn

    Jedi Padawan

  • Members
  • PipPipPip
  • 118 posts
  • LocationAtlanta

Posted 13 November 2017 - 06:53 PM

JRWuuXL.png

How about fixing the vanilla one first?

What do you mean?

This is a mod request.... If there is something broken, that is a different mod.

#16 ALPHA000102

ALPHA000102

    Jedi Padawan

  • Members
  • PipPipPip
  • 112 posts

Posted 13 November 2017 - 07:16 PM

First of all thank you for the helping me this. I have completed the item scripts as best I can by following the tutorials but when I try to compile them it says something is wrong and will not do it. Can you please take a look at them and see where I have messed up? I have attached them to this post. Second thank you giving me the script information. I will try to build them later today. Also I can understand you point about this being easy but you should know this like I said I am still new to modding so I need help on this. Thank you in advance.

Attached Files



#17 Qui-Gon Glenn

Qui-Gon Glenn

    Jedi Padawan

  • Members
  • PipPipPip
  • 118 posts
  • LocationAtlanta

Posted 13 November 2017 - 08:00 PM

Ok Alpha, it is no problem and I am glad to help.

I will make the scripts that I didn't include in my tutorial post, get them compiled, and attach them here as a zip including the source files (nss) and the compiled scripts(ncs).

The part of modding that I understand is somewhat easy for me, because I studied programming in my youth and it has been a hobby ever since.

The rest is NOT necessarily easy, or even plain easy, and some of it takes a lot of talent and patience :)

@Kexikus made a good post concerning where to place scripts in the dialog. Once I have provided scripts that are close to what you want and actually work in-game, I cannot help you further on this. However, you will be very close, and someone that works more with dialog editing can help you make that part work, and I will be happy to edit/tweak your scripts further from there to make the mod act as close as I can make it to what you want.

Don't be frustrated or get down :D

These pains we all go through, as new modders!

#18 ALPHA000102

ALPHA000102

    Jedi Padawan

  • Members
  • PipPipPip
  • 112 posts

Posted 13 November 2017 - 08:56 PM

Thank you. I will check the dialogue when the time is right. Have you had a chance to look at my item scripts yet? I want to know what went wrong so I can compile them myself and expand my modding knowledge. I think I may already know how to place them in the dialogue and will out for sure when I try this. Thank you in advance.



#19 Qui-Gon Glenn

Qui-Gon Glenn

    Jedi Padawan

  • Members
  • PipPipPip
  • 118 posts
  • LocationAtlanta

Posted 13 November 2017 - 11:18 PM

About to start compiling.

I will compile everything I can finish, but your armband didn't tell me enough regarding which module you are in for the Zaalbar portion of the mod. I need the module's name at minimum, which may be dan14, so I can find the On_Enter script for that module. I would prefer you to get this for me.

#20 Qui-Gon Glenn

Qui-Gon Glenn

    Jedi Padawan

  • Members
  • PipPipPip
  • 118 posts
  • LocationAtlanta

Posted 14 November 2017 - 12:36 AM

Here are the files, in the current state of revision.

I am amazed to report that I didn't have an error in compiling until I got to the Multiclassing scripts, and that was due to a poor cut&paste on my part from the files provided by Alpha.

This mod will give you a lot of stuff. I edited a few things, as I thought you might be being a little nutty, but I can change back the number of items given to what you specified, if that's really what you want!

...

The Dantooine On_Enter is the only script not compiled, so for now that trainer will not spawn. I have to eat dinner, and then maybe I can find that module, but it is more likely that I am done modding for the night. I will be happy to compile that for you tomorrow, and until then you should be able to test what we've done :D

Included are both the source files, which go nowhere unless you want to tweak them yourself and recompile, and the compiled scripts that will go in your override. If you do ever end up releasing this as a public mod, my only request is that you give me a credit in your readme.

Attached Files







Also tagged with one or more of these keywords: NPC, Forces, Jedi, powers, Blasters, Mods, Lightsabers, Zaalbar, Endar, Spire

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users