#Runtime Netcode Patcher

1 messages ยท Page 1 of 1 (latest)

torn schooner
#

NetcodeValidator

  • The NetcodeValidator was cleaned up and restructured to more closely match the class it is effectively a wrapper for. This changes the api to require a call to netcodeValidator.PatchAll() now after initializing with new NetcodeValidator(this)
  • NetcodeValidator also now patches all methods immediately upon PatchAll() but waits until NetworkManager is Initialized each time to register custom named messages.
  • Patched all the NetworkBehaviour constructors to start a coroutine to yield until the NetworkObject.IsSpawned and then bind to said network object and update network properties. This mitigates having to add NetworkBehaviours before NetworkObject load.

FastBuffer Extensions

  • A large quantity of the data processing was moved to the respective extension methods. This is all internal but a large move in the right direction regardless.

RPC Changes

  • Big Changes: Parameter counts are now (theoretically) larger than we can discuss
  • You can now use System.Serializable (With an attribute [Serializable]) or INetworkSerializable (with inheritence) as parameters.

QoL

  • Large sections of code have been removed and reduced to improve readability.
devout gorge
#

@torn schooner can you elaborate more on the example provided. it seems incomplete

torn schooner
#

When did you check that

#

Then there isn't anything else to elaborate on? Besides maybe the AddToTerminalObject is incomplete

devout gorge
#

AddToTerminalObject is what i was referring to yea

torn schooner
#

Yeahhhh Idk why I didn't type it

#

But it's just __instance.gameObject.AddComponent<PluginNetworkingInstance>()

#

I fixed it and will push to include that line lol

#

I guess I just zonked out on that xD

#

๐Ÿ˜ฌ

devout gorge
#

all good lol

devout gorge
#

tried the example 1 to 1 and RunClientRpc() doesnt actually get called because isHost is always false

torn schooner
#

I'm assuming NetworkObjectId is valid or there would probably be an error

#

I'm pushing an update soon

#

I'm assuming it's because the NetworkManager is null so IsHost isn't assigned when I run the method ๐Ÿค”

#

I'll have to think about a solution while I finish these changes and implement it for 0.1.1

#

Adding a NetworkBehaviour to a NetworkObject at runtime is a workaround to how netcode wants it done

#

But tbf it should be valid if NetworkObject IsSpawned

torn schooner
#

That is 100% accurate

#

It's just getting those values to be accurate on your custom behaviour is difficult

devout gorge
#

thanks

torn schooner
#

It's what we're talking about lol

#

It might be a bit late @devout gorge but could you tell me if you get an error like this ?

devout gorge
#

chekcing logs

torn schooner
#

Hmm

#

Thanks for bringing this to my attention cuz upon further investigation the networkobject ref is null ๐Ÿค”

devout gorge
#

no error

#

but it was set to true

torn schooner
#

So inconsistent now?

devout gorge
#

just isHost is false

#

but .NetworkObject.NetworkManager.IsHost is true

torn schooner
#

Casn you do me a favor @devout gorge

#

Well nvm it's Terminal Start there too

#

Yea I hate to butr can you try this?

devout gorge
#

send it

torn schooner
#

I'm also in Terminal-Start as Prefix and I'm getting this log output

#

So IsHost is true for me, I'd like to see if 0.1.1 fixes your issue

#

I added a wait until the NetworkObject is valid so that might be what fixed it

#

But ^ seems redundant from my understanding ๐Ÿคทโ€โ™‚๏ธ

devout gorge
#

weirdly still false & true

torn schooner
#

What's the log output look like now?

#

W/ ids and what not

devout gorge
#

but yes its 0, 25 true

torn schooner
#

That is bizarre, why would it say it's true and then in the awake say its not

devout gorge
#

awake is executed before your log

#

could be the issue?

torn schooner
#

๐Ÿ˜ฎ

#

Whaaaa

#

Ye that's the issue then

#

Why does Awake get run before the construct of your type

#

How does that work

#

Omgggg

#

The networkobject isn't spawned in awake

#

BROOOOOO

#

Nah

#

