0% found this document useful (0 votes)
15 views2 pages

Editing Assembly-CSharp.dll in dnSpy

This document provides a 23 step tutorial for creating a task in DLL by modifying various script files in the Assembly-CSharp.dll project using DnSpy. The steps involve adding IF statements and new variables to check for and assign task completion.

Uploaded by

David Chi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Editing Assembly-CSharp.dll in dnSpy

This document provides a 23 step tutorial for creating a task in DLL by modifying various script files in the Assembly-CSharp.dll project using DnSpy. The steps involve adding IF statements and new variables to check for and assign task completion.

Uploaded by

David Chi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Tutorial to create a task in DLL by Ana Caona#0335, based on d4cr3wd 's tutorial

1. Open [Link] with DnSpy

2. Go to DialogueWheelScript, and look for HideShadows()

3. Once inside, do Right Click -> Edit Method and add your student in that if
statement. Don't forget to replace the ID with the ID of the student you make the
task for !
Refer to the following screenshot to see how to do :

[Link]

4. Once it's done, press "Compile".

5. Go to SubtitleType, and scroll to the very very end

6. There, do Right Click -> Edit Class

7. Put a , (a coma) after CouncilToCounselor. Then, skip a line and paste


TaskIDLine at the very end of the list.
Refer to the following screenshot to see how to do. Don't forget to replace ID in
TaskIDLine with the ID of the student you make the task for !

[Link]

8. Once it's done, press "Compile"

9. Do File -> Save All -> Ok

10. Go to StudentScript and look for TaskLineResponseType

11. After doing Right Click -> Edit method, get and add a new if statement there as
on the screenshot :

[Link]

12. Once it's done, press "Compile"

13. Go to SubtitleScript and look for UpdateLabel(SubtitleType

14. Around 907 line, you'll be at the good place. Here, do Right Click -> Edit
Method add a new if statement.
Refer to the screenshot to see what to do.

[Link]

15. Press "Compile"

16. Stay in SubtitleScript and look for GetClipLength

17. Right Click -> Edit Method and add a new if statement there

[Link]

18. Press "Compile".

19. Go to TaskWindowScript, at the very beginning in Start()


20. Do Right Click -> Edit Method and add icon and description for your task like
on the following screenshot !

[Link]

21. Still in TaskWindowScript, look for GenericCheck() and do the following step :

[Link]
[Link]

22. Again in TaskWindowScript, just under what you've just done, in


AltGenericCheck(), do the following step :

[Link]
[Link]

23. You want to get a special thing to complete the task ?


Go to TaskManagerScript and look for UpdateTaskStatus()

24. Right Click -> Edit Method and add a new if statement there :

[Link]

You can try writing an object you'd need to get, for example : Cigs, Soda, etc...
If the object isn't available or if you wrote it wrong, it'll appear in red.

Common questions

Powered by AI

To update TaskLineResponseType, locate the method in StudentScript, then right-click and edit it. You will need to add a new if statement as shown in the reference screenshot. This must align with the intended response type for the task being added. Once done, compile the updated method .

Saving all progress after each compile ensures that incremental changes are preserved and any successful compile steps are not lost. This approach mitigates risks arising from crashes or errors encountered in subsequent code modifications, maintaining a stable integration of changes .

In TaskWindowScript, editing the GenericCheck() method enables the incorporation of new task logic. You need to follow the provided steps from the reference image to ensure the method checks correctly for conditions related to the new task. This helps ensure the task behaves as intended under different scenarios .

Modifying the UpdateLabel method requires navigating to line 907 in SubtitleScript, where you should right-click and edit the method to include a new if statement as indicated in the reference screenshot. This ensures that the method correctly interprets the new TaskIDLine added to the SubtitleType class .

To customize the icon and description of a task, edit the TaskWindowScript's Start() method by right-clicking and adding the relevant icon and description as specified in the reference screenshot. This helps visually distinguish the new task .

To modify methods within the DialogueWheelScript, you need to open Assembly-CSharp.dll with DnSpy and navigate to DialogueWheelScript to find HideShadows(). Once located, right-click, select Edit Method, and add the required student in the if statement, ensuring the ID is replaced with the student's ID for the task. After making the adjustments, press 'Compile' to apply the changes .

Editing the AltGenericCheck() method involves inserting additional conditions directly after the changes made to the GenericCheck() method. This ensures secondary checks for task completion operate as desired and reflect the necessary validations for the new task .

To insert a new task into SubtitleType, scroll to the end of the SubtitleType class, right-click, and select Edit Class. Place a comma after CouncilToCounselor, skip a line, and paste TaskIDLine at the end, ensuring to replace 'ID' in TaskIDLine with the correct student ID for the task. Finish by pressing 'Compile' .

Modifying GetClipLength in SubtitleScript involves adding a new if statement to handle subtitling parameters for the new tasks. This ensures the subtitle timing and audio-visual mappings function appropriately, aligning with the newly introduced TaskIDLine parameters .

In TaskManagerScript, to ensure a custom object is recognized for completing a task, you locate and edit the UpdateTaskStatus() method. Add a new if statement to specify the object required, such as Cigs or Soda. If the object is entered incorrectly or isn't available, it will be highlighted in red, indicating an error .

You might also like