Leaderboard


Popular Content

Showing content with the highest reputation on 07/24/2020 in Posts

  1. 1 point
    Hi I've spent the last month working on a new decompiler for NCS code, and I'm ready to share my work in progress with you all. It works properly on many scripts, but there are still situations where it produces incorrect code (but the issues are usually relatively minor). I started this project both because an updated, open source NCS decompiler would be useful to me, and also to learn more about decompilation theory. It's a fascinating topic - I plan to create a YouTube video series on decompilation, using this code as an example. It's also meant to be a reference for others who want to implement an NCS decompiler for themselves (e.g. in C++ for the xoreos-tools project), or for those who want to learn decompilation in general - although NCS is a relatively simple language to decompile (for many reasons, discussed in the GitHub readme), I use very little in the way of "heuristics" and have based my algorithms mostly on the famous 1994 Cifuentes thesis "Reverse Compilation Techniques". I'll keep you all updated if you're interested in any educational content I produce based on this project. Relative to DeNCS, my code has some new features (some implemented fully, some still in the works), including: - Detecting if-else if-else if-...-else chains and not using nested ifs (done) - Doesn't have any problems with ACTION assignments to global variables (DeNCS fails on this, which is one of the main reasons some K1 scripts don't work in DeNCS) (done) - Handles recursion gracefully using a technique I came up with (which I believe might be novel) (WIP but mostly done) - Detecting includes and using the source code from the game's NSS files rather than the decompiled code (WIP) It works quite well, but it's not perfect yet and there are issues (take a look at the GitHub README for more information). Please be very careful if you want to use this for your mods, and (if possible) decompile scripts with the original DeNCS as well to check for consistency. If in doubt, I'd trust DeNCS over my decompiler for now. You can find the complete source code on GitHub at https://github.com/lachjames/ncs2nss as well as instructions on using the decompiler if you'd like to give it a try. I'd be very grateful for any suggestions or issues anyone would like to raise I'm aware that other decompiler projects are currently in the works, and I'd be more than happy to work with anyone who would like to work with me. I've licensed the code under GPL 3.0; my understanding (I'm not a lawyer) is that you are welcome to use the code for anything as long as you open source that code too. At the very least, this is my intent. This is the same license xoreos-tools uses, so it seems reasonable. This project relies on xoreos-tools for disassembly; Windows binaries are included in the xt/ folder (but I intend to remove this before any official release, or at least work with @DrMcCoy to make this automatically update to the latest version of xoreos-tools).
  2. 1 point
    Milestone reached: All K1 skyboxes, backdrops and models are finished or in short: Everything for vanilla (!) K1 is done Before you get your hopes up though, that does not mean that the release is imminent! The current plan is to release the mods for both games simultaneously, although that might change. However, I want to have the addons for K1 ready at least before I release it. That's mostly BOS:SR support which includes a Taris skybox that will probably take a while to do. The reason for why getting K1 actually done was that I had to do some tweaks to Kashyyyk and the Tatooine buildings, but mostly I iterated through dozens and dozens of iterations of improving Manaan as I wasn't really happy with the old version. The sky was too dark for instance and there were issues with K1s terrible bloom effect. But after several weeks I finally reached a result that I really like. Sadly I don't have a screenshot, so you'll have to wait for closer to the release to see it. Another thing that kept me busy was M4-78 which is now pretty much done. You've seen most of it before so it was mostly busywork of adding backdrops to all modules, tweaking fog, etc. But it also included the irradiated skybox: Certainly looks unhealthy, doesn't it?