Change your logging method from Awake to Start in your plugin

devout gorge
#

copy

torn schooner
#

Like that to Start

#

I'm waiting until NetworkObject.IsSpawned, which maybe I shouldn't do

#

Okay that's def the problem

devout gorge
torn schooner
#

I gotta run to the store for lunch but when I get back i will 100% fix that and wait until something that happens before awake

#

Cuz that's what's going on is I'm waiting for NetworkObject.IsSpawned

#

and clearly that won't fly

#

Cuz it runs wayyyyy too late

#

So glad we could track that down, tysm @devout gorge

#

That's a huge hel,p

devout gorge
#

np cant wait to fully utlize this and get my mod out finally lol

torn schooner
#

@devout gorge 0.1.8 should fix any of the issues you had previously. I also added a public method thisNetworkBehaviour.SyncWithNetworkObject() that you can run before calling any references to NetworkBehaviour properties if you run into any weird issues.

devout gorge
#

got some extra braincells in me time to try this again

devout gorge
#

still having the issue with isHost @torn schooner

#
[Warning: Unity Log] False```
torn schooner
#

You should get a log error just before Awake if it's null

devout gorge
torn schooner
#

If it's not then try .SyncWithNetworkObject just before those debug logs

#

Show load message

#

For runtime patcher

devout gorge
#

hmmm

#

i dont see it

torn schooner
#

The load messsage for the plugin?

devout gorge
#

let me disable everything else to make sure theres no conflicts

torn schooner
#

I'm gona push an update to make it 0.2.0 soon that's gonna change a thing you'll have to update

devout gorge
#

incase you wanna know what im using

torn schooner
#

So gimme like 5 secs

#

Then we'll get deep in there

devout gorge
#

oh im dumb

#

[Info : BepInEx] Loading [RuntimeNetcodeRPCValidator 0.1.8]

#

nothing else tho

torn schooner
#

Yea there was a logging error I'm afraid may also be affecting things

#

I'm not sure why it's not working tho tbf xD

#

I had consistent results before I pushed 0.1.8

devout gorge
#

your example is incorrect still btw

#
        public void SendPreferredNameServerRpc(string name) {
            Debug.Log(name);
            TellAllOtherClients(NetworkBehaviourExtensions.LastSenderId, name);
        }
        [ClientRpc]
        public void TellEveryoneClientRpc(ulong senderId, string name) {
            Debug.Log(StartOfRound.Instance.allPlayerScripts.First(playerController => playerController.actualClientId == senderId).playerUsername + " is now " + name);
        }
#

TellEveryoneClientRpc but is calling TellAllOtherClients

torn schooner
#

xD

devout gorge
#

anyone with half a braincell with notice it and fix it but just incase

torn schooner
#

Well thankfully before I'm pushing this update I'm finalizng my UnitTester plugin that will be in the repo along side it so examples should be build-ready going forward

#

And hopefully avoiding the issues w stuff not working ๐Ÿคฆโ€โ™‚๏ธ

devout gorge
#

๐Ÿ™

torn schooner
#

@devout gorge The only change you'll have to note on 0.2.0

#

PluginGUID instead of Plugin

devout gorge
#

alright

#

remeber i said i had some braincells

#

clearly i didnt

#

i forgot to readd the validator......

torn schooner
#

Like

#

erm

#

as a dependency? new netcodevalidator?

devout gorge
#

new netcodevalidator

torn schooner
#

Big memin

devout gorge
#

one thing tho

#

its registering the example rpcs

#

but not mine

torn schooner
#

Wdym?

#

do yours have the attribute and name suffix?

devout gorge
torn schooner
#

Ofc they do, you'r not dumb

#

Hmm

#

I cant think of a reason why

#

I'm stumped

devout gorge
#

wait

#

i think ik the issue

#

could be the staging shit

#

i removed the exampels and its still in the log lol

torn schooner
#

๐Ÿ˜ฌ i broke my new glow steps git repo on accident cuz idk what im doing xD

#

It's a struggle

devout gorge
#

code error causing build to not work and i didnt see it

#

and its True

#

nice

devout gorge
#

@torn schooner got a error when a non host player tried to trigger a rpc

#
[Error  : Unity Log] NotServerException: ConnectedClientIds should only be accessed on server.
Stack trace:
Unity.Netcode.NetworkManager.get_ConnectedClientsIds () (at <1b23ec5fcbfc4fbca0db70afcdb9b715>:0)
Unity.Netcode.CustomMessagingManager.SendNamedMessageToAll (System.String messageName, Unity.Netcode.FastBufferWriter messageStream, Unity.Netcode.NetworkDelivery networkDelivery) (at <1b23ec5fcbfc4fbca0db70afcdb9b715>:0)
RuntimeNetcodeRPCValidator.NetworkBehaviourExtensions.MethodPatchInternal (Unity.Netcode.NetworkBehaviour networkBehaviour, System.Reflection.MethodBase original, System.Object[] args) (at <16c204566f764b8f9c2a9a66ccf07b63>:0)
RuntimeNetcodeRPCValidator.NetworkBehaviourExtensions.MethodPatch (Unity.Netcode.NetworkBehaviour __instance, System.Reflection.MethodBase __originalMethod, System.Object[] __args) (at <16c204566f764b8f9c2a9a66ccf07b63>:0)
(wrapper dynamic-method) BunkbedRevive.BunkBedNetworking.DMD<BunkbedRevive.BunkBedNetworking::RevivePlayerClientRpc>(BunkbedRevive.BunkBedNetworking,int)
BunkbedRevive.BunkbedController.OnInteract () (at <3bd758e1b80c4ed38df9aa7eee6b0e06>:0)
BunkbedRevive.BunkbedController+<>c.<CreateTrigger>b__4_0 (GameNetcodeStuff.PlayerControllerB <p0>) (at <3bd758e1b80c4ed38df9aa7eee6b0e06>:0)
UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at <e27997765c1848b09d8073e5d642717a>:0)
UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at <e27997765c1848b09d8073e5d642717a>:0)
InteractTrigger.Interact (UnityEngine.Transform playerTransform) (at <44743d9474784365a095189c76175301>:0)
GameNetcodeStuff.PlayerControllerB.Interact_performed (UnityEngine.InputSystem.InputAction+CallbackContext context) (at <44743d9474784365a095189c76175301>:0)
UnityEngine.InputSystem.Utilities.DelegateHelpers.InvokeCallbacksSafe[TValue] (UnityEngine.InputSystem.Utilities.CallbackArray`1[System.Action`1[TValue]]& callbacks, TValue argument, System.String callbackName, System.Object context) (at <69a3ba35f0be43dc9f2827cb84fef646>:0)
UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)

[Error  : Unity Log] NotServerException while executing 'performed' callbacks of 'Movement/Interact[/Keyboard/e]'
torn schooner
#

A client is trying to call a serverrpc

#

You should look intently at your code @devout gorge

#

I reckon I should add a check to make the error message more clear

#

But ye SendNameMessageToAll is the server custom message handler send to clients call

#

Sorry I didn't see this sooner

devout gorge
#

maybe i got this wrong

#

how would i have a client send to all other clients then

torn schooner
#

Call a ServerRpc that then calls a ClientRpc

#

It's possible you've ogt it right

#

Ye no I double checked it seems you have a client calling a client rpc

#

Ye

#

You should call a ServerRpc

#

(That in theory does some checks for maliciousness idk xD)

#

Then call that RevivePlayerClientRpc

#

ClientRpc's really shouldn't be called unless you're inside a ServerRpc(Obviously the server) or you've checked you're on the server manually (By using if IsHost)

devout gorge
#

works 100%

torn schooner
#

^_^

#

Just finished the Testing plugin too, feeling confident to finalize and push 1.2.0 ๐Ÿ˜„

torn schooner
# torn schooner ### 0.1.8 - NuGet Allot of the updates up to 0.1.8 is getting all the github wor...

๐Ÿฅณ

v0.2.0

Changed

  • The final changes to the NetcodeValidator class occur w/ this update. This will be the final form, the only change on your end is a new NetcodeValidator(YourPluginGUID) instead of new NetcodeValidator(YourPlugin). This is to be more in line with how Harmony instances are handled and to make things easier on the back-end. This includes a few new methods listed below following the pattern of the Harmony class.
  • NetcodeValidator.Patch(Type type)
  • NetcodeValidator.Patch(Assembly assembly)
  • NetcodeValidator.PatchAll()
torn schooner
wintry plume
#

just realized, no license @torn schooner ?

torn schooner
#

Thanks, didn't notice @wintry plume Uploading releases now

wintry plume
#

only noticed cause I wanted to take a look at how you do error messages :)

torn schooner
# torn schooner ## 0.2.1 ### Changes - Improved error checking. - Unified text handling to impr...

0.2.2-5

Fixes

  • Fixed licensing thanks Xilo โค๏ธ

Changes

  • Major Readme overhaul with much better info ๐Ÿ˜„
  • NetworkBehaviours on Pre-Existing NetworkObjects now need manual binding. More on the github README

Removals

  • NetworkBehaviourExtensions.LastSenderId has been removed in favor of RpcParams.

Additions

  • Now fully supports ClientRpcParams & ServerRpcParams as the last parameter of your RPC, to the same specs as normal NGO
wintry plume
#

@torn schooner when you get the chance, would you be willing to look into adding your API to https://lethal.wiki?

This article goes into how to add to the wiki, and if you need any help (if you choose to add it to the wiki), just lmk

wanton lava
#

this is exactly what i was looking for, didn't want to go down the route of making a manager prefab for my networking

wintry plume
torn schooner
#

I'm happy too, perfect thing to do on my laptop, I'll definitely try and get it done today! I'm kinda swamped trying to help w/ networking problems ;~; its a bit slow going on this i3 hp laptop ๐Ÿคฃ

torn schooner
#

Erm

#

@wintry plume lol

#

Idk if I should put RNV on there

#

Unless we severely modify how it's presented atm

#

Cuz it's just gonna confuse people w/ 'Networking' being entirely @junior sails patcher

#

Then having a Runtime alternative too

#

๐Ÿคทโ€โ™‚๏ธ

wintry plume
#

isn't it more of an API than a dev tool? may be misunderstanding it

torn schooner
#

Evaisa's Netcode Weaver is compile time

#

Mine does the same

#

But at runtime

#

W/ Harmony

wintry plume
#

ah

#

okay

torn schooner
#

It adds some alternatives

#

Like ability to serialize System.SErialize

#

Not needing to do asset bundles

#

Etc.

#

So it has valid usages over Weaver

#

(It's allot easier to setup and use imo)

#

You dont need to compile you just add a dependency

#

And you dont need asset bundles and you can bind Behaviours to pre existing objects

#

So it's a bit more conducive to new modding

#

But ye

#

Unless the 'Networking' article is restrutured

#

Having another article on RNV

#

Might just confuse people to thinking they need both

#

(Which would be TERRIBLE)

#

Having both would be brokey af

wintry plume
#

the networking article can be restructured

torn schooner
#

I really do want it on there cuz the examples in my readme has been a headache to maintain

#

I need a nice wiki for it tbh

#

This is primo oppurtunity

#

But I also don't want to confuse people ;~:

wintry plume
torn schooner
#

Yeah, as long as you're cool with me proposing a restructure I can work on that

#

Allot of crossover ye

#

Just different "setups" for each I guess

#

(I've programmed RNV to do RPC checks and processing to be as close to the same as Netcode Patcher)

#

Even just added the XXXRpcParams handling so you can do that the same as NGO as well

#

I need to talk to Evaisa more

wintry plume
#

I say

  • adjust preface to include your runtime patcher
  • add section on "Why use RNV?"
  • make any slight differences on how RPC works at appropriate parts in "Creating the NetworkHandler" (and maybe restructure?)
  • separate "Spawning the Network Handler" to
  • Compile Patcher
  • Runtime Patcher
  • move last "Using Unity Netcode Patcher" to the compile patcher section

it's a lot, but I know both the article and VitePress in-and-out so I can definitely provide help on it

torn schooner
#

And get a bit more on the same page

#

But I think there's a mutual respect (hopefully lol)

#

The way I see the difference imo

wintry plume
torn schooner
#

If you're not going to use Assetbundles

#

You should probably just use RNV

#

Cuz otherwise you're going through a whole extra process when you could just throw in a dependency and bind to the terminal

wintry plume
#

I wrote the networking article so long ago with like 5 days work of networking knowledge, some of the stuff is just flat out wrong or needs to be changed to be more generalized

torn schooner
#

Oki, wish me luck โค๏ธ

wintry plume
#

like this

I recommend separating this script as far as possible from any patches to avoid potential errors through Unity. This can easily be done by not including/using any outside methods and variables in the script.

#

just wrong

#

no need to do that

torn schooner
#

Interesting

#

Well hopefully I won't have to change much, just generalizing :3

#

You're a knowledgable fella

wintry plume
torn schooner
#

Relatable

wintry plume
#

if you also want me to help you format your personal wiki I can also help (using vitepress, currently writing my api wiki in it)

slow osprey
#

I am making my mod of making a gym into the ship and I am trying to sync everything but i get an error

#
Stack trace:
RuntimeNetcodeRPCValidator.FastBufferExtensions.WriteMethodInfoAndParameters (Unity.Netcode.FastBufferWriter fastBufferWriter, System.Reflection.MethodBase methodInfo, System.Object[] args) (at <0df0f351a5d94cbb9af1af6290fbdcfa>:IL_00CF)
RuntimeNetcodeRPCValidator.NetworkBehaviourExtensions.MethodPatchInternal (Unity.Netcode.NetworkBehaviour networkBehaviour, System.Reflection.MethodBase method, System.Object[] args) (at <0df0f351a5d94cbb9af1af6290fbdcfa>:IL_00A5)
RuntimeNetcodeRPCValidator.NetworkBehaviourExtensions.MethodPatch (Unity.Netcode.NetworkBehaviour __instance, System.Reflection.MethodBase __originalMethod, System.Object[] __args) (at <0df0f351a5d94cbb9af1af6290fbdcfa>:IL_0000)
(wrapper dynamic-method) BenchPress.DMD<BenchPress::OnEnterServerRpc>(BenchPress,GameNetcodeStuff.PlayerControllerB)
BenchPress.OnEnter (GameNetcodeStuff.PlayerControllerB player) (at <966b5a204c05406e993ca03271e0b863>:IL_0017)
UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at <e27997765c1848b09d8073e5d642717a>:IL_0010)
UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at <e27997765c1848b09d8073e5d642717a>:IL_0025)
InteractTrigger+<specialInteractAnimation>d__61.MoveNext () (at <44743d9474784365a095189c76175301>:IL_0033)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e27997765c1848b09d8073e5d642717a>:IL_0026)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
InteractTrigger:Interact(Transform)
GameNetcodeStuff.PlayerControllerB:ClickHoldInteraction()
GameNetcodeStuff.PlayerControllerB:DMD<GameNetcodeStuff.PlayerControllerB::Update>(PlayerControllerB)
#

I have no idea how to fix this

#

Here are the rpcs with "playerInBench"

wintry plume
#

PlayerControllerB is not a serializable object, and there's not a method to easily serialize it since that happens during compile time;
try passing the playerClientId and get the player controller from that

slow osprey
#

ok thx

#

i will try that

torn schooner
#

Xilo
lol

#

Don't be so nice

#

xD

#

I wasn't gonna be shady or nuthin

#

But I did explain that in the readme

#

So I was gonna link it ๐Ÿ˜›

#

And the serialization article of NGO

slow osprey
#

ohh ok

#

i missed that lol

#

oops

torn schooner
#

Nw it's obscure, but the serialization article is nice

#

Espc if you've never set it up before

#

Lemme find it

#

Check that out @slow osprey

slow osprey
#

alr ill check that out

#

thx

torn schooner
#

But I wonder

wintry plume
torn schooner
#

Since you can serialize a NetworkBehaviourReference

#

You could maybe just cast the PlayerCOntrollerB to that

#

And then tryGet

wintry plume
#

oh hmm

torn schooner
#

and cast to PlayerControllerB

#

I think

wintry plume
#

actually yeah that's the method

torn schooner
#

I just serialize it to bytes

#

Just a slightly diff process than INetworkSerializable

#

That's the whole thing

#

For writing a Method identifier and it's parameters

wintry plume
#

I wasn't able to get writing to bytes to work for me (partially cause unity prims aren't serializable I think) as well as the ByteWritter isn't secure, so I went with json

torn schooner
#

the if (contains(INetworkSerializable)
else if (isSerializable is the dif

#

Sorry

#

Wrong

#

That's reading

#

That's writing

#

You can totz jack that code from FastBufferExtensions.cs on RNV git if you want @wintry plume

#

Lemme make sure license allows that

#

Pretty sure it did

#

If not we changing that bish

wintry plume
torn schooner
#

Hey

#

Don't pop my bubble

#

Wyd

wintry plume
#

just a heads up

#

that you created a security leak and people can run malicious code over your stuff :)

torn schooner
#

Except not really

#

You didn't read into the details of the article

#

Clickbaiter

wintry plume
#

im lazy

torn schooner
#

Worst case is a DoS

#

I.e. crash your shit

#

The preferred alternatives gives no alternative to serliazing out to a system serializable object

#

Cuz that's kinda not really security friendly anyways

#

But the real risk

#

Is that I'm writing a method name

#

But there's checks

#

SO it' should be fine

wintry plume
#

I clearly don't know enough about byteformmater or whatnot

#

still sticking with json though

#

cause it works

torn schooner
#

u use json?

#

Why not just use INetworkSerializable then

wintry plume
#

issue is that I only have 1 rpc for each (unless you can use INetworkSerializable object in an rpc, but I doubt)

#

also supports people just adding [Serializable] to their classes

torn schooner
#

INetworkSerializable are like for RPCs

#

I mean not really xD

#

But NGO does use them

#

RNV supports them

slow osprey
torn schooner
#

^_^

#

Xilo is genius

wintry plume
#

(self-promo)

torn schooner
#

Hey @wintry plume I'm workign on the article

#

I noticed you used nuget references to bepinex in the assemblies section

#

Do you care if I also suggest using @barren bones lethal gamelib?

wintry plume
#

sure

#

need to move over to using the gamelib anyways

torn schooner
#

<PackageReference Include="LethalCompany.GameLibs.Steam" Version="45.0.2-alpha.1"  PrivateAssets="all"/>
#

Nice

wintry plume
#

just interested

#

oh wait

#

I see

torn schooner
#

/dev/starting-a-mod

#

You also use UnityEngine.Modules

#

But that lacks some of the addon packages

#

Such as Netcode

#

and ofc LethalCompany specific stuff

#

But thankfully their GameLibs covers it ๐Ÿ˜„

wintry plume
#

oh

#

ye add it

torn schooner
#

Alright

#

@wintry plume

#

I'm removing System.Serializable

#

All it takes is one person to ruin it for everyone

#

One bad actor

wintry plume
#

me? :P

torn schooner
#

lol

#

i mean xD

#

You put it out there

#

GOt me reasearching

#

There's not allot

#

But i mean

#

Someone else gonna start digging now

#

Eventually someone will ruin it fs

#

Plus it really unifies it

#

Then it is just like NGO rpcs

#
  • you can bind to preexisting networkbehaviours
#

Easier for the docs too

wintry plume
#

yeah

torn schooner
#

Hehehehe I'm clever

#

@wintry plume

#

See the bold
"Unity Netcode Patcher" "Patching" "Unitys Netcode"
"Runtime Netcode Validator" Runtime" "Validation" "Netcode"

#

Ps that lookin nice and neutral?

#

Like I'm not biased af

#

All information eh

wintry plume
#

looks good EmployeeThumbsUp

torn schooner
#

Only problem is

#

Its like

#

Alright @wintry plume small pivot

wintry plume
#

I like pivoting

torn schooner
#

Just added some basic comments about how the snippet that's added works

torn schooner
#

@wintry plume

wintry plume
#

looks good

barren bone
junior sail
#

Oh, @torn schooner question, what happens when your thing is installed but a mod is already patched. I assume you account for that in some way?

torn schooner
#

Just woke up but kinda considering depreciating RNV ๐Ÿค”

torn schooner
#

@junior sail Do you know if the patching does anything to the DLL besides adding the [RuntimeInitializeOnLoad] __initializeVariables method (and the obv RPC modification

torn schooner
#

Runtime Netcode Tools

#

Discussing Upcoming Changes

With Weaver reaching full maturity, thanks to the hard work of @junior sail & @barren bone, I've found the actual patching part of this API to be a moot point. While my instinct is to ko the repo, it still has some significant value in the method NetcodeValidator::BindToPreExistingObjectByBehaviour<TCustomBehaviour, TNativeBehaviour>() so I will be marking the whole package as depreciated and transitioning to a generic module for the above mentioned purpose. Sorry for the changes but please check out the process of compile-time patching using NGO's IL Post Processing facilitated by Evaisa's Unity Netcode Patcher

junior sail
barren bone
#

moot* btw @torn schooner :)

barren bone
#

to keep having the best of both worlds

junior sail
#

so will do stuff to all of those

#

for the record i did not intend to push your solution out of the way, i can't say the patching part didn't feel slightly redundant to me but the development is cool.
The reason i asked that question is because i worried what happens when there was mods installed that used netcodepatcher, and mods that used your thingy for patching.

#

I do think there is value in a solution which makes the other parts easier, such as what you mentioned

barren bone
#

it doesn't do anything automatically

junior sail
#

ah that makes sense

#

in that case i don't see a reason to deprecate it shrug that was not my intention

#

i hate seeing cool projects get dropped, i never considered this a competition or anything

barren bone
#

ehm

#

not especially

#

๐Ÿ˜…

#

tbf it would be pretty perfectly suited to being added to lcapi

torn schooner
#

we should probably leave the depreciation message here ๐Ÿคทโ€โ™‚๏ธ

torn schooner
# torn schooner # Discussing Upcoming Changes With Weaver reaching full maturity, thanks to the ...

Discussing Upcoming Changes

With Weaver reaching full maturity, thanks to the hard work of @junior sail & @barren bone, I've found the actual patching part of this API to be a moot point. While my instinct is to ko the repo, it still has some significant value in the method NetcodeValidator::BindToPreExistingObjectByBehaviour<TCustomBehaviour, TNativeBehaviour>() so I will be marking the whole package as depreciated and transitioning to a generic module for the above mentioned purpose. Sorry for the changes but please check out the process of compile-time patching using NGO's IL Post Processing facilitated by Evaisa's Unity Netcode Patcher

barren bone
torn schooner
#

๐Ÿ˜ฌ

#

Discussing Upcoming Changes

With Weaver reaching full maturity, thanks to the hard work of @junior sail & @barren bone, I've found the actual patching part of this API to be a moot point. While my instinct is to ko the repo, it still has some significant value in the method NetcodeValidator::BindToPreExistingObjectByBehaviour<TCustomBehaviour, TNativeBehaviour>() so I will be marking the whole package as depreciated and transitioning to a generic module for the above mentioned purpose. Sorry for the changes but please check out the process of compile-time patching using NGO's IL Post Processing facilitated by Evaisa's Unity Netcode Patcher

devout gorge
torn schooner
#

Runtime Netcode Patcher

languid wagon
#

why ๐Ÿ˜ญ

torn schooner
#

@barren bone

#

Wdid

barren bone
#

Huh

torn schooner
#

Follow my train (heh just finished playing derail valley) of thought, right

#

I reckoned that Evaisa's thing pretty much covered all bases

#

But there have been some issues with my transfer process

#

And appar people are still using RNV, despite my attempts to depreciate

#

(Including More Emotes which is kinda big)

#

Twas a bit of a passion project

#

Maybe I shouldn't kill it?

barren bone
#

eba and I never wanted you to kill it

#

it's up to you what you do

#

it's a very cool thing

torn schooner
#

Ofc, I know no one does, I just hate being the source of so much confusion in the modding community

#

Thanks for the input โค๏ธ

barren bone
#

on a separate note @torn schooner , UNP now supports embedded debug symbols!

torn schooner
#

Wow that's a big step

#

Very nice

barren bone
#

it took some fuckn wrangling i'll tell u that lmao

#

also did u hear we broke the thunderstore decompiler

torn schooner
#

Oh reeeally?

barren bone
#

certain mods would fail to decomp on thunderstore after being netcode patched

torn schooner
#

Oh no

barren bone
#

I think because the IL code I was generating for the NetcodePatchedAttribute was completely invalid

#

so i've fixed that now

torn schooner
barren bone
torn schooner
#

L:ol

#

The page just says Nope

barren bone
#

(assuming they update their netcodepatcher... which they might not)

torn schooner
#

Source don't exist

junior sail
#

(Oh speaking of, @barren bone the problem with patching net 4.7.2 still consistently shows up, check #dev-general )

barren bone
#

i could try including polysharp?

junior sail
#

The biggest problem was naming scheme, with you calling your thing runtime netcode patcher

torn schooner
#

I'm honestly open to rebranding mine

#

I'm bad at names and gave it an accurate descriptor lmao

#

@barren bone for some reason the plugin info references for RNV don't get decompiled on thunderstore source either

junior sail
#

names are not my strong suit either

torn schooner
barren bone
#

U wanna VC?

#

actually dwai i can show u

torn schooner
#

If I'm gonna continue, I'd like to avoid confusion by supporting a user utilizing both UNP and RNV (for RNV features but also just avoid issues) by not patching already patched methods

barren bone
#

wait

#

attributetargets.class??

torn schooner
#

I can certainly check if the type contains a [RuntimeInitializeOnLoad] void __initializeVariables but that may not be the most robust way

barren bone
#

that's not right

torn schooner
#

Lol

barren bone
#

Basically

#

Check if the assembly has a custom attribute whose full name is [AssemblyName].NetcodePatcher.NetcodePatchedAssemblyAttribute

torn schooner
#

Ah ok

#

So you're injecting a new attribute in

#

and tagging the assembly

torn schooner
#

Where can I find these definitions @barren bone

junior sail
torn schooner
#

It seems it doesn't actually do anything to the INetworkSErializable

#

Sorry ye

#

Found it โค๏ธ

torn schooner
junior sail
torn schooner
#

Does some real chicanery w/ the INetworkMessage

torn schooner
#

@junior sail ?

junior sail
#

fine with me, tho might be a tad misleading as it does more than just validating no?

torn schooner
#

Tysm for the guidance

gray basin
river gale
#

who should i ask for bugs with RuntimeNetcodePatcher?
apparently NetworkObjectReference[] does not get marked as NetcodeSerializable and thorws an error

river gale
#

@torn schooner maybe as OP you know how to avoid it ๐Ÿค”

river gale
#

@barren bone apparently you are lordFire i did not know
have any idea about this problem? (#dev-general message - slient ping on suggestion from here)

wintry plume
river gale
#

๐Ÿ‘ then definitely lordfire to ask

barren bone
#

wassah

#

Runtime NetCode patcher is day's thing, like Xilo said

river gale
#

need to pass NetworkObjectReference[] to an Rpc as StartOfRound.SyncAlreadyHeldObjectsClientRpc does, but at runtime the Patcher complains it is not Serializzable

barren bone
#

and it's from a time where the compile time patcher was harder to use

river gale
#

do you have a link for the compile time one?

barren bone
#

recommend you

  • follow the 'prepare' steps
  • install the CLI
  • do the 'usage as post build target'
#

MSBuild would be great but it's broken rn

river gale
barren bone
#

not at all, go ahead

torn schooner
#

Deprecated