DuckofDeath Posted August 8, 2002 Share Posted August 8, 2002 I got bored with the ladder map and /spawning reborns so I wanted to just replace the stormtroopers in the SP game with reborns, so I'd at least get more saber fights in some sort of context. However, merely playing with the npc.cfg files, replacing the model directories, and such only results in invisible, messed up stormtroopers. Anyone have any idea on how to do this? Link to comment Share on other sites More sharing options...
Phillio Posted August 9, 2002 Share Posted August 9, 2002 I think its possible.....i will now go work on it........ Link to comment Share on other sites More sharing options...
Arkum Posted August 9, 2002 Share Posted August 9, 2002 I don't know if you can do that, but I replaced them with battledroids and clonetropers! Link to comment Share on other sites More sharing options...
DuckofDeath Posted August 9, 2002 Author Share Posted August 9, 2002 How'd you do that? It'd probably be the same thing, only I'd replace them with a different model name. Link to comment Share on other sites More sharing options...
Darth Osiris Posted August 10, 2002 Share Posted August 10, 2002 Originally posted by DuckofDeath How'd you do that? It'd probably be the same thing, only I'd replace them with a different model name. It's not that simple, if you want them to wield lightsabers. Link to comment Share on other sites More sharing options...
DuckofDeath Posted August 11, 2002 Author Share Posted August 11, 2002 really? I figured if I told them to act like Reborn and look like Reborn, they'd fight with sabers. Well, any tips on getting it working? Link to comment Share on other sites More sharing options...
Sepulman Posted August 11, 2002 Share Posted August 11, 2002 Viewing that this is probably one of faq's of these forae, I'll make this a long post; Before you read further this is a hex edit instruction of a lucasarts file, so only suitable for private use, not for release with mods. I've checked the "modding rules" and there seems to be nothing in them against spreading this info. You're probabely wondering by now if there isn't a simpler way to do this. Well there is, but you need the SP source code which will most likely never be released. If you look through this forums you'll see there's been numerous attempts at a script like version which have all failed and it seems unlikely that a script version wouldn't have been found yet if it did exist. I'm pretty sure this I'll work because my actual first test was replacing a couple of stormies with blue-sabered reborn. Now, on to the interesting stuff. You'll first need some kind of hex editor, doesn't matter which one, as long as it's got an text search function and make sure you're in text overwrite mode. Now BACK UP your "jk2gamex86.dll" (located in your gamedata folder). Open up "jk2gamex86.dll" (located in your gamedata folder) with your hex-editor, next perform a text search for "torm". Why "torm" you say? Well, for the educational purpose of this you'll need to find 3 mentions of the stormtrooper, all with different capitalization and as hex-editors have capitalization-sensitive searches, you'll find anything starting with "storm" As you look through the results, you'll find 3 different capitalization versions of "stormtrooper" (not counting "stormtrooper2" entries, off course.) 1. NPC_Stormtrooper; steer clear of this one, this is the NPC's description that matches the one actually stored in the single-player maps, no need to mess around with this, any name alteration will cause certain npc's not to show in your maps, unless, that's the target, off course. 2. stormtrooper; this is the actual name of the npc class that fits with each NPC; don't mess with this or you'll end up with bad "npc spawn"'s and general weirdness. 3. StormTrooper; Notice the Big 'T'? Well that's just the same name as found in the npcs.cfg file. You've guessed it already! This is the one we need! Now, you're thinking about replacing this one with some reborn. If yo know you custom NPC's you'll know that the name of a reborn NPC needs to start with 'Reborn'. So lets just keep it simple and edit the 'StormTrooper' we've last found and change it to "Rebornrooper", basicly overwriting the first part of the name and save. Now, when you try to play a map, the game will go look for a "Rebornrooper" in your npcs.cfg file every time it needs a stormtrooper (1! don't forget to edit stormtrooper2 etc if you wish full conversion), so you'll need to add a custom NPC called "Rebornrooper" to your npcs.cfg and sick it in a pk3 to create a npcs mod (Look in this forum for information how to create custom classes if you don't know how, spread by the good people that found it out). Now you need to just run the game and see if it worked. But isn't messing around with copies of the "jk2gamex86.dll" just too damn troublesome, you say? Well there's also a way around that; What you need to is rename your "jk2gamex86.dll" to something with the same word length. Next, copy you single player exe (jk2sp.exe) and rename that to something else. Now open up you renamed copy of jk2sp.exe in you hex editor and search for "jk2gamex86.dll" and edit that text to whatever you've renamed your modified jk2gamex86.dll to. Save the lot and try out your new exe to start up your modified game. Another thing you might be wondering about is what to do if the name of the NPC you wish to replace is shorter than the required name of the custom NPC? Well, then we'll need to work creatively. Say you would like to replace Jan with a Jedi? What you'll see in your Hex Editor is something like "Jan Luke". Now how do you fix that? well you're in luck, just fit "Jedi" over "Jan " so that you'll have "JediLuke". Since the program assumes that the NPC name in your dll's ends at the next empty char, the program will assume that the name of NPC_Jan's npcs.cfg name is JediLuke and so you'll need to name you custom NPC JediLuke. You got lucky this time, but when you wish to replace Jan with the female Jedi (JediF) then you'll end up with "JediFuke" and you'll not only have to name your NPC JediFuke but also rename Luke's npcs.cfg name with Fuke. The bad thing about this is that overlapping names like this is that the name which is overlapped (Luke in this case) can no longer be modified itself and that you'll have to take the namechange into account when you try to spawn from the console. Hope this made some sense to y'all, so enjoy! Make backups! Check you CapItAliZation! Personal use only! Link to comment Share on other sites More sharing options...
Sepulman Posted August 12, 2002 Share Posted August 12, 2002 Did it work? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.