AmanoJyaku

Members
  • Content Count

    219
  • Joined

  • Last visited

  • Days Won

    10

AmanoJyaku last won the day on November 20

AmanoJyaku had the most liked content!

Community Reputation

158 Jedi Grand Master

4 Followers

About AmanoJyaku

  • Rank
    Jedi Knight

Recent Profile Visitors

4,857 profile views
  1. Thanks! It's probably more complicated than this (I don't see any code explaining the XP drop on the Harbinger), but it supports the idea of examining scripts further.
  2. I was discussing XP with someone and we noticed StrategyWiki's entries sometimes deviate from our own experiences. Is anyone familiar with the XP granted for things like locks and mines? I know it's based on your level, but slightly more complicated. When recovering mines it's supposed to be 15*level, then drops to 10*level once you're five levels higher than the mine max. E.g. minor mines are max level 5, so 75XP at level 5 and 60XP at level 6; average mines are max level 10, so 150XP at level 10 and 110XP at level 11; etc... Is this always true in TSLRCM? The person I spoke with claimed they always got 15*level on Peragus, but that never happened to me. When picking locks it's supposed to be 5*level, but some locks give 10*level. How does this work? Are there thresholds like with mines, or is the award specific to each lock? What's confusing is in the Harbinger picking locks at level 6 gives more XP than at level 7, indicating a threshold. But I've seen nothing like it afterward. Are there any other XP awards that change when your level does? Other than combat, of course. Computer and repair come to mind, as some rewards are based on your level and others are fixed. I'm fairly certain that's controlled by scripts, like the computer console in the Peragus mining tunnels.
  3. In theory, an ERF can contain anything. In practice, the games look for things in specific places. You can download the file specifications here: https://neverwintervault.org/project/nwn1/other/bioware-aurora-engine-file-format-specifications
  4. The last few updates were light on samples, so let's address that. TSL's k_inc_treasure.nss: And the reverse compiler output: And the two overlapped for comparison, with the reverse compiled script labeled as "RCScript": In some cases, the number of RCScript statements matches that of the original NWScript statements, e.g. the assignment expression statement "str = pad + str;". [An earlier post referred to RCScript statements as proto-statements, and NWScript statements as complete statements. They're all terms I made up.] In others, multiple RCScripts statements combine to form the NWScript statement. The simplest example is a variable declaration with an initializer: the initializer is an expression statement that immediately follows the declaration. A more complicated example is the iteration statement, which is followed by a jump statement. Then, the body of the iteration statement (in the example, the assignment expression statement) is placed between them. The return statement is similar, however it has a slight quirk in that it starts off as regular expression statement that gets split in two. Then a jump statement is placed in between the two pieces, with the second being the original MOVSP. The first piece is modified with a new MOVSP that removes the result of the expression and all other values on the stack in order to clear the stack before exiting the subroutine. However, the ultimate is the switch statement. It's so complicated it needs its own post. It has optional parts... The final three RCScript statements are unprintable. The first clears all variables from the stack. However, this was already dealt with in the return statement. The jump statement inserted into the return statement jumps past this MOVSP and lands on the final MOVSP. Since the stack has already been cleared, this must be clearing arguments. And then the subroutine returns. To Do: Write code to generate expressions, e.g. ADDxx becomes <operand 1> + <operand 2> Regroup RCScript statements back into NWScript statements Integrate the value stack so variables can be referenced by unique names
  5. I'm not promising anything, but we'll see. I don't know how many people are coders, but I came across a series of articles on creating your own compiler. The articles are largely useless for writing a reverse compiler like this WIP, but they give some insight into how early design choices impact development later on. In part 4 the author wanted to make one change to a feature added in part 2, yet it led to multiple changes because so much was dependent on that one change. This has been my experience from the start: numerous rewrites from the ground up as I learned more about the NCS byte code. Finally, I'm past interpreting individual codes and on to interpreting statements and data structures. Statements are easy (except switch statements), but data structures will require some thought. Two different data structures could have the same member definitions (e.g. struct S1 {int i; float f;} and struct S2 {int i; float f;}), so I'll need logic to detect this. Finding structures is surprisingly easy, though. tl;dr The two obstacles left are switch statements and user-defined structs, and I'm nearly finished with switch statements. http://visualstudiomagazine.com/articles/2014/05/01/how-to-write-your-own-compiler-part-1.aspx http://visualstudiomagazine.com/articles/2014/06/01/compiler-basics-part-2.aspx http://visualstudiomagazine.com/articles/2014/07/01/syntax-analysis.aspx https://visualstudiomagazine.com/articles/2014/09/01/compiler-basics-how-to-part-4.aspx
  6. How is everyone? It's been a while... Several changes have been made to the reverse compiler, resulting in a rewrite from the ground up: All Opcodes are now properly decoded, including: RSADDx - Now able to differentiate variables from subroutine return values JSR - Number of subroutine arguments and return values fully deduced JZ - Now able to differentiate logical AND|OR expressions from if|while|for statements Subroutine signatures are now partially deduced: Number, but not types, of arguments and return values To do: Collection of type information is dependent upon evaluation of statements Proto-statements (I made up this term) are discovered: Input for recreating complete statements (I made up this term, too) int i = 0; is a complete statement int i; is a complete statement, and a proto-statement of int i = 0; i = 0; is a complete statement, and a proto-statement of int i = 0; To do: Proto-statements must be combined to recreate complete statements Error handling is slowly being added: Has helped discover programming and algorithm bugs Is meant to discover incorrect NCS files, which compilers can generate under certain conditions To do: "Full" error handling won't happen in the first release If anyone has questions I'll be happy to explain further. For now, I'm working to complete this before the two-year anniversary of starting this project. 😬
  7. @Dgt_V Yes, it's Panar. Afterward, you get the head by speaking with the droid. It's not in the droid's store inventory.
  8. Where are the Kreia underwear mods??? 😭😡🤡

    1. Show previous comments  2 more
    2. N-DReW25

      N-DReW25

      @DarthParametricIf you can just slice off her hand and add it as part of your Kreia Visible Body Models mod then we might finally be able to make the "Kreia dances for Vogga" mod.

    3. DarthParametric

      DarthParametric

      It will need to wait until we get working deepfake VO generation. Then it can be part of the Kreia romance mod that @Snigaroo has been dreaming about for years.

    4. N-DReW25

      N-DReW25

      Now THAT I can wait for!... (In a good way)

  9. You may have been bitten by the polar academy bug. Install TSLRCM if you haven't already; it fixes that bug. Unfortunately, I think you'll have to start a new game.
  10. What do you mean "the script won't work"? Does it compile? Do you even know if the script is running?
  11. Try this: https://steamcommunity.com/app/208580/discussions/0/541906989387634015/
  12. It depends on the version you have. If you get it from Steam and choose the default install you get 4K/5K support.
  13. What about modifying autobalance.2da? From what I understand, most enemies are Set_3. So changing vpmult from 0.65 to a higher value, e.g. 1.3 to double enemy VP, might work. https://strategywiki.org/wiki/Star_Wars_Knights_of_the_Old_Republic_II:_The_Sith_Lords/Autobalance