Skip to content

Commit

Permalink
v2.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
SchuhBaum committed Oct 4, 2023
1 parent 924c997 commit e487028
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 29 deletions.
8 changes: 5 additions & 3 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## SimplifiedMoveset
###### Version: 2.4.3
###### Version: 2.4.4

This is a mod for Rain World v1.9.

Expand All @@ -11,7 +11,7 @@ https://www.youtube.com/watch?v=Jp6UyUgoWB0

### Installation
0. Update Rain World to version 1.9 if needed.
1. Download the file `SimplifiedMoveset.zip` from [Releases](https://github.com/SchuhBaum/SimplifiedMoveset/releases/tag/v2.4.3).
1. Download the file `SimplifiedMoveset.zip` from [Releases](https://github.com/SchuhBaum/SimplifiedMoveset/releases/tag/v2.4.4).
2. Extract its content in the folder `[Steam]\SteamApps\common\Rain World\RainWorld_Data\StreamingAssets\mods`.
3. Start the game as normal. In the main menu select `Remix` and enable the mod.

Expand All @@ -26,12 +26,14 @@ There are two licenses available - MIT and Unlicense. You can choose which one y

### Changelog
#### (Rain World v1.9)
v2.4.3:
v2.4.4:
- (belly slide) Reduced the duration of the normal belly slide back to vanilla. The overall distance is unintentionally increased otherwise (like +20%). Not sure why since the speed is decreased and the same as the long belly slide. From what I tested the distance is as in vanilla now. I might need to double check later since this seems somewhat odd.
- (belly slide) Reduced the speed and increased the duration of the belly slide for Gourmand. This way it matches better with his rocket jump.
- (gourmand) Added this option. Enabled by default. Exhaust only when throwing spears. Stun creatures with rocket jumps. Slides, rocket jumps and rolls only stun and deal no damage.
- (belly slide) Increased the duration for Rivulet's belly slide slightly to better match vanilla's slide distance.
- (gourmand) Allow rocket jumps to deal damage if you have enough speed (similar to Option_Roll_2).
- (tube worm) Restored that wall jumps are priotized over using tube worms.
- (wall jump) Restored that inputs are buffered for 6 frames when pressing jump early.

v2.4.0:
- (crawl) Forgot to add an option check for the last change.
Expand Down
2 changes: 1 addition & 1 deletion SimplifiedMoveset/modinfo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "SimplifiedMoveset",
"name": "SimplifiedMoveset",
"version": "2.4.3",
"version": "2.4.4",
"authors": "SchuhBaum",
"description": "Various movement changes. The main idea is to remove or simplify timings, making it easier to perform advanced moves consistently.",
"requirements": [],
Expand Down
2 changes: 1 addition & 1 deletion SimplifiedMoveset/workshopdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Title": "SimplifiedMoveset",
"Description": "Various movement changes. The main idea is to remove or simplify timings, making it easier to perform advanced moves consistently.",
"ID": "SimplifiedMoveset",
"Version": "2.4.3",
"Version": "2.4.4",
"TargetGameVersion": "",
"Requirements": "",
"RequirementNames": "",
Expand Down
4 changes: 2 additions & 2 deletions SourceCode/MainMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

namespace SimplifiedMoveset;

[BepInPlugin("SimplifiedMoveset", "SimplifiedMoveset", "2.4.3")]
[BepInPlugin("SimplifiedMoveset", "SimplifiedMoveset", "2.4.4")]
public class MainMod : BaseUnityPlugin {
//
// meta data
//

public static readonly string mod_id = "SimplifiedMoveset";
public static readonly string author = "SchuhBaum";
public static readonly string version = "2.4.3";
public static readonly string version = "2.4.4";

//
// options
Expand Down
2 changes: 1 addition & 1 deletion SourceCode/MainModOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class MainModOptions : OptionInterface {

public static Configurable<bool> crouch_jump = main_mod_options.config.Bind("crouchJump", defaultValue: true, new ConfigurableInfo("Decreases charge time for super launch jumps.", null, "", "Crouch Jump"));
public static Configurable<bool> grab = main_mod_options.config.Bind("grab", defaultValue: false, new ConfigurableInfo("Grab dead large creatures only when crouching.", null, "", "Grab"));
public static Configurable<bool> gourmand = main_mod_options.config.Bind("gourmand", defaultValue: true, new ConfigurableInfo("Exhaust only when throwing spears. Stun creatures with rocket jumps. Slides, rocket jumps and rolls only stun and deal no damage.", null, "", "Gourmand"));
public static Configurable<bool> gourmand = main_mod_options.config.Bind("gourmand", defaultValue: true, new ConfigurableInfo("Exhaust only when throwing spears. Stun creatures with rocket jumps. Slides, slow rocket jumps and rolls only stun and deal no damage.", null, "", "Gourmand"));

public static Configurable<bool> roll_1 = main_mod_options.config.Bind("roll_1", defaultValue: true, new ConfigurableInfo("Rocket jumps from rolls have consistent height.", null, "", "Roll 1"));
public static Configurable<bool> roll_2 = main_mod_options.config.Bind("roll_2_", defaultValue: false, new ConfigurableInfo("When enabled, removes the ability to chain rolls from rocket jumps.", null, "", "Roll 2"));
Expand Down
29 changes: 14 additions & 15 deletions SourceCode/PlayerMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ internal static void On_Config_Changed() {
On.Player.UpdateBodyMode -= Player_UpdateBodyMode;

On.Player.UpdateMSC -= Player_UpdateMSC;
On.Player.WallJump -= Player_WallJump;
On.Player.Tongue.AutoAim -= Tongue_AutoAim;
On.Player.Tongue.Shoot -= Tongue_Shoot;

Expand Down Expand Up @@ -164,7 +163,6 @@ internal static void On_Config_Changed() {

if (Option_WallJump) {
On.Player.checkInput += Player_CheckInput; // input "buffer" for wall jumping
On.Player.WallJump += Player_WallJump;
}
}

Expand Down Expand Up @@ -1146,9 +1144,14 @@ public static bool WallJump(Player player, Player_Attached_Fields attached_field
return false;
}

if (player.input[0].x == 0 || direction > 0 == player.input[0].x > 0) {
player.simulateHoldJumpButton = 0;
return true;
}

// don't jump off the wall while climbing;
// x input direction == wall jump direction;
return player.input[0].x == 0 || direction > 0 == player.input[0].x > 0;
return false;
}

//
Expand Down Expand Up @@ -2043,11 +2046,10 @@ private static void IL_Player_UpdateBodyMode(ILContext context) { // Option_Craw

private static void IL_Player_WallJump(ILContext context) {
// LogAllInstructions(context);

ILCursor cursor = new(context);

cursor.Emit(OpCodes.Ldarg_0);
cursor.Emit(OpCodes.Ldarg_1);

cursor.EmitDelegate<Func<Player, int, bool>>((player, direction) => {
if (player.Get_Attached_Fields() is not Player_Attached_Fields attached_fields) return true;
return WallJump(player, attached_fields, direction);
Expand All @@ -2068,9 +2070,11 @@ private static void IL_Player_WallJump(ILContext context) {
private static void Player_CheckInput(On.Player.orig_checkInput orig, Player player) { // Option_WallJump
orig(player);

// does not conflict with vanilla code // simulateHoldJumpButton is used for crouch super jumps
// only used once: (this.input[0].jmp || this.simulateHoldJumpButton > 0) = true anyways
// simulateHoldJumpButton = 0 afterwards // set in WallJump()
// does not conflict with vanilla code; simulateHoldJumpButton is used for crouch
// super jumps and is only used once like this:
// (this.input[0].jmp || this.simulateHoldJumpButton > 0)
// this would be true anyways when spamming jump; reset simulateHoldJumpButton
// afterwards in WallJump();

if (player.bodyMode != BodyModeIndex.WallClimb) return;
if (player.simulateHoldJumpButton > 0) {
Expand All @@ -2085,6 +2089,8 @@ private static void Player_CheckInput(On.Player.orig_checkInput orig, Player pla
}

if (player.IsJumpPressed()) {
// 15 frames is the amount as you get for mid-air wall jumps; too many frames
// makes this somewhat awkward in some situations; 6 seems better;
player.simulateHoldJumpButton = 6;
}
}
Expand Down Expand Up @@ -2478,13 +2484,6 @@ private static void Player_UpdateMSC(On.Player.orig_UpdateMSC orig, Player playe
player.buoyancy = player.gravity;
}

private static void Player_WallJump(On.Player.orig_WallJump orig, Player player, int direction) {
orig(player, direction);

// not sure if this was required;
player.simulateHoldJumpButton = 0;
}

//
//
//
Expand Down
2 changes: 1 addition & 1 deletion SourceCode/SimplifiedMoveset.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net48</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>10.0</LangVersion>
<Version>2.4.3</Version>
<Version>2.4.4</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
19 changes: 14 additions & 5 deletions SourceCode/TubeWormMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,24 @@ private static void IL_TubeWorm_Update(ILContext context) { // Option_TubeWorm
// LogAllInstructions(context);
}

private static bool TubeWorm_JumpButton(On.TubeWorm.orig_JumpButton orig, TubeWorm tubeworm, Player player) { // Option_TubeWorm
bool vanilla_result = orig(tubeworm, player);
private static bool TubeWorm_JumpButton(On.TubeWorm.orig_JumpButton orig, TubeWorm tube_worm, Player player) { // Option_TubeWorm
bool vanilla_result = orig(tube_worm, player);
if (player.IsClimbingOnBeam() || player.CanWallJumpOrMidAirWallJump() || player.bodyMode == BodyModeIndex.CorridorClimb) {
tube_worm.useBool = false;
return player.IsJumpPressed();
}

if (player.IsClimbingOnBeam() || player.CanWallJumpOrMidAirWallJump() || player.bodyMode == BodyModeIndex.CorridorClimb) return player.IsJumpPressed();
if (player.shortcutDelay > 10) return player.IsJumpPressed();
if (player.shortcutDelay > 10) {
tube_worm.useBool = false;
return player.IsJumpPressed();
}
if (player.Get_Attached_Fields() is not Player_Attached_Fields attached_fields) return vanilla_result;

// prevents falling off beams and using tongue at the same time
if (attached_fields.dont_use_tubeworm_counter > 0) return player.IsJumpPressed();
if (attached_fields.dont_use_tubeworm_counter > 0) {
tube_worm.useBool = false;
return player.IsJumpPressed();
}
return vanilla_result;
}
}

0 comments on commit e487028

Please sign in to comment.