YimMenuV2 icon indicating copy to clipboard operation
YimMenuV2 copied to clipboard

[Request]: Add more funcs in the Lua Scripts section

Open PSWalloz opened this issue 3 months ago • 6 comments

Problem

No response

Solution

Sorry i dont know much about cheats, however i am thinking yall should remake the lua funcs or the funcs that yimmenu originally had which is the imgui stuff and add windows, a script called silent night is a great script and was supported on yimmenu (the original one) but not supported on this, here is the source of the silent night script https://github.com/SilentSalo/SilentNight/blob/main/Yim/Silent_Night_v0.0.5.lua

Reason

this would be really good for users who want to use silent night

Additional context

No response

Duplicate

  • [x] I confirm that issue isn't a duplicate.

!!!READ THIS!!! Recovery features

  • [x] I confirm that I'm not requesting a recovery feature

PSWalloz avatar Aug 28 '25 19:08 PSWalloz

The source of Silent Night does not help and your solution wouldn't make any difference on its own unless you write a compatibility layer for several things:

  1. This API is very different from the V1 API and both of them don't use luau (luau is Roblox's API): V1 uses Lua 5.4 and this uses LuaJIT which has some differences and some new extensions.
  2. Enhanced and Legacy are two different game versions. Even if both APIs were an exact copy of one another and using the same Lua version, Silent Night (or any script that uses anything other than stats and natives) still wouldn't work because, again, these are two different game versions.

The only solution is to wait for the API to be finished and rewrite that script or ask the dev if they would like to rewrite it.

xesdoog avatar Aug 30 '25 08:08 xesdoog

Enhanced and Legacy are two different game versions. Even if both APIs were an exact copy of one another and using the same Lua version, Silent Night (or any script that uses anything other than stats and natives) still wouldn't work because, again, these are two different game versions.

We can use signatures to find global|local indexes. ScrUpdate can already generate and find such signatures.

Here is an example of how it works in BadAPI:

local transition_state = Globals.FindPattern("transition_state", "fm_maintain_cloud_header_data", "62 ? ? ? 25 ? 57 ? ?", 1--[[offset]], 3 --[[num_bytes to read]])

event.register_handler("Draw", "Transition state", function ()
	if ImGui.Begin("Transition State") then
		ImGui.Text(tostring(transition_state:GetInt()))
	end
	ImGui.End()
end)

This should work on both legacy and enhanced, as well as after game updates, without changing the script.

tupoy-ya avatar Aug 30 '25 08:08 tupoy-ya

We can use signatures to find global|local indexes. ScrUpdate can already generate and find such signatures.

Yes I suppose that would be a good feature but wouldn't that introduce more bloat just for something that can be handled by Lua devs? Even if that gets added, other requests will be opened for other scripts that rely on for example memory patterns like most of Arthur's scripts. I'm not sure what the best approach would be but I think making this API at least close to the old one then letting the Lua devs handle cross-compatibility would be simpler. Instead of hard assigning globals/locals/ida patterns, they could place them in a table and update them themselves. That way they could write scripts that seamlessly work for both APIs.

xesdoog avatar Aug 30 '25 09:08 xesdoog

Yes I suppose that would be a good feature but wouldn't that introduce more bloat just for something that can be handled by Lua devs?

It shouldn't add too much bloat, we already have code for searching script patterns: https://github.com/YimMenu/YimMenuV2/blob/enhanced/src/game/gta/ScriptPointer.cpp I honestly think this is a better approach then hard coding global indexes, because with this method we can have scripts that work on multiple game versions as well as on both legacy and enhanced, without much effort from the script developer.

Even if that gets added, other requests will be opened for other scripts that rely on for example memory patterns like most of Arthur's scripts.

Not sure what you meant here, what requests are you talking about?

That way they could write scripts that seamlessly work for both APIs.

Pretty sure there will be a very small amount of scripts that will even try to be cross compatible.

tupoy-ya avatar Aug 30 '25 09:08 tupoy-ya

It shouldn't add too much bloat, we already have code for searching script patterns: https://github.com/YimMenu/YimMenuV2/blob/enhanced/src/game/gta/ScriptPointer.cpp I honestly think this is a better approach then hard coding global indexes, because with this method we can have scripts that work on multiple game versions as well as on both legacy and enhanced, without much effort from the script developer.

I was already going to add caching for globals and locals, but maybegreat said it was unnecessary: https://github.com/YimMenu/YimMenuV2/pull/211#discussion_r2051461649

ShinyWasabi avatar Aug 30 '25 14:08 ShinyWasabi

I really wanna play in public sessions but my game either crashes or put me back in an invite only when I do it how can I actually play online? With other people. Without hosting. Because no one joins I have FSL downloaded as well. I'm on Legacy.

lolnonexe202 avatar Aug 31 '25 23:08 lolnonexe202