https://github.com/ttfh/tdll
Extended Teardown API - DLL
https://github.com/ttfh/tdll
dll-hooking lua teardowngame
Last synced: about 2 months ago
JSON representation
Extended Teardown API - DLL
- Host: GitHub
- URL: https://github.com/ttfh/tdll
- Owner: TTFH
- License: other
- Created: 2024-01-08T18:14:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-15T20:03:15.000Z (5 months ago)
- Last Synced: 2025-03-30T03:51:12.051Z (3 months ago)
- Topics: dll-hooking, lua, teardowngame
- Language: Lua
- Homepage:
- Size: 4.92 MB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TDLL
## Extended Teardown API - DLL> [!Caution]
> This DLL is compatible only with Teardown 1.6.2 Build 16602375 (released on December 4, 2024). It will stop working after the next game update. Ensure you remove it by verifying the game files on Steam after updating Teardown.### What it does:
- Provides a DLL that can be used to extend the Teardown API.
- Implements the functions listed below.### How to install:
Download the file `pros.sdk.x64.dll` and copy it into the Teardown directory, overwrite the existing file when prompted.### How to uninstall:
Verify the game files on Steam.
1. Open Steam.
2. Right-click Teardown in your library.
3. Select Properties > Installed Files > Verify Integrity of Game Files.### Dependencies:
ImGui Docking branch is requiered for compiling the DLL.> [!Tip]
> Check the `examples` folder to learn how to use the new functions.> [!Note]
> Press 'F1' on the pause menu or the editor to access the DLL options.> [!Warning]
> Some functions provided by this DLL are untested and may cause the game to crash or behave unpredictably.
> Please report any issues you encounter.## New API functions:
```lua
version = GetDllVersion()
Arguments
none
Return value
version (string) – Version of the DLLTick(index)
Arguments
index (number) – Index of the clock, between 0 and 15, default is 0 if not provided
Return value
none -- Starts a clockelapsed = Tock(index)
Arguments
index (number) – Index of the clock, between 0 and 15, default is 0 if not provided
Return value
elapsed (number) – Time elapsed since Tick was called in nanosecondshour, minute, second = GetSystemTime()
Arguments
none
Return value
hour (number) – Current hour
minute (number) – Current minute
second (number) – Current secondyear, month, day = GetSystemDate()
Arguments
none
Return value
year (number) – Current year
month (number) – Current month
day (number) – Current daystatus, response = HttpRequest(method, endpoint, headers, body, cookies)
Arguments
method (string) – HTTP method to use
endpoint (string) – URL to send the request
headers (table) – Table with headers to send
body (string) – Request body
cookies (string) – Filename where to store and read cookies from
Return value
status (number) – HTTP status code
response (string) – Response bodyid = HttpAsyncRequest(method, endpoint, headers, body)
Arguments
method (string) – HTTP method to use
endpoint (string) – URL to send the request
headers (table) – Table with headers to send
body (string) – Request body
Return value
id (number) – Request idresponses = FetchHttpResponses()
Arguments
none
Return value
responses (table) – Table with responses [{id, url, status, body}]width, height, pixels = LoadImagePixels(path)
Arguments
path (string) – Path to the image (relative to the game directory or absolute)
Return value
width (number) – Image width
height (number) – Image height
pixels (table) – Table with the image pixels [{r, g, b}]SaveImageToFile(path, width, height, pixels)
Arguments
path (string) – Path to save the image (relative to the game directory or absolute)
width (number) – Image width
height (number) – Image height
pixels (table) – Table with the image pixels [{r, g, b}]
Return value
noneSendDatagram(message)
Arguments
message (string) – Message to send
Return value
nonemessages = FetchDatagrams()
Arguments
none
Return value
messages (table) – Table with received messages. Note: outgoing messages are also includedscale = GetTimeScale()
Arguments
none
Return value
scale (number) – Current time scalesize = GetShadowVolumeSize()
Arguments
none
Return value
size (table) – Vector with the size of the shadow volumelist = GetBoundaryVertices()
Arguments
none
Return value
list (table) – Indexed table with vertices of the boundaryRemoveBoundary()
Arguments
none
Return value
noneSetBoundaryVertex(index, vertex)
Arguments
index (number) – Index of the vertex
vertex (table) – Vector with the new position of the vertex
Return value
noneragdoll = IsRagdoll(animator)
Arguments
animator (number) – Animator handle
Return value
ragdoll (bool) – If the animator is a ragdollcount = GetHeatCount()
Arguments
none
Return value
count (number) – Number of heats (blowtorch, AddHeat())shape, pos, amount = GetHeatInfo(index)
Arguments
index (number) – Index of the heat
Return value
shape (number) – Shape handle
pos (table) – Local position of the heat in voxels
amount (number) – Amount of heatSetSunLength(length)
Arguments
length (number) – Environment sun length
Return value
noneshape, pos = GetFireInfo(index)
Arguments
index (number) – Index of the fire
Return value
shape (number) – Shape handle
pos (table) – Local position of the fireSetJointStrength(joint, strength, size)
Arguments
joint (number) – Joint handle
strength (number) – Joint strength for detaching (default 3000)
size (number) – Joint distance for detaching (default 0.8)
Return value
nonelist = GetPaletteTintArray(palette, tint, strength)
Arguments
palette (number) – Palette index
tint (string) – Tint type ("black", "yellow", "rgba")
strength (number) – Tint strength (1 to 4)
Return value
list (table) – Array with the palette index asocition for each of the 255 indexesAllowInternalFunctions(script)
Arguments
script (number) – Script handle
Return valueSetVehicleMaxSteerAngle(vehicle, angle)
Arguments
vehicle (number) – Vehicle handle
angle (number) – Maximum steering angle in degrees (default 30)
Return value
nonepos, axis = GetJointLocalPosAndAxis(joint, index)
Arguments
joint (number) – Joint handle
index (number) – Index of the body (1 or 2)
Return value
pos (table) – Vector with the position of the joint relative to the index-th body
axis (table) – Vector with the axis of the joint relative to the index-th bodysize = GetJointSize(joint)
Arguments
joint (number) – Joint handle
Return value
size (number) – Joint sizecollide, sound, autodisable = GetJointParams(joint)
Arguments
joint (number) – Joint handle
Return value
collide (bool) – If the jointed bodies collide
sound (bool) – If the joint makes sound
autodisable (bool) – Whatever this doespos, rot = GetWaterTransform(water)
Arguments
water (number) – Water handle
Return value
transform (table) – Transform of the waterlist = GetWaterVertices(water)
Arguments
water (number) – Water handle
Return value
list (table) – Indexed table with vertices of the waterSetWaterVertex(water, index, vertex)
Arguments
water (number) – Water handle
index (number) – Index of the vertex
vertex (table) – Vector with the new position of the vertex
Return value
nonepath = GetScriptPath(script)
Arguments
script (number) – Script handle
Return value
path (string) – Path to the scripttransform = GetWheelTransform(wheel)
Arguments
wheel (number) – Wheel handle
Return value
transform (table) – Transform of the wheelSetWheelTransform(wheel, transform)
Arguments
wheel (number) – Wheel handle
transform (table) – Transform of the wheel
Return value
noneSetWheelRadius(wheel, radius)
Arguments
wheel (number) – Wheel handle
radius (number) – Radius of the wheel
Return value
nonelist = GetTriggerVertices(trigger)
Arguments
trigger (number) – Trigger handle
Return value
list (table) – Indexed table with the vertices of the triggerval1, val2 = GetLightSize(light)
Arguments
light (number) – Light handle
Return value
val1 (number) – Light radius or width
val2 (number) – Light length, angle or heighttype, r, g, b, a, reflectivity, shininess, metallic, emissive = GetPaletteMaterial(palette, index)
Arguments
palette (number) – Palette index
index (number) – Material index
Return value
type (string) – Type
red (number) – Red value
green (number) – Green value
blue (number) – Blue value
alpha (number) – Alpha value
reflectivity (number) – Range 0 to 1
shininess (number) – Range 0 to 1
metallic (number) – Range 0 to 1
emissive (number) – Range 0 to 32SetPaletteMaterialType(palette, index, type)
Arguments
palette (number) – Palette index
index (number) – Material index
type (string) – Material type
Return value
nonedensity = GetShapeDensity(shape)
Arguments
shape (number) – Shape handle
Return value
density (number) – Densitypalette = GetShapePaletteId(shape)
Arguments
shape (number) – Shape handle
Return value
palette (number) – Palette indexvoxels = GetShapeVoxelMatrix(shape)
Arguments
shape (number) – Shape handle
Return value
voxels (table) – Table with the voxel matrix [x][y][z]SetShapeScale(shape, scale)
Arguments
shape (number) – Shape handle
scale (number) – Scale
Return value
noneSetShapePalette(shape, palette)
Arguments
shape (number) – Shape handle
palette (number) – Palette index
Return value
noneHasCollision(shape)
Arguments
shape (number) – Shape handle
Return value
collision (bool) – If the shape has collisionSetCollision(shape, collision)
Arguments
shape (number) – Shape handle
collision (bool) – If the shape has collisiontexture, weight, blendTexture, blendTextureWeight = GetShapeTexture(shape)
Arguments
shape (number) – Shape handle
Return value
texture (number) – Texture index
weight (number) – Texture weight
blendTexture (number) – Blend texture index
blendTextureWeight (number) – Blend texture weightoffset = GetTextureOffset(shape)
Arguments
shape (number) – Shape handle
Return value
offset (table) – Vector with the texture offsetSetShapeTexture(shape, texture, weight, blendTexture, blendTextureWeight)
Arguments
shape (number) – Shape handle
texture (number) – Texture index
weight (number) – Texture weight
blendTexture (number) – Blend texture index
blendTextureWeight (number) – Blend texture weight
Return value
noneSetTextureOffset(shape, offset)
Arguments
shape (number) – Shape handle
offset (table) – Vector with the texture offset
Return value
noneSaveToFile(file, str)
Arguments
file (string) – File path
str (string) – String to save
Return valueZlibSaveCompressed(file, str)
Arguments
file (string) – File path
str (string) – String to compress
Return value
nonestr = ZlibLoadCompressed(file)
Arguments
file (string) – File path
Return value
str (string) – Decompressed string or nil if file does not exist
```## Internal functions:
```lua
ActivityAvailabilityChange
ActivityEnd
ActivityResume
ActivityStart
ActivityTerminate
CompleteAchievement
DeleteShape
FxEmitSmokeCPP
GetActionByButton
GetBodyHit
GetBodyHitsCount
GetButtonsByAction
GetClipboardText
GetDisplayCount
GetDisplayName
GetDisplayResolution
GetKeyByAction
GetLayoutActions
GetPlayerToolRecoil
GetShapeStrength
HasInputController
IndicateAchievementProgress
IsAchievementCompleted
IsBodyHitted
IsRunningOnApple
IsRunningOnEgs
IsRunningOnIOS
IsRunningOnMac
IsRunningOnPC
IsRunningOnPlaystation
IsRunningOnPlaystation5
IsRunningOnSteam
IsRunningOnSteamDeck
IsRunningOnSwitch
IsRunningOnXbox
IsRunningOnXboxS
IsRunningOnXboxX
PermitScreenRecord
ProhibitScreenRecord
ProsBrowseToQRLink
ProsHasActiveQRCode
ProsIsAccountLinked
ProsRequestQRCode
QueryLayerFilter
RadiolinkCheckConnectionCPP
RadiolinkDrawLinesCPP
ResumeLevel
RobotAimUpdateCPP
RobotFootStepCPP
RobotGetBodyParametersCPP
RobotGetTransformAndAxesCPP
RobotHoverGetUpCPP
RobotHoverUprightCPP
RobotProcessSamplesCPP
RobotRejectAllBodiesCPP
RobotRemoveTaggedJointsCPP
RobotSensorGetBlockedCPP
RobotSetBodyCollisionFilterCPP
RobotSetFootConstraintsCPP
SaveCameraOverrideTransform
SaveShape
SetClipboardText
SetPresence
SetRopeSlack
SetShapeStrength
SetVehicleEngineHealth
TornadoBodiesSuctionCPP
TornadoSpawnParticlesCPP
UiAddDrawObject
UiDislikeProsMod
UiDrawLater
UiForceMouse
UiGetModById
UiGetModsList
UiGetModsNumber
UiGetProsModAt
UiGetProsModNumber
UiGetProsModRange
UiLikeProsMod
UiLinkColor
UiRemoveDrawObject
UiRichTextSplitByWords
UiSelectProsMod
UiSelectedProsModInfo
UiSetProsModFilter
UiSubscribeToProsMod
UiTextToLower
UiTextToUpper
UiUnsubscribeFromProsMod
WatchBodyHit
WinddustSpawnParticlesCPP
explosionDebrisCPP
explosionSparksCPP
fireUpdateCPP
smokeUpdateCPP
trailUpdateCPP
```