Reply To: Mafia 3 Modding (Mega Thread)

Download Mods for the Mafia Games Forums Mod Creation Mafia 3 Modding (Mega Thread) Reply To: Mafia 3 Modding (Mega Thread)

#163032
KNGR
Participant

I’m found interesting lua script inside scripts.sds (/scripts/common/base/game_structure_console.lua) with console commands. Here list :

  1. carpls(optional – vehicle_name) : Spawn a random car in front of the player. Optional vehicle name will spawn if valid.
  2. coverage : Toggles coverage across entire map on or off
  3. datastoreexist(variable_name optional – variable_group) : Returns true/false if the datastore variable exists in variable_group (CheckPointData if nil)
  4. deldatastore(variable_name optional – variable_group) : Deletes the datastore variable value from variable_group (CheckPointData if nil)
  5. disablespawner(spawner_id) : Disables activity spawner. WARNING: If the spawner is part of active plotline it may get enabled again in the next frame
  6. enablespawner(spawner_id) : Enables activity spawner. WARNING: If the spawner is part of active plotline it may get disabled again in the next frame
  7. printspawnercounts : Prints current spawner count for activities
  8. setupspawnercounts : Sets up spawner count for activitiesforcespawner(spawner_id) : Forces activity spawner. WARNING: If the spawner is part of active plotline it may get disabled again in the next
  9. frameforceretaliation(retaliation_quest_id) : Forces retaliation event. WARNING: If the quest is part of active plotline it may get disabled again in the next
  10. frameforceroamer(roamer_quest_id) : Forces roamer event. WARNING: If the quest is part of active plotline it may get disabled again in the next frame
  11. gsinitdone : Initiates gameplay scripts in freeeride
  12. finishquest(quest_id optional – outcome_id) : Finishes an available quest. If outcome id is not present default is used
  13. getdatastore(variable_name optional – variable_group) : Prints the datastore variable value from variable_group (CheckPointData if nil) group and returns it
  14. getqueststate(quest_id) : Prints the quest state and returns its value.
  15. givemoney : Adds 1000 money to the wallet
  16. givemoneystash(amount) : Adds amount money to the stash
  17. givemoneywallet(amount) : Adds amount money to the wallet
  18. giveperks : Gives 2 perks
  19. giverelays(amount) : Gives amount of relays
  20. giverp : Give 1 Respect Points
  21. givetp : Give 1 Transmitter Points
  22. givexp : Give 1000 Experience Points
  23. goto : Teleport the player to a location or entity (if valid). Ex.: goto(-15.35 24.1 -17.6) goto(‘spawn_point_wh_01’)
  24. gotosemi : Teleport the player to a location primarily used while in a semi-truck to handle the trailer correctly. Ex.: goto(-15.35 24.1 -17.6)
  25. isquestavailable(quest_id) : Prints the boolean value
  26. isquestfinished(quest_id) : Prints the boolean value
  27. isspawnerenabled(spawner_id) : Prints boolean value
  28. list: lists all user commands available entered through Viscript or game_structure_console.lua
  29. lockquest(quest_id) : Sets available quest as unavailable without finishing it. WARNING: If the quest is part of active plotline it may get unlocked again in the next frame
  30. removemoneystash(amount) : Removes ‘amount’ money from the stash
  31. removemoneywallet(amount) : Removes ‘amount’ money from the wallet
  32. setdatastore(variable_name variable_value optional – variable_group) : Sets the value to datastore variable in variable_group (CheckPointData if group is nil) group
  33. setqueststate(quest_id state) : Sets the quest state.
  34. sgdebug : toggles Spawn Group Debug on or off
  35. sgreport : triggers a status report from all active Spawn Groups
  36. stashmoney : Places money from wallet into stash
  37. teleport(x z) : Teleports player to set coordinates
  38. time(time_h) : Sets the game time to the specified hours. 0-24 can use fractional parts of hours.
  39. unlockquest(quest_id) : Sets the quest as available. WARNING: If the quest is part of active plotline it may get locked again in the next frame
  40. usercommands : lists all user commands available through viscript or hardcoded in game_structure_console.lua
  41. usercoms : lists all user commands available through viscript or hardcoded in game_structure_console.lua
  42. sitdownplayentry(entryID character) : forces a character in a sitdown to play a specific entry
  43. sitdownsetmood(mood character) : forces a character in a sitdown to use a specific animation mood (content neutral angry)
  44. revealwiretap : Shows icons of all wiretap nodes on map
  45. installwiretap(district) : installs all wiretap nodes in the given district
  46. unlockallweapons : unlocks all weapons in the mobile store
  47. unlockallvehicles : unlocks all vehicles in the vehicle delivery service
  48. unlockallservices : unlocks all services to their highest level
  49. thermset(amount) : Set the thermometer earn level for all three spokes to the value
  50. thermsetburke(amount) : Set the thermometer earn level for Burke to the value
  51. thermsetcass(amount) : Set the thermometer earn level for Cassandra to the value
  52. thermsetcassandra(amount) : Set the thermometer earn level for Cassandra to the value
  53. thermsetvito(amount) : Set the thermometer earn level for Vito to the value
  54. thermlist : List the current thermometer order

Now we need to find way for enable console ?

yeah, found them too

there are some more like:

NinjaMode
VoodooDoll
SkipTutorials
MissionTextDebug
TeleportPlayer
GiveTransmitterPoints
SpawnGroupDebug
SpawnGroupReport
GiveRespectPoints
GiveExperience
GiveMoney
GiveMoneyWallet
GiveMoneyStash
GiveRelays
Goto
GotoEntity
GotoPosition
GotoSemiTruck
SpawnCar
RemoveMoneyWallet
RemoveMoneyStash
StashMoney
GivePerks
SwitchCoverage

also these seem to be configured in:

/scripts/common/base/game_structure_console.lua

also:

game.console:BindConsoleCommand(key, command)
game.console:EnableBoundConsoleCommands()
game.console:AreBoundConsoleCommandsEnabled()
game.console:ToggleBoundCommands()