Jump to content

Untested Running System


Mimus

Recommended Posts

Running System

Sorry for my English, I use a translator.

 

Description

Simple system that allows running at the press of a button. The System was made on entities in general so we can easily imagine adding a check box on an npc to make it run.

 

Media:

028f0e02eb0cc7e83ac5c913dc57fa9e.gif

 

Git Patch:

Download

 

Layout for Keybinding

Place in "resources\gui\layouts\menu\OptionsWindow.json" and  "resources\gui\layouts\game\OptionsWindow.json"

after "ControlToggleGuiButton2" content.

Spoiler

"ControlRunningLabel": {
            "Bounds": "8,1003,28,16",
            "Padding": "0,0,0,0",
            "AlignmentEdgeDistances": "0,0,0,0",
            "AlignmentTransform": "0,0",
            "Margin": "0,0,0,0",
            "RenderColor": "255,255,255,255",
            "Alignments": "",
            "DrawBackground": true,
            "MinimumSize": "1,1",
            "MaximumSize": "4096,4096",
            "Disabled": false,
            "Hidden": false,
            "RestrictToParent": false,
            "MouseInputEnabled": false,
            "HideToolTip": false,
            "ToolTipBackground": null,
            "ToolTipFont": null,
            "ToolTipTextColor": "",
            "BackgroundTemplate": null,
            "TextColor": "255,255,255,255",
            "HoveredTextColor": "",
            "ClickedTextColor": "",
            "DisabledTextColor": "255,225,225,225",
            "TextAlign": "Left, Top",
            "TextPadding": "0,0,0,0",
            "AutoSizeToContents": true,
            "Font": "sourcesansproblack,10",
            "TextScale": 1.0
          },
          "ControlRunningButton1": {
            "Bounds": "181,998,120,28",
            "Padding": "3,3,3,3",
            "AlignmentEdgeDistances": "0,0,0,0",
            "AlignmentTransform": "0,0",
            "Margin": "0,0,0,0",
            "RenderColor": "255,255,255,255",
            "Alignments": "",
            "DrawBackground": true,
            "MinimumSize": "1,1",
            "MaximumSize": "4096,4096",
            "Disabled": false,
            "Hidden": false,
            "RestrictToParent": false,
            "MouseInputEnabled": true,
            "HideToolTip": false,
            "ToolTipBackground": null,
            "ToolTipFont": null,
            "ToolTipTextColor": "",
            "TextColor": "255,255,255,255",
            "HoveredTextColor": "255,255,255,255",
            "ClickedTextColor": "255,255,255,255",
            "DisabledTextColor": "255,255,255,255",
            "TextAlign": "Center",
            "TextPadding": "3,3,3,3",
            "AutoSizeToContents": false,
            "Font": "sourcesansproblack,10",
            "TextScale": 1.0,
            "NormalImage": "control_button.png",
            "HoveredImage": "control_button_hovered.png",
            "ClickedImage": "control_button_clicked.png",
            "DisabledImage": "",
            "CenterImage": false,
            "HoverSound": "octave-tap-resonant.wav",
            "MouseUpSound": "",
            "MouseDownSound": "octave-tap-warm.wav",
            "ClickSound": ""
          },
          "ControlRunningButton2": {
            "Bounds": "309,998,120,28",
            "Padding": "3,3,3,3",
            "AlignmentEdgeDistances": "0,0,0,0",
            "AlignmentTransform": "0,0",
            "Margin": "0,0,0,0",
            "RenderColor": "255,255,255,255",
            "Alignments": "",
            "DrawBackground": true,
            "MinimumSize": "1,1",
            "MaximumSize": "4096,4096",
            "Disabled": false,
            "Hidden": false,
            "RestrictToParent": false,
            "MouseInputEnabled": true,
            "HideToolTip": false,
            "ToolTipBackground": null,
            "ToolTipFont": null,
            "ToolTipTextColor": "",
            "TextColor": "255,255,255,255",
            "HoveredTextColor": "255,255,255,255",
            "ClickedTextColor": "255,255,255,255",
            "DisabledTextColor": "255,255,255,255",
            "TextAlign": "Center",
            "TextPadding": "3,3,3,3",
            "AutoSizeToContents": false,
            "Font": "sourcesansproblack,10",
            "TextScale": 1.0,
            "NormalImage": "control_button.png",
            "HoveredImage": "control_button_hovered.png",
            "ClickedImage": "control_button_clicked.png",
            "DisabledImage": "",
            "CenterImage": false,
            "HoverSound": "octave-tap-resonant.wav",
            "MouseUpSound": "",
            "MouseDownSound": "octave-tap-warm.wav",
            "ClickSound": ""
          }

 

 

