Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
{
"version": "5.1.4",
"channel": "stable",
"changelog": ""
{
"version": "5.1.9",
"channel": "stable",
"changelog": "B-26: Option to disable fixer NPCs on streets. See CHANGELOG.md for full details."
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -629,9 +629,15 @@
},
"vehicle_add_to_traffic": {
"helperTitle": "Vehicle : Add to Traffic",
"helper": "This action will change vehicle as traffic",
"helper": "This action will change vehicle as traffic. Optional: min_speed, max_speed, cleartraffic, x/y/z (or position). Defaults: min_speed=1, max_speed=5, cleartraffic=true, position=0,0,0.",
"tag": "myvehiculetag",
"name": "vehicle_add_to_traffic"
"name": "vehicle_add_to_traffic",
"minspeed": 1,
"maxspeed": 5,
"cleartraffic": true,
"x": 0,
"y": 0,
"z": 0
},
"getSalaryFromCurrentRent": {
"helperTitle": "House : Get Salary from current place",
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
# Legacy files — DO NOT install these into the game

These two files were shipped in `mod/data/` in Cyberscript 5.1.4 and earlier.
They are **not loaded by any Cyberscript Lua code** — they exist only as
reference templates. Unfortunately, the old wiki instructed users (and some
downstream mod authors) to manually copy them into the game's
`r6/config/` directory, which caused the widespread **"F-key stops working
in quickhack / dialog / exit-vehicle"** bug:

- `inputUserMappings.xml` re-asserts `IK_F` as the binding for
`selectChoice`, `selectChoiceUI`, and `exitVehicle` in **17 places**,
overriding any user rebinding.
- `settings.lua` ships a complete CP2077 settings template that likewise
hard-codes `IK_F` defaults for those same actions.

## Why they were moved (B-06 / B-20 fix)

Moving them out of the active mod path (`mod/data/`) into
`mod/data/legacy/` prevents accidental installation and the resulting
key-binding conflict. The Cyberscript mod itself never reads either file —
verified by grepping every `*.lua` in `mod/modules/` and `mod/init.lua` for
references to `inputUserMappings.xml` / `data/settings.lua` (zero matches).

## What to do if you previously installed these files

1. Delete `bin/x64/plugins/cyber_engine_tweaks/mods/cyberscript/mod/data/inputUserMappings.xml`
if present (it is no longer shipped here).
2. Check your game's `r6/config/inputUserMappings.xml` — if you (or a mod
manager) copied the Cyberscript version there, restore the backup or
verify your quickhack/dialog/exit-vehicle keys in the game's Options →
Key Bindings screen.
3. Re-bind `selectChoice` / `selectChoiceUI` / `exitVehicle` in-game if
needed.

## Downstream mod authors

If your mod previously relied on reading `mod/data/settings.lua` directly
(none currently do, per the research report), please read your own copy of
the template from your mod's directory instead. The Cyberscript Lua runtime
does not and never did apply these settings to the game.

— Cyberscript CP2077 fork, bug-fix pass (B-06 / B-20)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
{
"_comment": "B-14 fix: Backward-compatibility alias map for Cyberscript interactions and menu options. v5.1.4 renamed default interactions and menu options, which silently broke downstream mods that referenced the old names. This file maps old names -> new names so legacy JSON actions continue to fire. Cyberscript loads this file at cache-build time and registers each old tag as an alias pointing at the new tag's cached data. To add your own aliases, add entries below (old name as key, new name as value). Both names will then resolve to the same cached interaction.",
"_format": "key = old interaction tag (string), value = new interaction tag (string)",
"_example": {
"old_interaction_name": "new_interaction_name",
"open_phone": "open_phone_menu"
},
"aliases": {
}
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,66 +2,128 @@ logme(10,"CyberMod: api module loaded")
cyberscript.module = cyberscript.module +1
local api = {}

-- B-13 fix: every public api.* entry point wraps the internal call in pcall
-- and logs the failure with enough context for downstream-mod authors to
-- debug spawn failures (GH #17 — dependent mods reported "no NPC spawns" with
-- no diagnostic). The api surface (argument count, return value) is unchanged
-- so existing downstream mods are not broken. Failures return nil; callers
-- that already check for nil continue to work; callers that ignored errors
-- now at least leave a trace in cyberscript.log.

function api.spawn(chara,appearance, tag, x, y ,z, spawnlevel, isprevention, isMPplayer, scriptlevel, isitem, rotation)

spawnNPC(chara,appearance, tag, x, y ,z, spawnlevel, isprevention, isMPplayer, scriptlevel, isitem, rotation)

local ok, err = pcall(function()
spawnNPC(chara,appearance, tag, x, y ,z, spawnlevel, isprevention, isMPplayer, scriptlevel, isitem, rotation)
end)
if not ok then
logme(1, "[Cyberscript API] api.spawn failed for chara=" .. tostring(chara) .. " tag=" .. tostring(tag) .. " err=" .. tostring(err))
end
end

function api.spawnVehicle(chara, appearance, tag, x, y ,z, spawnlevel, spawn_system ,isAV,from_behind,isMP,wait_for_vehicule, scriptlevel, wait_for_vehicle_second)



spawnVehicleV2(chara, appearance, tag, x, y ,z, spawnlevel, spawn_system ,isAV,from_behind,isMP,wait_for_vehicule, scriptlevel, wait_for_vehicle_second)



local ok, err = pcall(function()
spawnVehicleV2(chara, appearance, tag, x, y ,z, spawnlevel, spawn_system ,isAV,from_behind,isMP,wait_for_vehicule, scriptlevel, wait_for_vehicle_second)
end)
if not ok then
logme(1, "[Cyberscript API] api.spawnVehicle failed for chara=" .. tostring(chara) .. " tag=" .. tostring(tag) .. " err=" .. tostring(err))
end
end

function api.despawn(tag)

despawnEntity(tag)


local ok, err = pcall(function()
despawnEntity(tag)
end)
if not ok then
logme(1, "[Cyberscript API] api.despawn failed for tag=" .. tostring(tag) .. " err=" .. tostring(err))
end

end

function api.move(targetPuppet, targetPosition, targetDistance, movementType, v2)

MoveTo(targetPuppet, targetPosition, targetDistance, movementType, v2)


local ok, err = pcall(function()
MoveTo(targetPuppet, targetPosition, targetDistance, movementType, v2)
end)
if not ok then
logme(1, "[Cyberscript API] api.move failed err=" .. tostring(err))
end

end

function api.teleport(objlook, position, rotation, isplayer)

teleportTo(objlook, position, rotation, isplayer)


local ok, err = pcall(function()
teleportTo(objlook, position, rotation, isplayer)
end)
if not ok then
logme(1, "[Cyberscript API] api.teleport failed err=" .. tostring(err))
end

end

function api.getEntitybyTag(tag)

getEntityFromManager(tag)


local ok, result = pcall(function()
return getEntityFromManager(tag)
end)
if not ok then
logme(1, "[Cyberscript API] api.getEntitybyTag failed for tag=" .. tostring(tag) .. " err=" .. tostring(err))
return nil
end
return result

end

function api.runActionList(actionlist, tag, source,isquest,executortag,bypassMenu)

runActionList(actionlist, tag, source,isquest,executortag,bypassMenu)


local ok, err = pcall(function()
runActionList(actionlist, tag, source,isquest,executortag,bypassMenu)
end)
if not ok then
logme(1, "[Cyberscript API] api.runActionList failed for tag=" .. tostring(tag) .. " err=" .. tostring(err))
end

end

function api.checkTriggerRequirement(requirement,triggerlist)

checkTriggerRequirement(requirement,triggerlist)


local ok, result = pcall(function()
return checkTriggerRequirement(requirement,triggerlist)
end)
if not ok then
logme(1, "[Cyberscript API] api.checkTriggerRequirement failed err=" .. tostring(err))
return false
end
return result

end


function api.setVariable(tag,key,score)

setVariable(tag,key,score)


local ok, err = pcall(function()
setVariable(tag,key,score)
end)
if not ok then
logme(1, "[Cyberscript API] api.setVariable failed for tag=" .. tostring(tag) .. " key=" .. tostring(key) .. " err=" .. tostring(err))
end

end

function api.getVariableKey(tag,key)

getVariableKey(tag,key)


local ok, result = pcall(function()
return getVariableKey(tag,key)
end)
if not ok then
logme(1, "[Cyberscript API] api.getVariableKey failed for tag=" .. tostring(tag) .. " key=" .. tostring(key) .. " err=" .. tostring(err))
return nil
end
return result

end

return api
Loading