Skip to content

Commit

Permalink
Rename unity editor menu to IL_ClothColliders; update links in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Jul 3, 2020
1 parent 73003d6 commit a4927b5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Plugin for AI-Shoujo and HoneySelect2 that allows zipmods to easily add cloth ph

## How to use
1. Make sure that latest versions of BepInEx 5, [Modding API](https://github.com/IllusionMods/IllusionModdingAPI) and [BepisPlugins](https://github.com/IllusionMods/BepisPlugins) are installed, and your game is updated.
2. Download the latest release from [releases](https://github.com/ManlyMarco/AI_ClothColliders/releases).
2. Download the latest release from [releases](https://github.com/ManlyMarco/Illusion_ClothColliders/releases).
3. Extract the release to your game. The dll file should end up inside `Koikatu\BepInEx\plugins`.

## How to make my mod compatible
There's a full guide available [here](https://github.com/ManlyMarco/AI_ClothColliders/blob/master/AI_Cloth_Colliders_Tutorial.pdf). Below you can see a condensed version of this guide.
1. Get the [AI Shoujo Modding Tool](https://github.com/hooh-hooah/ModdingTool) and follow its readme to set up Unity Editor and open the project in it.
2. Open the Modding project opened in Unity Editor, and drop [this file](https://raw.githubusercontent.com/ManlyMarco/AI_ClothColliders/master/Unity%20Editor/ClothColliderInfoExportWindow.cs) inside the `Assets/Editor` folder. After a moment a new menu option should appear on the menu bar - AI_ClothColliders.
There's a full guide available [here](https://github.com/ManlyMarco/Illusion_ClothColliders/blob/master/AI_Cloth_Colliders_Tutorial.pdf). Below you can see a condensed version of this guide.
1. Get the [AIS/HS2 Modding Tool](https://github.com/hooh-hooah/ModdingTool) and follow its readme to set up Unity Editor and open the project in it.
2. Open the Modding project opened in Unity Editor, and drop [this file](https://raw.githubusercontent.com/ManlyMarco/Illusion_ClothColliders/master/Unity%20Editor/ClothColliderInfoExportWindow.cs) inside the `Assets/Editor` folder. After a moment a new menu option should appear on the menu bar - AI_ClothColliders.
3. Make sure you have one character in the current scene. Place your clothes on the character, and set up the Cloth components on the clothes and colliders on the character. You need to link the colliders to the Cloth components.
**Note:** You can apply colliders to only the Left bones (ending with _L), and then use menu option `AI_ClothColliders/Copy L colliders to R` to copy colliders to the right side.
4. After you are happy with how the colliders are set up, use menu option "AI_ClothColliders/Show cloth collider exporter window".
Expand All @@ -26,11 +26,9 @@ An example manifest.xml:
<name>TEST</name>
<version>v1.0</version>
<author>Test</author>
<description />
<website>https://github.com/ManlyMarco/AI_ClothColliders</website>
<game>AI Girl</game>
<website>https://github.com/ManlyMarco/Illusion_ClothColliders</website>
<!-- Metadata for the colliders -->
<AI_ClothColliders>
<ClothColliders>
<!-- First cloth with one collider -->
<cloth id="69" category="fo_top" clothName="test_cloth">
<CapsuleCollider boneName="cf_J_Kosi01_s" radius="1.00" center="0.00, 0.00, 0.00" height="2.50" direction="0" />
Expand All @@ -49,7 +47,7 @@ An example manifest.xml:
<CapsuleCollider boneName="cf_J_Kosi01_s" radius="0.75" center="0.00, -0.40, -0.30" height="2.80" direction="0" />
<CapsuleCollider boneName="cf_J_Spine03_s" radius="1.00" center="0.00, 0.00, 0.00" height="2.50" direction="0" />
</cloth>
</AI_ClothColliders>
</ClothColliders>
<!-- Metadata from other plugins -->
<AI_MaterialEditor>
...
Expand Down
12 changes: 6 additions & 6 deletions Unity Editor/ClothColliderInfoExportWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

/// <summary>
/// This is an Unity Editor script. To use it you need the correct version of Unity Editor for your game.
/// Place this file in Unity Editor project in Assets/Editor folder, then use the AI_ClothColliders menu.
/// Place this file in Unity Editor project in Assets/Editor folder, then use the IL_ClothColliders menu.
/// How to use:
/// 1 - Add the character model to the scene
/// 2 - Add colliders to the character model's body, only add them to the left bones (ending with _L)
/// 3 - Use menu option "AI_ClothColliders/Copy L colliders to R" to copy colliders to the right side, adjust if necessary
/// 4 - Use menu option "AI_ClothColliders/Show cloth collider exporter window" and paste the result to your manifest.xml for use with the AI_ClothColliders plugim.
/// 3 - Use menu option "IL_ClothColliders/Copy L colliders to R" to copy colliders to the right side, adjust if necessary
/// 4 - Use menu option "IL_ClothColliders/Show cloth collider exporter window" and paste the result to your manifest.xml for use with the IL_ClothColliders plugim.
/// Each cloth component is identified by its name, so you need to export each cloth component separately and then combine the exports into your zipmod's manifest.xml file.
/// </summary>
public class ClothColliderInfoExportWindow : EditorWindow
Expand All @@ -22,7 +22,7 @@ public class ClothColliderInfoExportWindow : EditorWindow
private int _currentId;
private string _export;

[MenuItem("AI_ClothColliders/Show cloth collider exporter window")]
[MenuItem("IL_ClothColliders/Show cloth collider exporter window")]
public static void ShowWindow()
{
var w = GetWindow(typeof(ClothColliderInfoExportWindow));
Expand Down Expand Up @@ -66,7 +66,7 @@ private XDocument ExportCloth()
var doc = new XDocument();
var root = new XElement("manifest");
doc.AddFirst(root);
var root2 = new XElement("AI_ClothColliders");
var root2 = new XElement("ClothColliders");
root.AddFirst(root2);
var clothRoot = new XElement("cloth");
clothRoot.SetAttributeValue("id", _currentId.ToString());
Expand Down Expand Up @@ -139,7 +139,7 @@ private enum CategoryNo
fo_shoes,
}

[MenuItem("AI_ClothColliders/Copy L colliders to R")]
[MenuItem("IL_ClothColliders/Copy L colliders to R")]
private static void CopyLtoR()
{
foreach (var collider in GameObject.FindObjectsOfType<Collider>())
Expand Down
2 changes: 1 addition & 1 deletion Unity Editor/FixClothPainting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class FixClothPainting
private static GameObject _savedSelection;
private static float _restoreSelectionTimer;

[MenuItem("AI_ClothColliders/Fix Collider", false, 100)]
[MenuItem("IL_ClothColliders/Fix cloth painting", false, 100)]
static void FixClothCollider()
{
if (Selection.activeGameObject != null)
Expand Down

0 comments on commit a4927b5

Please sign in to comment.