Based On:

Version: 0.6.1.0

Link to comment
Share on other sites

1 minute ago, Weylon Santana said:

This modification is cool.

But a doubt, if the speed is already very high, or at most. Say 0.5s (500ms). Something that we set up in the server config, using the button to run would go even faster?

 

The code simply seems to reduce the time between each movement when sprinting.

So if you're already moving very fast, you'd simply end up twice as fast with this edit. (from a quick glance)

Link to comment
Share on other sites

Just now, Joyce said:

 

The code simply seems to reduce the time between each movement when sprinting.

So if you're already moving very fast, you'd simply end up twice as fast with this edit. (from a quick glance)

Ahh got it, I'm not a programmer, you know, so it's hard to understand the codes.

Link to comment
Share on other sites

Great feature mate, but is there a way to adjust the ratio of speed?

I've tried to divide the amount of time required to traverse 1 tile by 4 on both server and client, but the result is that my player is stuck on the same place.


 

Spoiler


c6f6d01f1059c8440c8f241cbf544886.png584e9989c8902b273ad378b7611feedc.gif

 

Link to comment
Share on other sites

It's a nice feature but when I use it, my character is running smoothly in the client where I logged it  but he's not running smoothly when I see him on a second client logged with a different account. Both clients are logged to a local server. 

 

Am I the only to whom this happens?

Link to comment
Share on other sites

  • 4 weeks later...

I did some work with the patch.

 

If you already have this patch and want to add running frames, download this patch.

If you don't have this patch and want to add running frames, download this one.

 

To add running sprite add "_run" at the end of your sprite name.

 

Spoiler

There is no more byte for bool too :7_sweat_smile:

 

Link to comment
Share on other sites

I tried this out with the new running animation. I noticed the FPS drop when going from stopped to walking or running and caused player to lag a bit. Any one else have this problem? Fps goes from 61 to 50 or below when I start to walk or run. 

Link to comment
Share on other sites

On 5/8/2020 at 1:54 AM, Justn said:

I tried this out with the new running animation. I noticed the FPS drop when going from stopped to walking or running and caused player to lag a bit. Any one else have this problem? Fps goes from 61 to 50 or below when I start to walk or run. 

I've done some tests and I noticed FPS drop when another client was doing something (not just walking or running, attacking too). However, the FPS drop is not related to the patch nor the running sprite feature since there are the same drops on the vanilla version of the official development branch.

Link to comment
Share on other sites

  • 5 weeks later...
On 5/2/2020 at 7:11 PM, Shenmue said:

I did some work with the patch.

 

If you already have this patch and want to add running frames, download this patch.

If you don't have this patch and want to add running frames, download this one.

 

To add running sprite add "_run" at the end of your sprite name.

 

  Hide contents

There is no more byte for bool too :7_sweat_smile:

 

I just try to install your patch on a clean 6.2 dev version and i have this error when i try to install the patch.

 

Any idea ?

 

Quote

error: patch failed: Intersect.Client/Entities/Player.cs:814
error: Intersect.Client/Entities/Player.cs: patch does not apply
error: patch failed: Intersect.Client/Entities/Player.cs:814
error: Intersect.Client/Entities/Player.cs: patch does not apply

 

Link to comment
Share on other sites

3 hours ago, Atsuya said:

I just try to install your patch on a clean 6.2 dev version and i have this error when i try to install the patch.

 

Any idea ?

 

Error like these can occur when:

1) The patch is not up to date with the code, which is probably the case

2) You are not on the correct branch or version of the branch to apply the patch. The post say it's based on 6.1, but it also worked on 6.2

3) You have modifications on your code that have conflicts with the patch. For example you changed a line of code used by the patch, or you applied another one. (Probably not your case if you are in a clean dev version)

 

I've made a tutorial on how to solve this kind of issues with Visual Studio. Link below:

Go to the tutorial

Link to comment
Share on other sites

10 hours ago, Atsuya said:

I just try to install your patch on a clean 6.2 dev version and i have this error when i try to install the patch.

 

Any idea ?

 

I just tested the mod and everything went well on my side. Maybe your dev branch is not up to date

Link to comment
Share on other sites

20 hours ago, Shenmue said:

 

I just tested the mod and everything went well on my side. Maybe your dev branch is not up to date

 

I have test it on the dev branch too, but i think i have apply the diagonal pach... have you got an idea to compile the two ?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...