Skip to content

Commit

Permalink
[GitHub Action] Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 13, 2024
1 parent e5ba3eb commit c3c5fab
Show file tree
Hide file tree
Showing 6 changed files with 251 additions and 313 deletions.
16 changes: 11 additions & 5 deletions docs/Mod-Creation/Assets/Character.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Character

[Rob's character template, called HenryTutorial](https://github.com/ArcPh1r3/HenryTutorial), is the recommended method of adding a custom survivor as it is the most up to date and involves the least amount of jank.
## Henry Tutorial
[Rob's character template, called HenryTutorial](https://github.com/ArcPh1r3/HenryTutorial), is the recommended method of adding a custom survivor as it is the most up to date, and most complete. It does its best to abstract as much as possible under the hood that you don't have to worry about.

## Thunderkit.
If you are more Unity-minded, and would like to get your hands dirty with the nitty gritty of creating characters, Thunderkit may be for you.
Currently, no such template like the Henry Tutorial exists for Thunderkit, but that isn't to say it is impossible. Reach out in the modding discord for help along the way.
- [See here](https://risk-of-thunder.github.io/R2Wiki/Mod-Creation/Unity-Editor-Usage/ThunderKit/Crash-Course-and-Getting-Started/) to get started with thunderkit.
- RoR2EditorKit has a wizard for easily creating a CharacterBody.
- Provided your Thunderkit Import went smoothly and you have RoR2EditorKit installed, go to the toolbar at the top, and hit `Tools/RoR2EditorKit/Wizards/Character Body`

[ThunderHenry](https://github.com/Vale-X/Thunderkit-Henry) is another template, which utilize Thunderkit, even though that template is mostly complete too, be warned though as most people who made a custom character used the regular HenryTutorial rather than this project, so getting help from other may be more difficult.
[ThunderHenry](https://github.com/Vale-X/Thunderkit-Henry) was a Thunderkit-oriented version of the henry template, but it is currently out of date. It does however, have a good wiki of general RoR2 information that applies to any character, which we have yet to move to this wiki.

## Before You Begin
If you are newer to modding, then I recommend that you start out just working on the skills before you work out anything relating to custom models or animations. Doesn't matter if your character is a commando clone, so long as they're fun to play.

To this end you should check out the [custom skills page on the wiki](https://risk-of-thunder.github.io/R2Wiki/Mod-Creation/Assets/Skills/) since this will give you a working template that's a little more simple to understand than the full character template.

It's a good place to start before you move on to a fully fledged character mod.

Additionally, if you have all of your skill states in their own .cs files, then when it's time to switch templates it will be as easy as dragging the files from one project to the other.

Another thing to note, rob uses a different method of asset bundle embedding than the [current recommended way, which is to just put the assets next to the .dll file (instead of embedding the assets directly in the .dll)](https://risk-of-thunder.github.io/R2Wiki/Mod-Creation/Assets/Loading-Assets/). If you are unfamiliar with loading from stream, then feel free to replace the entirety of the assets static class in robs template with the method that's on the wiki (just make sure to use the same variable names).
Additionally, if you have all of your skill states in their own .cs files, then when it's time to switch templates it will be as easy as dragging the files from one project to the other.

This file was deleted.

33 changes: 22 additions & 11 deletions docs/Mod-Creation/IDE/Visual-Studio/Post-Build-Events.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,22 @@ The language for these events is [Batch](https://en.wikipedia.org/wiki/Batch_fil

> If you are running into issues due to macros being empty. Feel free to hop into the discord and ask Paddywan or ping Harb. We'll share your pain and hopefully be able to tell you how to remedy it.
### Copy output DLL
## Copy output DLL
Most commonly used is the copy command to get your dll to where you want it.
```batch
copy <something> <somewhere>
::example
copy /Y "$(TargetPath)" "$(SolutionPath)Builds\"
```
Let's go over the arguments individually
* `copy` signifies a copy instruction. It takes two arguments: what to copy and where to copy it to.
* `/y` is a flag for the copy instruction to suppress the prompting if you want to overwrite the destination file.
* `"$(TargetPath)"` is a macro to the output dll produced by building the project. See **macros** at the end of the page.
* `"$(ProjectPath)Builds\"` is a folder named Builds right next to your `.sln` file. This is especially useful if you want to have folder containing all latest builds of your mods contained in your solution.
- `copy` signifies a copy instruction. It takes two arguments: what to copy and where to copy it to.
- `/y` is a flag for the copy instruction to suppress the prompting if you want to overwrite the destination file.
- `"$(TargetPath)"` is a macro to the output dll produced by building the project. See **macros** at the end of the page.
- `"$(ProjectPath)Builds\"` is a folder named Builds right next to your `.sln` file. This is especially useful if you want to have folder containing all latest builds of your mods contained in your solution.

### External Programs
Use `xcopy` to copy a folder if your mod requires multiple files.

## External Programs
If you have external files or programs you want to run, simply provide the absolute path to run it, followed by any arguments that you might need it.
```batch
[program] arg1 arg2 etc
Expand All @@ -42,7 +44,18 @@ del temp.txt
```
Afterwards you can use this variable in commands by using `%VARNAME%`, in the example's case, this would be `%COOLDLL%`.

### Conditionals
### UNetWeaver
Possibly the most common example of an external program would be the use of Unity's UNetWeaver for networking. [See this page](https://risk-of-thunder.github.io/R2Wiki/Mod-Creation/C%23-Programming/Networking/UNet/) to learn more.

If you are using a .bat file, make sure you `call` it before you perform other post build actions in your IDE, or the post build will for some reason stop at the .bat
```batch
call weaver.bat
copy /Y "$(TargetPath)" "$(SolutionPath)Builds\"
rem the rest of your commands
```

## Conditionals
Batch has `for, if` and probably more go google!
Batch does not have conditional operators, but there are some implementations for `or` and `and`

Expand All @@ -64,7 +77,7 @@ if %a% == 1 (
)
```

# Macros
## Macros
* `$(OutDir)` is the folder to which your dll is outputted. This path ends in a `\`.
* `$(ConfigurationName)` is the configuration under which you've chosen to build under. By default this is set to "Debug", and a "Release" configuration is available. **NOTE:** sometimes this does not work and you need to use `$(Configuration)` instead.
* `$(ProjectName)` is the name of your project.
Expand All @@ -77,6 +90,4 @@ if %a% == 1 (
* `$(SolutionFileName)` is the filename of your [solution](https://docs.microsoft.com/en-us/visualstudio/extensibility/internals/solutions-overview), which contains all your projects. this file usually ends in in `.sln`.
* `$(SolutionPath)` is the absolute path to your solution file. Ending in `.sln`.
* `$(SolutionName)` is your solution name, excluding the `.sln` part.
* `$(TargetExt)`, `$(ProjectExt)`, and `$(SolutionExt)` will likely be `.dll`, `.csproj`, and `.sln` respectively.


* `$(TargetExt)`, `$(ProjectExt)`, and `$(SolutionExt)` will likely be `.dll`, `.csproj`, and `.sln` respectively.
Loading

0 comments on commit c3c5fab

Please sign in to comment.