Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

make sure you're using this version of dnspy first, the more recent versions of vt aren't as compatible with the older versions of dnspy anymore and it should fix some compiling errors you may run into https://github.com/dnSpyEx/dnSpy/releases/

try that first, if that didn't work then I can't tell you exactly what's wrong from the information you gave me since I would need more specific info, my guess is that it would either be a syntax error or not formatting your code properly

Thank you for responding. I spent some time messing around and found that the version of dnSpy I was using (6.1.8) was adding unnecessary lines of code that it could not interpret and if I simply removed/reformatted the lines throwing errors, the problem would be resolved.
This new version fixes the issue altogether, thank you very much.

(1 edit)

+ I want to add this post in case anyone comes looking for solutions after me.
dnSpy just kinda sucks, it will tell you there are things wrong with your code that you didn't change, it will put things in the code that it can't read and it will say it's broken, it needs to be restarted if you added a method and try to call it in the same session, there are many problems.
Updating to the correct version does prevent some of these things from happening but they will still occur. The solution is being smart enough and have the patience enough (because you have to do it everytime you recompile) to unfuck whatever it decides to fuck up.
There's always the possibility that this issue only exists on my machine, or it's a fault of mine but just in case anyone else has this issue, blame dnSpy and spend the next 6 hours reformatting the same 6 lines of the base game's code everytime you make a change and save and restart the program frequently.

(1 edit)

Apologies for once again requesting support on such an old thread, but I've encountered some more dnSpy jank that I do not know how to solve.
I am attempting to edit the RunAttack() method in EventScene.cs as part of adding a custom attack. I am editing the switch: statement which contains most of the attack IDs and adding a case: for the custom attack in AttackList.cs
In case it matters, the custom attack is a clone of "Pamper" with the only change being the CT.S_Type, I have the ID set to 2223.

The problem in dnSpy is that whenever I attempt to add the code for the new attack, or even edit the code for the existing "Pamper" attack, dnSpy completely misinterprets the code and creates code for an irrelevant attack. (Seems to be "Kiss" most of the time but I've seen other things on various attempts.)

There are no errors with the code to my knowledge, the game still runs find and can execute this strange code, but it is preventing me from making progress and would like to know why it is happening and perhaps how to fix it.

Images attached:
Code that I wish to add -


Code that gets added -


Edit: I have found a somewhat solution after reformatting the entire script that allows the code to stop hallucinating and actually save what I write. Still would like to know why this happens because the reformatting takes a lot of time.