Jump to content

mrwonko

JKHub Staff
  • Posts

    1,574
  • Joined

  • Last visited

Everything posted by mrwonko

  1. I don't see "TORSO_COLLAR_OFF" anywhere in the code you posted, I wonder how it ends up in the error message. Can you post the full NPC definition?
  2. Like I said, use surfOn. I don't see it in that npc you posted.
  3. The relevant surfaces are torso_galaktorso_off, torso_collar_off, torso_galakface_off, torso_eyes_mouth_off & torso_galakhead_off, as you can check via ModView from the SDK. In Jedi Academy, surfaces get disabled via the .skin file, but apparently Jedi Outcast uses ext_data/npcs.cfg instead. Here's an excerpt of the Stromtrooper Officer: STOfficer { playerModel stormtrooper surfOn torso_pauldron_off surfOff "torso_armor_neck_augment torso_body_neck_augment" It uses the "surfOn" and "surfOff" settings to enable the pauldron. You should be able to similarly enable the missing Galak surfaces.
  4. This tutorial goes through the steps required to export a new vehicle from Blender into Jedi Academy. It does not teach how to create the model itself. Before we start make sure you've properly installed the Blender JKA Plugin Suite. http://jkhub.org/ind...eenshot&id=1413 Blender 2.64+ - Jedi Academy Plugin Suite v0.2.1 The Jedi Academy SDK is also useful as it includes ModView, a Model Viewer for glm/gla files. Then just create your model as usual. There's plenty of tutorial on that so I'm not going to reiterate. You can even have multiple levels of detail, though some limitations apply. (See the part about the G2 Properties) But when creating the UV maps you'll have to keep in mind that the GLM format saves UV coordinates per vertex, not per face. So any uv seam on your model has to actually be a split in the model. The easiest way to do this is to also mark any seam as a "Sharp Edge" as well (in the Edge menu opened by Ctrl+E)... ... and use the Edge Split modifier to create the splits there. (Be sure to enable "Sharp Edges" and disable "Edge Angle".) If the exporter were more clever it could do the splitting automatically, but alas it can't. While we're on the topic of UV maps: Every vertex needs UV coordinates. Every. Single. One. Even those on hidden tag surfaces. (I never said they need to look good, right?) You'll get an error to remind you otherwise. Next, a word on shading. Jedi Academy basically uses smooth shading on everything. To preview this in Blender, you can enable it for all faces by selecting them all (A) and enabling Smooth Shading (W -> Shade Smooth): -> So everything will be smoothed. You may not want that, but once again Edge Splitting helps: Just mark any sharp edges as such and use the Edge Split modifier as above. As above? That's right, any UV seams will inherently not be smoothed on the model, so keep that in mind when choosing the seams. All this splitting may add a lot of additional vertices. Be careful to stay below the limit of 1000 vertices per mesh that Jedi Academy has and split the mesh where necessary. As for animations: Jedi Academy's animations are skeleton-based so you'll have to use an Armature. The actual animations you'll need vary from case to case - if you're doing something swoop-like, you won't really need any (you still need to export a one-frame root animation and the model has to be properly rigged), but in my case I've got an x-wing like model with landing gear that has to be folded in/out and turbines that need to rotate into flying position. This is similar to the X-Wing, so I take a look at the X-Wing's animations in ModView. Base your vehicle on existing ones or you might have to code the new behavior. (My VTOL won't have a hover mode, for example - it'll fly like the x-wing.) Whatever you do, make sure you have a single root bone (i.e. without parent) called "model_root" and there's a proper hierarchy in your skeleton, loose bones will go missing and if there's no model_root animations won't work. Wing opening is analogous to rotating the turbines, and the gear is just the same, so let's create the animations! The gla files are just one long list of frames, so set the scene up in a way that all the animations are played in a row. Keep in mind that you can play them backwards too, which is used in the x-wing as well. Again, there's plenty of material on skeletal animations in Blender, just refer to that. Feel free to use IK and all kinds of crazy rigs, there shouldn't be any problems as long as you're using a single Armature in the end. You'll have to write a configuration file describing the animations: Their name, when they start, their duration, the FPS etc. There's a plugin to aid with that, so let's use that. First, we have to mark the beginning of each sequence of the animation. Do this by placing a Marker at the appropriate time in the timeline (M) and renaming it to the desired name (Ctrl+M). Also make sure the animation duration is set correctly, which it will have to be for the export as well. Just leave out the backwards playing animations, this is a rough first version. Then use the animation marker exporter to export it to a file called animation.cfg, which should then look somewhat like this: // Animation Data generated from Blender Markers // name start length loop fps BOTH_GEARS_OPEN 0 15 0 24 BOTH_WINGS_OPEN 15 22 0 24 Edit that to fill in the missing sequences, using the one from the vehicle you're basing your new one on for reference. This is what I ended up with: // Animation Data generated from Blender Markers // name start length loop fps BOTH_GEARS_OPEN 0 15 0 20 BOTH_GEARS_CLOSE 0 15 0 -20 BOTH_WINGS_OPEN 15 21 0 20 BOTH_WINGS_CLOSE 15 21 0 -20 BOTH_VS_IDLE 14 1 0 20 ROOT 14 1 0 20 There's a special kind of surfaces in glm files: Tags. They signify positions, and in vehicles they can be used to define where the exhaust effect should be played, where the muzzles are (i.e. where shots come from) and, for vehicles like swoops, where the player should be placed. This could be done pretty well using an Empty in Blender, but those can't be properly weighted to a skeleton so surfaces are used instead. It works like this: The origin is at vertex 2, the X-axis towards vertex 0 and the Y-Axis towards vertex 1. In Blender there's no built-in way of displaying the indices that I'm aware of so take care to create them in the right order. Raven has the guideline of making the X Axis short and the Y Axis long, but they too occasionally screw up (take a look at the X-Wing's tags, for example.) Take a look at your exported model in ModView to make sure your tags are correct. The exhaust effects and shots in Jedi Academy go in the Y- direction, so place your tags accordingly. (Again, feel free to look at existing models for reference, for example in ModView, which also allows display of vertex indices.) Keep in mind that tags, too, need to be UV mapped, although they will be hidden. The tags for the muzzles are called *muzzle1, *muzzle2 and so on, while the exhaust ones are (predictably) called *exhaust1, *exhaust2 etc. Again, ModView is your friend for finding out the right names. But how will the exporter know which surfaces are Tags? You'll have to tell it! You might've noticed the "Add G2 Properties" button in the object settings. Press it and you'll be able to set some glm specific settings. You will have to add these properties to all your objects! Why? Because glm files can have multiple Levels of Detail (LOD), so to be able to match them they need the same name across the board, and that's done using the "name" property. You also have to define the material to be used on this object, using the "shader" setting. Multi-material objects are not supported, so you may have to split your meshes. Also keep in mind that the same materials have to be used across the different LODs! The settings from LOD 0 (the most detailed one) are the ones that actually count, for the other levels only name is relevant. (And it has to match the name of an object on LOD 0! You can't add new objects on lower LODs!) The "Tag" checkbox is to tell the exporter what's a tag, and the "off" checkbox is supposed to be used for hidden surfaces, but ModView instead looks for names ending in "_off" and Jedi Academy uses the skin files instead. You also have to set up a proper hierarchy. In playermodels, this is also used for dismemberment, in case of vehicles it's mostly mosmetic. (Although I think they can lose parts when exploding, too? Someone investigate!) The important thing is that the hierarchy is used for LODs, and all you need to know is this: At the top level, you need to have a scene_root object. (Add Object adds an Empty placeholder perfect for this.) All objects will be exported in scene_root's space, i.e. if you scale scene_root down to 10% scale you can work at 10% scale and still export full-size. Keep that in mind in case you've imported a player model to get the scale of your model right: Use the same scale in your scene_root as you used during the import! Your armature has to be a child of scene_root and needs to be called skeleton_root (both object and armature). However, if you've imported a playermodel for scale, make sure your armature is not called skeleton_root or the importer will try to use that armature for the imported model! While we're on the topic of scale, don't scale your bones! There's no support for scaling in gla files since that's hardly ever necessary. For each LOD, you'll then need another (Empty) object, called "model_root_0" (or "model_root_1" for LOD 1 (less detailed than 0) and so on). This object should have exactly one child, the root object of the exported hierarchy. (For Raven's models this is an extra surface called "stupidtriangle" that they needed due to their inferior exporter. ) Below that, it's up to you unless you need dismemberment, but every part has to be in the hierarchy somewhere. Here's what my hierarchy looks like: Remember that the names here are not the ones used for export, the exporter uses the ones from the G2 Properties. The last thing to do before exporting - and you'll likely only want to do this just before exporting since it makes editing the model later harder - is to apply all the modifier except for the Armature one and to triangulate all the meshes (Ctrl+T). And then it's just a matter of exporting with the right setting. First the gla, since the glm will have to reference it. The important thing here is to clear the "gla reference" field. If we were creating new animations for an existing skeleton we'd enter its path here, but since we're creating a completely new skeleton we'll leave it empty. If you're not working directly within your base/mod folder, you may have to setup "Base Path" as well, refer to the manual in that case. And then the glm. Make sure to point it to the gla you just exported in the ".gla name" field, omitting the ".gla" extension. The file has to be called model.glm. And then it's just a matter of copying the appropriate .veh file in ext_data/vehicles and an .npc file in ext_data/npcs and adjusting them. Here are the files I ended up with, including the .blend files before and after applying the modifiers. (They may differ in some other ways, too, I was playing around a lot while writing the tutorial.) Since this is mostly about the model the .veh file isn't quite perfect and I didn't create unique graphics for the UI either. mrw_vtol.pk3
  5. Are you trying to make a serverside-only modification or do you plan to redistribute your modified bsp?
  6. No need for a deathscript, NPCs should use their npc_target upon death, so you can directly connect them to the target_count without any scripting.
  7. Who executes this script? How is it triggered?
  8. You must be using an outdated version of the exporter, I get the following error: Furthermore: After I fix those two issues, in-game I get the much more reasonable error Though it sadly does not tell us which surface. Grab the latest version at https://github.com/mrwonko/Blender-Jedi-Academy-Tools/releases/tag/nightly and see if that gives you clearer error messages. Let me know if anything is unclear.
  9. That's 1.8 billion, not 18 million. With that out of the way, it looks like the exporter crashed halfway through exporting the model (hence the error message), and now the game can't load the half-written file. Based on just that error message, I can't tell exactly what's wrong with the model, but some number appears to be too large. Please share the .blend file so I can reproduce this locally.
  10. This is an issue I do not want to reproduce, installing that many mods sounds like too much of a hassle. I read some of the related code to see if I could figure out what might theoretically be the issue. Your screenshot looks like SP to me, so I checked the SP code, but it should work the same in MP. The first thing that jumped out is MAX_SHADER_FILES = 4096. You should be able to check if that's the limit you run into by adding a Com_Printf log like so if ( numShaderFiles > MAX_SHADER_FILES ) { Com_Printf("Too many shader files (%d > %d)", numShaderFiles, MAX_SHADER_FILES); numShaderFiles = MAX_SHADER_FILES; } at the limit check in ScanAndLoadShaderFiles. But I suspect it's currently impossible to run into that, because you probably run into the MAX_FOUND_FILES limit first, which is also 4096. A message about that could go before the return in the limit check in FS_AddFileToList: if ( nfiles == MAX_FOUND_FILES - 1 ) { Com_Printf("MAX_FOUND_FILES (%d) exceeded, ignoring file %s", MAX_FOUND_FILES, name); return nfiles; } If those are indeed the limits you're hitting, I would recommend you keep doubling both of them until it works. Don't immediately set them to something super large, as increasing the limits will increase the amount of RAM needed, and you only have so much of that. Also be aware that a single broken shader file can break other files as well, which can also cause the kind of issue you're experiencing. When that happens, the broken mod needs to be removed or fixed.
  11. When I use that model in multiplayer, my saber works just fine. How are you using it?
  12. I've heard of this issue before, but don't remember what causes it. Please link to an example so I can take a look.
  13. If you check the readme of the lightsaber mod, it says And JA Unlimited's readme has a section called "Is this mod compatible with other mods?" which contains So these mods are fundamentally incompatible. A programmer would have to merge the source code of both to create a new, combined mod, but I don't think the source code of either mod is available online. You'd have to contact the creator of JA Unlimited and hope they still have the code 15 years later, and re-create the rgb saber mod by taking the relevant bits of OJP.
  14. I think you have to restart radiant after switching between Single Player Mapping Mode and Multi Player Mapping Mode, maybe that's why it didn't work at first...
  15. npc_player only exists in Jedi Academy SP mode. If you're creating a JK2 map, use npc_kyle instead.
  16. So it turns out that's not quite true. If the file is not listed in the torrent, I didn't download it as part of my jk3files scraping. However, there are still some mods I downloaded separately, just to play them. Looks like Expedition 1.05 is one of those, I found an 11-year-old file on my hard drive. I've uploaded it to my website, the download link on the page you posted should no longer be dead. --edit-- On closer inspection, while the readme of that file does contain "File Version: 1.05", its filename is "expedition1.06_readme.txt". Chances are this is a WIP release I received at some point? The full 1.06 release correctly says "File Version: 1.06"
  17. No, this was never available on my mirror, when I remove files (on request), I remove the file page as well. The IDs of removed files can be viewed in the config: jk3files-mirror/config.py at master · mrwonko/jk3files-mirror (github.com) When I scraped jk3files, crawling the file page for metadata and downloading the file itself were two separate steps, which could fail independently. It was a random dice roll whether a request for a recent file would hit an up-to-date server instance, so my script would retry a couple of times, then give up. Maybe this was one of the newer files I failed to download, or it had already been removed from jk3files for some reason? You could check the torrent, that's the most complete version of my archive: http://mrwonko.de/jk3files.torrent If the file's not listed there, I never had it.
  18. This Reva? I've downloaded it and tried it in OpenJK SP and she threw her saber at me without my game crashing. Am I doing something differently than you?
  19. I've never looked into it in detail, but the Dynamic Music System uses the ext_data/dms.dat file, which seems to define the timestamps at which switching between tracks sounds seamless, so you'll probably want to look into that.
  20. I know that a single broken shader can break all following shaders as well. Maybe that's also the case for NPCs? One broken NPC in turn breaks others? Try removing mods to find out which one is causing it, then share that one here and we can have a look at why it's broken.
  21. Sounds like Jedi Academy Enhanced might have added support for progressive jpeg textures, which are originally unsupported and lead to that error message. You then installed a mod that uses them (maybe Jedi Academy Enhanced ships with progressive jpegs? That would be a little mad...) and this makes it incompatible with the original game. Try removing mods until you find the offender.
  22. I don't understand the difference between spawning and showing up. Can you elaborate? Also, what's an example of a mod that exhibits this behaviour?
  23. You can compare the glm saber models for Jedi Academy and Jedi Outcast sabers using the ModView tool. At first glance, I can see that Jedi Outcast appears to use a tag called "*flash" to define where the blade starts, while Jedi Academy uses "*blade1", presumably due to the added support for multi-bladed sabers. So you'll have to edit the model to rename the tag, which can be done using the Blender Plugin or a hex-editor (making sure to replace instead of insert so the overall file length stays the same). The other issue is that Jedi Outcast does not have customisable sabers. That either needs to be programmed in (which needs to be done inside the VR port), or you can replace the default saber by giving the new one the same name. If you go the latter route, you should provide one PK3 file per saber, and then the player has to choose only one of them.
  24. Which steps are you referring to? What guide are you following?
×
×
  • Create New...