Editing Assembly-CSharp.dll in dnSpy
Editing Assembly-CSharp.dll in dnSpy
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 .