Hi Guys,
i just wanted to ask if there is any tutorial for how to use OxidePatcher (i already set it up)
It already lists the existing Hooks.
![]()
But what now?
What am i supposed to look for and and what i have to fill in to immigrate the new hook etc. etc. such an awesome tool but so many Questions![]()
Tutorial for Oxide Patcher?
Discussion in 'Hurtworld Development' started by Glumi Chan, May 14, 2016.
-
Wulf Community Admin
From where you are now:
- Look at each flagged hook and fix the placement by adjusting the index (if you aren't familiar with where it's supposed to go, this may be challenging)
- To add a new hook, browse the assembly you want to hook (ie. Assembly-CSharp) and find a location where you want to hook
- After you find the exact location you want, click "Hook this Method", then adjust the index, arguments, etc in the new view
- It will likely take a good bit of experimenting if you aren't familiar with how IL patching works
-
1. Maybe you have link where to read about "Indexing" or maybe explain what that is?
2. Can you maybe show up where for example you found existing Hooks?
like: "OnPlayerConnected" maybe i can learn from realised examples -
Wulf Community Admin
-
Okay on that "Index of line number in the IL" i go on with google
With example i mean: at some time your "OnPlayerConnected" didnt exist.. So you had to do the same with OxidePatcher or?
Where in the Assembly-CSharp(on the left side) you found that? -
Wulf Community Admin
-
And what was the Name of the Method in the Assembly?
-
Wulf Community Admin
-
Okay okay through JustDecompile it is way much easier and understandable.
But maaaaaaaybe if your nice to me () could you explain the Index.
"Number of Line in the IL" <-- This Sentence -
Wulf Community Admin
-
Yeah but Line Number of what?
The decompiled code and for what is "IL" the Shortword? -
Wulf Community Admin
-
I dont get what u mean with ne "Number of Line" of which line?
and whats "IL" -
Wulf Community Admin
Line numbers are shown on each line when viewing a hook's code or IL views in the patcher. -
To the Line thing...
Yeah i though about that too, but none of the existing Hooks-Index are matching with the Assembly Lines o:
How that happened? Cause the hooks already exists cause of your work :/ -
Wulf Community Admin
-
Hello back
i could not retrace what u did in your existing Oxide Mod.
Look you pointing to Index(Line): 21 in Assembly-CSharp.dll at GameManager for "OnPlayerDisconnected"
But when i use "JustDecompile" -> decompile "Assembly-CSharp.dll" -> GoTo "GameManager" -> Jump to Line 21
and there is only my Tickrate??
Im not sure if i already understood the Index :/
-
Wulf Community Admin
-
Okay now i see what u mean with "IL Viewer" etc. ^^
Sometimes you are picking "ret" (example: onPlayerDisconnected) and sometimes "IL_001a: starg.s clientName" (onPlayerConnected)
My Questions:
- What is the Difference
- On which Location i have to inject? (On the Returning part of a method?) -
Wulf Community Admin
If I knew the location of every hook you wanted to add, I might as well add them myself.