Advertisement
RoRModAnon

Info for RoR2 modders

Apr 3rd, 2019
1,451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. IF A FILE HAS A CMD/RPC FUNCTION, DO NOT EDIT THE FILE, INSTEAD EDIT METHODS NOT RELATED TO THEM.
  2. It'll have shit like this https://pastebin.com/zx5jc3fi
  3. If you decompile/recompile a file that has them, clientside will shit the bed, so don't.
  4.  
  5. Pastebin of my memory log that I mainly made so I remember where I gotta do shit in case new update comes out. You can look at in in case you want to update for new patch since I quit or because you want examples of how I did shit: https://pastebin.com/srMa401L
  6.  
  7. >Finding mentions of something in entire project:
  8. Export to Project in dnspy
  9. Open Notepad++
  10. Ctrl + f & switch to Search in Files
  11. Select folder you exported the project to
  12.  
  13. >Adding new buffs:
  14. Stick it in BuffIndex (remove count, add the buff, compile it, then readd count and recompile, otherwise it does weird stuff)
  15. Save the assembly and throw it back into Dnspy so it updates the enum.
  16. Register it in BuffCatalog.
  17. Increase the array sizes in BuffCatalog and CharacterBody.
  18. Search mentions of BuffIndex.*youritem* in the new assembly or BuffIndex.Count in an old one.
  19. Make sure these are all still BuffIndex.Count, most likely it'll have changed when you compiled BuffIndex.
  20. Do whatever you want with the buff. Apply it with yourCharacterBody.AddTimedBuff(BuffIndex.YourBuff, duration); then you can check for it with charBody.HasBuff(BuffIndex.YourBuff)
  21.  
  22. >Adding new Artifacts:
  23. Stick it in ArtifactIndex (remove count, add the buff, compile it, then readd count and recompile, otherwise it does weird stuff)
  24. Save the assembly and throw it back into Dnspy so it updates the enum.
  25. Register it in ArtifactCatalog (Optionally: Add a nameToken and accordingly add it to the language files)
  26. Increase the array size in ArtifactCatalog.
  27. Search mentions of ArtifactIndex.*yourartifact* in the new assembly or ArtifactIndex.Count in an old one.
  28. Make sure these are all still ArtifactIndex.Count, most likely it'll have changed when you compiled ArtifactIndexIndex.
  29. You can now check for the artifact using Run.instance.enabledArtifacts.HasArtifact(ArtifactIndex.YourArtifact);
  30.  
  31. >Making characters pickable in game (courtesy of some other anon):
  32. (check https://pastebin.com/Q1nnGjwt for ids/bodies, courtesy of some other anon)
  33. In SurvivorIndex, add your new survivor, it should look like this https://pastebin.com/S9fmVJZq here I added lemurian. Then hit compile
  34. In SurvivorCatalog, scroll down and add SurvivorIndex.Lemurian to idealSurvivorOrder, also change SurvivorDef[7] to SurvivorDef[8]
  35. Add a new survivor like this https://pastebin.com/LSYijsTe in this case LemurianBody exist, just like BanditBody. You need to find other bodies prefabs names to use them, GolemBody works too.
  36. LemurianDisplay and LEMURIAN_DESCRIPTION probably don't exist in the assets, you can add them if you want to.
  37. To fix the compilation error, replace the block of code with https://pastebin.com/wKPf3ULS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement