Darkkender Posted May 8, 2006 Share Posted May 8, 2006 I've been recently playing around with making an underwater module like was in K1 on Manaan. One of the things I'm trying to do is figure out which of the scripts within the module play the bubble animation for the sea floor. The problem comes from the fact that I have a very strong problem with trying to read the pcode/byte code. The problem is I get confused about 5 characters in when trying to use torlacks tutorial on it. To make matters worse is the fact that I can't seem to find my older copy of the JRE that DeNCS worked on. If anybody knows off hand which animation number it is for the sea floor bubbles I might be able to figure out a script of my own to do the same thing. I'm only 3/4 sure it is script driven as a looping animation but I can't seem to find the right reference in the 2da files or NWNscript.nss. I don't even know if the animation is still around for K2. However I'm hoping it is one of the many things that they didn't clean out and left alone. I've already torn apart the other main module elements including loading the module models into gmax to see if I spotted any bubble models and I couldn't find any. This is why I'm sure it has to be script driven. Link to comment Share on other sites More sharing options...
stoffe Posted May 9, 2006 Share Posted May 9, 2006 One of the things I'm trying to do is figure out which of the scripts within the module play the bubble animation for the sea floor. (snip) If anybody knows off hand which animation number it is for the sea floor bubbles I might be able to figure out a script of my own to do the same thing. As far as I can tell that is not a scripted effect, the bubbles are an animation that is part of the area model. The only animations played in the underwater area are of the (non-aggressive) Firaxa sharks that swim around in the distance. Link to comment Share on other sites More sharing options...
blawk Posted May 9, 2006 Share Posted May 9, 2006 Hey DK, I think stoffe is right, but I'm not sure because I've been looking around and as far as I know, areas don't have embedded animations (mainly because it would be useless as the game can't interact with the model itself). The bubble is made from a texture AFAIK (although, it's the area model which provides the background color for water, the texture is transparent except for the edges/borders of the bubble), I found it while digging for some other stuff. Maybe "tracing" usage of the texture helps to find the involved code that shows up the animation. If I have time I'll post the name later today. Cheers, and keep up the nice work. [edit 1]: BTW, any idea on editing area models? Are those "hard coded"/packed inside the game? I'm *quite* interested on this. I know porting isn't Good but It could be Fun to get one of the maps of Jedi Knight II inside TSL. Link to comment Share on other sites More sharing options...
stoffe Posted May 9, 2006 Share Posted May 9, 2006 I think stoffe is right, but I'm not sure because I've been looking around and as far as I know, areas don't have embedded animations (mainly because it would be useless as the game can't interact with the model itself). Areas can have embedded animations, both ambient ones that run all the time, and specific sequences of animations that can be triggered with the PlayRoomAnimation() scripting command. For example, the simpler forms of such animations are like the rotating gears and waterfalls in the Taris sewers in KotOR1. The more advanced ones, triggered by scripts, are like the arrival of the Harbinger at Peragus, or the repair of the Dantooine Academy in Kotor2:TSL. Link to comment Share on other sites More sharing options...
blawk Posted May 9, 2006 Share Posted May 9, 2006 Areas can have embedded animations, both ambient ones that run all the time, and specific sequences of animations that can be triggered with the PlayRoomAnimation() scripting command. For example, the simpler forms of such animations are like the rotating gears and waterfalls in the Taris sewers in KotOR1. The more advanced ones, triggered by scripts, are like the arrival of the Harbinger at Peragus, or the repair of the Dantooine Academy in Kotor2:TSL. Thanks for the information, my apologies. Although, it's not the model *itself*. They must be using something to act as "layer" between the model (polygons, and "animations". water falls can be hard coded for sure) and the game engine. BTW, I'm not sure if an area could use an existing animation and "place it" in the "background". The Peragus ext. may be structured that way (you can see the interior with Atton in the terminal too). Cheers. Link to comment Share on other sites More sharing options...
blawk Posted May 9, 2006 Share Posted May 9, 2006 OK, dunno if this should be an edit for the previous message but I just found an example of the bubble "texture": PER_bubbles.tpc , also fx_bubble.tpc and fx_kolto_bub.tpc Waterfalls, for example, use this one: PLC_waterfall.tpc Link to comment Share on other sites More sharing options...
oldflash Posted May 9, 2006 Share Posted May 9, 2006 Those are textures. I suspect they may be some sort of emiters (vfx) just like smoke and fireplace effect. Link to comment Share on other sites More sharing options...
Darkkender Posted May 9, 2006 Author Share Posted May 9, 2006 I couldn't find any textures originally that were for bubbles underwater. The only underwater textures I could seem to locate was the grass for seaweed. That's whats frustrating because there is usually some sort of reference in the various files to relate to the extra textures used. So from what you can tell stoffe all of the scripts in that module are for the firaxa sharks? As to the area models blawk there has been alot of effort put forth in the community by our tool developers relating to further breaking apart the model format. If I under stood PERL better and could get all of the modules needed installed properly I would have a test change based on an error I was receiving for area models. I was playing with mdlops replacer function with area models and it seems that one set of there coordinates are outside the bounds of what mdlops is setup to handle. I mentioned it to Cchagrin about a month ago but he hasn't gotten back to me about it. I'm sure he is just swamped is why. So if anybody more adept with Perl wants to work with me on testing an upgrade or series of changes and upgrades for mdlops then we might be able to pull off breaking the area models. Link to comment Share on other sites More sharing options...
mjpb3 Posted May 9, 2006 Share Posted May 9, 2006 I could be wrong, and please forgive me completely if I have no idea what I am talking about here But doesn't the watersuit have the bubble animations in the model file? Like I wrote I could be completely missing what the context of the discussion is, so please forgive me... Link to comment Share on other sites More sharing options...
Darkkender Posted May 9, 2006 Author Share Posted May 9, 2006 The Watersuit is just a reskinned spacesuit. As to the bubbles they are only in specific locations within the module itself. In fact you can run around in the module without the watersuit if you want. Just watch out for the sharks. Link to comment Share on other sites More sharing options...
blawk Posted May 9, 2006 Share Posted May 9, 2006 As to the area models blawk there has been alot of effort put forth in the community by our tool developers relating to further breaking apart the model format. If I under stood PERL better and could get all of the modules needed installed properly I would have a test change based on an error I was receiving for area models. I was playing with mdlops replacer function with area models and it seems that one set of there coordinates are outside the bounds of what mdlops is setup to handle. I mentioned it to Cchagrin about a month ago but he hasn't gotten back to me about it. I'm sure he is just swamped is why. So if anybody more adept with Perl wants to work with me on testing an upgrade or series of changes and upgrades for mdlops then we might be able to pull off breaking the area models. I just tried two, one worked, the other failed. Here's the one that worked, rendered without textures. Scale and everything else is perfectly set. edit 1: it's still a real problem that we don't know what textures are used in each mesh. it's all a try-check-discard game until you find the right one. edit 2: potato power added, plus textures loaded. old image at: http://blawk.krath.googlepages.com/261tel-render-notextures.png Link to comment Share on other sites More sharing options...
Darkkender Posted May 9, 2006 Author Share Posted May 9, 2006 What did you do? Did you use the Replacer function of mdlops? If so which version of mdlops 0.5 or 0.6a? Moderator's could you change the title to the following so that the thread is properly titled. --Exploring Area Modules and there components Was a Discussion on scripts.-- Done! ~ ChAiNz.2da Link to comment Share on other sites More sharing options...
mjpb3 Posted May 9, 2006 Share Posted May 9, 2006 The Watersuit is just a reskinned spacesuit. As to the bubbles they are only in specific locations within the module itself. In fact you can run around in the module without the watersuit if you want. Just watch out for the sharks. Yar! Well, as I wrote, I was taking a shot in the dark... Link to comment Share on other sites More sharing options...
blawk Posted May 9, 2006 Share Posted May 9, 2006 What did you do? Did you use the Replacer function of mdlops? If so which version of mdlops 0.5 or 0.6a? mdlops 0.5. Did nothing, just looked up the name of the mesh/model used for one of the rooms in 261TEL and converted it to ASCII MDL, then loaded in 3D Studio. I'm re-texturing the scene just for fun, but can't find the texture for the door, seems to be missing (OK, checked again and TEL_hut is there finally. It would be great to have mdlops extract the textures automatically). Some models *will* fail. I believe it's because mdlops expects to get some data in the MDL file that is unused in area meshes. Dunno. BTW, it can be resource intensive, and you should try twice. For some reason it didn't work for me the first time. Never give up at the first try I still doubt about the possibility of adding new areas in-game, they load the textures within the engine, some way I don't know, also I don't know how they set the models for each room, if it's just a resref to the MDL or something more complicated. At very least, you can use the area scenes for your own CGI cutscenes and movies. Cheers. EDIT 1: Maybe I could try to write down a list of area models that *work* right now and can be successfully imported and edited. I'm testing a few right now. Note that this is all "modularized": each room inside an area is an unique model/scene. The game engine connects them with triggers and the like, but they are all independent, which makes me think that advanced (probably hardcore ) area modification is possible (ex. making a completely new area out of modified room models using existing textures). The problem I see here is that textures can't be introduced (talking about area related ones, item and NPC models have those assigned via 2da files, which seems not to be the case for area textures), and same happens with models, or maybe I'm wrong and it's something still to be discovered. It's a matter of trying to extract a model, work on it, save it, put on override along a module created from scratch prepared with "rooms" actually using the new models and pray to get it working. EDIT 2: I think stoffe was partially right on the animations. Although, I haven't found embedded ones yet. I guess those are really rare cases. 261tel animations (the ones of the crashed shuttle), are all either game engine/script based. Model is 100% static. Link to comment Share on other sites More sharing options...
Darkkender Posted May 9, 2006 Author Share Posted May 9, 2006 Are you talking about some models failing decompiling from mdl to ascii-mdl? Because I've never had one fail me there. Every model I've ever wanted converted to ascii has always worked. Now the reverse isn't true when changing the model and trying to replace the original model with the new model. Link to comment Share on other sites More sharing options...
Pavlos Posted May 9, 2006 Share Posted May 9, 2006 Textures are assigned to models by their names . It has something to do with HEX editing and all that icky stuff but nothing that we cannot do. I believe Darth Insidious was HEX editing 262TEL a while ago for a mod he was working on. Also, I doubt, to be honest, that if you did manage to get a new area into the game (Lightmaps and all) that you would be willing to spend the time fiddling with the .are alignment . All those numbers would drive even the most dedicated code breaker mad... Link to comment Share on other sites More sharing options...
Darkkender Posted May 9, 2006 Author Share Posted May 9, 2006 Textures are assigned to models by their names . It has something to do with HEX editing and all that icky stuff but nothing that we cannot do. I believe Darth Insidious was HEX editing 262TEL a while ago for a mod he was working on. Also, I doubt, to be honest, that if you did manage to get a new area into the game (Lightmaps and all) that you would be willing to spend the time fiddling with the .are alignment . All those numbers would drive even the most dedicated code breaker mad... You're not willing to wager money on that are you? I was doing some of that with the deathstar mod that I scraped. My only problem was the walkmesh files. Link to comment Share on other sites More sharing options...
Darth333 Posted May 9, 2006 Share Posted May 9, 2006 New textures can easily be assigned by HEX editing the models and you can also remove the parts of an area you don't want to use. After this, it's a matter of renaming the proper files to make sure you don't change anything in the existing module. I don't have much time to post about it right now but it has been briefly (and informally ) discussed here: http://www.lucasforums.com/showpost.php?p=2003140&postcount=55 and here: http://www.lucasforums.com/showpost.php?p=2004517&postcount=77 Link to comment Share on other sites More sharing options...
blawk Posted May 10, 2006 Share Posted May 10, 2006 New textures can easily be assigned by HEX editing the models and you can also remove the parts of an area you don't want to use. After this, it's a matter of renaming the proper files to make sure you don't change anything in the existing module. I see, what's the procedure for the room removal? Does the game automatically "close" removed rooms? Let's say, like you are trying to get into a room that existed in the module but it's now removed. If the game doesn't find the model for the room you're trying to access, it would probably crash (or make you fall in the "Oblivion" like in GTA games ). Also, any good hex editor for win32 which is free? WinHex is good but it's not free and you need to get a license for editing files >200Kb. edit 1: found http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm#download I will remove the crashed shuttle from the model and try to get it to work in the game. Even with Mr. Potato. Just for tinkering a bit. Anyone has done something similar before? Cheers. Link to comment Share on other sites More sharing options...
Darth333 Posted May 10, 2006 Share Posted May 10, 2006 I see, what's the procedure for the room removal? Does the game automatically "close" removed rooms? Let's say, like you are trying to get into a room that existed in the module but it's now removed. If the game doesn't find the model for the room you're trying to access, it would probably crash (or make you fall in the "Oblivion" like in GTA games ). You have to edit the .are and the .lyt files. Check the links I posted above: I hex edited the model file to point at the new textures. In fact, I'm only using room 262telu for this mod (renamed to 263telu). I got rid of the rest of the other rooms in the area as they didn't fit the location of the tomb. I had to rename and edit the .lyt file too and delete references to other rooms in the 262tel area or it would crash when loading from a savegame (but it loaded when entering the module for the first time). I tested and retested and no crashing problems so far Link to comment Share on other sites More sharing options...
Pavlos Posted May 10, 2006 Share Posted May 10, 2006 You just delete the model reference in the walkmesh file. That will cause the model to dissapear from your module. What you will see is an empty space where the model once was with no walkmesh and probably just the skybox shoing through (Unless there is something behind the model). You cannot simply remove the shuttle from 261TEL by this method as to my knowledge there are only two models involved in this module: the skybox and the plateau. You would have to go about actually editing the model... which could well cause it to become unusable. But it is always worth a try . If people didn't try then we wouldn't be where we are with KotOR Modding! Link to comment Share on other sites More sharing options...
Darth InSidious Posted May 10, 2006 Share Posted May 10, 2006 Textures are assigned to models by their names . It has something to do with HEX editing and all that icky stuff but nothing that we cannot do. I believe Darth Insidious was HEX editing 262TEL a while ago for a mod he was working on. Also, I doubt, to be honest, that if you did manage to get a new area into the game (Lightmaps and all) that you would be willing to spend the time fiddling with the .are alignment . All those numbers would drive even the most dedicated code breaker mad... Yes, I am still doing it...It's possible, but the slightest mistake and all your efforts can be utterly in vain. RE: Layout changing. Yes, it's possible, but putting different models from different areas together is not. I tried time and again, but it wouldn't work... Link to comment Share on other sites More sharing options...
blawk Posted May 12, 2006 Share Posted May 12, 2006 You just delete the model reference in the walkmesh file. That will cause the model to dissapear from your module. What you will see is an empty space where the model once was with no walkmesh and probably just the skybox shoing through (Unless there is something behind the model). You cannot simply remove the shuttle from 261TEL by this method as to my knowledge there are only two models involved in this module: the skybox and the plateau. You would have to go about actually editing the model... which could well cause it to become unusable. But it is always worth a try . If people didn't try then we wouldn't be where we are with KotOR Modding! Well, I just removed the shuttle and the snow planes around it, added a patch snow plane and it looks well for testing. Now what should I do to export it to mdl? I'm using 3d studio max 8 with the MDL plugin and nothing else. Or I'm just wrong and there's no way to actually export edited models? [edit 1] I've been able to introduce the modified model in-game, without the shuttle. Although, it's not exporting my new plane which fills the space left by the shuttle placement. Although, I believe it's something related to the textures as I can walk on it (it's just that I can see the skybox below). I'll post an screenshot tomorrow. Maybe we are just a step before being able to perform further changes on area models. I guess others will be easier than this one (my apologies of not choosing the most easy one for testing). The problem of the plateau is that there's virtually nothing below the plateau and the skybox, just a specially modified plane and nothing more. thus, any gap left there is more evident. Cheers. Link to comment Share on other sites More sharing options...
Pavlos Posted May 12, 2006 Share Posted May 12, 2006 This is not my area but this might help you, or any of the stickied tutorials. The problem is that even if you did manage to successfully edit the model of the module... you still wouldn't have walkmesh where the shuttle used to be. Fred Tetra made progress with the creation of walkmesh a while ago so I recommend you have a search of the forums for the information regarding that. Link to comment Share on other sites More sharing options...
blawk Posted May 12, 2006 Share Posted May 12, 2006 Got a screenshot, I'll try to fix this tomorrow if there's a way to get around it (I guess it's about making the plane being a child trimesh of 261teld, as every other trimesh does in the scene): Cheers. edit 2: I've been able to work out the issue (partially): I've linked the plane mesh to the grund mesh and then exported and compiled the model with mdlops: So, as I commented in a earlier post, it's the reason why the skybox was showing up instead of the plane. But, for some reason, it's not liking the texture loading : I wouldn't like to be alone on this one, please, someone with experience on modeling AND using NWNMax send me a PM. I can provide the mdl/mdx files at request. I'm sure other rooms are easier to edit but it's better to go the hard way and get to know the stuff before messing with other models. Cheers. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.