Prime Posted September 27, 2003 Share Posted September 27, 2003 Let me say right off the bat that this is definitely a work in progress, and that there is still plenty of stuff I don't know about this. But I know the basics, and maybe together we can fill in all the gaps Also note that this is the way I found to do it, but in the end there may be other, easier ways. But for now, this will have to do. So, what I am discribing here is how to replace Jaden with a model that was not included in the original game. However, the mechanism is the same as using a JA model, we just need to include more information so the game knows what to do. This tutorial does not discribe how to give the player more options in the character creation screen, but how to replace that character model in the game itself. For this example, lets suppose that I am wanting to use a nice Mace Windu model that I downloaded to replaced Jaden. I will be using WinZip and Notepad for this tutuorial. Here are the steps: 1. Unzip the downloaded .pk3 to get the model that we want to use. First, create a new, empty directory. I'll call mine "mods". Open the .pk3 using WinZip, and you should see the model and texture files, as well as their directories (should be in the form of models/players/<custom name> where custom name = mace in this example). Select everything and click Extract. Here, point to our created "mod" directory and make sure Use Folder Names is selected. After clicking OK, this should mean that all those files end up in the mods/models/players/mace/ directory. Check to make sure everything is there. Now we have our model ready. 2. Create an .npc file so the game has the necessary information about the character. This file can be used to tell as much or as little about the character that as we want, apart from a few basic things that are necessary. This is pretty handy, since if you want to go through JA being a Jedi Master or Sith Lord, we can set things up so that everything is set properly when we replace Jaden. First of all, lets look at what a .npc file (which is just a text file) looks like and what we can us it for. The basic format is this: <character name> { <parameters} } Looking through the .npc files for the JA characters, here is what the possible parameters and settings are. This is not an exaustive list, but these are the most useful. Look at the ones in assets1.pk3 for more options. Note that some parameters are only useful for computer controlled characters. I'll put the possible settings in ( ). Others can correct any mistakes. playerModel directory in models/players/where the model is (e.g. mace). saber the saber hilt the character should use (kyle, reborn, reborn_new, desann, jedi, luke, single_1-9, dual_1-?, saberstar2, sabertrident, saberbroad, shadowtrooper, tavion) saber2 same as above, presumably for those who use two sabers. sabercolor saber blade colour (red, blue, green, purple, yellow) rank not sure what this really does. Something to do with followers? (lt, commander, captain, ?) health character's health points (1-?) weapon the character's weapon. This can be set multiple times (WP_NONE, WP_SABER, WP_BRYAR_PISTOL, WP_BLASTER, WP_BLASTER_PISTOL, WP_BLASTER_RIFLE, WP_MELEE, WP_DISRUPTOR, WP_ROCKET_LAUNCHER, WP_BOWCASTER, WP_REPEATER, WP_THERMAL, WP_BOT_LASER, WP_NOGHRI_STICK, WP_CONCUSSION, WP_FLECHETTE, WP_TUSKEN_STAFF, WP_TUSKEN_RIFLE) saberStyle The available saber style for the character. This can be set more than once to give multiple styles (1=blue, 2=yellow, 3=red, 5=Tavion, 4=Desann, 6=dual, 7=staff) surfOn list of model surfaces to turn on in "<list>" format surfOff list of model surfaces to turn on in "<list>" format scale percentage scale of the character (e.g. 75=75% the size of Jaden, 110=10% bigger than Jaden) yawSpeed How quickly they can turn walkSpeed How fast they walk runSpeed How fast they run FP_HEAL Force Heal level (0-3) FP_LEVITATION ? (0-3) FP_SPEED Force Speed level (0-3) FP_PUSH Force Push level (0-3) FP_PULL Force Pull level (0-3) FP_TELEPATHY Force ? level (0-3) FP_GRIP Force Grip level (0-3) FP_LIGHTNING Force Lightning level (0-3) FP_SABERTHROW Force Saberthrow level (0-3) FP_RAGE Force Rage level (0-3) FP_PROTECT Force Protect level (0-3) FP_ABSORB Force Absorb level (0-3) FP_DRAIN Force Drain level (0-3) FP_SEE Force See level (0-3) FP_SABER_DEFENSE Force Saber Offense level (0-3) FP_SABER_OFFENSE Force Saber Defense level (0-3) forcePowerMax maximum Force power (default = 100) playerTeam whose team the character is on (TEAM_PLAYER, TEAM_ENEMY, TEAM_NEUTRAL, TEAM_FREE) enemyTeam who the character's enemies are (TEAM_PLAYER, TEAM_ENEMY, TEAM_NEUTRAL, TEAM_FREE)) class default behavior? (CLASS_JAWA, CLASS_KYLE, etc.) snd character's dialog sounds directory sndcombat character's combat sounds directory sndjedi character's jedi sounds directory dismemberProbHead probability of head being dismembered ( from 0 (never) to 100 (always) ) dismemberProbArms probability of arms being dismembered ( from 0 (never) to 100 (always) ) dismemberProbHands probability of hands being dismembered ( from 0 (never) to 100 (always) ) dismemberProbLegs probability of legs being dismembered ( from 0 (never) to 100 (always) ) dismemberProbWaist probability of waist being dismembered ( from 0 (never) to 100 (always) ) Okay, thats most of them. The parameters that you don't set will be left at whatever the values where before switching models. So if we just want the model but everything else left the same, we might have a .npc file that looks like: MaceWindu { playerModel mace class CLASS_PLAYER } We can set as little or as much as we want for the character. Now that we have an idea what to put in the file, create a "ext_data/npcs/" directory in "mods". In that directory, create an mace.npc file, and in it put what I explained above, depending on what you want. For example: MaceWindu { playerModel mace saber kyle weapon WP_SABER saberStyle 1 saberStyle 3 saberStyle 2 FP_HEAL 3 FP_LEVITATION 3 FP_SPEED 3 FP_PUSH 3 FP_PULL 3 FP_TELEPATHY 3 FP_GRIP 0 FP_LIGHTNING 0 FP_SABERTHROW 3 FP_RAGE 0 FP_PROTECT 3 FP_ABSORB 3 FP_DRAIN 0 FP_SEE 3 FP_SABER_DEFENSE 3 FP_SABER_OFFENSE 3 forcePowerMax 200 rank captain reactions 3 aim 3 move 3 aggression 3 evasion 5 intelligence 3 playerTeam TEAM_PLAYER enemyTeam TEAM_ENEMY class CLASS_LUKE yawSpeed 140 walkSpeed 55 runSpeed 200 // race human snd kyle sndcombat kyle sndjedi kyle health 200 dismemberProbHead 0 dismemberProbArms 0 dismemberProbLegs 0 dismemberProbHands 0 dismemberProbWaist 0 } 3. Bundle everything up into a .pk3 file. Here is where we get everything ready so that the game can use the model. Note that we do not alter the assets1.pk3 file at all! Doing that would prevent us from playing MP on pure survers, because the game would think we are trying to cheat! Create a new empty .zip file (you can call it what you want. e.g. mace.zip). Click add and go into the "mods" directory. Under "Folders" click Recursive Folders. This includes the directory information the game will need. Then select "models" (without going into that directory), and click Add with Wildcards. This will put all the necessary files into the .zip file. To confirm, make sure the model and texture files are there, with "models/players/mace/" listed under path. Also make sure that the mace.npc file is there with "ext_data/npcs/" as the path. Finally, change the extention of our .zip file to .pk3. Now we should have mace.pk3. 4. Loading the .pk3 file into JA JA is great in this respect because all we have to add our new model is place the .pk3 file into the "GameData/base/" directory. JA will load all the .pk3 files in alphabetical order, replacing any duplicates with the latest copy. So if you wanted to replace the Luke model, you could create a .pk3 with a new model and put it in the base directory, and that will replace the game's Luke. In this case there is no other Mace, so it just loads it in. 5. Select the model in the game To select the model we will be using the playermodel console command. So once the game starts and you are at the beginning of a mission, open the console by pressing shift ~. Then at the prompt type: playermodel <npc entry name> so in our case: playermodel MaceWindu That should change Jaden to the new model, as well as change any parameters that we have set in the .npc file, such as saber stanced. 6. Automating the model change a little bit IIRC, once you change the model and save the game, using that saved game will load the new model automatically. But if you don't like typing the playermodel command every time, we can speed it up a little bit. In the JA base directory, create a text file called autoexec.cfg. In that put a line that says: bind <some key> "playermodel MaceWindu" Then when you are in the game, you can just press the specified key without going into the console and the new model should load. Whew. Well I hope that helps people a bit. I view this as a work in progress, so I welcome any feedback or questions. If anything isn't clear I will try and expand on it. If you have more information about certain things, please post it. I'm still learning too! Link to comment Share on other sites More sharing options...
Prime Posted September 27, 2003 Author Share Posted September 27, 2003 Note that you should also be able to use this new model as an NPC by typing the npc spawn <npcname> command. Link to comment Share on other sites More sharing options...
Londo Mollari Posted September 27, 2003 Share Posted September 27, 2003 Thank You Prime!!!!!!!!!!!!! Link to comment Share on other sites More sharing options...
Scoundrel Posted September 27, 2003 Share Posted September 27, 2003 Thank you, I really preciate this. Link to comment Share on other sites More sharing options...
Scoundrel Posted September 27, 2003 Share Posted September 27, 2003 Ok, I allready faced problems:D I have New NPCs.pk3 in my base folder. Pk3 includes ex_data folder, which includes npcs folder which includes obi-wan.npc and ct_fisto.npc. And there is of course models folder which includes players folder. And in players folder there is ct_fisto folder and obi-wan folder, those include meshes. THat should be all, right? I start game and try to change playermodel, and supri, suprise. Game can not found model. What is wrong? Link to comment Share on other sites More sharing options...
Prime Posted September 27, 2003 Author Share Posted September 27, 2003 Originally posted by Scoundrel Ok, I allready faced problems:D I have New NPCs.pk3 in my base folder. Pk3 includes ex_data folder, which includes npcs folder which includes obi-wan.npc and ct_fisto.npc. And there is of course models folder which includes players folder. And in players folder there is ct_fisto folder and obi-wan folder, those include meshes. THat should be all, right? That sounds right so far. Originally posted by Scoundrel I start game and try to change playermodel, and supri, suprise. Game can not found model. What is wrong? Okay, make sure that the playerModel entry in each .npc file points to the model's directory properly. Also remember that the playermodel command needs the npc entry name, not the model name. Confirm as well that you have a model_default.skin file in each model directory. Are you doing this? If so, post your .npc file and I have a look at it. We'll figure it out Link to comment Share on other sites More sharing options...
Scoundrel Posted September 27, 2003 Share Posted September 27, 2003 I figured out whats wrong myself. Kit Fisto is actually working, I just typed his name wrong:D But Obi-Wan is still not working. Fisto is JK2 model which is (what is right word?) imported (?) to JK3 model, but Obi-Wan is original JK2 model. Does these have to be JK3 models, or am I just doing everyting wrong? And btw, ct_fisto model wasnt in the npcs.pk3, it was in base folder in its own pk3. I just noticed. It works like charm. *edit* Oh, does it matter, if npc name and model name are same? Link to comment Share on other sites More sharing options...
Londo Mollari Posted September 27, 2003 Share Posted September 27, 2003 Hey prime I made some discoveries back in my JA modding thread, but the playermodel keeps reverting back at the start of each new level Link to comment Share on other sites More sharing options...
Sith_Chick Posted September 27, 2003 Share Posted September 27, 2003 I am trying to play SP using the Tavion_new model... but how can I get 'bad girl' to show up in the cutscenes? Link to comment Share on other sites More sharing options...
Prime Posted September 28, 2003 Author Share Posted September 28, 2003 Originally posted by Scoundrel I figured out whats wrong myself. Kit Fisto is actually working, I just typed his name wrong:D Excellent! That's one down Originally posted by Scoundrel Fisto is JK2 model which is (what is right word?) imported (?) to JK3 model, but Obi-Wan is original JK2 model. Does these have to be JK3 models, or am I just doing everyting wrong? As far as I know, JO models should work just as well as JA models. The game is suppost to convert the JO models on the fly. So I don't think this is a problem. Originally posted by Scoundrel *edit* Oh, does it matter, if npc name and model name are same? I don't think it should. Are you still getting the "not found" error? Try loading the model in MP as well. If it works there, then at least we know the model isn't faulty. Originally posted by Londo Mollari Hey prime I made some discoveries back in my JA modding thread, but the playermodel keeps reverting back at the start of each new level Originally posted by Sith_Chick I am trying to play SP using the Tavion_new model... but how can I get 'bad girl' to show up in the cutscenes? I'm not sure about these two problems yet. I'll have to play around a little more. Sorry Does anyone know ways around these problems? Link to comment Share on other sites More sharing options...
Prime Posted September 28, 2003 Author Share Posted September 28, 2003 As Londo Mollari has discovered, if you make the title of your NPC entry in the .npc file Player, this should make it show up in cutscenes. But it still seems to revert back to the old model each time a level loads. Link to comment Share on other sites More sharing options...
Scoundrel Posted September 28, 2003 Share Posted September 28, 2003 Argh.. This gets worse all the time. First, I got one more working, Qui-gon. Then, I got Mace Windu working, but hes robe is blank. Just white. And I cant get Yoda or Obi-Wan working. And now, Kit-Fisto is not working. And I should get 19 of these working. This is nightmare. Prime, what models have you used in your npcs? Link to comment Share on other sites More sharing options...
Tesla Posted September 28, 2003 Share Posted September 28, 2003 How do i create a new npc file ? Great tutorial, im going to try and add some npcs myself. Link to comment Share on other sites More sharing options...
Prime Posted September 28, 2003 Author Share Posted September 28, 2003 Originally posted by Tesla How do i create a new npc file ? Great tutorial, im going to try and add some npcs myself. An .npc file is just a text file. You can create an empty text file, and then just change the extention to .npc. It's as simple as that Originally posted by Scoundrel Then, I got Mace Windu working, but hes robe is blank. Just white. The reason why his robe is blank is because the surfaces are not turned off, but there is no texture file specified to cover it. If you want to have the robe, you can specify the texture, or if you don't you can turn off the robe surface all together. This brings up the subject of turning on and off surfaces. Let's look at the two cases: 1. Turning off surfaces Let's look at the Mace case. I assume you are using the Mace model from JO. OK, the game looks for the model_default.skin in the directory specified in the .npc file. In that .skin file is the location of all the textures to be used by the model. You will also see a .surf file. This file was used in JO MP to turn surfaces on and off (don't know if they are still used by JA). If you look in the model_default.surf for mace, you will see... surfOff "robe torso_robe" This told JO that in MP for the Mace model without the robe it had to turn off the robe and torso_robe surfaces. If you look in the .skin file, you won't see and entry for these two surfaces. In JA, it doesn't know that the surfaces should be turned off, so we have to tell it. To do this, we add the following to the end of the model_default.skin file: robe,*off torso_robe,*off These correspond to the .surf file, so now JA knows not to draw these surfaces. If you repackage everything up and load it into JA, the white robe surfaces should be gone. 2. Turning surfaces on Really, JA just needs to know what to cover the surfaces with. In the Mace case, we need to tell JA what texture to cover the robe surface with. Looking in the model_robe.skin file we can see that the two surfaces we turned off (robe and torso_robe) have entries. So we can add these two entries into our model_default.skin. This should set the robe up nicely. Note: In the Mace case, you will see in the model_robe.surf file that there are three surfaces turned off: surfOff "l_arm r_arm torso" So we need to indicate this for our robed version of Mace. So in the model_default.skin file, we need to alter the entries for the above surfaces to: l_arm,*off r_arm,*off torso,*off This should make it so Mace has his robe and it is all textured properly. Hopefully this all makes sense. Originally posted by Scoundrel And I cant get Yoda or Obi-Wan working. And now, Kit-Fisto is not working. What is the problem with these? Is it the "not found" problem? Or is it texture problems? Link to comment Share on other sites More sharing options...
Tesla Posted September 28, 2003 Share Posted September 28, 2003 An .npc file is just a text file. You can create an empty text file, and then just change the extention to .npc. It's as simple as that Thank You, Thank You, your my savior *goes of to create new .npc file * Link to comment Share on other sites More sharing options...
Tyler_Durden Posted September 28, 2003 Share Posted September 28, 2003 Would there be a way to just have the different parts of the body such as head, torso and legs be selectable from the load screen? This way you can just do it from the start and not have to input it in the console. Someone got more hilts at the select screen into the game, so it might work for the player model as well..... Link to comment Share on other sites More sharing options...
Darth Kaan Posted September 28, 2003 Share Posted September 28, 2003 You can solve the model loading problem by attaching a target_scriptrunner to your info_player_start, so each time the level loads it runs your script which loads your custom npc instead of Jaden. You can even set what type of saber, saber blade color/s what weapons and force powers/levels you want them to have. The only problem I have not figured out how to fix yet, is if you die during the level and reload from a checkpoint or start from a quick save, the custom npc model re-loads but the skin does not... Link to comment Share on other sites More sharing options...
Tesla Posted September 28, 2003 Share Posted September 28, 2003 Ok, i've got all the files together, bunged them into a zip, how do i change the extension to a .pk3 ? Sorry for all these questions, i never really got into modding and adding things for JO. Link to comment Share on other sites More sharing options...
Prime Posted September 28, 2003 Author Share Posted September 28, 2003 Originally posted by Tesla Ok, i've got all the files together, bunged them into a zip, how do i change the extension to a .pk3 ? Sorry for all these questions, i never really got into modding and adding things for JO. You do it just like you did for the .npc file. Just change the extension manually Originally posted by Darth Kaan You can solve the model loading problem by attaching a target_scriptrunner to your info_player_start, so each time the level loads it runs your script which loads your custom npc instead of Jaden. You can even set what type of saber, saber blade color/s what weapons and force powers/levels you want them to have. Can you discribe how to do that? Originally posted by Tyler_Durden Would there be a way to just have the different parts of the body such as head, torso and legs be selectable from the load screen? This way you can just do it from the start and not have to input it in the console. Someone got more hilts at the select screen into the game, so it might work for the player model as well..... I'm not sure how to do that yet Link to comment Share on other sites More sharing options...
Akin Posted September 28, 2003 Share Posted September 28, 2003 Thank you so mutch for posting this Prime! I've been looking for a way to play with my favourite sw characters for a long time now..Finaly someone explained how to do it. Tnx! Link to comment Share on other sites More sharing options...
Scoundrel Posted September 28, 2003 Share Posted September 28, 2003 This is strange, now Obi-Wan is working, Qui-Gon is working, Mace is working (not robe, I'll fix that right away), Kit Fisto is not working (which is strange, I havent modified his file since it was working), Yoda is not working, cannot found NPC called yoda. I have tried everything to get Fisto working. Here is hes NPC: kit-fisto { playerModel ct_fisto saber jedi saberColor green weapon WP_SABER saberStyle 1 saberStyle 2 saberStyle 3 FP_HEAL 2 FP_LEVITATION 3 FP_SPEED 3 FP_PUSH 3 FP_PULL 2 FP_TELEPATHY 2 FP_GRIP 0 FP_LIGHTNING 0 FP_RAGE 0 FP_PROTECT 2 FP_ABSORB 2 FP_DRAIN 0 FP_SEE 2 FP_SABERTHROW 3 FP_SABER_DEFENSE 3 FP_SABER_OFFENSE 3 rank commander reactions 5 aim 5 move 5 aggression 5 evasion 5 intelligence 5 playerTeam TEAM_PLAYER enemyTeam TEAM_ENEMY class CLASS_JEDI yawSpeed 140 walkSpeed 55 runSpeed 200 snd obi-wan sndcombat ct_fisto sndjedi ct_fisto health 400 dismemberProbHead 0 dismemberProbArms 5 dismemberProbLegs 0 dismemberProbHands 10 dismemberProbWaist 0 } It worked before, but now it cannot find kit-fisto npc. I'll add rest of NPCs today, Prime, I'll let you know if (when:D ) I face more problems. Link to comment Share on other sites More sharing options...
Scoundrel Posted September 28, 2003 Share Posted September 28, 2003 Problems faced:D I tried to make Windus robe working, but it is just more blank than usually. Now torso and hands are blank too. Prime, could you send me working Mace Windu? (Model and NPC) You did one, right? Now, I'm trying to get Yarael Poof working. Link to comment Share on other sites More sharing options...
Zod Posted September 28, 2003 Share Posted September 28, 2003 I'm just having trouble with Mace an his robe ;\ Link to comment Share on other sites More sharing options...
Scoundrel Posted September 28, 2003 Share Posted September 28, 2003 Again getting worse. I got many of these working. Quigon, Obi-Wan, Mace Windu (With partly blank), Yarael Poof, Plo Koon, Kit Fisto and Coleman Trebor. But then I tried to add Eeth Koth, and everything stopped working. I deleted Eeth Koth, and then everyone started working again, but now, nothing is working. Goddamnit! Erh.. Hate to ask this, but... Could someone do me big favor? I want pretty many NPCs in to this game. They dont have to be too personalized, just give them right sabercolor and put them reactions and other stuff to 5. If someone could do this, let me know and I'll give you list of models/skins. And if you dont have some of them, I'll give you links to download sites. (There are 19 of them) I just cant do this myself, everything gets wrong all the time. Thanks. Link to comment Share on other sites More sharing options...
Akin Posted September 28, 2003 Share Posted September 28, 2003 I can't get that stupid robe to work with mace either So i was wondering if you could be si kind and explain to me how to get the unrobed version to work.(He looks cooler ingame with out the robe anyways ) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.