Guest cornel Posted February 16, 2016 I can decompile mdl files with MDLops.exe. I can then edit the mdl file with NotePad++. But what utility do I need to compile the edited mdl file? The games don't seem to see decompiled mdls And what utility will let me decompile, view, edit and compile the mdx files? Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted February 16, 2016 MDLOps will decompile and compile models. You can edit models in 3DSMax or GMax using the NWMax plugin (a link to a particular version is stickied in the forums, I think in the General KotOR Modding section). Also, not all of the model format is known, and certain things are only supported by KAurora or MDLOps, individually. I actually told you this in your main menu thread... Quote Share this post Link to post Share on other sites
Guest cornel Posted February 16, 2016 Thank you Fair Strides for taking the time for this. I am not a programmer, so bear with me: I did see your answers, but I don't want to "visually" modify actual 3D models. I just want to edit mdl files with NotePad++ and then recompile them again, because the decompiled mdl files are not read by the game, as it turns out. You say MDLops can do that. How? I did not see that option. When I "open" an edited mdl file, instead of compiling, it just decompiles it again, making a new file with the ascii addition to the name... Sorry to be such a noob Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted February 16, 2016 I think I should note that you haven't read the read-me for MDLOps, as it was actually very thorough on how to operate it... The "-ascii" file is the only one you can edit in Notepad (or anything, really) and that's the decompiled model. You need to select that as the model in MDLOps and then do the same as if you were decompiling it. Quote Share this post Link to post Share on other sites
Guest cornel Posted February 16, 2016 I have no problem admitting guilt or mistakes, but : readme? what readme? In the zip folder I have downloaded were only these files: GPL.txt, icon.xpm, installing perl.txt, -k1-bin.mdl, -k1-bin.mdx, mdlops.exe, mdlops.pl and mdlopsm.pm... I did exactly that, as I said in my former post, and the result is: yet another ascii titled file! I'm probably doing something wrong, because it is you who knows what he's talking about. I certainly do not! I'm more of a blind man trying to find his way... (I was going to say: "in the dark", but then I realized that, to a blind man, it makes no difference whether if its day or night LOL) Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted February 16, 2016 Well I was certainly not trying to be insulting. I've just downloaded the MDLOps from the site again before making this comment, and there is indeed the following file: readme_MDLOps_0-7.txt Or if you have an older version of MDLOps, you can try to locate readme mdlops0-5.txt or... Hmm... The 0.6 version done by JDNoa years ago seems to have left out many of the documentation files. You might try downloading the MDLOps from the Modding Tools section of the Downloads page. As for proper use of MDLOps, you will first want to delete all the .mdl and .mdx files you have (including the "-k1-bin.mdl" and .mdx files) and re-extract your menu models with KotOR Tool. After that, the following steps will work for you: 1. Open MDLOps and select the .mdl file. 2. Click the Read and Write button. This will produce the "-ascii" .mdl file. 3. Edit the "-ascii" .mdl file however you want. 4. Save the "-ascii" .mdl file. 5. Select the "-ascii" .mdl file in MDLOps. 6. Click the Read and Write button. This will produce "-ascii-k1-bin" .mdl and .mdx files (or "k2-bin" files if the MDLOps is in KotOR 2 mode). 7. Move the "-bin" files to your Override folder and rename both to the original filenames you extracted from KotOR Tool. 1 Quote Share this post Link to post Share on other sites
Guest cornel Posted February 16, 2016 Insulting? No man, you're helping me out! Guess what? I had "mdlops06a1"... Just my luck. So now I've downloaded the one from this site and, yes: LOTS of info for me to read though! so I'll just go and do that: read.Thanks! Okay, so I've discovered why it didn't work: I had already renamed the edited mdl file to its original name, deleting the ascii bit, before loading it into MDLops! So the utility thought it was a binary mdl file and decompiled it again. Duh. Still, I seem to be unlucky at modding: I edited the mainmenu01.mdl, following your instructions to the letter, only modifying one thing: a color (into white: 1,1,1), but the game froze up when loading... Is there maybe something else I should know? Administrator: Posts merged. Please don't double post. Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted February 17, 2016 I did mention that not all of the .mdl and .mdx file format had been deciphered. And the color really isn't in the .mdl or .mdx files. You would need to be editing the .gui file for that to have any effect. At this point in time, I don't know if changing the model will be possible for you (well, I know a very complicated way that would require 3DSMax or GMax and in the end might or might not even work). But changing colors or textures should certainly be within the realm of the .gui files. A note on the .gui files: Leave the Alpha and the Color fields in the main struct (in the same "branch" the Controls list is connected to) alone and the default values. Quote Share this post Link to post Share on other sites
Guest cornel Posted February 17, 2016 I am playing around with the main menu gui files and am in the process of changing the color of the buttons. A lot of work, doing the buttons one by one, for each menu page... There's no global variable I could change, is there? What I was trying to do in the main menu mdl file, was change the color of the fog into bright white. There are three color for the "mist", as they call it. The start, end and mid colors. I assume that's the color order for the fog animation. I haven't been able to find a "mist" reference in the gui file... yet. About the model, what I did was take the mainmenu03.mdl and mdx, rename them mainmenu01.mdl and mdx, and brighten up Kreia's jedi robe in PhotoShop and replacing her dark side face with the light side one, by renaming the kreiah.tga to kreiaevilh.tga. Now if I could get the fog to be white, I'd have my "light side" menu! Thank you for all those little pointers you're dropping on the forum. They are very helpful! Quote Share this post Link to post Share on other sites
Kexikus 995 Posted February 17, 2016 I'm not sure, but I'd assume that kreiah and kreiaevilh are also the textures used for her ingame mod and the same goes for her robe texture. So you probably messed with that too. I don't know if that bothers you but I wanted to mention it Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted February 17, 2016 If you want to make changes like that, you'd be far better off just hex editing the original binary model. Trying to use MDLOps is a road to nowhere (other than Frustrationville). And as Kexikus alludes to, you'll want to use a custom name for your retexture. Just make sure to keep the same number of characters as the one you are replacing though if hex editing. Quote Share this post Link to post Share on other sites
Guest cornel Posted February 17, 2016 You're probably right... Didn't think about that, lol!Would it be possible to "create" a custom mdl, just for the menu, by renaming the mdl, mdx, and tga files I modified, and then change something (name references) in the mainmanu01.mdl?Another thing: I just tried to change the height and width values (1920x1080) for the loadscreen3 in mainmenu8x6.gui, to make my custom background stretch over the entire screen, but it also offsets it, shifting it halfway off-screen. Would you happen to know where the location coordinates for loadscreen3 are specified? TOP and LEFT values are both 0, so I don't know why it would "start" the placement where the old background (800x600) was... I managed to get the background in its correct position by changing the LEFT value to -660 (a negative value, go figure...), but now I need the background to stretch over the whole 1920 length. I already changed the width to 1920, but the background still only covers - I estimate - 800 pixels? Somehow I feel this isn't the right place to specify that the background should cover an area of 1920x1080...EDIT: I've given up on this and reverted the wide-screen hack. Now I have a full screen menu background. The game itself looks the same, so i don't know why I bothered with the ws hack in the first place... I don't know if I'm up to hex-editing, DarthParametric... Way over my head, I think Couldn't I just make an extra, a custom mdl, just for the menu, by renaming the mdl, mdx, and tga files I modified, and then change all the original name references in the mainmanu01.mdl? Administrator: Posts merged. Please don't double post. Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted February 17, 2016 Changing references in the ASCII model is fine, but that's only of any use if you can actually compile it into a working binary model. My feelings on it probably amount to "good luck with that". Hence why I suggested hex editing. You are replacing the references in the vanilla binary model, so you don't have to deal with the vagaries of MDLOps. That's why I'm curious myself as to what they did for Revenge of Revan. Compiling a working animated model with VFX seems highly unlikely (assuming they actually have an animated character and VFX - I've only seen a small, blurry screenshot). I figured they might have used a script-based approach and hijacked the way the DS endgame shows the player character. Quote Share this post Link to post Share on other sites
Guest cornel Posted February 17, 2016 Okay, I'm curious: what exactly would you do? Which hex-editor would you use, and which file would you edit? Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted February 17, 2016 What editor you use doesn't matter so much. There are a gazillion around. I'm sure someone can chime in with suggestions on a decent free one. As to the editing itself, if you want to use the Kreia menu, open up mainmenu04.mdl in a hex editor and use whatever search tools it has to find the textures. As a shortcut, if you do a quick .decompile with MDLOps, you'll get a text file with all the textures listed. We know that the ones were are interested in are P_KreiaEvilH and P_KreiaEvilA. So do a search for those text strings. In this case we find 5 instances of P_KreiaEvilA and 8 instances of P_KreiaEvilH. Now in this example it is easy, all of those a just texture references. But in some instances there may be full or partial strings shared between textures and other elements like meshes and so forth, which can require manually picking out which ones to change. But in this case a simple Find and Replace function will do the trick. Now as I mentioned above, a crucial element of hex editing is to keep your replacement strings to the exact number of characters. If you don't, Bad Things™ will happen. Google "hex offsets" to learn why. Anyway, in this case both our text strings have 12 characters each, so we need two unique 12 character strings to replace them. Like so: P_KreiaEvilH = KreiaJediFce P_KreiaEvilA = KreiaJediRbe Now punch those into a Find and Replace function, Replace All, and you are done. Save it out and grab the MDX, then make copies that you rename to all the menu model variants (01 to 06) and put them in the Override folder. Now go find the neutral Kreia textures, P_KreiaA and P_KreiaH, and rename them to KreiaJediRbe and KreiaJediFce respectively. Put those in the Override as well. Then start it up, you should go from this: to this: Now you also want the smoke colour changed, right? That's a tad more tricky. You'll have to wait for part 2. Quote Share this post Link to post Share on other sites
Guest cornel Posted February 17, 2016 I don't know what to say... except for: THANK YOU for going through all this trouble in changing stuff in your game, posting screen shots, explaining everything... How do you know all this stuff? The amount of characters having to be the same, the name of Kreia's jedi outfit... (I looked KreiaJediFce up with the FindRefs Utility, but nothing came up.) I'm gonna try this now and get back to you when I succeed Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted February 17, 2016 Like I said above, the original textures are named P_KreiaA and P_KreiaH. You have to rename them to KreiaJediRbe and KreiaJediFce to keep the same number of characters. Well you can name them whatever you want, as long as the character length matches. As to how I know certain stuff, I'm certainly no font of all knowledge. But modding is no different to learning anything else. Read, watch, practice, ask questions, experiment - all the usual trial and error stuff. Work out what you want to do, search for information, ask if anyone can point you in the right direction. Sometimes you'll get a blow-by-blow account, other times you'll have to just start poking and see what happens. Eventually you'll figure out what works and what doesn't, what you can do and what you need help with. And when you see someone ask "how do I do X?" and you know how to do X, you pass the information along. And thus the modding circle is complete, young Padawan. Quote Share this post Link to post Share on other sites
Guest cornel Posted February 17, 2016 As you can see, almost done... just remains the white fog issue... (...and the selected text color, which i somehow cannot find in the gui file, cause i changed everything, including highlighted...) BTW, I noticed a funny thing: PULSING values are all 0, yet the buttons blink... I even tried deleting all PULSING references from the gui file, and still the buttons blink at mouse over! P.S. What are those NEW_CONTENT and WARP buttons? They don't appear in the menu... Quote Share this post Link to post Share on other sites
Guest cornel Posted February 17, 2016 Just so you understand the context (reason for modified game title and light side menu): this is the menu of the first game... Quote Share this post Link to post Share on other sites
Guest cornel Posted February 17, 2016 I just noticed that we went off-topic here... Let's continue this conversation in my thread on modifying the main menu! http://deadlystream.com/forum/topic/4143-main-menu-modding/ Quote Share this post Link to post Share on other sites