├── .github └── FUNDING.yml ├── LICENSE ├── README.md ├── changelog.txt ├── lua ├── DOC.MD ├── libs │ ├── v1 │ │ ├── README.txt │ │ └── live_editor.lua │ └── v2 │ │ ├── imports │ │ ├── aardvark │ │ │ └── aardvark_manager.lua │ │ ├── career_mode │ │ │ ├── FCECareerModeUserManager.lua │ │ │ ├── consts.lua │ │ │ ├── enums.lua │ │ │ ├── helpers.lua │ │ │ └── managers.lua │ │ ├── core │ │ │ ├── common.lua │ │ │ ├── consts.lua │ │ │ ├── date.lua │ │ │ ├── live_editor.lua │ │ │ ├── logger.lua │ │ │ ├── managers │ │ │ │ └── players_manager.lua │ │ │ ├── memory.lua │ │ │ └── player.lua │ │ ├── external │ │ │ └── json.lua │ │ ├── gameplay │ │ │ └── gp_attribulator_manager.lua │ │ ├── other │ │ │ ├── consts.lua │ │ │ ├── helpers.lua │ │ │ └── playstyles_enum.lua │ │ ├── services │ │ │ └── enums.lua │ │ └── t3db │ │ │ ├── db.lua │ │ │ ├── field.lua │ │ │ └── table.lua │ │ ├── main.lua │ │ ├── temp_doc_draft.md │ │ └── tests │ │ ├── aardvark_manager_test.lua │ │ ├── event_handlers_test.lua │ │ ├── plugins.lua │ │ ├── t3db.lua │ │ ├── tests.lua │ │ └── timing.lua └── scripts │ ├── 1ovr_99pot.lua │ ├── 99ovr_99pot.lua │ ├── 99ovr_99pot_in_given_team.lua │ ├── 99pot_in_given_team.lua │ ├── auto_import_gameplay.lua │ ├── auto_max_user_team_fitness.lua │ ├── auto_max_user_team_form.lua │ ├── auto_max_user_team_form_morale_sharpness.lua │ ├── auto_max_user_team_morale.lua │ ├── auto_max_user_team_sharpness.lua │ ├── auto_max_vpro_fitness.lua │ ├── custom_headassetid_to_playerid.lua │ ├── custom_tattoos_to_playerid.lua │ ├── delete_generated_players.lua │ ├── export_season_stats.lua │ ├── export_transfer_history.lua │ ├── extend_cpu_players_contracts.lua │ ├── extend_user_team_players_contracts.lua │ ├── find_teams_no_gk.lua │ ├── fix_players_headmodels.lua │ ├── fix_vpro_nationality.lua │ ├── generate_minifaces.lua │ ├── generate_minifaces_for_players_with_realface.lua │ ├── generate_minifaces_user_team.lua │ ├── import_legend_player_from_csv.lua │ ├── is_retiring=0.lua │ ├── is_retiring=1.lua │ ├── list_players.lua │ ├── mass_edit_age.lua │ ├── mass_edit_age_linearly.lua │ ├── mass_edit_squadrole.lua │ ├── medium_socklenghtcode.lua │ ├── modifier=0.lua │ ├── pap_all_playstyles.lua │ ├── print_team_jersey_numbers.lua │ ├── small_squad_find.lua │ ├── terminate_player_loans.lua │ ├── track_cm_events.lua │ ├── unlock_boots.lua │ ├── unlock_mgr_clothes.lua │ ├── untuck_shirts.lua │ ├── vpro_99ovr.lua │ └── vpro_always_starter.lua └── mods ├── Coaches ├── Coaches.zip └── README.md ├── Extended Player and Manager Editor ├── Extended Player and Manager Editor.zip └── README.md ├── Increased PCM Level Cap ├── Increased PCM Level Cap.zip └── README.md ├── More Stupid Transfers ├── More Stupid Transfers.zip └── README.md └── Quicksim Settings ├── Quicksim Settings.zip └── README.md /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: xAranaktu 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Welcome to the FC 24 Live Editor! 2 | 3 | - [Changes in latest version of the tool](https://raw.githubusercontent.com/xAranaktu/FC-24-Live-Editor/main/changelog.txt) 4 | - [FC 24 Live Editor & Cheat Table Release Schedule](https://bit.ly/FC-24-Release-Schedule) 5 | - Check [WIKI](https://github.com/xAranaktu/FC-24-Live-Editor/wiki) for Guides and Tutorials 6 | 7 | My plans for Live Editor is to make all in one tool. 8 | It's dedicated for single player manager career mode, but there are some dedicated features for player career mode too. 9 | Modding, editing game memory, editing database, API for developers and many other features that you never dreamed about. 10 | 11 | ### Before you pledge on Patreon/buy the game 12 | The game is protected with EA Anticheat. Using the tool may flag your account and EA may ban it later on. 13 | You are using the tool at your own risk. 14 | 15 | - This tool doesn't work online. You won't be able to connect with EA servers while using it. This is intended, and won't be "fixed". 16 | - I can't guarantee for how long the tool will be working. EA may update the game at any time and since then it may be not possible to update the Live Editor to make it compatible with latest game update. 17 | 18 | 19 | For now this tool allows you to: 20 | - Mod almost **all** legacy files (add or replace) 21 | - Edit Players 22 | - Edit Database (only tables that are part of the squadfile) 23 | 24 | If you don't know how to use tool, Check [Getting Started](https://github.com/xAranaktu/FC-24-Live-Editor/wiki/Getting-Started) Guide, [FAQ](https://github.com/xAranaktu/FC-24-Live-Editor/wiki/Frequently-asked-questions) and tutorials on the sidebar. 25 | 26 | *** 27 | 28 | ![](https://i.imgur.com/4X2JzEg.jpeg) 29 | ![](https://i.imgur.com/xu0orZX.png) 30 | ![](https://i.imgur.com/dNWUhPO.png) 31 | ![](https://i.imgur.com/dbE6MGl.png) 32 | ![](https://i.imgur.com/lfH1mJ9.png) 33 | ![](https://i.imgur.com/GMaAe90.png) 34 | ![](https://i.imgur.com/9CBJXTi.png) 35 | ![](https://i.imgur.com/nWeZ65H.png) -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | v24.1.1.9: 2 | - Work with Title Update 18.2 3 | 4 | v24.1.1.8: 5 | - Game Activation Window should not appear anymore. 6 | 7 | v24.1.1.7: 8 | - Work with Title Update 15.1 9 | 10 | v24.1.1.6: 11 | - Fixed game crash when trying to open Players/Teams 12 | - Fixed youth player minifaces not being shown in player editor 13 | - Fixed transfer bans being wiped when checking transfer history (Thanks torinarg for finding where the issue is) 14 | 15 | v24.1.1.5: 16 | - It's now possible to connect to EA servers and download squadfiles when playing with live editor (no, you can't use LE in FUT) 17 | - Replaced some of the messageboxes with notifications. 18 | - Added "Aardvark Editor" 19 | - Added some missing bodytypecodes to option picker 20 | - Added option to filter players by their playstyles 21 | - Added "Is Presigned" column to transfer history 22 | - Fixed disappearing entries from transfer history when attempting to undo transfer for player with presigned contract 23 | 24 | v24.1.1.4: 25 | - Work with Title Update 8 26 | 27 | v24.1.1.3: 28 | - Added Gameplay Attribulator Editor 29 | - Work with Title Update 7 30 | 31 | v24.1.1.2: 32 | - Work with Title Update 6 33 | 34 | v24.1.1.1: 35 | - Added "lua_autorun" folder to "C:\FC 24 Live Editor\mods". You can put there your lua scripts which will be executed when you start the game. 36 | - Added 10 new lua scripts (auto_max_user_team_fitness, auto_max_vpro_fitness, vpro_always_starter and a few more ported from Cheat Table) 37 | - Game "Advanced Launch Options" can be now set in Live Editor settings 38 | - It's now possible to change manager name in already started career save. 39 | - Fixed game crash occurring when loading some large modified legacy files (for example overlays above 2MB). 40 | 41 | v24.1.1.0: 42 | - Added 7 hidden traits (aka playstyles) to player editor. (Thanks to tokke001) 43 | - Creating job offer will now immediately spawn new offer to your inbox. You don't need to wait a few days till it arrive now. 44 | - It's now possible to generate miniface for VPRO 45 | - It's now possible to import miniface for VPRO (must be 256x256 PNG!) 46 | - Fixed game crashes after saving changes in team editor and proceeding to match 47 | 48 | v24.1.0.9: 49 | - Fixed game crash on load career save when in-game language is other than English 50 | - Fixed game crash occuring on attempt to loan player with the tool. 51 | - Fixed miniface generator capturing goalkeepers with their team home jersey instead of gk jersey. 52 | - Fixed issue which caused some legacy files not show in "File Browser" (around 100 of them, like youth_scout.ini). Now the number of legacy files found by LE should match with what FIFA Editor Tool show. 53 | 54 | v24.1.0.8: 55 | - Launcher will now display your game title update. 56 | - Updated bodytypecodes 57 | - Added to Players Editor: 58 | - Other -> Team selection bias 59 | - Other -> Team selection bias position 60 | - Added to Formation Editor: 61 | - Freeze Lineup 62 | 63 | v24.1.0.7: 64 | - Fixed Perfect Timed Shot 65 | - Added Formation Editor 66 | 67 | v24.1.0.6: 68 | - Fixes in "vpro_99ovr.lua" script: 69 | - Script shouldn't overwrite player nationality anymore 70 | - Attributes shouldn't reset after training session anymore 71 | - Now you can permanently change player nationality by changing it in player editor 72 | 73 | v24.1.0.5: 74 | - Added "Potential" column in "Transfer History" 75 | - Fixed "Unsackable" 76 | 77 | v24.1.0.4: 78 | - Added "Transfer History" 79 | - Added "Transfer Bans" 80 | - Added option to assign playstyles to "vpro_99ovr.lua" script 81 | 82 | v24.1.0.3: 83 | - Work with Title Update 2 84 | 85 | v24.1.0.2: 86 | - Fixed Perfect Timed Shot 87 | - Fixed crash when saving changes in team editor (also diabled formation editor and transfer bans for now) 88 | 89 | v24.1.0.1: 90 | - Added Aerial playstyle to player editor 91 | - Fixed: 92 | - Misc Featrues -> GTN -> Reveal Player Data 93 | 94 | v24.1.0.0: 95 | - First working version. 96 | -------------------------------------------------------------------------------- /lua/libs/v1/README.txt: -------------------------------------------------------------------------------- 1 | Old Lua API. 2 | Please, use v2 -------------------------------------------------------------------------------- /lua/libs/v1/live_editor.lua: -------------------------------------------------------------------------------- 1 | --- Main live editor lib 2 | --- Documentation in -> DOC.MD 3 | 4 | Log("Init LIVE EDITOR LUA API V1") 5 | 6 | function DeleteDBTableRow(table_name, row) 7 | local addr = "0" 8 | for k,v in pairs(row) do 9 | addr = row[k].addr 10 | break 11 | end 12 | return DeleteDBTableRowByAddr(table_name, addr) 13 | end 14 | 15 | --- TransferPlayer(20801, 1794, 500, 600, 60) 16 | --- TransferPlayer(188567, 7, 500000000, 600000, 60) 17 | --- TransferPlayer(158023, 1, 500000000, 600000, 60) 18 | function TransferPlayer(playerid, to_teamid, transfersum, wage, contract_length, from_teamid, release_clause) 19 | cTransferPlayer(playerid, from_teamid or 0, to_teamid, transfersum, release_clause or -1, wage, contract_length) 20 | end 21 | 22 | --- LoanPlayer(20801, 241, 12, -1) 23 | --- LoanPlayer(158023, 11, 12, -1) 24 | 25 | function LoanPlayer(playerid, to_teamid, loan_length, loantobuy, from_teamid) 26 | cLoanPlayer(playerid, from_teamid or 0, to_teamid, loan_length, loantobuy) 27 | end 28 | 29 | function ReleasePlayerFromTeam(playerid) 30 | player_teamid = GetTeamIdFromPlayerId(playerid) 31 | free_agents_teamid = 111592 32 | cTransferPlayer(playerid, player_teamid, free_agents_teamid, 0, 0, 0, 12) 33 | end 34 | 35 | function IsPlayerTransferListed(playerid, teamid) 36 | return cIsPlayerTransferListed(playerid, teamid or 0) 37 | end 38 | 39 | function IsPlayerLoanListed(playerid, teamid) 40 | return cIsPlayerLoanListed(playerid, teamid or 0) 41 | end 42 | 43 | function AddPlayerToTransferList(playerid, teamid) 44 | cAddPlayerToTransferList(playerid, teamid or 0) 45 | end 46 | 47 | function AddPlayerToLoanList(playerid, teamid) 48 | cAddPlayerToLoanList(playerid, teamid or 0) 49 | end 50 | 51 | function RemovePlayerFromLoanList(playerid, teamid) 52 | cRemovePlayerFromLoanList(playerid, teamid or 0) 53 | end 54 | 55 | function RemovePlayerFromTransferList(playerid, teamid) 56 | cRemovePlayerFromTransferList(playerid, teamid or 0) 57 | end 58 | 59 | function RemovePlayerFromLists(playerid, teamid) 60 | cRemovePlayerFromLists(playerid, teamid or 0) 61 | end 62 | 63 | --- DEPRECATED 64 | -- Current not doing anything, keep for the compatiblity with old scripts 65 | function ReloadDB() 66 | end 67 | function ReloadPlayersManager() 68 | end 69 | -------------------------------------------------------------------------------- /lua/libs/v2/imports/aardvark/aardvark_manager.lua: -------------------------------------------------------------------------------- 1 | local AardvarkManager = {} 2 | 3 | function AardvarkManager:new() 4 | local o = setmetatable({}, self) 5 | 6 | -- lua metatable 7 | self.__index = self 8 | self.__name = "AardvarkManager" 9 | 10 | return o 11 | end 12 | 13 | function AardvarkManager:SetInt(key, value) 14 | AardvarkSetInt(key, value) 15 | end 16 | 17 | function AardvarkManager:SetFloat(key, value) 18 | AardvarkSetFloat(key, value) 19 | end 20 | 21 | function AardvarkManager:SetString(key, value) 22 | AardvarkSetString(key, value) 23 | end 24 | 25 | function AardvarkManager:GetInt(key) 26 | return AardvarkGetInt(key) 27 | end 28 | 29 | function AardvarkManager:GetFloat(key) 30 | return AardvarkGetFloat(key) 31 | end 32 | 33 | function AardvarkManager:GetString(key) 34 | return AardvarkGetString(key) 35 | end 36 | 37 | 38 | 39 | return AardvarkManager; -------------------------------------------------------------------------------- /lua/libs/v2/imports/career_mode/FCECareerModeUserManager.lua: -------------------------------------------------------------------------------- 1 | require 'imports/core/consts' 2 | require 'imports/career_mode/helpers' 3 | 4 | local FCECareerModeUserManager = {} 5 | 6 | function FCECareerModeUserManager:new() 7 | local o = setmetatable({}, self) 8 | 9 | -- lua metatable 10 | self.__index = self 11 | self.__name = "FCE::CareerMode::UserManager" 12 | 13 | self.offsets = { 14 | mUserInfo = 0x18 15 | } 16 | 17 | self.user_info_offsets = { 18 | mUserType = 0x1EC, 19 | mPlayerType = 0x1F0, 20 | mPlayerId = 0x1F8, 21 | } 22 | 23 | return o 24 | end 25 | 26 | function FCECareerModeUserManager:GetAddr() 27 | return GetManagerObjByTypeId(ENUM_FCEGameModesFCECareerModeUserManager) 28 | end 29 | 30 | function FCECareerModeUserManager:GetUserInfo(mgr) 31 | if (mgr == nil) then 32 | mgr = self:GetAddr() 33 | end 34 | if (mgr == 0) then return 0 end 35 | 36 | return MEMORY:ReadPointer(mgr + self.offsets.mUserInfo) 37 | end 38 | 39 | -- Return true if in Manager Career Mode 40 | function FCECareerModeUserManager:IsManagerCareer() 41 | local user_info = self:GetUserInfo(self:GetAddr()) 42 | if (user_info == 0) then return false end 43 | 44 | return MEMORY:ReadInt(user_info + self.user_info_offsets.mUserType) == 1 45 | end 46 | 47 | -- Return true if in Player Career Mode 48 | function FCECareerModeUserManager:IsPlayerCareer() 49 | local user_info = self:GetUserInfo(self:GetAddr()) 50 | if (user_info == 0) then return false end 51 | 52 | return MEMORY:ReadInt(user_info + self.user_info_offsets.mUserType) == 2 53 | end 54 | 55 | -- Return User PlayerID in Player Career Mode 56 | function FCECareerModeUserManager:GetPAPID() 57 | local result = 0 58 | if (self:IsPlayerCareer()) then 59 | return MEMORY:ReadInt(self:GetUserInfo(self:GetAddr()) + self.user_info_offsets.mPlayerId) 60 | end 61 | 62 | return result 63 | end 64 | 65 | function FCECareerModeUserManager:PlayerIsVPRO() 66 | local user_info = self:GetUserInfo(self:GetAddr()) 67 | if (user_info == 0) then return false end 68 | 69 | return MEMORY:ReadInt(user_info + self.user_info_offsets.mPlayerType) == 0 70 | end 71 | 72 | function FCECareerModeUserManager:PlayerIsRealPlayer() 73 | local user_info = self:GetUserInfo(self:GetAddr()) 74 | if (user_info == 0) then return false end 75 | 76 | return MEMORY:ReadInt(user_info + self.user_info_offsets.mPlayerType) == 1 77 | end 78 | 79 | function FCECareerModeUserManager:PlayerIsCreatedPlayer() 80 | local user_info = self:GetUserInfo(self:GetAddr()) 81 | if (user_info == 0) then return false end 82 | 83 | return MEMORY:ReadInt(user_info + self.user_info_offsets.mPlayerType) == 2 84 | end 85 | 86 | return FCECareerModeUserManager; 87 | -------------------------------------------------------------------------------- /lua/libs/v2/imports/career_mode/consts.lua: -------------------------------------------------------------------------------- 1 | CONST_CM_EVENTS_NAMES = { 2 | [0] = "NO_MESSAGE", 3 | [1] = "TOURNAMENT_MODE_ACTIVATED", 4 | [2] = "SOAK_STARTED", 5 | [3] = "INITIAL_USER_ADDED", 6 | [4] = "ABOUT_TO_INIT_MODE", 7 | [5] = "CAREER_TYPE_SELECTED", 8 | [6] = "USER_MATCH_COMPLETED", 9 | [7] = "USER_MATCH_COMPLETED_IN_TOURNAMENT", 10 | [8] = "CPU_MATCH_COMPLETED", 11 | [9] = "USER_INTERNATIONAL_MATCH_COMPLETED", 12 | [10] = "CPU_INTERNATIONAL_MATCH_COMPLETED", 13 | [11] = "PRE_SEASON_STARTED", 14 | [12] = "PRE_SEASON_COMPLETED", 15 | [13] = "HOURS_PASSED", 16 | [14] = "DAY_PASSED", 17 | [15] = "WEEK_PASSED", 18 | [16] = "MONTH_PASSED", 19 | [17] = "MID_SEASON_REACHED", 20 | [18] = "END_OF_SEASON_REACHED", 21 | [19] = "SUSPENSION", 22 | [20] = "BACK_FROM_SUSPENSION", 23 | [21] = "MAIN_COMPETITION_SCHEDULED", 24 | [22] = "SEASON_RESET", 25 | [23] = "SEASON_ENDED", 26 | [24] = "FIXTURES_RESCHEDULED", 27 | [25] = "ENTERED_HUB_FIRST_TIME", 28 | [26] = "DATA_READY", 29 | [27] = "PREPARE_FOR_SAVE", 30 | [28] = "POST_LOAD_PREPARE", 31 | [29] = "PREPARE_FOR_FIRST_SAVE", 32 | [30] = "COMPETITION_STARTED", 33 | [31] = "COMPETITION_SCHEDULED", 34 | [32] = "COMPETITION_COMPLETE", 35 | [33] = "STAGE_STARTED", 36 | [34] = "STAGE_COMPLETE", 37 | [35] = "ABOUT_TO_ENTER_PREMATCH", 38 | [36] = "ABOUT_TO_LEAVE_PREMATCH", 39 | [37] = "POST_MATCH_REPORTS_DISPLAYED", 40 | [38] = "DEBUG_LOG_FOR_MATCH_NOW", 41 | [39] = "TEAMS_READY_FOR_USER_MATCH", 42 | [40] = "ABOUT_TO_ENTER_A_MATCH", 43 | [41] = "FE_TO_BE", 44 | [42] = "ABOUT_TO_SIM_OVER_A_MATCH", 45 | [43] = "ABOUT_TO_ENTER_QUICK_SIM", 46 | [44] = "ABOUT_TO_ENTER_INTERACTIVE_SIM", 47 | [45] = "ABOUT_TO_ENTER_PLAY_HIGHLIGHTS", 48 | [46] = "ABOUT_TO_ENTER_PLAY_FULL_MATCH_SIM", 49 | [47] = "HIGHLIGHT_PLAYED", 50 | [48] = "TEAM_MOVE", 51 | [49] = "LEAGUE_OBJECTIVE_UPDATED", 52 | [50] = "CUP_OBJECTIVE_UPDATED", 53 | [51] = "PLAYER_GROWTH", 54 | [52] = "BOARD_EMAIL_EVENT", 55 | [53] = "MANAGER_PRESTIGE_EVENT", 56 | [54] = "PLAYER_UNFIT", 57 | [55] = "PLAYER_FORM_EVENT", 58 | [56] = "PLAYER_INSERTED_INTO_PLAYERS_TABLE", 59 | [57] = "PLAYER_DELETED_FROM_PLAYERS_TABLE", 60 | [58] = "PLAYERS_RETIRED", 61 | [59] = "ALL_RETIRED_PLAYERS_COMPLETE", 62 | [60] = "PLAYER_CONTRACT_TERMINATION", 63 | [61] = "PLAYER_CONTRACT_ACCEPTED", 64 | [62] = "PLAYER_CONTRACT_NEGOTIATION", 65 | [63] = "PLAYER_WITH_POTENTIAL", 66 | [64] = "BACK_FROM_INJURY", 67 | [65] = "PRIZE_MONEY_RECEIVED", 68 | [66] = "SCREEN_HAS_DONE_LOADING", 69 | [67] = "USER_TEAM_PLAYER_FORM_CHANGE", 70 | [68] = "USER_TEAM_ADVANCES_IN_CUP", 71 | [69] = "USER_TEAM_OUT_OF_CUP", 72 | [70] = "USER_TEAM_PLAYER_RETIRES_MID_SEASON", 73 | [71] = "USER_TEAM_PLAYER_RETIRES", 74 | [72] = "CPU_TRANSFER_INFO", 75 | [73] = "NUM_DAYS_BEFORE_USER_GAME", 76 | [74] = "NUM_DAYS_BEFORE_LAST_LEAGUE_GAME", 77 | [75] = "LOAN_IS_RETURNING_OR_BEING_RECALLED", 78 | [76] = "PLAY_TIME_MORALE_CHANGE", 79 | [77] = "PLAYER_UNHAPPY_WITH_WAGE", 80 | [78] = "PLAYER_MADE_AVAILABLE_FOR_TRANSFER", 81 | [79] = "PLAYER_MADE_AVAILABLE_FOR_LOAN", 82 | [80] = "ENTERING_TEAM_MANAGEMENT", 83 | [81] = "LEAVING_TEAM_MANAGEMENT", 84 | [82] = "YOUTH_SCOUT_REPORT_IS_AVAILABLE", 85 | [83] = "TRANSFER_MOVE_ABOUT_TO_COMPLETE", 86 | [84] = "TRANSFER_MOVE_COMPLETE", 87 | [85] = "USER_PRESIGNED_CONTRACT_CREATED", 88 | [86] = "TRANSFER_SCOUTED_PLAYER", 89 | [87] = "SCOUT_SENT_ON_AREA_MISSION", 90 | [88] = "SCOUT_RETURNED_WITH_REPORT", 91 | [89] = "GTN_SCOUT_HIRED", 92 | [90] = "GTN_SCOUT_FIRED", 93 | [91] = "COMMENTATOR_NOTES_DATA_INIT", 94 | [92] = "TRANSFER_BID_REJECTED", 95 | [93] = "TRANSFER_BID_RETRACTED", 96 | [94] = "TRANSFER_BID_COUNTER_OFFER", 97 | [95] = "TRANSFER_BID_COUNTER_OFFER_REJECTED_BY_CPU", 98 | [96] = "TRANSFER_WINDOW_CLOSE_DAY_REACHED", 99 | [97] = "TRANSFER_WINDOW_NUM_DAYS_TIL_CLOSE", 100 | [98] = "TRANSFER_WINDOW_NUM_DAYS_SINCE_OPEN", 101 | [99] = "TRANSFER_WINDOW_OPENING_SOON", 102 | [100] = "TRANSFER_WINDOW_CLOSED", 103 | [101] = "LOAN_BUY_LOAN_CONTRACT_ACCEPTED", 104 | [102] = "LOAN_BUY_LOAN_CONTRACT_REJECTED", 105 | [103] = "LOAN_BUY_FUTURE_FEE_DUE", 106 | [104] = "LOAN_BUY_NEGOTIATE_PLAYER_CONTRACT_OFFER", 107 | [105] = "LOAN_BUY_FUTURE_FEE_NOT_PAYED", 108 | [106] = "LIVE_TABLE_FIRST_UPDATE", 109 | [107] = "YOUTH_PLAYER_ADDED_TO_YOUTH_ACADEMY", 110 | [108] = "PLAYER_ADDED_TO_TEAM", 111 | [109] = "PLAYER_REMOVED_FROM_TEAM", 112 | [110] = "YOUTH_PLAYER_PROMOTION", 113 | [111] = "YOUTH_PLAYERS_STATS_UPDATE", 114 | [112] = "YOUTH_PLAYERS_RISK_FACTOR", 115 | [113] = "YOUTH_PLAYERS_RETIREMENT", 116 | [114] = "YOUTH_SCOUT_IS_AVAILABLE", 117 | [115] = "YOUTH_SCOUT_HIRED", 118 | [116] = "YOUTH_SCOUT_FIRED", 119 | [117] = "YOUTH_SCOUT_IS_SENT_ON_MISSION", 120 | [118] = "DEADLINE_DAYS_STARTED", 121 | [119] = "DEADLINE_DAYS_ENDED", 122 | [120] = "LONGTERM_INJURY", 123 | [121] = "USER_AWARD", 124 | [122] = "INTERNATIONAL_JOB_OFFER_MADE", 125 | [123] = "INTERNATIONAL_JOB_OFFER_ACCEPTED", 126 | [124] = "INTERNATIONAL_JOB_OFFER_DECLINED", 127 | [125] = "INTERNATIONAL_JOB_OFFER_STALLED", 128 | [126] = "INTERNATIONAL_JOB_OFFER_EXPIRED", 129 | [127] = "INTERNATIONAL_JOB_OVER", 130 | [128] = "INTERNATIONAL_JOB_FIRED", 131 | [129] = "INTERNATIONAL_JOB_RESIGNED", 132 | [130] = "INTERNATIONAL_JOB_REVIEW", 133 | [131] = "INTERNATIONAL_JOB_PAP_SELECTED", 134 | [132] = "INTERNATIONAL_JOB_PAP_NOT_SELECTED", 135 | [133] = "INTERNATIONAL_JOB_PAP_UPCOMING_FIXTURES", 136 | [134] = "INTERNATIONAL_TOP_PLAYERS", 137 | [135] = "JOB_OFFER_RECEIVED", 138 | [136] = "JOB_OFFER_ACCEPTED", 139 | [137] = "JOB_OFFER_REJECTED", 140 | [138] = "JOB_OFFER_EXPIRED", 141 | [139] = "ABOUT_TO_SWITCH_JOBS", 142 | [140] = "JOB_OFFERS_GENERATED", 143 | [141] = "PAP_REQUEST_TO_PLAY_A_MATCH", 144 | [142] = "TABLE_RIVALS", 145 | [143] = "PLAYER_ANNOUNCMENT", 146 | [144] = "COMPETITION_CHAMPION", 147 | [145] = "LIVE_TABLE_UPDATE", 148 | [146] = "CAREER_TRAINING_SESSION_COMPLETED", 149 | [147] = "PAP_TRAINING_DRILL_COMPLETED", 150 | [148] = "USER_TRAINING_COMPLETED", 151 | [149] = "USER_SHORTLISTED", 152 | [150] = "USER_TRANSFERLISTED", 153 | [151] = "USER_LOANLISTED", 154 | [152] = "USER_TRANSFER_CLUB_STAGE_FINISHED", 155 | [153] = "USER_LOAN_CLUB_STAGE_FINISHED", 156 | [154] = "USER_TRANSFER_PLAYER_STAGE_FINISHED", 157 | [155] = "USER_LOAN_PLAYER_STAGE_FINISHED", 158 | [156] = "USER_TRANSFER_OFFER_RECEIVED", 159 | [157] = "USER_LOAN_OFFER_RECEIVED", 160 | [158] = "USER_CONTRACT_RENEWAL", 161 | [159] = "HIGHLIGHTS_READY", 162 | [160] = "OBJECTIVES_GENERATED", 163 | [161] = "USER_PLAYER_POSITION_CHANGED", 164 | [162] = "USER_PLAYER_TRAINING_PLAN_CHANGED", 165 | [163] = "USER_PLAYER_TRAINING_PLAN_FINISHED", 166 | [164] = "USER_EXPIRING_LOANS", 167 | [165] = "MATCH_RESTARTED", 168 | [166] = "FIXTURE_USER_CHANGED", 169 | [167] = "GOLDEN_BOOT_AWARD_EVENT", 170 | [168] = "SET_NUM_USERS", 171 | [169] = "PLAYER_OF_THE_YEAR", 172 | [170] = "MANAGER_OF_THE_MONTH", 173 | [171] = "MANAGER_OF_THE_SEASON", 174 | [172] = "PLAYER_OF_THE_TOURNAMENT", 175 | [173] = "PAP_SCOUT_ACTION", 176 | [174] = "TARGET_TEAM_CHANGED", 177 | [175] = "SUITABLE_COACHES_APPEARED", 178 | [176] = "STAFF_FIRED", 179 | [177] = "SCRIPT_DRIVEN_NEWS", 180 | [178] = "INJURY", 181 | [179] = "GOLDEN_BOOT_NEWS_EVENT", 182 | [180] = "TEAM_OF_THE_WEEK", 183 | [181] = "GOAL_KEEPER_OF_THE_TOURNAMENT", 184 | [182] = "PLAYER_OF_THE_MONTH", 185 | [183] = "FIGHT_4_PLAYER_OF_THE_MONTH", 186 | [184] = "TEAM_OF_THE_COMPETITION", 187 | [185] = "TRANSFERS_MESSAGING_EVENTS", 188 | [186] = "CHAMPION_OF_COMPETITION", 189 | [187] = "CHAMPION_OF_CHAMPIONS_LEAGUE", 190 | [188] = "CHAMPION_OF_EUROPA_LEAGUE", 191 | [189] = "CHAMPION_OF_UEFA_SUPERCUP", 192 | [190] = "CHAMPION_OF_FIFA_WORLD_CUP", 193 | [191] = "PROMOTED_TEAMS", 194 | [192] = "RELEGATED_TEAMS", 195 | [193] = "ENTERED_CHAMPION_SLOT", 196 | [194] = "ENTERED_PROMOTION_SLOT", 197 | [195] = "ENTERED_RELEGATION_SLOT", 198 | [196] = "FIRST_LEAGUE_FIXTURE", 199 | [197] = "TEAM_WINS_AGAINST_RIVAL", 200 | [198] = "UNDERDOG_TEAM_WINS_AGAINST_BIGGER_OPPONENT", 201 | [199] = "PLAYERS_TEAM_PLANS_TO_BUY_PLAYER", 202 | [200] = "NEWS_WORTHY_TRANSFER_EVENT", 203 | [201] = "HAT_TRICK", 204 | [202] = "UPCOMING_MATCH", 205 | [203] = "CUP_TOURNAMENT_STARTED", 206 | [204] = "CUP_TOURNAMENT_STARTED2", 207 | [205] = "STAR_PLAYER_LISTED", 208 | [206] = "PRE_CONTRACT_MADE", 209 | [207] = "PRE_CONTRACT_COMPLETE", 210 | [208] = "BOLSTER", 211 | [209] = "TRANSFER_REPLACE_PLAYER", 212 | [210] = "TRANSFER_RUMOUR_TOP_SCORER_ASSISTER", 213 | [211] = "PRE_SEASON_TOURNAMENT", 214 | [212] = "CLUB_WORTH_INCREASED_NEWS", 215 | [213] = "CAREER_REAL_PLAYER_START_NEWS", 216 | [214] = "CAREER_VPRO_START_NEWS", 217 | [215] = "CAREER_MANAGER_START_NEWS", 218 | [216] = "OBJECTIVES_INTRO_NEWS", 219 | [217] = "MATCH_DECIDED_IN_PENALTY_SHOOTOUT", 220 | [218] = "NON_USER_MATCH_RESULT", 221 | [219] = "INTERNATIONAL_WEEK_NEWS", 222 | [220] = "INTERNATIONAL_KNOCKOUT_STAGE_NEWS", 223 | [221] = "INTERNATIONAL_GROUP_STAGE_NEWS", 224 | [222] = "6_POINTER_LOGIC", 225 | [223] = "MARQUEE_MATCH_NEWS", 226 | [224] = "RIVALS_NON_USER_NEWS", 227 | [225] = "CLINCH_NEWS_FOR_LEAGUE_TITLE_POSSIBLE_WIN", 228 | [226] = "CLINCH_NEWS_FOR_LEAGUE_TITLE_POSSIBLE_DRAW", 229 | [227] = "CLINCH_NEWS_FOR_LEAGUE_PROMOTION_POSSIBLE_WIN", 230 | [228] = "CLINCH_NEWS_FOR_LEAGUE_PLAYOFF_POSSIBLE_WIN", 231 | [229] = "CLINCH_NEWS_FOR_CHAMPIONS_LEAGUE_QUALIFICATION_WIN", 232 | [230] = "CLINCH_NEWS_FOR_EUROPA_LEAGUE_QUALIFICATION_WIN", 233 | [231] = "ONES_TO_WATCH", 234 | [232] = "ONES_FOR_THE_FUTURE", 235 | [233] = "CUP_POSSIBLE_QUALIFICATION_WITH_A_WIN", 236 | [234] = "CUP_POSSIBLE_QUALIFICATION_WITH_A_WIN_AND_USER_TEA", 237 | [235] = "CUP_POSSIBLE_ELIMINATION_WITH_A_DRAW", 238 | [236] = "CUP_POSSIBLE_ELIMINATION_IF_USER_DOES_NOT_WIN", 239 | [237] = "CUP_STAGE_MATCH", 240 | [238] = "FIGHT_FOR_TOP_SCORER", 241 | [239] = "LEAGUE_TITLE_CLINCHED", 242 | [240] = "LEAGUE_PLAYOFF_CLINCHED", 243 | [241] = "LEAGUE_PROMOTION_CLINCHED", 244 | [242] = "EUROPA_LEAGUE_QUALIFICATION_CLINCHED", 245 | [243] = "CHAMPIONS_LEAGUE_QUALIFICATION_CLINCHED", 246 | [244] = "CUP_POSSIBLE_ELIMINATION_CLINCHED", 247 | [245] = "CUP_POSSIBLE_ELIMINATION_CLINCHED_EXPECTED", 248 | [246] = "CUP_QUALIFICATION_CLINCHED", 249 | [247] = "UCL_DRAW_DATE_GROUPS_ANTICIPATION_NEWS", 250 | [248] = "EL_DRAW_DATE_GROUPS_ANTICIPATION_NEWS", 251 | [249] = "SUDA_DRAW_DATE_GROUPS_ANTICIPATION_NEWS", 252 | [250] = "UCL_DRAW_DATE_GROUPS_NEWS", 253 | [251] = "EL_DRAW_DATE_GROUPS_NEWS", 254 | [252] = "SUDA_DRAW_DATE_GROUPS_NEWS", 255 | [253] = "UCL_DRAW_DATE_GROUPS_REACTION_NEWS", 256 | [254] = "EL_DRAW_DATE_GROUPS_REACTION_NEWS", 257 | [255] = "SUDA_DRAW_DATE_GROUPS_REACTION_NEWS", 258 | [256] = "UCL_DRAW_DATE_FIRST_KO_ROUND_ANTICIPATION_NEWS", 259 | [257] = "EL_DRAW_DATE_FIRST_KO_ROUND_ANTICIPATION_NEWS", 260 | [258] = "EL_DRAW_DATE_FIRST_KO_ROUND_NEWS", 261 | [259] = "EL_DRAW_DATE_FIRST_KO_ROUND_REACTION_NEWS", 262 | [260] = "UCL_DRAW_DATE_KO_ROUND_NEWS", 263 | [261] = "EL_DRAW_DATE_KO_ROUND_NEWS", 264 | [262] = "UCL_DRAW_DATE_KO_ROUND_REACTION_NEWS", 265 | [263] = "EL_DRAW_DATE_KO_ROUND_REACTION_NEWS", 266 | [264] = "UEFA_TEAM_OF_THE_YEAR", 267 | [265] = "FIGHT_4_UEFA_TEAM_OF_THE_YEAR", 268 | [266] = "DEBUG_NEWS", 269 | [267] = "CHAMPION_OF_COPA_LIBERTADORES", 270 | [268] = "CHAMPION_OF_COPA_SUDAMERICANA", 271 | [269] = "CHAMPION_OF_RECOPA_SUDAMERICANA", 272 | [270] = "LIBE_DRAW_DATE_GROUPS_ANTICIPATION_NEWS", 273 | [271] = "LIBE_DRAW_DATE_GROUPS_NEWS", 274 | [272] = "LIBE_DRAW_DATE_GROUPS_REACTION_NEWS", 275 | [273] = "LIBE_DRAW_DATE_FIRST_KO_ROUND_ANTICIPATION_NEWS", 276 | [274] = "SUDA_DRAW_DATE_FIRST_KO_ROUND_ANTICIPATION_NEWS", 277 | [275] = "LIBE_DRAW_DATE_KO_ROUND_NEWS", 278 | [276] = "SUDA_DRAW_DATE_KO_ROUND_NEWS", 279 | [277] = "LIBE_DRAW_DATE_KO_ROUND_REACTION_NEWS", 280 | [278] = "SUDA_DRAW_DATE_KO_ROUND_REACTION_NEWS", 281 | [279] = "CHAMPION_OF_EUROPA_CONFERENCE_LEAGUE", 282 | [280] = "UECL_DRAW_DATE_GROUPS_ANTICIPATION_NEWS", 283 | [281] = "UECL_DRAW_DATE_GROUPS_NEWS", 284 | [282] = "UECL_DRAW_DATE_GROUPS_REACTION_NEWS", 285 | [283] = "UECL_DRAW_DATE_FIRST_KO_ROUND_ANTICIPATION_NEWS", 286 | [284] = "UECL_DRAW_DATE_FIRST_KO_ROUND_NEWS", 287 | [285] = "UECL_DRAW_DATE_FIRST_KO_ROUND_REACTION_NEWS", 288 | [286] = "UECL_DRAW_DATE_KO_ROUND_NEWS", 289 | [287] = "UECL_DRAW_DATE_KO_ROUND_REACTION_NEWS" 290 | } -------------------------------------------------------------------------------- /lua/libs/v2/imports/career_mode/enums.lua: -------------------------------------------------------------------------------- 1 | ENUM_CM_EVENT_MSG_NO_MESSAGE = 0 2 | ENUM_CM_EVENT_MSG_TOURNAMENT_MODE_ACTIVATED = 1 3 | ENUM_CM_EVENT_MSG_SOAK_STARTED = 2 4 | ENUM_CM_EVENT_MSG_INITIAL_USER_ADDED = 3 5 | ENUM_CM_EVENT_MSG_ABOUT_TO_INIT_MODE = 4 6 | ENUM_CM_EVENT_MSG_CAREER_TYPE_SELECTED = 5 7 | ENUM_CM_EVENT_MSG_USER_MATCH_COMPLETED = 6 8 | ENUM_CM_EVENT_MSG_USER_MATCH_COMPLETED_IN_TOURNAMENT = 7 9 | ENUM_CM_EVENT_MSG_CPU_MATCH_COMPLETED = 8 10 | ENUM_CM_EVENT_MSG_USER_INTERNATIONAL_MATCH_COMPLETED = 9 11 | ENUM_CM_EVENT_MSG_CPU_INTERNATIONAL_MATCH_COMPLETED = 10 12 | ENUM_CM_EVENT_MSG_PRE_SEASON_STARTED = 11 13 | ENUM_CM_EVENT_MSG_PRE_SEASON_COMPLETED = 12 14 | ENUM_CM_EVENT_MSG_HOURS_PASSED = 13 15 | ENUM_CM_EVENT_MSG_DAY_PASSED = 14 16 | ENUM_CM_EVENT_MSG_WEEK_PASSED = 15 17 | ENUM_CM_EVENT_MSG_MONTH_PASSED = 16 18 | ENUM_CM_EVENT_MSG_MID_SEASON_REACHED = 17 19 | ENUM_CM_EVENT_MSG_END_OF_SEASON_REACHED = 18 20 | ENUM_CM_EVENT_MSG_SUSPENSION = 19 21 | ENUM_CM_EVENT_MSG_BACK_FROM_SUSPENSION = 20 22 | ENUM_CM_EVENT_MSG_MAIN_COMPETITION_SCHEDULED = 21 23 | ENUM_CM_EVENT_MSG_SEASON_RESET = 22 24 | ENUM_CM_EVENT_MSG_SEASON_ENDED = 23 25 | ENUM_CM_EVENT_MSG_FIXTURES_RESCHEDULED = 24 26 | ENUM_CM_EVENT_MSG_ENTERED_HUB_FIRST_TIME = 25 27 | ENUM_CM_EVENT_MSG_DATA_READY = 26 28 | ENUM_CM_EVENT_MSG_PREPARE_FOR_SAVE = 27 29 | ENUM_CM_EVENT_MSG_POST_LOAD_PREPARE = 28 30 | ENUM_CM_EVENT_MSG_PREPARE_FOR_FIRST_SAVE = 29 31 | ENUM_CM_EVENT_MSG_COMPETITION_STARTED = 30 32 | ENUM_CM_EVENT_MSG_COMPETITION_SCHEDULED = 31 33 | ENUM_CM_EVENT_MSG_COMPETITION_COMPLETE = 32 34 | ENUM_CM_EVENT_MSG_STAGE_STARTED = 33 35 | ENUM_CM_EVENT_MSG_STAGE_COMPLETE = 34 36 | ENUM_CM_EVENT_MSG_ABOUT_TO_ENTER_PREMATCH = 35 37 | ENUM_CM_EVENT_MSG_ABOUT_TO_LEAVE_PREMATCH = 36 38 | ENUM_CM_EVENT_MSG_POST_MATCH_REPORTS_DISPLAYED = 37 39 | ENUM_CM_EVENT_MSG_DEBUG_LOG_FOR_MATCH_NOW = 38 40 | ENUM_CM_EVENT_MSG_TEAMS_READY_FOR_USER_MATCH = 39 41 | ENUM_CM_EVENT_MSG_ABOUT_TO_ENTER_A_MATCH = 40 42 | ENUM_CM_EVENT_MSG_FE_TO_BE = 41 43 | ENUM_CM_EVENT_MSG_ABOUT_TO_SIM_OVER_A_MATCH = 42 44 | ENUM_CM_EVENT_MSG_ABOUT_TO_ENTER_QUICK_SIM = 43 45 | ENUM_CM_EVENT_MSG_ABOUT_TO_ENTER_INTERACTIVE_SIM = 44 46 | ENUM_CM_EVENT_MSG_ABOUT_TO_ENTER_PLAY_HIGHLIGHTS = 45 47 | ENUM_CM_EVENT_MSG_ABOUT_TO_ENTER_PLAY_FULL_MATCH_SIM = 46 48 | ENUM_CM_EVENT_MSG_HIGHLIGHT_PLAYED = 47 49 | ENUM_CM_EVENT_MSG_TEAM_MOVE = 48 50 | ENUM_CM_EVENT_MSG_LEAGUE_OBJECTIVE_UPDATED = 49 51 | ENUM_CM_EVENT_MSG_CUP_OBJECTIVE_UPDATED = 50 52 | ENUM_CM_EVENT_MSG_PLAYER_GROWTH = 51 53 | ENUM_CM_EVENT_MSG_BOARD_EMAIL_EVENT = 52 54 | ENUM_CM_EVENT_MSG_MANAGER_PRESTIGE_EVENT = 53 55 | ENUM_CM_EVENT_MSG_PLAYER_UNFIT = 54 56 | ENUM_CM_EVENT_MSG_PLAYER_FORM_EVENT = 55 57 | ENUM_CM_EVENT_MSG_PLAYER_INSERTED_INTO_PLAYERS_TABLE = 56 58 | ENUM_CM_EVENT_MSG_PLAYER_DELETED_FROM_PLAYERS_TABLE = 57 59 | ENUM_CM_EVENT_MSG_PLAYERS_RETIRED = 58 60 | ENUM_CM_EVENT_MSG_ALL_RETIRED_PLAYERS_COMPLETE = 59 61 | ENUM_CM_EVENT_MSG_PLAYER_CONTRACT_TERMINATION = 60 62 | ENUM_CM_EVENT_MSG_PLAYER_CONTRACT_ACCEPTED = 61 63 | ENUM_CM_EVENT_MSG_PLAYER_CONTRACT_NEGOTIATION = 62 64 | ENUM_CM_EVENT_MSG_PLAYER_WITH_POTENTIAL = 63 65 | ENUM_CM_EVENT_MSG_BACK_FROM_INJURY = 64 66 | ENUM_CM_EVENT_MSG_PRIZE_MONEY_RECEIVED = 65 67 | ENUM_CM_EVENT_MSG_SCREEN_HAS_DONE_LOADING = 66 68 | ENUM_CM_EVENT_MSG_USER_TEAM_PLAYER_FORM_CHANGE = 67 69 | ENUM_CM_EVENT_MSG_USER_TEAM_ADVANCES_IN_CUP = 68 70 | ENUM_CM_EVENT_MSG_USER_TEAM_OUT_OF_CUP = 69 71 | ENUM_CM_EVENT_MSG_USER_TEAM_PLAYER_RETIRES_MID_SEASON = 70 72 | ENUM_CM_EVENT_MSG_USER_TEAM_PLAYER_RETIRES = 71 73 | ENUM_CM_EVENT_MSG_CPU_TRANSFER_INFO = 72 74 | ENUM_CM_EVENT_MSG_NUM_DAYS_BEFORE_USER_GAME = 73 75 | ENUM_CM_EVENT_MSG_NUM_DAYS_BEFORE_LAST_LEAGUE_GAME = 74 76 | ENUM_CM_EVENT_MSG_LOAN_IS_RETURNING_OR_BEING_RECALLED = 75 77 | ENUM_CM_EVENT_MSG_PLAY_TIME_MORALE_CHANGE = 76 78 | ENUM_CM_EVENT_MSG_PLAYER_UNHAPPY_WITH_WAGE = 77 79 | ENUM_CM_EVENT_MSG_PLAYER_MADE_AVAILABLE_FOR_TRANSFER = 78 80 | ENUM_CM_EVENT_MSG_PLAYER_MADE_AVAILABLE_FOR_LOAN = 79 81 | ENUM_CM_EVENT_MSG_ENTERING_TEAM_MANAGEMENT = 80 82 | ENUM_CM_EVENT_MSG_LEAVING_TEAM_MANAGEMENT = 81 83 | ENUM_CM_EVENT_MSG_YOUTH_SCOUT_REPORT_IS_AVAILABLE = 82 84 | ENUM_CM_EVENT_MSG_TRANSFER_MOVE_ABOUT_TO_COMPLETE = 83 85 | ENUM_CM_EVENT_MSG_TRANSFER_MOVE_COMPLETE = 84 86 | ENUM_CM_EVENT_MSG_USER_PRESIGNED_CONTRACT_CREATED = 85 87 | ENUM_CM_EVENT_MSG_TRANSFER_SCOUTED_PLAYER = 86 88 | ENUM_CM_EVENT_MSG_SCOUT_SENT_ON_AREA_MISSION = 87 89 | ENUM_CM_EVENT_MSG_SCOUT_RETURNED_WITH_REPORT = 88 90 | ENUM_CM_EVENT_MSG_GTN_SCOUT_HIRED = 89 91 | ENUM_CM_EVENT_MSG_GTN_SCOUT_FIRED = 90 92 | ENUM_CM_EVENT_MSG_COMMENTATOR_NOTES_DATA_INIT = 91 93 | ENUM_CM_EVENT_MSG_TRANSFER_BID_REJECTED = 92 94 | ENUM_CM_EVENT_MSG_TRANSFER_BID_RETRACTED = 93 95 | ENUM_CM_EVENT_MSG_TRANSFER_BID_COUNTER_OFFER = 94 96 | ENUM_CM_EVENT_MSG_TRANSFER_BID_COUNTER_OFFER_REJECTED_BY_CPU = 95 97 | ENUM_CM_EVENT_MSG_TRANSFER_WINDOW_CLOSE_DAY_REACHED = 96 98 | ENUM_CM_EVENT_MSG_TRANSFER_WINDOW_NUM_DAYS_TIL_CLOSE = 97 99 | ENUM_CM_EVENT_MSG_TRANSFER_WINDOW_NUM_DAYS_SINCE_OPEN = 98 100 | ENUM_CM_EVENT_MSG_TRANSFER_WINDOW_OPENING_SOON = 99 101 | ENUM_CM_EVENT_MSG_TRANSFER_WINDOW_CLOSED = 100 102 | ENUM_CM_EVENT_MSG_LOAN_BUY_LOAN_CONTRACT_ACCEPTED = 101 103 | ENUM_CM_EVENT_MSG_LOAN_BUY_LOAN_CONTRACT_REJECTED = 102 104 | ENUM_CM_EVENT_MSG_LOAN_BUY_FUTURE_FEE_DUE = 103 105 | ENUM_CM_EVENT_MSG_LOAN_BUY_NEGOTIATE_PLAYER_CONTRACT_OFFER = 104 106 | ENUM_CM_EVENT_MSG_LOAN_BUY_FUTURE_FEE_NOT_PAYED = 105 107 | ENUM_CM_EVENT_MSG_LIVE_TABLE_FIRST_UPDATE = 106 108 | ENUM_CM_EVENT_MSG_YOUTH_PLAYER_ADDED_TO_YOUTH_ACADEMY = 107 109 | ENUM_CM_EVENT_MSG_PLAYER_ADDED_TO_TEAM = 108 110 | ENUM_CM_EVENT_MSG_PLAYER_REMOVED_FROM_TEAM = 109 111 | ENUM_CM_EVENT_MSG_YOUTH_PLAYER_PROMOTION = 110 112 | ENUM_CM_EVENT_MSG_YOUTH_PLAYERS_STATS_UPDATE = 111 113 | ENUM_CM_EVENT_MSG_YOUTH_PLAYERS_RISK_FACTOR = 112 114 | ENUM_CM_EVENT_MSG_YOUTH_PLAYERS_RETIREMENT = 113 115 | ENUM_CM_EVENT_MSG_YOUTH_SCOUT_IS_AVAILABLE = 114 116 | ENUM_CM_EVENT_MSG_YOUTH_SCOUT_HIRED = 115 117 | ENUM_CM_EVENT_MSG_YOUTH_SCOUT_FIRED = 116 118 | ENUM_CM_EVENT_MSG_YOUTH_SCOUT_IS_SENT_ON_MISSION = 117 119 | ENUM_CM_EVENT_MSG_DEADLINE_DAYS_STARTED = 118 120 | ENUM_CM_EVENT_MSG_DEADLINE_DAYS_ENDED = 119 121 | ENUM_CM_EVENT_MSG_LONGTERM_INJURY = 120 122 | ENUM_CM_EVENT_MSG_USER_AWARD = 121 123 | ENUM_CM_EVENT_MSG_INTERNATIONAL_JOB_OFFER_MADE = 122 124 | ENUM_CM_EVENT_MSG_INTERNATIONAL_JOB_OFFER_ACCEPTED = 123 125 | ENUM_CM_EVENT_MSG_INTERNATIONAL_JOB_OFFER_DECLINED = 124 126 | ENUM_CM_EVENT_MSG_INTERNATIONAL_JOB_OFFER_STALLED = 125 127 | ENUM_CM_EVENT_MSG_INTERNATIONAL_JOB_OFFER_EXPIRED = 126 128 | ENUM_CM_EVENT_MSG_INTERNATIONAL_JOB_OVER = 127 129 | ENUM_CM_EVENT_MSG_INTERNATIONAL_JOB_FIRED = 128 130 | ENUM_CM_EVENT_MSG_INTERNATIONAL_JOB_RESIGNED = 129 131 | ENUM_CM_EVENT_MSG_INTERNATIONAL_JOB_REVIEW = 130 132 | ENUM_CM_EVENT_MSG_INTERNATIONAL_JOB_PAP_SELECTED = 131 133 | ENUM_CM_EVENT_MSG_INTERNATIONAL_JOB_PAP_NOT_SELECTED = 132 134 | ENUM_CM_EVENT_MSG_INTERNATIONAL_JOB_PAP_UPCOMING_FIXTURES = 133 135 | ENUM_CM_EVENT_MSG_INTERNATIONAL_TOP_PLAYERS = 134 136 | ENUM_CM_EVENT_MSG_JOB_OFFER_RECEIVED = 135 137 | ENUM_CM_EVENT_MSG_JOB_OFFER_ACCEPTED = 136 138 | ENUM_CM_EVENT_MSG_JOB_OFFER_REJECTED = 137 139 | ENUM_CM_EVENT_MSG_JOB_OFFER_EXPIRED = 138 140 | ENUM_CM_EVENT_MSG_ABOUT_TO_SWITCH_JOBS = 139 141 | ENUM_CM_EVENT_MSG_JOB_OFFERS_GENERATED = 140 142 | ENUM_CM_EVENT_MSG_PAP_REQUEST_TO_PLAY_A_MATCH = 141 143 | ENUM_CM_EVENT_MSG_TABLE_RIVALS = 142 144 | ENUM_CM_EVENT_MSG_PLAYER_ANNOUNCMENT = 143 145 | ENUM_CM_EVENT_MSG_COMPETITION_CHAMPION = 144 146 | ENUM_CM_EVENT_MSG_LIVE_TABLE_UPDATE = 145 147 | ENUM_CM_EVENT_MSG_CAREER_TRAINING_SESSION_COMPLETED = 146 148 | ENUM_CM_EVENT_MSG_PAP_TRAINING_DRILL_COMPLETED = 147 149 | ENUM_CM_EVENT_MSG_USER_TRAINING_COMPLETED = 148 150 | ENUM_CM_EVENT_MSG_USER_SHORTLISTED = 149 151 | ENUM_CM_EVENT_MSG_USER_TRANSFERLISTED = 150 152 | ENUM_CM_EVENT_MSG_USER_LOANLISTED = 151 153 | ENUM_CM_EVENT_MSG_USER_TRANSFER_CLUB_STAGE_FINISHED = 152 154 | ENUM_CM_EVENT_MSG_USER_LOAN_CLUB_STAGE_FINISHED = 153 155 | ENUM_CM_EVENT_MSG_USER_TRANSFER_PLAYER_STAGE_FINISHED = 154 156 | ENUM_CM_EVENT_MSG_USER_LOAN_PLAYER_STAGE_FINISHED = 155 157 | ENUM_CM_EVENT_MSG_USER_TRANSFER_OFFER_RECEIVED = 156 158 | ENUM_CM_EVENT_MSG_USER_LOAN_OFFER_RECEIVED = 157 159 | ENUM_CM_EVENT_MSG_USER_CONTRACT_RENEWAL = 158 160 | ENUM_CM_EVENT_MSG_HIGHLIGHTS_READY = 159 161 | ENUM_CM_EVENT_MSG_OBJECTIVES_GENERATED = 160 162 | ENUM_CM_EVENT_MSG_USER_PLAYER_POSITION_CHANGED = 161 163 | ENUM_CM_EVENT_MSG_USER_PLAYER_TRAINING_PLAN_CHANGED = 162 164 | ENUM_CM_EVENT_MSG_USER_PLAYER_TRAINING_PLAN_FINISHED = 163 165 | ENUM_CM_EVENT_MSG_USER_EXPIRING_LOANS = 164 166 | ENUM_CM_EVENT_MSG_MATCH_RESTARTED = 165 167 | ENUM_CM_EVENT_MSG_FIXTURE_USER_CHANGED = 166 168 | ENUM_CM_EVENT_MSG_GOLDEN_BOOT_AWARD_EVENT = 167 169 | ENUM_CM_EVENT_MSG_SET_NUM_USERS = 168 170 | ENUM_CM_EVENT_MSG_PLAYER_OF_THE_YEAR = 169 171 | ENUM_CM_EVENT_MSG_MANAGER_OF_THE_MONTH = 170 172 | ENUM_CM_EVENT_MSG_MANAGER_OF_THE_SEASON = 171 173 | ENUM_CM_EVENT_MSG_PLAYER_OF_THE_TOURNAMENT = 172 174 | ENUM_CM_EVENT_MSG_PAP_SCOUT_ACTION = 173 175 | ENUM_CM_EVENT_MSG_TARGET_TEAM_CHANGED = 174 176 | ENUM_CM_EVENT_MSG_SUITABLE_COACHES_APPEARED = 175 177 | ENUM_CM_EVENT_MSG_STAFF_FIRED = 176 178 | ENUM_CM_EVENT_MSG_SCRIPT_DRIVEN_NEWS = 177 179 | ENUM_CM_EVENT_MSG_INJURY = 178 180 | ENUM_CM_EVENT_MSG_GOLDEN_BOOT_NEWS_EVENT = 179 181 | ENUM_CM_EVENT_MSG_TEAM_OF_THE_WEEK = 180 182 | ENUM_CM_EVENT_MSG_GOAL_KEEPER_OF_THE_TOURNAMENT = 181 183 | ENUM_CM_EVENT_MSG_PLAYER_OF_THE_MONTH = 182 184 | ENUM_CM_EVENT_MSG_FIGHT_4_PLAYER_OF_THE_MONTH = 183 185 | ENUM_CM_EVENT_MSG_TEAM_OF_THE_COMPETITION = 184 186 | ENUM_CM_EVENT_MSG_TRANSFERS_MESSAGING_EVENTS = 185 187 | ENUM_CM_EVENT_MSG_CHAMPION_OF_COMPETITION = 186 188 | ENUM_CM_EVENT_MSG_CHAMPION_OF_CHAMPIONS_LEAGUE = 187 189 | ENUM_CM_EVENT_MSG_CHAMPION_OF_EUROPA_LEAGUE = 188 190 | ENUM_CM_EVENT_MSG_CHAMPION_OF_UEFA_SUPERCUP = 189 191 | ENUM_CM_EVENT_MSG_CHAMPION_OF_FIFA_WORLD_CUP = 190 192 | ENUM_CM_EVENT_MSG_PROMOTED_TEAMS = 191 193 | ENUM_CM_EVENT_MSG_RELEGATED_TEAMS = 192 194 | ENUM_CM_EVENT_MSG_ENTERED_CHAMPION_SLOT = 193 195 | ENUM_CM_EVENT_MSG_ENTERED_PROMOTION_SLOT = 194 196 | ENUM_CM_EVENT_MSG_ENTERED_RELEGATION_SLOT = 195 197 | ENUM_CM_EVENT_MSG_FIRST_LEAGUE_FIXTURE = 196 198 | ENUM_CM_EVENT_MSG_TEAM_WINS_AGAINST_RIVAL = 197 199 | ENUM_CM_EVENT_MSG_UNDERDOG_TEAM_WINS_AGAINST_BIGGER_OPPONENT = 198 200 | ENUM_CM_EVENT_MSG_PLAYERS_TEAM_PLANS_TO_BUY_PLAYER = 199 201 | ENUM_CM_EVENT_MSG_NEWS_WORTHY_TRANSFER_EVENT = 200 202 | ENUM_CM_EVENT_MSG_HAT_TRICK = 201 203 | ENUM_CM_EVENT_MSG_UPCOMING_MATCH = 202 204 | ENUM_CM_EVENT_MSG_CUP_TOURNAMENT_STARTED = 203 205 | ENUM_CM_EVENT_MSG_CUP_TOURNAMENT_STARTED2 = 204 206 | ENUM_CM_EVENT_MSG_STAR_PLAYER_LISTED = 205 207 | ENUM_CM_EVENT_MSG_PRE_CONTRACT_MADE = 206 208 | ENUM_CM_EVENT_MSG_PRE_CONTRACT_COMPLETE = 207 209 | ENUM_CM_EVENT_MSG_BOLSTER = 208 210 | ENUM_CM_EVENT_MSG_TRANSFER_REPLACE_PLAYER = 209 211 | ENUM_CM_EVENT_MSG_TRANSFER_RUMOUR_TOP_SCORER_ASSISTER = 210 212 | ENUM_CM_EVENT_MSG_PRE_SEASON_TOURNAMENT = 211 213 | ENUM_CM_EVENT_MSG_CLUB_WORTH_INCREASED_NEWS = 212 214 | ENUM_CM_EVENT_MSG_CAREER_REAL_PLAYER_START_NEWS = 213 215 | ENUM_CM_EVENT_MSG_CAREER_VPRO_START_NEWS = 214 216 | ENUM_CM_EVENT_MSG_CAREER_MANAGER_START_NEWS = 215 217 | ENUM_CM_EVENT_MSG_OBJECTIVES_INTRO_NEWS = 216 218 | ENUM_CM_EVENT_MSG_MATCH_DECIDED_IN_PENALTY_SHOOTOUT = 217 219 | ENUM_CM_EVENT_MSG_NON_USER_MATCH_RESULT = 218 220 | ENUM_CM_EVENT_MSG_INTERNATIONAL_WEEK_NEWS = 219 221 | ENUM_CM_EVENT_MSG_INTERNATIONAL_KNOCKOUT_STAGE_NEWS = 220 222 | ENUM_CM_EVENT_MSG_INTERNATIONAL_GROUP_STAGE_NEWS = 221 223 | ENUM_CM_EVENT_MSG_6_POINTER_LOGIC = 222 224 | ENUM_CM_EVENT_MSG_MARQUEE_MATCH_NEWS = 223 225 | ENUM_CM_EVENT_MSG_RIVALS_NON_USER_NEWS = 224 226 | ENUM_CM_EVENT_MSG_CLINCH_NEWS_FOR_LEAGUE_TITLE_POSSIBLE_WIN = 225 227 | ENUM_CM_EVENT_MSG_CLINCH_NEWS_FOR_LEAGUE_TITLE_POSSIBLE_DRAW = 226 228 | ENUM_CM_EVENT_MSG_CLINCH_NEWS_FOR_LEAGUE_PROMOTION_POSSIBLE_WIN = 227 229 | ENUM_CM_EVENT_MSG_CLINCH_NEWS_FOR_LEAGUE_PLAYOFF_POSSIBLE_WIN = 228 230 | ENUM_CM_EVENT_MSG_CLINCH_NEWS_FOR_CHAMPIONS_LEAGUE_QUALIFICATION_WIN = 229 231 | ENUM_CM_EVENT_MSG_CLINCH_NEWS_FOR_EUROPA_LEAGUE_QUALIFICATION_WIN = 230 232 | ENUM_CM_EVENT_MSG_ONES_TO_WATCH = 231 233 | ENUM_CM_EVENT_MSG_ONES_FOR_THE_FUTURE = 232 234 | ENUM_CM_EVENT_MSG_CUP_POSSIBLE_QUALIFICATION_WITH_A_WIN = 233 235 | ENUM_CM_EVENT_MSG_CUP_POSSIBLE_QUALIFICATION_WITH_A_WIN_AND_USER_TEA = 234 236 | ENUM_CM_EVENT_MSG_CUP_POSSIBLE_ELIMINATION_WITH_A_DRAW = 235 237 | ENUM_CM_EVENT_MSG_CUP_POSSIBLE_ELIMINATION_IF_USER_DOES_NOT_WIN = 236 238 | ENUM_CM_EVENT_MSG_CUP_STAGE_MATCH = 237 239 | ENUM_CM_EVENT_MSG_FIGHT_FOR_TOP_SCORER = 238 240 | ENUM_CM_EVENT_MSG_LEAGUE_TITLE_CLINCHED = 239 241 | ENUM_CM_EVENT_MSG_LEAGUE_PLAYOFF_CLINCHED = 240 242 | ENUM_CM_EVENT_MSG_LEAGUE_PROMOTION_CLINCHED = 241 243 | ENUM_CM_EVENT_MSG_EUROPA_LEAGUE_QUALIFICATION_CLINCHED = 242 244 | ENUM_CM_EVENT_MSG_CHAMPIONS_LEAGUE_QUALIFICATION_CLINCHED = 243 245 | ENUM_CM_EVENT_MSG_CUP_POSSIBLE_ELIMINATION_CLINCHED = 244 246 | ENUM_CM_EVENT_MSG_CUP_POSSIBLE_ELIMINATION_CLINCHED_EXPECTED = 245 247 | ENUM_CM_EVENT_MSG_CUP_QUALIFICATION_CLINCHED = 246 248 | ENUM_CM_EVENT_MSG_UCL_DRAW_DATE_GROUPS_ANTICIPATION_NEWS = 247 249 | ENUM_CM_EVENT_MSG_EL_DRAW_DATE_GROUPS_ANTICIPATION_NEWS = 248 250 | ENUM_CM_EVENT_MSG_SUDA_DRAW_DATE_GROUPS_ANTICIPATION_NEWS = 249 251 | ENUM_CM_EVENT_MSG_UCL_DRAW_DATE_GROUPS_NEWS = 250 252 | ENUM_CM_EVENT_MSG_EL_DRAW_DATE_GROUPS_NEWS = 251 253 | ENUM_CM_EVENT_MSG_SUDA_DRAW_DATE_GROUPS_NEWS = 252 254 | ENUM_CM_EVENT_MSG_UCL_DRAW_DATE_GROUPS_REACTION_NEWS = 253 255 | ENUM_CM_EVENT_MSG_EL_DRAW_DATE_GROUPS_REACTION_NEWS = 254 256 | ENUM_CM_EVENT_MSG_SUDA_DRAW_DATE_GROUPS_REACTION_NEWS = 255 257 | ENUM_CM_EVENT_MSG_UCL_DRAW_DATE_FIRST_KO_ROUND_ANTICIPATION_NEWS = 256 258 | ENUM_CM_EVENT_MSG_EL_DRAW_DATE_FIRST_KO_ROUND_ANTICIPATION_NEWS = 257 259 | ENUM_CM_EVENT_MSG_EL_DRAW_DATE_FIRST_KO_ROUND_NEWS = 258 260 | ENUM_CM_EVENT_MSG_EL_DRAW_DATE_FIRST_KO_ROUND_REACTION_NEWS = 259 261 | ENUM_CM_EVENT_MSG_UCL_DRAW_DATE_KO_ROUND_NEWS = 260 262 | ENUM_CM_EVENT_MSG_EL_DRAW_DATE_KO_ROUND_NEWS = 261 263 | ENUM_CM_EVENT_MSG_UCL_DRAW_DATE_KO_ROUND_REACTION_NEWS = 262 264 | ENUM_CM_EVENT_MSG_EL_DRAW_DATE_KO_ROUND_REACTION_NEWS = 263 265 | ENUM_CM_EVENT_MSG_UEFA_TEAM_OF_THE_YEAR = 264 266 | ENUM_CM_EVENT_MSG_FIGHT_4_UEFA_TEAM_OF_THE_YEAR = 265 267 | ENUM_CM_EVENT_MSG_DEBUG_NEWS = 266 268 | ENUM_CM_EVENT_MSG_CHAMPION_OF_COPA_LIBERTADORES = 267 269 | ENUM_CM_EVENT_MSG_CHAMPION_OF_COPA_SUDAMERICANA = 268 270 | ENUM_CM_EVENT_MSG_CHAMPION_OF_RECOPA_SUDAMERICANA = 269 271 | ENUM_CM_EVENT_MSG_LIBE_DRAW_DATE_GROUPS_ANTICIPATION_NEWS = 270 272 | ENUM_CM_EVENT_MSG_LIBE_DRAW_DATE_GROUPS_NEWS = 271 273 | ENUM_CM_EVENT_MSG_LIBE_DRAW_DATE_GROUPS_REACTION_NEWS = 272 274 | ENUM_CM_EVENT_MSG_LIBE_DRAW_DATE_FIRST_KO_ROUND_ANTICIPATION_NEWS = 273 275 | ENUM_CM_EVENT_MSG_SUDA_DRAW_DATE_FIRST_KO_ROUND_ANTICIPATION_NEWS = 274 276 | ENUM_CM_EVENT_MSG_LIBE_DRAW_DATE_KO_ROUND_NEWS = 275 277 | ENUM_CM_EVENT_MSG_SUDA_DRAW_DATE_KO_ROUND_NEWS = 276 278 | ENUM_CM_EVENT_MSG_LIBE_DRAW_DATE_KO_ROUND_REACTION_NEWS = 277 279 | ENUM_CM_EVENT_MSG_SUDA_DRAW_DATE_KO_ROUND_REACTION_NEWS = 278 280 | ENUM_CM_EVENT_MSG_CHAMPION_OF_EUROPA_CONFERENCE_LEAGUE = 279 281 | ENUM_CM_EVENT_MSG_UECL_DRAW_DATE_GROUPS_ANTICIPATION_NEWS = 280 282 | ENUM_CM_EVENT_MSG_UECL_DRAW_DATE_GROUPS_NEWS = 281 283 | ENUM_CM_EVENT_MSG_UECL_DRAW_DATE_GROUPS_REACTION_NEWS = 282 284 | ENUM_CM_EVENT_MSG_UECL_DRAW_DATE_FIRST_KO_ROUND_ANTICIPATION_NEWS = 283 285 | ENUM_CM_EVENT_MSG_UECL_DRAW_DATE_FIRST_KO_ROUND_NEWS = 284 286 | ENUM_CM_EVENT_MSG_UECL_DRAW_DATE_FIRST_KO_ROUND_REACTION_NEWS = 285 287 | ENUM_CM_EVENT_MSG_UECL_DRAW_DATE_KO_ROUND_NEWS = 286 288 | ENUM_CM_EVENT_MSG_UECL_DRAW_DATE_KO_ROUND_REACTION_NEWS = 287 289 | 290 | -- Career Mode Managers 291 | ENUM_NoType = 0 292 | ENUM_IFCEInterface = 1 293 | ENUM_DUIFlapMenu = 2 294 | ENUM_DUIFlapSystem = 3 295 | ENUM_DUIMailBox = 4 296 | ENUM_FCEIIDataInterface = 5 297 | ENUM_FCEIIDebugInterface = 6 298 | ENUM_FCEIIDLCRegistryInterface = 7 299 | ENUM_FCEIIEventHandlerInterface = 8 300 | ENUM_FCEIIExternalCommInterface = 9 301 | ENUM_FCEIIFileInterface = 10 302 | ENUM_FCEIIMemoryInterface = 11 303 | ENUM_FCEIISystemInterface = 12 304 | ENUM_FCEIRandomNumberGen = 13 305 | ENUM_FCEIITeamSetupInterface = 14 306 | ENUM_FCEIIConnectedServicesInterface = 15 307 | ENUM_FCEGameModesScreenController = 16 308 | ENUM_FCEGameModesTextBedIO = 17 309 | ENUM_FCEGameModesTransferIO = 18 310 | ENUM_FCEGameModesFCECareerModeAchievementManager = 19 311 | ENUM_FCEGameModesFCECareerModeActionPopupManager = 20 312 | ENUM_FCEGameModesFCECareerModeActiveCompetitionsManager = 21 313 | ENUM_FCEGameModesFCECareerModeAttributeModifierManager = 22 314 | ENUM_FCEGameModesFCECareerModeAwardsManager = 23 315 | ENUM_FCEGameModesFCECareerModeBoardManager = 24 316 | ENUM_FCEGameModesFCECareerModeBudgetManager = 25 317 | ENUM_FCEGameModesFCECareerModeCalendarManager = 26 318 | ENUM_FCEGameModesFCECareerModeCareerModeNavHelper = 27 319 | ENUM_FCEGameModesFCECareerModeCareerModeScreensManager = 28 320 | ENUM_FCEGameModesFCECareerModeCoachManager = 29 321 | ENUM_FCEGameModesFCECareerModeCommentatorNotesManager = 30 322 | ENUM_FCEGameModesFCECareerModeConcurrentMatchManager = 31 323 | ENUM_FCEGameModesFCECareerModeContractTerminationManager = 32 324 | ENUM_FCEGameModesFCECareerModeCupSituationSystem = 33 325 | ENUM_FCEGameModesFCECareerModeDataController = 34 326 | ENUM_FCEGameModesFCECareerModeDebugManager = 35 327 | ENUM_FCEGameModesFCECareerModeDebugMatchDayLogManager = 36 328 | ENUM_FCEGameModesFCECareerModeDebugStatsManager = 37 329 | ENUM_FCEGameModesFCECareerModeEmailManager = 38 330 | ENUM_FCEGameModesFCECareerModeEndOfSeasonManager = 39 331 | ENUM_FCEGameModesFCECareerModeFirstSeasonManager = 40 332 | ENUM_FCEGameModesFCECareerModeEventsMailBox = 41 333 | ENUM_FCEGameModesFCECareerModeEventsManager = 42 334 | ENUM_FCEGameModesFCECareerModeFCECommsManager = 43 335 | ENUM_FCEGameModesFCECareerModeFCEDataObjectManager = 44 336 | ENUM_FCEGameModesFCECareerModeFinanceManager = 45 337 | ENUM_FCEGameModesFCECareerModeFinancialUtil = 46 338 | ENUM_FCEGameModesFCECareerModeFitnessManager = 47 339 | ENUM_FCEGameModesFCECareerModeFixtureManager = 48 340 | ENUM_FCEGameModesFCECareerModeFlowManager = 49 341 | ENUM_FCEGameModesFCECareerModePreSeasonTourManager = 50 342 | ENUM_FCEGameModesFCECareerModeHistoricalStatsManager = 51 343 | ENUM_FCEGameModesFCECareerModeIniSettingsManager = 52 344 | ENUM_FCEGameModesFCECareerModeInterestingResultManager = 53 345 | ENUM_FCEGameModesFCECareerModeInternationalsManager = 54 346 | ENUM_FCEGameModesFCECareerModeJobOfferManager = 55 347 | ENUM_FCEGameModesFCECareerModeJobSwitchManager = 56 348 | ENUM_FCEGameModesFCECareerModeLoansManager = 57 349 | ENUM_FCEGameModesFCECareerModeMainHubManager = 58 350 | ENUM_FCEGameModesFCECareerModeManagerAI = 59 351 | ENUM_FCEGameModesFCECareerModeManagerHistoryManager = 60 352 | ENUM_FCEGameModesFCECareerModeManagerSuccessManager = 61 353 | ENUM_FCEGameModesFCECareerModeMatchImportanceManager = 62 354 | ENUM_FCEGameModesFCECareerModeMatchSimulator = 63 355 | ENUM_FCEGameModesFCECareerModeMissionManager = 64 356 | ENUM_FCEGameModesFCECareerModeTcmFinanceManager = 65 357 | ENUM_FCEGameModesFCECareerModeNewsManager = 66 358 | ENUM_FCEGameModesFCECareerModeNextMatchManager = 67 359 | ENUM_FCEGameModesFCECareerModePersistentEventsManager = 68 360 | ENUM_FCEGameModesFCECareerModePlayableHighlightsManager = 69 361 | ENUM_FCEGameModesFCECareerModePlayAsPlayerManager = 70 362 | ENUM_FCEGameModesFCECareerModePAPMatchObjectivesManager = 71 363 | ENUM_FCEGameModesFCECareerModePAPPersonalityManager = 72 364 | ENUM_FCEGameModesFCECareerModePAPActivitiesManager = 73 365 | ENUM_FCEGameModesFCECareerModePAPAgentManager = 74 366 | ENUM_FCEGameModesFCECareerModePlayerContractManager = 75 367 | ENUM_FCEGameModesFCECareerModePlayerDataRevealManager = 76 368 | ENUM_FCEGameModesFCECareerModePlayerFormEventsManager = 77 369 | ENUM_FCEGameModesFCECareerModePlayerFormManager = 78 370 | ENUM_FCEGameModesFCECareerModePlayerGrowthManager = 79 371 | ENUM_FCEGameModesFCECareerModePlayerMonitoringManager = 80 372 | ENUM_FCEGameModesFCECareerModePlayerMoraleManager = 81 373 | ENUM_FCEGameModesFCECareerModePlayerRetirementManager = 82 374 | ENUM_FCEGameModesFCECareerModePlayerHeadsManager = 83 375 | ENUM_FCEGameModesFCECareerModePlayerSearchManager = 84 376 | ENUM_FCEGameModesFCECareerModePlayerStatusManager = 85 377 | ENUM_FCEGameModesFCECareerModePlayerUtil = 86 378 | ENUM_FCEGameModesFCECareerModePlayerValueManager = 87 379 | ENUM_FCEGameModesFCECareerModePlayerWageManager = 88 380 | ENUM_FCEGameModesFCECareerModePlaystyleManager = 89 381 | ENUM_FCEGameModesFCECareerModePresentationManager = 90 382 | ENUM_FCEGameModesFCECareerModeProfileStatsManager = 91 383 | ENUM_FCEGameModesFCECareerModeManagerModeSeasonObjectiveManager = 92 384 | ENUM_FCEGameModesFCECareerModeSavedInputManager = 93 385 | ENUM_FCEGameModesFCECareerModeScoutManager = 94 386 | ENUM_FCEGameModesFCECareerModeScriptManager = 95 387 | ENUM_FCEGameModesFCECareerModeSeasonObjectiveManager = 96 388 | ENUM_FCEGameModesFCECareerModeOldSeasonObjectiveManager = 97 389 | ENUM_FCEGameModesFCECareerModeObjectivesHistoryManager = 98 390 | ENUM_FCEGameModesFCECareerModeSeasonSituationSystem = 99 391 | ENUM_FCEGameModesFCECareerModeSeasonStatsManager = 100 392 | ENUM_FCEGameModesFCECareerModeSimDayManager = 101 393 | ENUM_FCEGameModesFCECareerModeSimResultsManager = 102 394 | ENUM_FCEGameModesFCECareerModeSoakManager = 103 395 | ENUM_FCEGameModesFCECareerModeSquadRankingManager = 104 396 | ENUM_FCEGameModesFCECareerModeStaffManager = 105 397 | ENUM_FCEGameModesFCECareerModeStandingsViewManager = 106 398 | ENUM_FCEGameModesFCECareerModeStatisticsViewManager = 107 399 | ENUM_FCEGameModesFCECareerModeStoryManager = 108 400 | ENUM_FCEGameModesFCECareerModeCareerStoryManager = 109 401 | ENUM_FCEGameModesFCECareerModeCMTableAnalysisStories = 110 402 | ENUM_FCEGameModesFCECareerModeTournamentStoryManager = 111 403 | ENUM_FCEGameModesFCECareerModeSuspensionManager = 112 404 | ENUM_FCEGameModesFCECareerModeTalkToPressManager = 113 405 | ENUM_FCEGameModesFCECareerModeTeamInterfaceImpl = 114 406 | ENUM_FCEGameModesFCECareerModeTeamManagementScreenManager = 115 407 | ENUM_FCEGameModesFCECareerModeTeamMoveManager = 116 408 | ENUM_FCEGameModesFCECareerModeTeamUtil = 117 409 | ENUM_FCEGameModesFCECareerModeTelemetryManager = 118 410 | ENUM_FCEGameModesFCECareerModeTimingsManager = 119 411 | ENUM_FCEGameModesFCECareerModeTournamentModeManager = 120 412 | ENUM_FCEGameModesFCECareerModeTrainingEventsManager = 121 413 | ENUM_FCEGameModesFCECareerModeTrainingCoachCareerManager = 122 414 | ENUM_FCEGameModesFCECareerModeTrainingPlayerCareerManager = 123 415 | ENUM_FCEGameModesFCECareerModeTransferManager = 124 416 | ENUM_FCEGameModesFCECareerModeTrophyManager = 125 417 | ENUM_FCEGameModesFCECareerModeUserManager = 126 418 | ENUM_FCEGameModesFCECareerModeYouthPlayerManager = 127 419 | ENUM_FCEGameModesFCECareerModeYouthPlayerUtil = 128 420 | ENUM_FCEGameModesFCECareerModeCompetitionObjectivesManager = 129 421 | ENUM_FCEGameModesFCECareerModeClubObjectivesManager = 130 422 | ENUM_FCEGameModesFCECareerModeCMStories = 131 423 | ENUM_FCEGameModesFCECareerModeLeagueTeamObjectivesInterface = 132 424 | ENUM_FCEGameModesFCECareerModeLeagueObjectivesAnalysisInterface = 133 425 | ENUM_FCEGameModesFCECareerModeUserCompetitionObjectivesInterface = 134 426 | ENUM_FCEGameModesFCECareerModeCompetitionObjectivesCheckData = 135 427 | ENUM_FCEGameModesFCECareerModeSagaManager = 136 428 | ENUM_FCEGameModesFCECareerModeCinematicsDataManager = 137 429 | ENUM_FCEGameModesFCECareerModePlayerConversationManager = 138 430 | ENUM_FCEGameModesFCECareerModeCreatedPlayerGrowthManager = 139 431 | ENUM_FCEGameModesFCECareerModeCategoryRatingManager = 140 432 | ENUM_FCEGameModesFCECareerModeEmailUtils = 141 433 | ENUM_FCEGameModesFCECareerModeFixtureUtils = 142 434 | ENUM_FCEGameModesFCECareerModeLeagueUtils = 143 435 | ENUM_FCEGameModesFCECareerModeMiscUtils = 144 436 | ENUM_FCEGameModesFCECareerModeNewsUtils = 145 437 | ENUM_FCEGameModesFCECareerModeResultUtils = 146 438 | ENUM_FCEGameModesFCECareerModeStatsUtils = 147 439 | ENUM_FCEGameModesFCECareerModeStringUtils = 148 440 | ENUM_FCEGameModesFCECareerModeTeamUtils = 149 441 | ENUM_FCEGameModesFCECareerModeAwardUtil = 150 442 | ENUM_FCEGameModesCommonFCEDataManager = 151 443 | -------------------------------------------------------------------------------- /lua/libs/v2/imports/career_mode/helpers.lua: -------------------------------------------------------------------------------- 1 | require 'imports/core/common' 2 | require 'imports/career_mode/enums' 3 | require 'imports/career_mode/consts' 4 | 5 | -- Get FCE Career Mode Manager object. 6 | -- Type ID in lua\libs\v2\imports\career_mode\enums.lua (ENUM_FCEGameModes) 7 | function GetManagerObjByTypeId(type_id) 8 | if type(type_id) ~= "number" then 9 | LOGGER:LogError("GetManagerObjByTypeId passed type_id is not a number!") 10 | return 0 11 | end 12 | 13 | local result = 0 14 | 15 | local comm_impl = GetPlugin(ENUM_djb2FeFceGMCommServiceInterface_CLSS) 16 | if (comm_impl <= 0) then return 0 end 17 | 18 | local mode_managers = MEMORY:ReadMultilevelPointer(comm_impl, {0x20, 0x10}) 19 | local mode_manager = mode_managers + (0x20 * type_id) 20 | 21 | -- Check if there is any instance 22 | if (MEMORY:ReadInt(mode_manager + 0x10) ~= 1) then 23 | return 0 24 | end 25 | 26 | local mode_manager_type = MEMORY:ReadPointer(mode_manager + 0x8) 27 | -- Check count 28 | if (MEMORY:ReadInt(mode_manager_type + 0x10) ~= 1) then 29 | return 0 30 | end 31 | 32 | result = MEMORY:ReadMultilevelPointer(mode_manager, {0x18, 0x0}) 33 | 34 | return result 35 | end 36 | 37 | function SetSquadRole(playerid, role) 38 | local player_status_mgr = GetManagerObjByTypeId(ENUM_FCEGameModesFCECareerModePlayerStatusManager) 39 | 40 | local PLAYERROLE_STRUCT = { 41 | mPlayerID = 0x0, 42 | mRole = 0x4, 43 | 44 | mSize = 0x8 45 | } 46 | 47 | local vec_begin_offset = 0x18 48 | local vec_end_offset = vec_begin_offset + 0x8 49 | 50 | local _start = MEMORY:ReadPointer(player_status_mgr + vec_begin_offset) 51 | local _end = MEMORY:ReadPointer(player_status_mgr + vec_end_offset) 52 | if (not _start) or (not _end) then return end 53 | 54 | local _max = 55 55 | local current_addr = _start 56 | local player_found = false 57 | for i=1, _max do 58 | if current_addr >= _end then return end 59 | 60 | if (playerid == MEMORY:ReadInt(current_addr + PLAYERROLE_STRUCT.mPlayerID)) then 61 | MEMORY:WriteInt(current_addr + PLAYERROLE_STRUCT.mRole, role) 62 | return 63 | end 64 | 65 | current_addr = current_addr + PLAYERROLE_STRUCT.mSize 66 | end 67 | end 68 | 69 | function GetCMEventNameByID(event_id) 70 | return CONST_CM_EVENTS_NAMES[event_id] or string.format("EVENT_%d", event_id) 71 | end 72 | 73 | function GetUserTeamID() 74 | if not IsInCM() then return 0 end 75 | 76 | local career_users_table = LE.db:GetTable("career_users") 77 | local first_record = career_users_table:GetFirstRecord() 78 | 79 | return career_users_table:GetRecordFieldValue(first_record, "clubteamid") 80 | end 81 | 82 | function GetUserNationalTeamID() 83 | if not IsInCM() then return 0 end 84 | 85 | local career_users_table = LE.db:GetTable("career_users") 86 | local first_record = career_users_table:GetFirstRecord() 87 | 88 | return career_users_table:GetRecordFieldValue(first_record, "nationalteamid") 89 | end 90 | 91 | function GetUserSeniorTeamPlayerIDs() 92 | local result = {} 93 | if not IsInCM() then return result end 94 | 95 | local user_teamid = GetUserTeamID() 96 | 97 | -- From this table should be the quickest I guess 98 | local career_playercontract_table = LE.db:GetTable("career_playercontract") 99 | local current_record = career_playercontract_table:GetFirstRecord() 100 | while current_record > 0 do 101 | local teamid = career_playercontract_table:GetRecordFieldValue(current_record, "teamid") 102 | if teamid == user_teamid then 103 | local playerid = career_playercontract_table:GetRecordFieldValue(current_record, "playerid") 104 | result[playerid] = true 105 | -- Log(string.format("%d", playerid)) 106 | end 107 | current_record = career_playercontract_table:GetNextValidRecord() 108 | end 109 | 110 | return result 111 | end 112 | 113 | function UserTeamSetPlayersForm(v) 114 | local bIsInCM = IsInCM() 115 | if not bIsInCM then return end 116 | 117 | local user_team_playerids = GetUserSeniorTeamPlayerIDs() 118 | local players_count = table_count(user_team_playerids) 119 | local updated_players = 0 120 | 121 | -- Get Players Table 122 | local players_table = LE.db:GetTable("players") 123 | local current_record = players_table:GetFirstRecord() 124 | 125 | local playerid = 0 126 | while current_record > 0 do 127 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 128 | if user_team_playerids[playerid] then 129 | SetPlayerForm(playerid, v) 130 | updated_players = updated_players + 1 131 | end 132 | 133 | if (updated_players == players_count) then 134 | return 135 | end 136 | 137 | current_record = players_table:GetNextValidRecord() 138 | end 139 | end 140 | 141 | function UserTeamSetPlayersSharpness(v) 142 | local bIsInCM = IsInCM() 143 | if not bIsInCM then return end 144 | 145 | local user_team_playerids = GetUserSeniorTeamPlayerIDs() 146 | local players_count = table_count(user_team_playerids) 147 | local updated_players = 0 148 | 149 | -- Get Players Table 150 | local players_table = LE.db:GetTable("players") 151 | local current_record = players_table:GetFirstRecord() 152 | 153 | local playerid = 0 154 | while current_record > 0 do 155 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 156 | if user_team_playerids[playerid] then 157 | SetPlayerSharpness(playerid, v) 158 | updated_players = updated_players + 1 159 | end 160 | 161 | if (updated_players == players_count) then 162 | return 163 | end 164 | 165 | current_record = players_table:GetNextValidRecord() 166 | end 167 | end 168 | 169 | function UserTeamSetPlayersMorale(v) 170 | local bIsInCM = IsInCM() 171 | if not bIsInCM then return end 172 | 173 | local user_team_playerids = GetUserSeniorTeamPlayerIDs() 174 | local players_count = table_count(user_team_playerids) 175 | local updated_players = 0 176 | 177 | -- Get Players Table 178 | local players_table = LE.db:GetTable("players") 179 | local current_record = players_table:GetFirstRecord() 180 | 181 | local playerid = 0 182 | while current_record > 0 do 183 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 184 | if user_team_playerids[playerid] then 185 | SetPlayerMorale(playerid, v) 186 | updated_players = updated_players + 1 187 | end 188 | 189 | if (updated_players == players_count) then 190 | return 191 | end 192 | 193 | current_record = players_table:GetNextValidRecord() 194 | end 195 | end 196 | 197 | function UserTeamSetPlayersFormSharpnessMorale(v_form, v_sharpness, v_morale) 198 | local bIsInCM = IsInCM() 199 | if not bIsInCM then return end 200 | 201 | local user_team_playerids = GetUserSeniorTeamPlayerIDs() 202 | local players_count = table_count(user_team_playerids) 203 | local updated_players = 0 204 | 205 | -- Get Players Table 206 | local players_table = LE.db:GetTable("players") 207 | local current_record = players_table:GetFirstRecord() 208 | 209 | local playerid = 0 210 | while current_record > 0 do 211 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 212 | if user_team_playerids[playerid] then 213 | SetPlayerForm(playerid, v_form) 214 | SetPlayerSharpness(playerid, v_sharpness) 215 | SetPlayerMorale(playerid, v_morale) 216 | updated_players = updated_players + 1 217 | end 218 | 219 | if (updated_players == players_count) then 220 | return 221 | end 222 | 223 | current_record = players_table:GetNextValidRecord() 224 | end 225 | end 226 | 227 | function UserTeamSetPlayersFitness(v_fitness) 228 | local bIsInCM = IsInCM() 229 | if not bIsInCM then return end 230 | 231 | local user_team_playerids = GetUserSeniorTeamPlayerIDs() 232 | local players_count = table_count(user_team_playerids) 233 | local updated_players = 0 234 | 235 | -- Get Players Table 236 | local players_table = LE.db:GetTable("players") 237 | local current_record = players_table:GetFirstRecord() 238 | 239 | local playerid = 0 240 | while current_record > 0 do 241 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 242 | if user_team_playerids[playerid] then 243 | SetPlayerFitness(playerid, v_fitness) 244 | updated_players = updated_players + 1 245 | end 246 | 247 | if (updated_players == players_count) then 248 | return 249 | end 250 | 251 | current_record = players_table:GetNextValidRecord() 252 | end 253 | end 254 | 255 | -------------------------------------------------------------------------------- /lua/libs/v2/imports/career_mode/managers.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xAranaktu/FC-24-Live-Editor/e7fb905bd0666d30fdbc42b2dffa2e971b1a7102/lua/libs/v2/imports/career_mode/managers.lua -------------------------------------------------------------------------------- /lua/libs/v2/imports/core/common.lua: -------------------------------------------------------------------------------- 1 | function table_count(T) 2 | local count = 0 3 | for _ in pairs(T) do count = count + 1 end 4 | return count 5 | end 6 | 7 | function split(s, delimiter) 8 | local result = {}; 9 | for match in (s..delimiter):gmatch("(.-)"..delimiter) do 10 | table.insert(result, match); 11 | end 12 | return result; 13 | end -------------------------------------------------------------------------------- /lua/libs/v2/imports/core/consts.lua: -------------------------------------------------------------------------------- 1 | DEFAULT_YEAR = 2023 2 | DEFAULT_MONTH = 7 3 | DEFAULT_DAY = 1 4 | -------------------------------------------------------------------------------- /lua/libs/v2/imports/core/date.lua: -------------------------------------------------------------------------------- 1 | require 'imports/core/consts' 2 | 3 | local DATE = {} 4 | 5 | function DATE:new() 6 | local o = setmetatable({}, self) 7 | 8 | -- lua metatable 9 | self.__index = self 10 | self.__name = "FC::DATE" 11 | 12 | -- From imports\core\consts.lua 13 | self.day = DEFAULT_DAY 14 | self.month = DEFAULT_MONTH 15 | self.year = DEFAULT_YEAR 16 | 17 | return o 18 | end 19 | 20 | -- Convert from int date to DATE 21 | -- for example 20230503 to: 22 | -- self.day = 3 23 | -- self.month = 5 24 | -- self.year = 2023 25 | function DATE:FromInt(int_date) 26 | self.day = math.floor(int_date % 100) 27 | self.month = math.floor((int_date % 10000) / 100) 28 | self.year = math.floor(int_date / 10000) 29 | end 30 | 31 | -- Convert from DATE to int 32 | -- For example: 33 | -- self.day = 3 34 | -- self.month = 5 35 | -- self.year = 2023 36 | -- to: 20230503 37 | function DATE:ToInt() 38 | return self.year * 10000 + self.month * 100 + self.day 39 | end 40 | 41 | -- Convert Date To String, by default to DD/MM/YYYY 42 | function DATE:ToString() 43 | return string.format("%02d/%02d/%04d", self.day, self.month, self.year) 44 | end 45 | 46 | -- Convert days to date 47 | -- Used by playerjointeamdate and birthdate fields in players table 48 | function DATE:FromGregorianDays(days) 49 | local a, b, c, d, e, m 50 | a = days + 2331205 51 | b = math.floor((4*a+3)/146097) 52 | c = math.floor((-b * 146097 / 4) + a) 53 | d = math.floor((4 * c + 3)/1461) 54 | e = math.floor(-1461 * d / 4 + c) 55 | m = math.floor((5*e+2)/153) 56 | 57 | self.day = math.ceil(-(153 * m + 2) / 5) + e + 1 58 | self.month = math.ceil(-m / 10) * 12 + m + 3 59 | self.year = b * 100 + d - 4800 + math.floor(m / 10) 60 | end 61 | 62 | function DATE:ToGregorianDays() 63 | local a = math.floor((14 - self.month) / 12) 64 | local m = self.month + 12 * a - 3; 65 | local y = self.year + 4800 - a; 66 | return self.day + math.floor((153 * m + 2) / 5) + y * 365 + math.floor(y/4) - math.floor(y/100) + math.floor(y/400) - 2331205; 67 | end 68 | 69 | return DATE; 70 | -------------------------------------------------------------------------------- /lua/libs/v2/imports/core/live_editor.lua: -------------------------------------------------------------------------------- 1 | MEMORY = require 'imports/core/memory' 2 | LOGGER = require 'imports/core/logger' 3 | local DB = require 'imports/t3db/db' 4 | local GameplayAttribulatorManager = require 'imports/gameplay/gp_attribulator_manager' 5 | local AardvarkManager = require 'imports/aardvark/aardvark_manager' 6 | local PLAYERS_MANAGER = require 'imports/core/managers/players_manager' 7 | 8 | local LIVE_EDITOR = {} 9 | 10 | function LIVE_EDITOR:new() 11 | local o = setmetatable({}, self) 12 | 13 | -- lua metatable 14 | self.__index = self 15 | self.__name = "LIVE_EDITOR" 16 | 17 | -- 18 | self.version = "" 19 | self.data_path = "" 20 | self.game_base = 0 21 | self.game_size = 0 22 | self.game_name = "" 23 | 24 | -- DB 25 | self.db = DB:new() 26 | 27 | -- Gameplay Attribulator Manager 28 | self.gameplay_attribulator_manager = GameplayAttribulatorManager:new() 29 | 30 | -- AardvarkManager 31 | self.aardvark_manager = AardvarkManager:new() 32 | 33 | -- Players Manager 34 | self.players_manager = PLAYERS_MANAGER:new() 35 | 36 | -- config.json 37 | self.config = {} 38 | 39 | self:Init() 40 | 41 | return o 42 | end 43 | 44 | function LIVE_EDITOR:Init() 45 | LOGGER:LogInfo("Init LIVE EDITOR LUA API V2") 46 | self.version = LE_VERSION 47 | self.data = LE_DATA_PATH 48 | self.game_base = LE_GAME_MODULE_BASE 49 | self.game_size = LE_GAME_MODULE_SIZE 50 | self.game_name = LE_GAME_MODULE_NAME 51 | 52 | self.gameplay_attribulator_manager:Init() 53 | self.players_manager:Init(self.db) 54 | end 55 | 56 | function LIVE_EDITOR:Load() 57 | LOGGER:LogInfo(string.format("Load LIVE EDITOR %s LUA API V2", self.version)) 58 | end 59 | 60 | return LIVE_EDITOR; -------------------------------------------------------------------------------- /lua/libs/v2/imports/core/logger.lua: -------------------------------------------------------------------------------- 1 | local LOGGER = {} 2 | 3 | function LOGGER:LogDebug(_text) 4 | Log(_text, 0) 5 | end 6 | 7 | function LOGGER:LogInfo(_text) 8 | Log(_text, 1) 9 | end 10 | 11 | function LOGGER:LogWarn(_text) 12 | Log(_text, 2) 13 | end 14 | 15 | function LOGGER:LogError(_text) 16 | Log(_text, 3) 17 | end 18 | 19 | function LOGGER:LogFatal(_text) 20 | Log(_text, 4) 21 | end 22 | 23 | 24 | return LOGGER; -------------------------------------------------------------------------------- /lua/libs/v2/imports/core/managers/players_manager.lua: -------------------------------------------------------------------------------- 1 | local PLAYERS_MANAGER = {} 2 | 3 | function PLAYERS_MANAGER:new() 4 | local o = setmetatable({}, self) 5 | 6 | -- lua metatable 7 | self.__index = self 8 | self.__name = "PLAYERS_MANAGER" 9 | 10 | self.db = nil 11 | 12 | return o 13 | end 14 | 15 | function PLAYERS_MANAGER:Init(db) 16 | self.db = db 17 | end 18 | 19 | function PLAYERS_MANAGER:GetPlayerName(playerid) 20 | return "GetPlayerName" 21 | end 22 | 23 | 24 | return PLAYERS_MANAGER; -------------------------------------------------------------------------------- /lua/libs/v2/imports/core/memory.lua: -------------------------------------------------------------------------------- 1 | local MEMORY = {} 2 | 3 | -- Writing to process memory 4 | 5 | function MEMORY:WriteBytes(_address, _value) 6 | return WriteBytes(_address, _value) 7 | end 8 | 9 | function MEMORY:WriteShort(_address, _value) 10 | return WriteShort(_address, _value) 11 | end 12 | 13 | function MEMORY:WriteInt(_address, _value) 14 | return WriteInteger(_address, _value) 15 | end 16 | 17 | function MEMORY:WriteFloat(_address, _value) 18 | return WriteFloat(_address, _value) 19 | end 20 | 21 | function MEMORY:WriteQword(_address, _value) 22 | return WriteQword(_address, _value) 23 | end 24 | 25 | function MEMORY:WriteString(_address, _value) 26 | return WriteString(_address, _value) 27 | end 28 | 29 | -- Reading from process memory 30 | 31 | function MEMORY:ReadBytes(addr, count) 32 | return ReadBytes(addr, count) 33 | end 34 | 35 | function MEMORY:ReadChar(addr) 36 | return ReadBytes(addr, 1)[1] 37 | end 38 | 39 | function MEMORY:ReadBool(addr) 40 | return ReadBytes(addr, 1)[1] > 0 41 | end 42 | 43 | function MEMORY:ReadShort(addr) 44 | return ReadShort(addr) 45 | end 46 | 47 | function MEMORY:ReadInt(addr) 48 | return ReadInteger(addr) 49 | end 50 | 51 | function MEMORY:ReadFloat(addr) 52 | return ReadFloat(addr) 53 | end 54 | 55 | function MEMORY:ReadQword(addr) 56 | return ReadQword(addr) 57 | end 58 | 59 | function MEMORY:ReadPointer(addr) 60 | return ReadQword(addr) 61 | end 62 | 63 | function MEMORY:ReadString(addr, strlen) 64 | return ReadString(addr, strlen) 65 | end 66 | 67 | function MEMORY:ReadMultilevelPointer(base_addr, offsets) 68 | for i=1, #offsets do 69 | if base_addr == 0 or base_addr == nil then 70 | return 0 71 | end 72 | base_addr = ReadQword(base_addr+offsets[i]) 73 | end 74 | return base_addr 75 | end 76 | 77 | function MEMORY:AOBScanGameModule(aob) 78 | return AOBScan(LE_GAME_MODULE_BASE, LE_GAME_MODULE_SIZE, aob) 79 | end 80 | 81 | function MEMORY:AOBScanRegion(module_base_addr, module_size, aob) 82 | return AOBScan(module_base_addr, module_size, aob) 83 | end 84 | 85 | function MEMORY:ResolvePtr(addr, start) 86 | if type(addr) ~= "number" then 87 | addr = tonumber(addr, 16) 88 | end 89 | 90 | local relative_offset = 0 91 | local n_bytes = 4 92 | local bytes = ReadBytes(addr+start, n_bytes) 93 | 94 | for i=n_bytes, 1, -1 do 95 | relative_offset = (relative_offset << 8) + bytes[i] 96 | end 97 | 98 | return relative_offset + addr + start + 4 99 | end 100 | 101 | return MEMORY; -------------------------------------------------------------------------------- /lua/libs/v2/imports/core/player.lua: -------------------------------------------------------------------------------- 1 | local PLAYER = {} 2 | 3 | function PLAYER:new() 4 | local o = setmetatable({}, self) 5 | 6 | -- lua metatable 7 | self.__index = self 8 | self.__name = "PLAYER" 9 | 10 | self.playerid = -1 11 | self.month = DEFAULT_MONTH 12 | self.year = DEFAULT_YEAR 13 | 14 | return o 15 | end 16 | 17 | return PLAYER; -------------------------------------------------------------------------------- /lua/libs/v2/imports/external/json.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- json.lua 3 | -- 4 | -- Copyright (c) 2019 rxi 5 | -- 6 | -- Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | -- this software and associated documentation files (the "Software"), to deal in 8 | -- the Software without restriction, including without limitation the rights to 9 | -- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 10 | -- of the Software, and to permit persons to whom the Software is furnished to do 11 | -- so, subject to the following conditions: 12 | -- 13 | -- The above copyright notice and this permission notice shall be included in all 14 | -- copies or substantial portions of the Software. 15 | -- 16 | -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | -- SOFTWARE. 23 | -- 24 | 25 | local json = { _version = "0.1.1" } 26 | 27 | ------------------------------------------------------------------------------- 28 | -- Encode 29 | ------------------------------------------------------------------------------- 30 | 31 | local encode 32 | 33 | local escape_char_map = { 34 | [ "\\" ] = "\\\\", 35 | [ "\"" ] = "\\\"", 36 | [ "\b" ] = "\\b", 37 | [ "\f" ] = "\\f", 38 | [ "\n" ] = "\\n", 39 | [ "\r" ] = "\\r", 40 | [ "\t" ] = "\\t", 41 | } 42 | 43 | local escape_char_map_inv = { [ "\\/" ] = "/" } 44 | for k, v in pairs(escape_char_map) do 45 | escape_char_map_inv[v] = k 46 | end 47 | 48 | 49 | local function escape_char(c) 50 | return escape_char_map[c] or string.format("\\u%04x", c:byte()) 51 | end 52 | 53 | 54 | local function encode_nil(val) 55 | return "null" 56 | end 57 | 58 | 59 | local function encode_table(val, stack) 60 | local res = {} 61 | stack = stack or {} 62 | 63 | -- Circular reference? 64 | if stack[val] then error("circular reference") end 65 | 66 | stack[val] = true 67 | 68 | if rawget(val, 1) ~= nil or next(val) == nil then 69 | -- Treat as array -- check keys are valid and it is not sparse 70 | local n = 0 71 | for k in pairs(val) do 72 | if type(k) ~= "number" then 73 | error("invalid table: mixed or invalid key types") 74 | end 75 | n = n + 1 76 | end 77 | if n ~= #val then 78 | error("invalid table: sparse array") 79 | end 80 | -- Encode 81 | for i, v in ipairs(val) do 82 | table.insert(res, encode(v, stack)) 83 | end 84 | stack[val] = nil 85 | return "[" .. table.concat(res, ",") .. "]" 86 | 87 | else 88 | -- Treat as an object 89 | for k, v in pairs(val) do 90 | if type(k) ~= "string" then 91 | error("invalid table: mixed or invalid key types") 92 | end 93 | table.insert(res, encode(k, stack) .. ":" .. encode(v, stack)) 94 | end 95 | stack[val] = nil 96 | return "{" .. table.concat(res, ",") .. "}" 97 | end 98 | end 99 | 100 | 101 | local function encode_string(val) 102 | return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"' 103 | end 104 | 105 | 106 | local function encode_number(val) 107 | -- Check for NaN, -inf and inf 108 | if val ~= val or val <= -math.huge or val >= math.huge then 109 | error("unexpected number value '" .. tostring(val) .. "'") 110 | end 111 | return string.format("%.14g", val) 112 | end 113 | 114 | 115 | local type_func_map = { 116 | [ "nil" ] = encode_nil, 117 | [ "table" ] = encode_table, 118 | [ "string" ] = encode_string, 119 | [ "number" ] = encode_number, 120 | [ "boolean" ] = tostring, 121 | } 122 | 123 | 124 | encode = function(val, stack) 125 | local t = type(val) 126 | local f = type_func_map[t] 127 | if f then 128 | return f(val, stack) 129 | end 130 | error("unexpected type '" .. t .. "'") 131 | end 132 | 133 | 134 | function json.encode(val) 135 | return ( encode(val) ) 136 | end 137 | 138 | 139 | ------------------------------------------------------------------------------- 140 | -- Decode 141 | ------------------------------------------------------------------------------- 142 | 143 | local parse 144 | 145 | local function create_set(...) 146 | local res = {} 147 | for i = 1, select("#", ...) do 148 | res[ select(i, ...) ] = true 149 | end 150 | return res 151 | end 152 | 153 | local space_chars = create_set(" ", "\t", "\r", "\n") 154 | local delim_chars = create_set(" ", "\t", "\r", "\n", "]", "}", ",") 155 | local escape_chars = create_set("\\", "/", '"', "b", "f", "n", "r", "t", "u") 156 | local literals = create_set("true", "false", "null") 157 | 158 | local literal_map = { 159 | [ "true" ] = true, 160 | [ "false" ] = false, 161 | [ "null" ] = nil, 162 | } 163 | 164 | 165 | local function next_char(str, idx, set, negate) 166 | for i = idx, #str do 167 | if set[str:sub(i, i)] ~= negate then 168 | return i 169 | end 170 | end 171 | return #str + 1 172 | end 173 | 174 | 175 | local function decode_error(str, idx, msg) 176 | local line_count = 1 177 | local col_count = 1 178 | for i = 1, idx - 1 do 179 | col_count = col_count + 1 180 | if str:sub(i, i) == "\n" then 181 | line_count = line_count + 1 182 | col_count = 1 183 | end 184 | end 185 | error( string.format("%s at line %d col %d", msg, line_count, col_count) ) 186 | end 187 | 188 | 189 | local function codepoint_to_utf8(n) 190 | -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa 191 | local f = math.floor 192 | if n <= 0x7f then 193 | return string.char(n) 194 | elseif n <= 0x7ff then 195 | return string.char(f(n / 64) + 192, n % 64 + 128) 196 | elseif n <= 0xffff then 197 | return string.char(f(n / 4096) + 224, f(n % 4096 / 64) + 128, n % 64 + 128) 198 | elseif n <= 0x10ffff then 199 | return string.char(f(n / 262144) + 240, f(n % 262144 / 4096) + 128, 200 | f(n % 4096 / 64) + 128, n % 64 + 128) 201 | end 202 | error( string.format("invalid unicode codepoint '%x'", n) ) 203 | end 204 | 205 | 206 | local function parse_unicode_escape(s) 207 | local n1 = tonumber( s:sub(3, 6), 16 ) 208 | local n2 = tonumber( s:sub(9, 12), 16 ) 209 | -- Surrogate pair? 210 | if n2 then 211 | return codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000) 212 | else 213 | return codepoint_to_utf8(n1) 214 | end 215 | end 216 | 217 | 218 | local function parse_string(str, i) 219 | local has_unicode_escape = false 220 | local has_surrogate_escape = false 221 | local has_escape = false 222 | local last 223 | for j = i + 1, #str do 224 | local x = str:byte(j) 225 | 226 | if x < 32 then 227 | decode_error(str, j, "control character in string") 228 | end 229 | 230 | if last == 92 then -- "\\" (escape char) 231 | if x == 117 then -- "u" (unicode escape sequence) 232 | local hex = str:sub(j + 1, j + 5) 233 | if not hex:find("%x%x%x%x") then 234 | decode_error(str, j, "invalid unicode escape in string") 235 | end 236 | if hex:find("^[dD][89aAbB]") then 237 | has_surrogate_escape = true 238 | else 239 | has_unicode_escape = true 240 | end 241 | else 242 | local c = string.char(x) 243 | if not escape_chars[c] then 244 | decode_error(str, j, "invalid escape char '" .. c .. "' in string") 245 | end 246 | has_escape = true 247 | end 248 | last = nil 249 | 250 | elseif x == 34 then -- '"' (end of string) 251 | local s = str:sub(i + 1, j - 1) 252 | if has_surrogate_escape then 253 | s = s:gsub("\\u[dD][89aAbB]..\\u....", parse_unicode_escape) 254 | end 255 | if has_unicode_escape then 256 | s = s:gsub("\\u....", parse_unicode_escape) 257 | end 258 | if has_escape then 259 | s = s:gsub("\\.", escape_char_map_inv) 260 | end 261 | return s, j + 1 262 | 263 | else 264 | last = x 265 | end 266 | end 267 | decode_error(str, i, "expected closing quote for string") 268 | end 269 | 270 | 271 | local function parse_number(str, i) 272 | local x = next_char(str, i, delim_chars) 273 | local s = str:sub(i, x - 1) 274 | local n = tonumber(s) 275 | if not n then 276 | decode_error(str, i, "invalid number '" .. s .. "'") 277 | end 278 | return n, x 279 | end 280 | 281 | 282 | local function parse_literal(str, i) 283 | local x = next_char(str, i, delim_chars) 284 | local word = str:sub(i, x - 1) 285 | if not literals[word] then 286 | decode_error(str, i, "invalid literal '" .. word .. "'") 287 | end 288 | return literal_map[word], x 289 | end 290 | 291 | 292 | local function parse_array(str, i) 293 | local res = {} 294 | local n = 1 295 | i = i + 1 296 | while 1 do 297 | local x 298 | i = next_char(str, i, space_chars, true) 299 | -- Empty / end of array? 300 | if str:sub(i, i) == "]" then 301 | i = i + 1 302 | break 303 | end 304 | -- Read token 305 | x, i = parse(str, i) 306 | res[n] = x 307 | n = n + 1 308 | -- Next token 309 | i = next_char(str, i, space_chars, true) 310 | local chr = str:sub(i, i) 311 | i = i + 1 312 | if chr == "]" then break end 313 | if chr ~= "," then decode_error(str, i, "expected ']' or ','") end 314 | end 315 | return res, i 316 | end 317 | 318 | 319 | local function parse_object(str, i) 320 | local res = {} 321 | i = i + 1 322 | while 1 do 323 | local key, val 324 | i = next_char(str, i, space_chars, true) 325 | -- Empty / end of object? 326 | if str:sub(i, i) == "}" then 327 | i = i + 1 328 | break 329 | end 330 | -- Read key 331 | if str:sub(i, i) ~= '"' then 332 | decode_error(str, i, "expected string for key") 333 | end 334 | key, i = parse(str, i) 335 | -- Read ':' delimiter 336 | i = next_char(str, i, space_chars, true) 337 | if str:sub(i, i) ~= ":" then 338 | decode_error(str, i, "expected ':' after key") 339 | end 340 | i = next_char(str, i + 1, space_chars, true) 341 | -- Read value 342 | val, i = parse(str, i) 343 | -- Set 344 | res[key] = val 345 | -- Next token 346 | i = next_char(str, i, space_chars, true) 347 | local chr = str:sub(i, i) 348 | i = i + 1 349 | if chr == "}" then break end 350 | if chr ~= "," then decode_error(str, i, "expected '}' or ','") end 351 | end 352 | return res, i 353 | end 354 | 355 | 356 | local char_func_map = { 357 | [ '"' ] = parse_string, 358 | [ "0" ] = parse_number, 359 | [ "1" ] = parse_number, 360 | [ "2" ] = parse_number, 361 | [ "3" ] = parse_number, 362 | [ "4" ] = parse_number, 363 | [ "5" ] = parse_number, 364 | [ "6" ] = parse_number, 365 | [ "7" ] = parse_number, 366 | [ "8" ] = parse_number, 367 | [ "9" ] = parse_number, 368 | [ "-" ] = parse_number, 369 | [ "t" ] = parse_literal, 370 | [ "f" ] = parse_literal, 371 | [ "n" ] = parse_literal, 372 | [ "[" ] = parse_array, 373 | [ "{" ] = parse_object, 374 | } 375 | 376 | 377 | parse = function(str, idx) 378 | local chr = str:sub(idx, idx) 379 | local f = char_func_map[chr] 380 | if f then 381 | return f(str, idx) 382 | end 383 | decode_error(str, idx, "unexpected character '" .. chr .. "'") 384 | end 385 | 386 | 387 | function json.decode(str) 388 | if type(str) ~= "string" then 389 | error("expected argument of type string, got " .. type(str)) 390 | end 391 | local res, idx = parse(str, next_char(str, 1, space_chars, true)) 392 | idx = next_char(str, idx, space_chars, true) 393 | if idx <= #str then 394 | decode_error(str, idx, "trailing garbage") 395 | end 396 | return res 397 | end 398 | 399 | 400 | return json 401 | -------------------------------------------------------------------------------- /lua/libs/v2/imports/gameplay/gp_attribulator_manager.lua: -------------------------------------------------------------------------------- 1 | local GameplayAttribulatorManager = {} 2 | 3 | function GameplayAttribulatorManager:new() 4 | local o = setmetatable({}, self) 5 | 6 | -- lua metatable 7 | self.__index = self 8 | self.__name = "GameplayAttribulatorManager" 9 | 10 | return o 11 | end 12 | 13 | function GameplayAttribulatorManager:Init() 14 | -- LOGGER:LogInfo("Init GameplayAttribulatorManager") 15 | end 16 | 17 | -- Import gameplayattribdb from json file 18 | -- By default from "C:\FC 24 Live Editor\AttribDBRuntime_gameplayattribdb.json" 19 | function GameplayAttribulatorManager:LoadFromFile(file_path) 20 | GameplayAttribulatorLoadFromFile(file_path or "") 21 | end 22 | 23 | -- Export gameplayattribdb to json file 24 | -- By default to "C:\FC 24 Live Editor\AttribDBRuntime_gameplayattribdb.json" 25 | function GameplayAttribulatorManager:SaveToFile(file_path) 26 | GameplayAttribulatorSaveToFile(file_path or "") 27 | end 28 | 29 | -- Set Float value by item path 30 | function GameplayAttribulatorManager:SetFloatValue(path, value) 31 | GameplayAttribulatorSetFloat(path, value) 32 | end 33 | 34 | -- Set Int value by item path 35 | function GameplayAttribulatorManager:SetIntValue(path, value) 36 | GameplayAttribulatorSetInt(path, value) 37 | end 38 | 39 | -- Set Bool value by item path 40 | function GameplayAttribulatorManager:SetBoolValue(path, value) 41 | local v = 0 42 | if (value) then 43 | v = 1 44 | end 45 | 46 | GameplayAttribulatorSetBool(path, v) 47 | end 48 | 49 | -- Get Float value by item path 50 | function GameplayAttribulatorManager:GetFloatValue(path) 51 | return GameplayAttribulatorGetFloat(path) 52 | end 53 | 54 | -- Get Int value by item path 55 | function GameplayAttribulatorManager:GetIntValue(path) 56 | return GameplayAttribulatorGetInt(path) 57 | end 58 | 59 | -- Get Bool value by item path 60 | function GameplayAttribulatorManager:GetBoolValue(path) 61 | return GameplayAttribulatorGetBool(path) 62 | end 63 | 64 | return GameplayAttribulatorManager; 65 | -------------------------------------------------------------------------------- /lua/libs/v2/imports/other/consts.lua: -------------------------------------------------------------------------------- 1 | CONST__PLAYER_PRIMARY_POS_NAME = { 2 | [0] = "GK", 3 | [1] = "SW", 4 | [2] = "RWB", 5 | [3] = "RB", 6 | [4] = "RCB", 7 | [5] = "CB", 8 | [6] = "LCB", 9 | [7] = "LB", 10 | [8] = "LWB", 11 | [9] = "RDM", 12 | [10] = "CDM", 13 | [11] = "LDM", 14 | [12] = "RM", 15 | [13] = "RCM", 16 | [14] = "CM", 17 | [15] = "LCM", 18 | [16] = "LM", 19 | [17] = "RAM", 20 | [18] = "CAM", 21 | [19] = "LAM", 22 | [20] = "RF", 23 | [21] = "CF", 24 | [22] = "LF", 25 | [23] = "RW", 26 | [24] = "RS", 27 | [25] = "ST", 28 | [26] = "LS", 29 | [27] = "LW" 30 | } 31 | -------------------------------------------------------------------------------- /lua/libs/v2/imports/other/helpers.lua: -------------------------------------------------------------------------------- 1 | DATE = require 'imports/core/date' 2 | require 'imports/other/consts' 3 | 4 | function GetPlayerPrimaryPositionName(pos_id) 5 | return CONST__PLAYER_PRIMARY_POS_NAME[pos_id] or "INVALID" 6 | end 7 | 8 | -- return FC::DATE (imports\core\date.lua) 9 | function GetCurrentDate() 10 | local result = DATE:new() 11 | 12 | if not IsInCM() then return result end 13 | 14 | local career_calendar_table = LE.db:GetTable("career_calendar") 15 | local first_record = career_calendar_table:GetFirstRecord() 16 | local currdate = career_calendar_table:GetRecordFieldValue(first_record, "currdate") 17 | 18 | result:FromInt(currdate) 19 | 20 | return result 21 | end 22 | 23 | function CalculatePlayerAge(current_date, birthdate) 24 | local age = current_date.year - birthdate.year 25 | 26 | if (current_date.month < birthdate.month or (current_date.month == birthdate.month and current_date.day < birthdate.day)) then 27 | age = age - 1 28 | end 29 | return age 30 | end 31 | 32 | 33 | function GetPlayerIDSForTeam(teamid) 34 | local result = {} 35 | if teamid <= 0 then return result end 36 | 37 | local teamplayerlinks_table = LE.db:GetTable("teamplayerlinks") 38 | 39 | local current_record = teamplayerlinks_table:GetFirstRecord() 40 | while current_record > 0 do 41 | local artificialkey = teamplayerlinks_table:GetRecordFieldValue(current_record, "artificialkey") 42 | 43 | if artificialkey > 0 and teamid == teamplayerlinks_table:GetRecordFieldValue(current_record, "teamid") then 44 | local playerid = teamplayerlinks_table:GetRecordFieldValue(current_record, "playerid") 45 | result[playerid] = true 46 | -- Log(string.format("%d", playerid)) 47 | end 48 | current_record = teamplayerlinks_table:GetNextValidRecord() 49 | end 50 | 51 | return result 52 | end 53 | 54 | -- Return players that are goalkeepers 55 | function GetGoalkeepers() 56 | local result = {} 57 | 58 | -- Get all rows for players table 59 | local players_table = LE.db:GetTable("players") 60 | local players_current_record = players_table:GetFirstRecord() 61 | 62 | local playerid = 0 63 | local preferredposition1 = 0 64 | while players_current_record > 0 do 65 | preferredposition1 = players_table:GetRecordFieldValue(players_current_record, "preferredposition1") 66 | 67 | -- If Is GK 68 | if preferredposition1 == 0 then 69 | -- Add to goalkeepers 70 | playerid = players_table:GetRecordFieldValue(players_current_record, "playerid") 71 | result[playerid] = true 72 | end 73 | 74 | players_current_record = players_table:GetNextValidRecord() 75 | end 76 | 77 | return result 78 | end 79 | 80 | 81 | -------------------------------------------------------------------------------- /lua/libs/v2/imports/other/playstyles_enum.lua: -------------------------------------------------------------------------------- 1 | -- Playstyle1 (trait1 & icontrait1) 2 | 3 | ENUM_PLAYSTYLE1_FINESSE_SHOT = 1 4 | ENUM_PLAYSTYLE1_CHIP_SHOT = 2 5 | ENUM_PLAYSTYLE1_POWER_SHOT = 4 6 | ENUM_PLAYSTYLE1_DEAD_BALL = 8 7 | ENUM_PLAYSTYLE1_POWER_HEADER = 16 8 | ENUM_PLAYSTYLE1_INCISIVE_PASS = 32 9 | ENUM_PLAYSTYLE1_PINGED_PASS = 64 10 | ENUM_PLAYSTYLE1_LONG_BALL_PASS = 128 11 | ENUM_PLAYSTYLE1_TIKI_TAKA = 256 12 | ENUM_PLAYSTYLE1_WHIPPED_PASS = 512 13 | ENUM_PLAYSTYLE1_JOCKEY = 1024 14 | ENUM_PLAYSTYLE1_BLOCK = 2048 15 | ENUM_PLAYSTYLE1_INTERCEPT = 4096 16 | ENUM_PLAYSTYLE1_ANTICIPATE = 8192 17 | ENUM_PLAYSTYLE1_SLIDE_TACKLE = 16384 18 | ENUM_PLAYSTYLE1_BRUISER = 32768 19 | ENUM_PLAYSTYLE1_TECHNICAL = 65536 20 | ENUM_PLAYSTYLE1_RAPID = 131072 21 | ENUM_PLAYSTYLE1_FLAIR = 262144 22 | ENUM_PLAYSTYLE1_FIRST_TOUCH = 524288 23 | ENUM_PLAYSTYLE1_TRICKSTER = 1048576 24 | ENUM_PLAYSTYLE1_PRESS_PROVEN = 2097152 25 | ENUM_PLAYSTYLE1_QUICK_STEP = 4194304 26 | ENUM_PLAYSTYLE1_RELENTLESS = 8388608 27 | ENUM_PLAYSTYLE1_TRIVELA = 16777216 28 | ENUM_PLAYSTYLE1_ACROBATIC = 33554432 29 | ENUM_PLAYSTYLE1_LONG_THROW = 67108864 30 | ENUM_PLAYSTYLE1_AERIAL = 134217728 31 | ENUM_PLAYSTYLE1_GK_FAR_THROW = 268435456 32 | ENUM_PLAYSTYLE1_GK_FOOTWORK = 536870912 33 | 34 | -- Playstyle2 (trait2 & icontrait2) 35 | ENUM_PLAYSTYLE2_GK_CROSS_CLAIMER = 1 36 | ENUM_PLAYSTYLE2_GK_RUSH_OUT = 2 37 | ENUM_PLAYSTYLE2_GK_FAR_REACH = 4 38 | ENUM_PLAYSTYLE2_GK_QUICK_REFLEXES = 8 39 | ENUM_PLAYSTYLE2_CPUAI_LONG_SHOT_TAKER = 16 40 | ENUM_PLAYSTYLE2_CPUAI_EARLY_CROSSER = 32 41 | ENUM_PLAYSTYLE2_CAREER_SOLID_PLAYER = 64 42 | ENUM_PLAYSTYLE2_CAREER_TEAM_PLAYER = 128 43 | ENUM_PLAYSTYLE2_CAREER_ONE_CLUB_PLAYER = 256 44 | ENUM_PLAYSTYLE2_CAREER_INJURY_PRONE = 512 45 | ENUM_PLAYSTYLE2_CAREER_LEADERSHIP = 1024 46 | -------------------------------------------------------------------------------- /lua/libs/v2/imports/t3db/db.lua: -------------------------------------------------------------------------------- 1 | MEMORY = require 'imports/core/memory' 2 | LOGGER = require 'imports/core/logger' 3 | 4 | require 'imports/services/enums' 5 | 6 | local TABLE = require 'imports/t3db/table' 7 | local DB = {} 8 | 9 | function DB:new() 10 | local o = setmetatable({}, self) 11 | 12 | -- lua metatable 13 | self.__index = self 14 | self.__name = "T3DB::DATABASE" 15 | 16 | self:Init() 17 | 18 | return o 19 | end 20 | 21 | --- 22 | -- Initialize Members 23 | function DB:Init() 24 | self.meta_loaded = false 25 | self.db_service = 0 26 | self.tables_count = 0 27 | self.meta = {} 28 | self.tables = {} 29 | end 30 | 31 | function DB:LoadMeta() 32 | if self.meta_loaded == true then return end 33 | 34 | self.meta = GetDBMeta() 35 | self.meta_loaded = true 36 | end 37 | 38 | function DB:GetDBService() 39 | if self.db_service <= 0 then 40 | local db_service = GetPlugin(ENUM_djb2Database_CLSS) - 8 -- weakptr 41 | -- LOGGER:LogDebug(string.format("DBService* = 0x%X", db_service)) 42 | self.db_service = db_service 43 | end 44 | 45 | return self.db_service 46 | end 47 | 48 | function DB:GetDBFromService() 49 | return MEMORY:ReadMultilevelPointer(self:GetDBService(), {0x20, 0x08, 0x10}) 50 | end 51 | 52 | function DB:GetTableFromDB(cur_db) 53 | return MEMORY:ReadPointer(cur_db + 0x10) 54 | end 55 | 56 | function DB:GetNextTable(cur_tbl) 57 | return MEMORY:ReadPointer(cur_tbl + 0x08) 58 | end 59 | 60 | function DB:GetNextDB(cur_db) 61 | return MEMORY:ReadPointer(cur_db + 0x18) 62 | end 63 | 64 | function DB:GetT3DBTableName(t3db_table) 65 | local tbl = TABLE:new() 66 | tbl:LoadShortname(t3db_table) 67 | tbl:LoadName(self.meta) 68 | 69 | return tbl.name 70 | end 71 | 72 | function DB:AddTable(table) 73 | local tbl = TABLE:new() 74 | tbl:Load(table, self.meta) 75 | 76 | if tbl:HasNoName() then return end 77 | 78 | self.tables[tbl.name] = tbl 79 | self.tables_count = self.tables_count + 1 80 | end 81 | 82 | function DB:GetTable(table_name) 83 | self:LoadMeta() 84 | 85 | local db = self:GetDBFromService() 86 | local db_tbl = {} 87 | local tbl = nil 88 | 89 | while db > 0 do 90 | if tbl ~= nil then break end 91 | 92 | db_tbl = self:GetTableFromDB(db) 93 | while db_tbl > 0 do 94 | if tbl ~= nil then break end 95 | 96 | if self:GetT3DBTableName(db_tbl) == table_name then 97 | tbl = TABLE:new() 98 | tbl:Load(db_tbl, self.meta) 99 | end 100 | 101 | db_tbl = self:GetNextTable(db_tbl) 102 | end 103 | 104 | db = self:GetNextDB(db) 105 | end 106 | 107 | return tbl 108 | end 109 | 110 | function DB:Load() 111 | self:LoadMeta() 112 | local db = self:GetDBFromService() 113 | local db_tbl = {} 114 | 115 | while db > 0 do 116 | -- LOGGER:LogDebug(string.format("DB* = 0x%X", db)) 117 | db_tbl = self:GetTableFromDB(db) 118 | while db_tbl > 0 do 119 | --LOGGER:LogDebug(string.format("DB::Table* = 0x%X", db_tbl)) 120 | self:AddTable(db_tbl) 121 | db_tbl = self:GetNextTable(db_tbl) 122 | end 123 | 124 | db = self:GetNextDB(db) 125 | end 126 | 127 | -- LOGGER:LogDebug("DB Init Done") 128 | end 129 | 130 | function DB:Reset() 131 | self.tables_count = 0 132 | self.tables = {} 133 | self:Load() 134 | end 135 | 136 | return DB; -------------------------------------------------------------------------------- /lua/libs/v2/imports/t3db/field.lua: -------------------------------------------------------------------------------- 1 | MEMORY = require 'imports/core/memory' 2 | LOGGER = require 'imports/core/logger' 3 | local FIELD = {} 4 | 5 | function FIELD:new() 6 | local o = setmetatable({}, self) 7 | 8 | -- lua metatable 9 | self.__index = self 10 | self.__name = "T3DB::FIELD" 11 | 12 | self:Init() 13 | 14 | return o 15 | end 16 | 17 | --- 18 | -- Initialize Members 19 | function FIELD:Init() 20 | self.name = "" 21 | self.shortname = "" 22 | 23 | self.type = 0 24 | self.offset = 0 25 | self.sz = 0 26 | self.fld_desc = {} 27 | end 28 | 29 | function FIELD:HasNoName() 30 | return self.name == nil or self.name == "" 31 | end 32 | 33 | function FIELD:LoadShortname(addr) 34 | local shortname_bytes = MEMORY:ReadBytes(addr + 0x8, 4) 35 | for i=1, 4 do 36 | local ch = string.char(shortname_bytes[i]) 37 | self.shortname = self.shortname .. ch 38 | end 39 | end 40 | 41 | function FIELD:Load(addr, fld_meta) 42 | self:LoadShortname(addr) 43 | 44 | self.fld_desc = fld_meta[self.shortname] 45 | self.name = self.fld_desc.name 46 | 47 | self.type = MEMORY:ReadInt(addr) 48 | 49 | local bit_offset = MEMORY:ReadInt(addr + 0x4) 50 | 51 | self.offset = math.floor(bit_offset / 8) 52 | self.startbit = math.floor(bit_offset % 8) 53 | self.sz = MEMORY:ReadInt(addr + 0xc) 54 | 55 | -- LOGGER:LogDebug(string.format( 56 | -- "[FIELD* 0x%X] %s (%s)", 57 | -- addr, self.name, self.shortname 58 | -- )) 59 | end 60 | 61 | function FIELD:GetInt(record_addr) 62 | local v = MEMORY:ReadQword(record_addr + self.offset) 63 | local a = v >> self.startbit 64 | local b = (1 << self.fld_desc.depth) - 1 65 | 66 | return (a & b) + self.fld_desc.min 67 | end 68 | 69 | function FIELD:SetInt(record_addr, new_value) 70 | local addr = record_addr + self.offset 71 | local v = MEMORY:ReadQword(addr) 72 | 73 | new_value = new_value - self.fld_desc.min 74 | 75 | local depth = self.fld_desc.depth - 1 76 | 77 | for i=0, depth do 78 | local currentbit = self.startbit + i 79 | local is_set = (new_value >> i) & 1 80 | 81 | if is_set == 1 then 82 | v = v | (1 << currentbit) 83 | else 84 | v = v & ~(1 << currentbit) 85 | end 86 | end 87 | MEMORY:WriteQword(addr, v) 88 | return true 89 | end 90 | 91 | function FIELD:GetFloat(record_addr) 92 | return string.unpack("f", string.pack("i4", self:GetInt(record_addr))) 93 | end 94 | 95 | function FIELD:SetFloat(record_addr, new_value) 96 | return self:SetInt(record_addr, string.unpack("i4", string.pack("f", new_value))) 97 | end 98 | 99 | function FIELD:GetString(record_addr) 100 | return MEMORY:ReadString(record_addr + self.offset) 101 | end 102 | 103 | function FIELD:SetString(record_addr, new_value) 104 | local string_max_len = math.floor(self.fld_desc.depth / 8) 105 | local new_val_len = string.len(new_value) 106 | if new_val_len > string_max_len then 107 | new_value = new_value:sub(1, new_val_len - string_max_len) 108 | new_val_len = string.len(new_value) 109 | end 110 | MEMORY:WriteString(addr, new_value) 111 | -- fill with null bytes 112 | for i=new_val_len, string_max_len-1 do 113 | MEMORY:WriteBytes(addr+i, 0) 114 | end 115 | end 116 | 117 | function FIELD:GetValue(record_addr) 118 | if self.type == 3 then 119 | return self:GetInt(record_addr) 120 | elseif self.type == 4 then 121 | return self:GetFloat(record_addr) 122 | elseif self.type == 0 then 123 | return self:GetString(record_addr) 124 | end 125 | 126 | return nil 127 | end 128 | 129 | function FIELD:SetValue(record_addr, v) 130 | if self.type == 3 then 131 | return self:SetInt(record_addr, v) 132 | elseif self.type == 4 then 133 | return self:SetFloat(record_addr, v) 134 | elseif self.type == 0 then 135 | return self:SetString(record_addr, v) 136 | end 137 | 138 | return false 139 | end 140 | 141 | return FIELD; 142 | -------------------------------------------------------------------------------- /lua/libs/v2/imports/t3db/table.lua: -------------------------------------------------------------------------------- 1 | MEMORY = require 'imports/core/memory' 2 | LOGGER = require 'imports/core/logger' 3 | 4 | local FIELD = require 'imports/t3db/field' 5 | local TABLE = {} 6 | 7 | function TABLE:new(o) 8 | local o = setmetatable({}, self) 9 | 10 | -- lua metatable 11 | self.__index = self 12 | self.__name = "T3DB::TABLE" 13 | 14 | self:Init() 15 | 16 | return o 17 | end 18 | 19 | --- 20 | -- Initialize Members 21 | function TABLE:Init() 22 | self.name = "" 23 | self.shortname = "" 24 | self.fields = nil -- It's self.fields = {}, but why it doesn't work here? 25 | self.first_record = 0 26 | self.record_size = 0 27 | self.written_records = 0 28 | 29 | self.last_record_idx = 0 30 | self.current_record_idx = 1 31 | end 32 | 33 | 34 | function TABLE:HasNoName() 35 | return self.name == nil or self.name == "" 36 | 37 | end 38 | 39 | function TABLE:GetFieldsCount() 40 | local fld_count = 0 41 | for k,v in pairs(self.fields) do 42 | fld_count = fld_count + 1 43 | end 44 | 45 | return fld_count 46 | end 47 | 48 | 49 | function TABLE:AddField(field, fld_meta) 50 | local fld = FIELD:new() 51 | fld:Load(field, fld_meta) 52 | 53 | -- LOGGER:LogDebug(string.format( 54 | -- "[TABLE:AddField] %s %s %s", 55 | -- self.name, fld.name, tostring(fld) 56 | -- )) 57 | 58 | self.fields[fld.name] = fld 59 | end 60 | 61 | function TABLE:LoadShortname(addr) 62 | local shortname_bytes = MEMORY:ReadBytes(addr + 0x40, 4) 63 | for i=1, 4 do 64 | local ch = string.char(shortname_bytes[i]) 65 | self.shortname = self.shortname .. ch 66 | end 67 | end 68 | 69 | function TABLE:LoadName(meta) 70 | self.name = meta.shortname_name_tables_map[self.shortname] 71 | end 72 | 73 | 74 | function TABLE:Load(addr, meta) 75 | self:LoadShortname(addr) 76 | self:LoadName(meta) 77 | 78 | if self:HasNoName() then return end 79 | 80 | self.first_record = MEMORY:ReadQword(addr + 0x30) 81 | self.record_size = MEMORY:ReadInt(addr + 0x44) 82 | self.written_records = MEMORY:ReadShort(addr + 0x7C) 83 | self.last_record_idx = self.written_records - 1 84 | 85 | local col_count = MEMORY:ReadChar(addr + 0x82) 86 | local col_addr = addr + 0x84 87 | 88 | -- LOGGER:LogDebug(string.format( 89 | -- "[TABLE* 0x%X] %s (%s), col_count = %d", 90 | -- addr, self.name, self.shortname, col_count 91 | -- )) 92 | 93 | local fld_meta = meta.field_desc_map[self.shortname] 94 | if fld_meta == nil then return end 95 | --print("Adding Fields") 96 | self.fields = {} 97 | for i=1, col_count do 98 | self:AddField(col_addr, fld_meta) 99 | col_addr = col_addr + 0x10 100 | end 101 | -- LOGGER:LogDebug(string.format("Added Fields: %d", self:GetFieldsCount())) 102 | end 103 | 104 | function TABLE:IsRecordValid(record) 105 | local last_byte = MEMORY:ReadBytes(record + self.record_size - 1, 1)[1] 106 | return (last_byte & 0x80) == 0 107 | end 108 | 109 | function TABLE:GetFirstRecord() 110 | self.current_record_idx = 0 111 | 112 | local current_record = self.first_record + (self.record_size * self.current_record_idx) 113 | 114 | if not self:IsRecordValid(current_record) then 115 | current_record = self:GetNextValidRecord() 116 | end 117 | 118 | return current_record 119 | end 120 | 121 | function TABLE:GetNextRecord() 122 | self.current_record_idx = self.current_record_idx + 1 123 | 124 | return self.first_record + (self.record_size * self.current_record_idx) 125 | end 126 | 127 | function TABLE:GetNextValidRecord() 128 | local current_record = 0 129 | while self.current_record_idx < self.last_record_idx do 130 | local rec = self:GetNextRecord() 131 | 132 | if self:IsRecordValid(rec) then 133 | current_record = rec 134 | break 135 | end 136 | end 137 | 138 | return current_record 139 | end 140 | 141 | function TABLE:GetField(field_name) 142 | return self.fields[field_name] 143 | end 144 | 145 | function TABLE:GetRecordFieldValue(record_addr, field_name) 146 | -- LOGGER:LogDebug(string.format("GetRecordFieldValue 0x%X, %s", record_addr, field_name)) 147 | local fld = self:GetField(field_name) 148 | if fld == nil then 149 | LOGGER:LogError(string.format("GetRecordFieldValue no field %s in table %s", field_name, self.name)) 150 | return nil 151 | end 152 | 153 | return fld:GetValue(record_addr) 154 | end 155 | 156 | function TABLE:SetRecordFieldValue(record_addr, field_name, v) 157 | local fld = self:GetField(field_name) 158 | if fld == nil then 159 | LOGGER:LogError(string.format("SetRecordFieldValue no field %s in table %s", field_name, self.name)) 160 | return false 161 | end 162 | 163 | return fld:SetValue(record_addr, v) 164 | end 165 | 166 | 167 | return TABLE; 168 | -------------------------------------------------------------------------------- /lua/libs/v2/main.lua: -------------------------------------------------------------------------------- 1 | local LIVE_EDITOR = require 'imports/core/live_editor' 2 | 3 | LE = LIVE_EDITOR:new() 4 | LE:Load() 5 | -------------------------------------------------------------------------------- /lua/libs/v2/temp_doc_draft.md: -------------------------------------------------------------------------------- 1 | Globals: 2 | - LE_VERSION (return version of the Live Editor as string)_ -------------------------------------------------------------------------------- /lua/libs/v2/tests/aardvark_manager_test.lua: -------------------------------------------------------------------------------- 1 | 2 | -- Test Float 3 | 4 | -- Getter 5 | local GC_GRAY_ZONE_WIDTH = LE.aardvark_manager:GetFloat("GC_GRAY_ZONE_WIDTH") 6 | assert(GC_GRAY_ZONE_WIDTH == 16.0, string.format("GC_GRAY_ZONE_WIDTH %.2f != 16.0", GC_GRAY_ZONE_WIDTH)) 7 | 8 | -- Setter 9 | LE.aardvark_manager:SetFloat("GC_GRAY_ZONE_WIDTH", 33.0) 10 | GC_GRAY_ZONE_WIDTH = LE.aardvark_manager:GetFloat("GC_GRAY_ZONE_WIDTH") 11 | assert(GC_GRAY_ZONE_WIDTH == 33.0, string.format("GC_GRAY_ZONE_WIDTH %.2f != 33.0", GC_GRAY_ZONE_WIDTH)) 12 | 13 | -- Test Int 14 | 15 | -- Getter 16 | local ENABLE_HAND = LE.aardvark_manager:GetInt("ENABLE_HAND") 17 | assert(ENABLE_HAND == 1, string.format("ENABLE_HAND %d != 1", ENABLE_HAND)) 18 | 19 | -- Setter 20 | LE.aardvark_manager:SetInt("ENABLE_HAND", 0) 21 | ENABLE_HAND = LE.aardvark_manager:GetInt("ENABLE_HAND") 22 | assert(ENABLE_HAND == 0, string.format("ENABLE_HAND %d != 0", ENABLE_HAND)) 23 | 24 | -- Test String 25 | 26 | -- Getter 27 | local REG_CURRENCY_TYPE = LE.aardvark_manager:GetString("REGIONALIZATION_TUR_TR/CURRENCY_TYPE") 28 | assert(REG_CURRENCY_TYPE == "EUROS", string.format("REG_CURRENCY_TYPE %s != EUROS", REG_CURRENCY_TYPE)) 29 | 30 | -- Setter 31 | LE.aardvark_manager:SetString("REGIONALIZATION_TUR_TR/CURRENCY_TYPE", "AAA") 32 | REG_CURRENCY_TYPE = LE.aardvark_manager:GetString("REGIONALIZATION_TUR_TR/CURRENCY_TYPE") 33 | assert(REG_CURRENCY_TYPE == "AAA", string.format("REG_CURRENCY_TYPE %s != AAA", REG_CURRENCY_TYPE)) 34 | 35 | LE.aardvark_manager:SetString("REGIONALIZATION_TUR_TR/CURRENCY_TYPE", "MUCHLONGERSTRINGMUCHLONGERSTRING") 36 | REG_CURRENCY_TYPE = LE.aardvark_manager:GetString("REGIONALIZATION_TUR_TR/CURRENCY_TYPE") 37 | assert(REG_CURRENCY_TYPE == "MUCHLONGERSTRINGMUCHLONGERSTRING", string.format("REG_CURRENCY_TYPE %s != MUCHLONGERSTRINGMUCHLONGERSTRING", REG_CURRENCY_TYPE)) 38 | 39 | -- Restore default values 40 | LE.aardvark_manager:SetFloat("GC_GRAY_ZONE_WIDTH", 16.0) 41 | LE.aardvark_manager:SetInt("ENABLE_HAND", 1) 42 | LE.aardvark_manager:SetString("REGIONALIZATION_TUR_TR/CURRENCY_TYPE", "EUROS") 43 | -------------------------------------------------------------------------------- /lua/libs/v2/tests/event_handlers_test.lua: -------------------------------------------------------------------------------- 1 | function pre__TestCaseEventHandler1(i1, i2, p3) 2 | LOGGER:LogInfo("pre__TestCaseEventHandler1") 3 | local v_int = LE.MEMORY:ReadInt(p3) 4 | LOGGER:LogInfo(string.format("%d %d %d (0x%X)", i1, i2, v_int, p3)) 5 | 6 | LE.MEMORY:WriteInt(p3, 9999) 7 | end 8 | 9 | function pre__TestCaseEventHandler2(i1, i2, p3) 10 | LOGGER:LogInfo("pre__TestCaseEventHandler2") 11 | end 12 | 13 | function post__TestCaseEventHandler1(i1, i2, psomeint, result) 14 | LOGGER:LogInfo("post__TestCaseEventHandler") 15 | 16 | local v_int = LE.MEMORY:ReadInt(result) 17 | LOGGER:LogInfo(string.format("%d %d result %d (0x%X)", i1, i2, v_int, result)) 18 | 19 | LE.MEMORY:WriteInt(result, 16161) 20 | end 21 | 22 | function post__TestCaseEventHandler2(i1, i2, psomeint, result) 23 | LOGGER:LogInfo("post__TestCaseEventHandler") 24 | 25 | local v_int = LE.MEMORY:ReadInt(result) 26 | LOGGER:LogInfo(string.format("%d %d result %d (0x%X)", i1, i2, v_int, result)) 27 | 28 | LE.MEMORY:WriteInt(result, 16161) 29 | end 30 | 31 | function post__TestCaseEventHandler3(i1, i2, psomeint, result) 32 | LOGGER:LogInfo("post__TestCaseEventHandler") 33 | 34 | local v_int = LE.MEMORY:ReadInt(result) 35 | LOGGER:LogInfo(string.format("%d %d result %d (0x%X)", i1, i2, v_int, result)) 36 | 37 | LE.MEMORY:WriteInt(result, 16161) 38 | end 39 | 40 | -- LOGGER:LogInfo("ClearEventHandlersForEvent") 41 | ClearEventHandlersForEvent("pre__TestCaseEvent") 42 | ClearEventHandlersForEvent("post__TestCaseEvent") 43 | 44 | -- LOGGER:LogInfo("AddEventHandler") 45 | AddEventHandler("pre__TestCaseEvent", pre__TestCaseEventHandler1) 46 | AddEventHandler("pre__TestCaseEvent", pre__TestCaseEventHandler2) 47 | AddEventHandler("post__TestCaseEvent", post__TestCaseEventHandler1) 48 | AddEventHandler("post__TestCaseEvent", post__TestCaseEventHandler2) 49 | AddEventHandler("post__TestCaseEvent", post__TestCaseEventHandler3) 50 | AddEventHandler("post__TestCaseEvent", post__TestCaseEventHandler3) -- Same func, shouldn't be added 51 | 52 | -- LOGGER:LogInfo("GetEventHandlers") 53 | local pre = GetEventHandlers("pre__TestCaseEvent") 54 | 55 | assert(type(pre) == "table", string.format("GetEventHandlers pre__TestCaseEvent, %s != table", type(pre)) ) 56 | assert(#pre == 2, string.format("GetEventHandlers pre__TestCaseEvent size, %d != 2", #pre) ) 57 | 58 | local post = GetEventHandlers("post__TestCaseEvent") 59 | assert(#post == 3, string.format("GetEventHandlers post__TestCaseEvent size, %d != 3", #post) ) 60 | 61 | RemoveEventHandler("post__TestCaseEvent", post[1].id) 62 | 63 | post = GetEventHandlers("post__TestCaseEvent") 64 | assert(#post == 2, string.format("RemoveEventHandler post__TestCaseEvent size, %d != 2", #post) ) 65 | 66 | ClearEventHandlersForEvent("post__TestCaseEvent") 67 | post = GetEventHandlers("post__TestCaseEvent") 68 | assert(#post == 0, string.format("ClearEventHandlersForEvent post__TestCaseEvent size, %d != 0", #post) ) 69 | -------------------------------------------------------------------------------- /lua/libs/v2/tests/plugins.lua: -------------------------------------------------------------------------------- 1 | require 'imports/services/enums' 2 | 3 | db = GetPlugin(ENUM_djb2Database_CLSS) 4 | 5 | LOGGER:LogInfo(string.format("%X", db)) 6 | -------------------------------------------------------------------------------- /lua/libs/v2/tests/t3db.lua: -------------------------------------------------------------------------------- 1 | assert(LE.db.tables_count == 201, string.format("LE.db.tables_count %d != 201", LE.db.tables_count)) 2 | 3 | local table = LE.db:GetTable("teams") 4 | 5 | assert(table.name == "teams", string.format("table.name %s != teams", table.name)) 6 | assert(table.shortname == "lyxL", string.format("table.shortname %s != lyxL", table.shortname)) 7 | 8 | local current_record = table:GetFirstRecord() 9 | 10 | local count = 0 11 | while current_record > 0 do 12 | local teamid = table:GetRecordFieldValue(current_record, "teamid") 13 | local teamname = table:GetRecordFieldValue(current_record, "teamname") 14 | LOGGER:LogInfo(string.format("%s %d", teamname, teamid)) 15 | 16 | local old = table:GetRecordFieldValue(current_record, "attackrating") 17 | 18 | table:SetRecordFieldValue(current_record, "attackrating", 99) 19 | local new = table:GetRecordFieldValue(current_record, "attackrating") 20 | LOGGER:LogInfo(string.format("%d %d", old, new)) 21 | 22 | count = count + 1 23 | current_record = table:GetNextValidRecord() 24 | end 25 | 26 | table = LE.db:GetTable("formations") 27 | current_record = table:GetFirstRecord() 28 | 29 | while current_record > 0 do 30 | local teamid = table:GetRecordFieldValue(current_record, "teamid") 31 | local formationid = table:GetRecordFieldValue(current_record, "formationid") 32 | local offset1x = table:GetRecordFieldValue(current_record, "offset1x") 33 | local attackers = table:GetRecordFieldValue(current_record, "attackers") 34 | local midfielders = table:GetRecordFieldValue(current_record, "midfielders") 35 | local defenders = table:GetRecordFieldValue(current_record, "defenders") 36 | 37 | LOGGER:LogInfo(string.format( 38 | "%d %d offset1x %0.3f attackers %0.3f midfielders %0.3f defenders %0.3f", 39 | teamid, formationid, offset1x, attackers, midfielders, defenders 40 | )) 41 | 42 | table:SetRecordFieldValue(current_record, "offset1x", 1.0) 43 | local newoffset1x = table:GetRecordFieldValue(current_record, "offset1x") 44 | LOGGER:LogInfo(string.format( 45 | "%d %d newoffset1x %0.3f attackers %0.3f midfielders %0.3f defenders %0.3f", 46 | teamid, formationid, newoffset1x, attackers, midfielders, defenders 47 | )) 48 | 49 | current_record = table:GetNextValidRecord() 50 | end 51 | assert(count == table.written_records, string.format("teams count %d != %d", count, table.written_records)) 52 | -------------------------------------------------------------------------------- /lua/libs/v2/tests/tests.lua: -------------------------------------------------------------------------------- 1 | -- LOGGER TEST (kind of) 2 | LOGGER:LogDebug("TEST LogDebug") 3 | LOGGER:LogInfo("TEST LogInfo") 4 | LOGGER:LogWarn("TEST LogWarn") 5 | LOGGER:LogError("TEST LogError") 6 | LOGGER:LogFatal("TEST LogFatal") 7 | 8 | -- MEMORY TEST 9 | -- TODO: Read base addr from Process 10 | local game_base_addr = 0x140000000 11 | local result = 0; 12 | 13 | -- Should be PE Header 14 | result = MEMORY:ReadBytes(game_base_addr, 2) 15 | assert(result[1] == 0x4D, string.format("ReadBytes Test, 0x%X != 0x4D", result[1])) 16 | assert(result[2] == 0x5A, string.format("ReadBytes Test, 0x%X != 0x5A", result[2])) 17 | 18 | result = MEMORY:ReadInt(game_base_addr) 19 | assert(result == 9460301, string.format("ReadInt Test, %d != 9460301", result)) 20 | 21 | result = MEMORY:ReadQword(game_base_addr) 22 | assert(result == 12894362189, string.format("ReadQword Test, %d != 12894362189", result)) 23 | 24 | -- AOB TEST 25 | result = MEMORY:AOBScanGameModule("4C 8B 3D ?? ?? ?? ?? 4D 85 FF 0F 84 ?? ?? ?? ?? 0F 1F 44 00 ??") 26 | assert(result > 0, string.format("AOB Test1, 0x%X <= 0", result)) 27 | 28 | result = MEMORY:ResolvePtr(result, 3) 29 | assert(result > 0, string.format("ResolvePtr Test1, 0x%X <= 0", result)) 30 | -------------------------------------------------------------------------------- /lua/libs/v2/tests/timing.lua: -------------------------------------------------------------------------------- 1 | local DB = require 'imports/t3db/db' 2 | if database == nil then 3 | database = DB:new() 4 | database:Load() 5 | end 6 | 7 | local table = database:GetTable("players") 8 | local current_record = table:GetFirstRecord() 9 | 10 | local count = 0 11 | 12 | 13 | Log("time_start") 14 | local time_start = os.clock() 15 | while current_record > 0 do 16 | count = count + 1 17 | current_record = table:GetNextValidRecord() 18 | end 19 | 20 | LOGGER:LogInfo(string.format("%d rows in players in %.5fs", count, os.clock()-time_start)) -------------------------------------------------------------------------------- /lua/scripts/1ovr_99pot.lua: -------------------------------------------------------------------------------- 1 | --- This script will set ALL players attributes on 1 and potential on 99 2 | require 'imports/career_mode/helpers' 3 | 4 | 5 | local user_team_playerids = {} 6 | 7 | -- Check if we are in Career Mode 8 | local bIsInCM = IsInCM(); 9 | 10 | if bIsInCM then 11 | user_team_playerids = GetUserSeniorTeamPlayerIDs() 12 | end 13 | 14 | -- Fields in Players Table in database that needs to be edited 15 | local fields_to_edit = { 16 | -- GK 17 | "gkdiving", 18 | "gkhandling", 19 | "gkkicking", 20 | "gkpositioning", 21 | "gkreflexes", 22 | 23 | -- ATTACK 24 | "crossing", 25 | "finishing", 26 | "headingaccuracy", 27 | "shortpassing", 28 | "volleys", 29 | 30 | -- DEFENDING 31 | "defensiveawareness", 32 | "standingtackle", 33 | "slidingtackle", 34 | 35 | -- SKILL 36 | "dribbling", 37 | "curve", 38 | "freekickaccuracy", 39 | "longpassing", 40 | "ballcontrol", 41 | 42 | -- POWER 43 | "shotpower", 44 | "jumping", 45 | "stamina", 46 | "strength", 47 | "longshots", 48 | 49 | -- MOVEMENT 50 | "acceleration", 51 | "sprintspeed", 52 | "agility", 53 | "reactions", 54 | "balance", 55 | 56 | -- MENTALITY 57 | "aggression", 58 | "composure", 59 | "interceptions", 60 | "positioning", 61 | "vision", 62 | "penalties", 63 | 64 | "overallrating" 65 | } 66 | 67 | -- Get Players Table 68 | local players_table = LE.db:GetTable("players") 69 | local current_record = players_table:GetFirstRecord() 70 | local count = 0 71 | 72 | local has_dev_plan = false 73 | local playerid = 0 74 | while current_record > 0 do 75 | has_dev_plan = false 76 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 77 | 78 | -- In career mode developement plans has higher prio than players table 79 | -- Only userteam players 80 | if user_team_playerids[playerid] then 81 | has_dev_plan = PlayerHasDevelopementPlan(playerid) 82 | end 83 | 84 | -- Set all attributes to 1 85 | for j=1, #fields_to_edit do 86 | players_table:SetRecordFieldValue(current_record, fields_to_edit[j], 1) 87 | 88 | if (has_dev_plan) then 89 | PlayerSetValueInDevelopementPlan(playerid, fields_to_edit[j], 1) 90 | end 91 | end 92 | 93 | -- Clear Player modifier to not affect his ovr 94 | players_table:SetRecordFieldValue(current_record, "modifier", 0) 95 | 96 | -- 99 Potential 97 | players_table:SetRecordFieldValue(current_record, "potential", 99) 98 | 99 | count = count + 1 100 | current_record = players_table:GetNextValidRecord() 101 | end 102 | 103 | MessageBox("Done", string.format("Edited %d players\n", count)) 104 | -------------------------------------------------------------------------------- /lua/scripts/99ovr_99pot.lua: -------------------------------------------------------------------------------- 1 | --- This script will set ALL players attributes on 99 and potential on 99 2 | require 'imports/career_mode/helpers' 3 | 4 | 5 | local user_team_playerids = {} 6 | 7 | -- Check if we are in Career Mode 8 | local bIsInCM = IsInCM(); 9 | 10 | if bIsInCM then 11 | user_team_playerids = GetUserSeniorTeamPlayerIDs() 12 | end 13 | 14 | -- Fields in Players Table in database that needs to be edited 15 | local fields_to_edit = { 16 | -- GK 17 | "gkdiving", 18 | "gkhandling", 19 | "gkkicking", 20 | "gkpositioning", 21 | "gkreflexes", 22 | 23 | -- ATTACK 24 | "crossing", 25 | "finishing", 26 | "headingaccuracy", 27 | "shortpassing", 28 | "volleys", 29 | 30 | -- DEFENDING 31 | "defensiveawareness", 32 | "standingtackle", 33 | "slidingtackle", 34 | 35 | -- SKILL 36 | "dribbling", 37 | "curve", 38 | "freekickaccuracy", 39 | "longpassing", 40 | "ballcontrol", 41 | 42 | -- POWER 43 | "shotpower", 44 | "jumping", 45 | "stamina", 46 | "strength", 47 | "longshots", 48 | 49 | -- MOVEMENT 50 | "acceleration", 51 | "sprintspeed", 52 | "agility", 53 | "reactions", 54 | "balance", 55 | 56 | -- MENTALITY 57 | "aggression", 58 | "composure", 59 | "interceptions", 60 | "positioning", 61 | "vision", 62 | "penalties", 63 | 64 | "overallrating" 65 | } 66 | 67 | -- Get Players Table 68 | local players_table = LE.db:GetTable("players") 69 | local current_record = players_table:GetFirstRecord() 70 | local count = 0 71 | 72 | local has_dev_plan = false 73 | local playerid = 0 74 | while current_record > 0 do 75 | has_dev_plan = false 76 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 77 | 78 | -- In career mode developement plans has higher prio than players table 79 | -- Only userteam players 80 | if user_team_playerids[playerid] then 81 | has_dev_plan = PlayerHasDevelopementPlan(playerid) 82 | end 83 | 84 | -- Set all attributes to 1 85 | for j=1, #fields_to_edit do 86 | players_table:SetRecordFieldValue(current_record, fields_to_edit[j], 99) 87 | 88 | if (has_dev_plan) then 89 | PlayerSetValueInDevelopementPlan(playerid, fields_to_edit[j], 99) 90 | end 91 | end 92 | 93 | -- Clear Player modifier to not affect his ovr 94 | players_table:SetRecordFieldValue(current_record, "modifier", 0) 95 | 96 | -- 99 Potential 97 | players_table:SetRecordFieldValue(current_record, "potential", 99) 98 | 99 | count = count + 1 100 | current_record = players_table:GetNextValidRecord() 101 | end 102 | 103 | MessageBox("Done", string.format("Edited %d players\n", count)) 104 | -------------------------------------------------------------------------------- /lua/scripts/99ovr_99pot_in_given_team.lua: -------------------------------------------------------------------------------- 1 | --- This script will set players attributes on 99 and potential on 99 in given team 2 | require 'imports/career_mode/helpers' 3 | require 'imports/other/helpers' 4 | 5 | -- CHANGE TEAMID 6 | local teamid = 0 7 | 8 | if teamid == 0 then 9 | MessageBox("Change TEAMID", "You need to change TEAMID in script") 10 | assert(false, "Change TEAMID") 11 | end 12 | 13 | -- For Career Mode 14 | local user_team_playerids = GetUserSeniorTeamPlayerIDs() 15 | 16 | -- Players that will be edited 17 | local team_playerids = GetPlayerIDSForTeam(teamid) 18 | 19 | -- Fields in Players Table in database that needs to be edited 20 | local fields_to_edit = { 21 | -- GK 22 | "gkdiving", 23 | "gkhandling", 24 | "gkkicking", 25 | "gkpositioning", 26 | "gkreflexes", 27 | 28 | -- ATTACK 29 | "crossing", 30 | "finishing", 31 | "headingaccuracy", 32 | "shortpassing", 33 | "volleys", 34 | 35 | -- DEFENDING 36 | "defensiveawareness", 37 | "standingtackle", 38 | "slidingtackle", 39 | 40 | -- SKILL 41 | "dribbling", 42 | "curve", 43 | "freekickaccuracy", 44 | "longpassing", 45 | "ballcontrol", 46 | 47 | -- POWER 48 | "shotpower", 49 | "jumping", 50 | "stamina", 51 | "strength", 52 | "longshots", 53 | 54 | -- MOVEMENT 55 | "acceleration", 56 | "sprintspeed", 57 | "agility", 58 | "reactions", 59 | "balance", 60 | 61 | -- MENTALITY 62 | "aggression", 63 | "composure", 64 | "interceptions", 65 | "positioning", 66 | "vision", 67 | "penalties", 68 | 69 | "overallrating" 70 | } 71 | 72 | -- Get Players Table 73 | local players_table = LE.db:GetTable("players") 74 | local current_record = players_table:GetFirstRecord() 75 | local count = 0 76 | 77 | local has_dev_plan = false 78 | local playerid = 0 79 | while current_record > 0 do 80 | has_dev_plan = false 81 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 82 | 83 | if team_playerids[playerid] then 84 | -- In career mode developement plans has higher prio than players table 85 | -- Only userteam players 86 | if user_team_playerids[playerid] then 87 | has_dev_plan = PlayerHasDevelopementPlan(playerid) 88 | end 89 | 90 | -- Set all attributes to 1 91 | for j=1, #fields_to_edit do 92 | players_table:SetRecordFieldValue(current_record, fields_to_edit[j], 99) 93 | 94 | if (has_dev_plan) then 95 | PlayerSetValueInDevelopementPlan(playerid, fields_to_edit[j], 99) 96 | end 97 | end 98 | 99 | -- Clear Player modifier to not affect his ovr 100 | players_table:SetRecordFieldValue(current_record, "modifier", 0) 101 | 102 | -- 99 Potential 103 | players_table:SetRecordFieldValue(current_record, "potential", 99) 104 | 105 | count = count + 1 106 | end 107 | 108 | current_record = players_table:GetNextValidRecord() 109 | end 110 | 111 | MessageBox("Done", string.format("Edited %d players\n", count)) 112 | -------------------------------------------------------------------------------- /lua/scripts/99pot_in_given_team.lua: -------------------------------------------------------------------------------- 1 | --- This script will set players potential on 99 in given team 2 | require 'imports/career_mode/helpers' 3 | require 'imports/other/helpers' 4 | 5 | -- CHANGE TEAMID 6 | local teamid = 0 7 | 8 | if teamid == 0 then 9 | MessageBox("Change TEAMID", "You need to change TEAMID in script") 10 | assert(false, "Change TEAMID") 11 | end 12 | 13 | -- Players that will be edited 14 | local team_playerids = GetPlayerIDSForTeam(teamid) 15 | 16 | -- Get Players Table 17 | local players_table = LE.db:GetTable("players") 18 | local current_record = players_table:GetFirstRecord() 19 | local count = 0 20 | 21 | local playerid = 0 22 | while current_record > 0 do 23 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 24 | 25 | if team_playerids[playerid] then 26 | -- 99 Potential 27 | players_table:SetRecordFieldValue(current_record, "potential", 99) 28 | 29 | count = count + 1 30 | end 31 | 32 | current_record = players_table:GetNextValidRecord() 33 | end 34 | 35 | MessageBox("Done", string.format("Edited %d players\n", count)) 36 | -------------------------------------------------------------------------------- /lua/scripts/auto_import_gameplay.lua: -------------------------------------------------------------------------------- 1 | -- Put this file in C:\FC 24 Live Editor\mods\lua_autorun and restart the game 2 | 3 | -- This script Load Gameplay cofiguration from C:\FC 24 Live Editor\AttribDBRuntime_gameplayattribdb.json 4 | 5 | function LEInitDone__OnEvent() 6 | LE.gameplay_attribulator_manager:LoadFromFile() 7 | end 8 | 9 | AddEventHandler("LEInitDoneEvent", LEInitDone__OnEvent) 10 | -------------------------------------------------------------------------------- /lua/scripts/auto_max_user_team_fitness.lua: -------------------------------------------------------------------------------- 1 | --- This script will keep yours players Fitness at 99 2 | require 'imports/career_mode/enums' 3 | require 'imports/career_mode/helpers' 4 | 5 | function MaxFitness__OnEvent(events_manager, event_id, event) 6 | if ( 7 | event_id == ENUM_CM_EVENT_MSG_ABOUT_TO_ENTER_PREMATCH or -- Before match 8 | event_id == ENUM_CM_EVENT_MSG_POST_LOAD_PREPARE -- After save load 9 | ) then 10 | UserTeamSetPlayersFitness(99) 11 | end 12 | end 13 | 14 | 15 | AddEventHandler("post__CareerModeEvent", MaxFitness__OnEvent) -------------------------------------------------------------------------------- /lua/scripts/auto_max_user_team_form.lua: -------------------------------------------------------------------------------- 1 | --- This script will keep yours players Form at 99 2 | 3 | require 'imports/career_mode/enums' 4 | require 'imports/career_mode/helpers' 5 | 6 | 7 | function MaxForm__OnEvent(events_manager, event_id, event) 8 | if ( 9 | event_id == ENUM_CM_EVENT_MSG_ABOUT_TO_ENTER_PREMATCH or -- Before match 10 | event_id == ENUM_CM_EVENT_MSG_POST_LOAD_PREPARE -- After save load 11 | ) then 12 | UserTeamSetPlayersForm(99) 13 | end 14 | end 15 | 16 | 17 | AddEventHandler("post__CareerModeEvent", MaxForm__OnEvent) 18 | -------------------------------------------------------------------------------- /lua/scripts/auto_max_user_team_form_morale_sharpness.lua: -------------------------------------------------------------------------------- 1 | --- This script will keep yours players Form, Sharpness and Morale at 99 2 | 3 | require 'imports/career_mode/enums' 4 | require 'imports/career_mode/helpers' 5 | 6 | 7 | function MaxFormSharpnessMorale__OnEvent(events_manager, event_id, event) 8 | if ( 9 | event_id == ENUM_CM_EVENT_MSG_ABOUT_TO_ENTER_PREMATCH or -- Before match 10 | event_id == ENUM_CM_EVENT_MSG_POST_LOAD_PREPARE -- After save load 11 | ) then 12 | UserTeamSetPlayersFormSharpnessMorale( 13 | 99, -- Form 14 | 99, -- Sharpness 15 | 99 -- Morale 16 | ) 17 | end 18 | end 19 | 20 | 21 | AddEventHandler("post__CareerModeEvent", MaxFormSharpnessMorale__OnEvent) 22 | -------------------------------------------------------------------------------- /lua/scripts/auto_max_user_team_morale.lua: -------------------------------------------------------------------------------- 1 | --- This script will keep yours players Morale at 99 2 | 3 | require 'imports/career_mode/enums' 4 | require 'imports/career_mode/helpers' 5 | 6 | 7 | function MaxMorale__OnEvent(events_manager, event_id, event) 8 | if ( 9 | event_id == ENUM_CM_EVENT_MSG_DAY_PASSED or -- Every Day 10 | event_id == ENUM_CM_EVENT_MSG_POST_LOAD_PREPARE -- After save load 11 | ) then 12 | UserTeamSetPlayersMorale(99) 13 | end 14 | end 15 | 16 | 17 | AddEventHandler("post__CareerModeEvent", MaxMorale__OnEvent) 18 | 19 | -- Insta exec if in CM 20 | if IsInCM() then 21 | UserTeamSetPlayersMorale(99) 22 | end 23 | -------------------------------------------------------------------------------- /lua/scripts/auto_max_user_team_sharpness.lua: -------------------------------------------------------------------------------- 1 | --- This script will keep yours players Sharpness at 99 2 | 3 | require 'imports/career_mode/enums' 4 | require 'imports/career_mode/helpers' 5 | 6 | 7 | function MaxSharpness__OnEvent(events_manager, event_id, event) 8 | if ( 9 | event_id == ENUM_CM_EVENT_MSG_ABOUT_TO_ENTER_PREMATCH or -- Before match 10 | event_id == ENUM_CM_EVENT_MSG_POST_LOAD_PREPARE -- After save load 11 | ) then 12 | UserTeamSetPlayersSharpness(99) 13 | end 14 | end 15 | 16 | 17 | AddEventHandler("post__CareerModeEvent", MaxSharpness__OnEvent) -------------------------------------------------------------------------------- /lua/scripts/auto_max_vpro_fitness.lua: -------------------------------------------------------------------------------- 1 | --- This script will keep your player fitness at 100 in player career mode 2 | 3 | require 'imports/career_mode/enums' 4 | require 'imports/career_mode/helpers' 5 | FCECareerModeUserManager = require 'imports/career_mode/fcecareermodeusermanager' 6 | 7 | function MaxVPROFitness__OnEvent(events_manager, event_id, event) 8 | if ( 9 | event_id == ENUM_CM_EVENT_MSG_ABOUT_TO_ENTER_PREMATCH or -- Before match 10 | event_id == ENUM_CM_EVENT_MSG_POST_LOAD_PREPARE -- After save load 11 | ) then 12 | local cm_user_mgr = FCECareerModeUserManager:new() 13 | 14 | SetPlayerFitness(cm_user_mgr:GetPAPID(), 99) 15 | end 16 | end 17 | 18 | 19 | AddEventHandler("post__CareerModeEvent", MaxVPROFitness__OnEvent) -------------------------------------------------------------------------------- /lua/scripts/custom_headassetid_to_playerid.lua: -------------------------------------------------------------------------------- 1 | --- This script can add/update headmodels from your mod manager 2 | --- You need to edit "headmodels_map" by yourself, pattern is simple: 3 | --- [playerid] = headassetid, 4 | --- by default it updates these faces: 5 | --- Messi 20801 6 | --- Ronaldo 158023 7 | --- Which in fact will just swap Messi face with Ronaldo face to demonstrate how the script works. 8 | require 'imports/core/common' 9 | 10 | local headmodels_map = { 11 | [158023] = 20801, -- [Messi] = Ronaldo 12 | [20801] = 158023 -- [Ronaldo] = Messi 13 | } 14 | 15 | -- Get Players Table 16 | local players_table = LE.db:GetTable("players") 17 | local current_record = players_table:GetFirstRecord() 18 | 19 | local updated_players = 0 20 | local players_count = table_count(headmodels_map) 21 | 22 | local playerid = 0 23 | local headassetid = nil 24 | while current_record > 0 do 25 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 26 | 27 | headassetid = headmodels_map[playerid] 28 | if (headassetid) then 29 | players_table:SetRecordFieldValue(current_record, "hashighqualityhead", 1) 30 | players_table:SetRecordFieldValue(current_record, "headclasscode", 0) 31 | players_table:SetRecordFieldValue(current_record, "headassetid", headassetid) 32 | 33 | updated_players = updated_players + 1 34 | end 35 | 36 | -- Break the loop if we already updated all players 37 | if (updated_players == players_count) then 38 | break 39 | end 40 | 41 | current_record = players_table:GetNextValidRecord() 42 | end 43 | 44 | MessageBox("Done", string.format("Edited %d players\n", updated_players)) 45 | -------------------------------------------------------------------------------- /lua/scripts/custom_tattoos_to_playerid.lua: -------------------------------------------------------------------------------- 1 | --- This script can add/update leftarm tattoos from your mod manager 2 | --- You need to edit "tattoos_map" by yourself, pattern is simple: 3 | --- [playerid] = tattooid, 4 | --- by default it updates these tattoos: 5 | --- 070 : Roberto Firmino 201942 6 | --- 071 : Manuel Lanzini 188988 7 | --- 072 : Dani Ceballos 222509 8 | --- 073 : Emerson Palmieri 210736 9 | --- 074 : Isco 197781 10 | --- 075 : James Maddison 220697 11 | --- 076 : Christian Pulisic 227796 12 | --- 077 : Ricardo Quaresma 20775 13 | --- 078 : Santi Mina 212623 14 | --- 079 : Saul 208421 15 | --- 080 : Arturo Vidal 181872 16 | --- 081 : Maro Icardi 201399 17 | --- 082 : Marcelo 176676 18 | --- 083 : Nainggolan 178518 19 | --- 084 : Gabriel Jesus 230666 20 | --- 085 : Leonardo Bonucci 184344 21 | --- 086 : Samu Castillejo 210617 22 | --- 087 : Coutinho 189242 23 | --- 088 : Joao Cancelo 210514 24 | --- 089 : Milinkovic-Savic 223848 25 | --- 090 : Perotti 183900 26 | --- 091 : Pellegrini 228251 27 | --- 092 : Spinazzola 202884 28 | --- 093 : Douglas Costa 190483 29 | --- 666 : Sergio Ramos 155862 30 | require 'imports/core/common' 31 | 32 | 33 | local tattoos_map = { 34 | [201942] = 70, 35 | [188988] = 71, 36 | [222509] = 72, 37 | [210736] = 73, 38 | [197781] = 74, 39 | [220697] = 75, 40 | [227796] = 76, 41 | [20775] = 77, 42 | [212623] = 78, 43 | [208421] = 79, 44 | [181872] = 80, 45 | [201399] = 81, 46 | [176676] = 82, 47 | [178518] = 83, 48 | [230666] = 84, 49 | [184344] = 85, 50 | [210617] = 86, 51 | [189242] = 87, 52 | [210514] = 88, 53 | [223848] = 89, 54 | [183900] = 90, 55 | [228251] = 91, 56 | [202884] = 92, 57 | [190483] = 93, 58 | [155862] = 666, 59 | } 60 | 61 | -- Get Players Table 62 | local players_table = LE.db:GetTable("players") 63 | local current_record = players_table:GetFirstRecord() 64 | 65 | local updated_players = 0 66 | local players_count = table_count(headmodels_map) 67 | 68 | local playerid = 0 69 | local tattooid = nil 70 | while current_record > 0 do 71 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 72 | 73 | tattooid = tattoos_map[playerid] 74 | if (tattooid) then 75 | players_table:SetRecordFieldValue(current_record, "tattooleftarm", tattooid) 76 | 77 | updated_players = updated_players + 1 78 | end 79 | 80 | -- Break the loop if we already updated all players 81 | if (updated_players == players_count) then 82 | break 83 | end 84 | 85 | current_record = players_table:GetNextValidRecord() 86 | end 87 | 88 | MessageBox("Done", string.format("Edited %d players\n", updated_players)) 89 | -------------------------------------------------------------------------------- /lua/scripts/delete_generated_players.lua: -------------------------------------------------------------------------------- 1 | --- This script will delete all generated players 2 | 3 | -- Get Players Table 4 | local players_table = LE.db:GetTable("players") 5 | local current_record = players_table:GetFirstRecord() 6 | local playerid = 0 7 | while current_record > 0 do 8 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 9 | if (playerid>= 280000) then 10 | DeletePlayer(playerid, 0) 11 | end 12 | 13 | current_record = players_table:GetNextValidRecord() 14 | end 15 | 16 | MessageBox("Done", "Done") 17 | -------------------------------------------------------------------------------- /lua/scripts/export_season_stats.lua: -------------------------------------------------------------------------------- 1 | -- This script will export current season stats (goals scored, assists etc.) to CSV. 2 | -- The SEASON_STATS.csv file will be created on Desktop. 3 | -- The game resets stats at the beginning of every season, so you need to run the script at the end of every season. 4 | require 'imports/other/helpers' 5 | 6 | local desktop_path = string.format("%s\\Desktop", os.getenv('USERPROFILE')) 7 | local current_date = GetCurrentDate() 8 | local file_path = string.format("%s\\SEASON_STATS_%02d_%02d_%04d.csv", desktop_path, current_date.day, current_date.month, current_date.year) 9 | 10 | -- Don't Touch 11 | local columns = { 12 | "position", 13 | "playerid", 14 | "playername", 15 | --"team", 16 | "competition", 17 | "appearances", 18 | "AVG", 19 | "MOTMs", 20 | "goals", 21 | "assists", 22 | "yellow_cards", 23 | "two_yellow", 24 | "red_cards", 25 | "saves", 26 | "goals_conceded", 27 | "cleansheets", 28 | } 29 | 30 | local col_to_key = { 31 | position = "position", 32 | playerid = "playerid", 33 | playername = "playername", 34 | --team = "teamname", 35 | competition = "compname", 36 | appearances = "app", 37 | AVG = "avg", 38 | MOTMs = "motm", 39 | goals = "goals", 40 | assists = "assists", 41 | yellow_cards = "yellow", 42 | two_yellow = "two_yellow", 43 | red_cards = "red", 44 | saves = "saves", 45 | goals_conceded = "goals_conceded", 46 | cleansheets = "clean_sheets", 47 | } 48 | 49 | function get_players() 50 | local result = {} 51 | 52 | -- Get Players Table 53 | local players_table = LE.db:GetTable("players") 54 | local current_record = players_table:GetFirstRecord() 55 | 56 | local playerid = 0 57 | local preferredposition1 = 0 58 | while current_record > 0 do 59 | local player = {} 60 | 61 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 62 | preferredposition1 = players_table:GetRecordFieldValue(current_record, "preferredposition1") 63 | 64 | player.position = GetPlayerPrimaryPositionName(preferredposition1) 65 | 66 | -- Get the names later, only if needed as it's very slow 67 | player.name = "" 68 | --player.teamname = "" 69 | 70 | result[playerid] = player 71 | 72 | current_record = players_table:GetNextValidRecord() 73 | end 74 | 75 | return result 76 | end 77 | 78 | function get_stats(players) 79 | local result = {} 80 | 81 | local all_stats = GetPlayersStats() 82 | 83 | for i=1, #all_stats do 84 | local stat = all_stats[i] 85 | local playerid = stat.playerid 86 | local app = stat.app 87 | 88 | if playerid > 0 and playerid < 4294967295 and app > 0 then 89 | local player = players[playerid] 90 | if player ~= nil then 91 | if player.name == "" then 92 | player.name = GetPlayerName(playerid) 93 | end 94 | 95 | local stats = player.stats or {} 96 | local compobjid = stat.compobjid 97 | stats[compobjid] = {} 98 | 99 | stats[compobjid]["playerid"] = playerid 100 | stats[compobjid]["playername"] = player.name 101 | stats[compobjid]["position"] = player.position 102 | 103 | stats[compobjid]["goals"] = stat.goals 104 | stats[compobjid]["yellow"] = stat.yellow 105 | stats[compobjid]["red"] = stat.red 106 | stats[compobjid]["assists"] = stat.assists 107 | stats[compobjid]["clean_sheets"] = stat.clean_sheets 108 | stats[compobjid]["compobjid"] = compobjid 109 | stats[compobjid]["compname"] = GetCompetitionNameByObjID(compobjid) 110 | 111 | -- Not sure 112 | stats[compobjid]["motm"] = stat.motm 113 | stats[compobjid]["saves"] = stat.saves 114 | stats[compobjid]["goals_conceded"] = stat.goals_conceded 115 | stats[compobjid]["two_yellow"] = stat.two_yellow 116 | 117 | local avg = stat.avg 118 | if app > 1 then 119 | avg = (avg / app) / 10 120 | elseif app == 1 then 121 | avg = avg / 10 122 | end 123 | 124 | stats[compobjid]["app"] = app 125 | stats[compobjid]["avg"] = string.format("%0.2f", avg) 126 | 127 | player.stats = stats 128 | result[playerid] = player 129 | 130 | end 131 | end 132 | end 133 | 134 | return result 135 | end 136 | 137 | assert(IsInCM(), "Script must be executed in career mode") 138 | 139 | local file = io.open(file_path, "w+") 140 | io.output(file) 141 | 142 | io.write(table.concat(columns, ",")) 143 | io.write("\n") 144 | local players_stats = get_stats(get_players()) 145 | for playerid, data in pairs(players_stats) do 146 | for compobjid, stat in pairs(data.stats) do 147 | local row = {} 148 | for i=1, #columns do 149 | local colname = columns[i] 150 | local _key = col_to_key[colname] 151 | table.insert(row, stat[_key]) 152 | end 153 | io.write(table.concat(row, ",")) 154 | io.write("\n") 155 | end 156 | 157 | end 158 | 159 | io.close(file) 160 | LOGGER:LogInfo("Done") 161 | -------------------------------------------------------------------------------- /lua/scripts/export_transfer_history.lua: -------------------------------------------------------------------------------- 1 | -- This script will export current season transfer history to CSV. 2 | -- The TRANSFER_HISTORY.csv file will be created on Desktop. 3 | -- The game resets transfer history at the beginning of every season, so you need to run the script at the end of every season. 4 | 5 | require 'imports/career_mode/enums' 6 | require 'imports/career_mode/helpers' 7 | require 'imports/other/helpers' 8 | 9 | local desktop_path = string.format("%s\\Desktop", os.getenv('USERPROFILE')) 10 | local current_date = GetCurrentDate() 11 | local file_path = string.format("%s\\TRANSFER_HISTORY_%02d_%02d_%04d.csv", desktop_path, current_date.day, current_date.month, current_date.year) 12 | 13 | -- Don't Touch 14 | local columns = { 15 | "type", 16 | "date", 17 | "playerid", 18 | "exchangeplayerid", 19 | "teamfromid", 20 | "teamtoid", 21 | "playername", 22 | "exchangeplayername", 23 | "teamfromname", 24 | "teamtoname", 25 | "fee", 26 | "total_deal_value" 27 | } 28 | 29 | assert(IsInCM(), "Script must be executed in career mode") 30 | 31 | function get_succeeded_ai_club_transfers(out, storage) 32 | -- size of each entry in this eastl::vector 33 | local obj_size = 0xB8 34 | 35 | -- playerid at 0x0 36 | -- buying_team at 0x4 37 | -- selling_team at 0x8 38 | -- seller_accepted at 0x6C 39 | -- buyer_accepted at 0x6D 40 | -- rlc_paid at 0x70 41 | 42 | local vec = MEMORY:ReadPointer(storage + 0x8) 43 | local mBegin = MEMORY:ReadPointer(vec + 0x0) 44 | local mEnd = MEMORY:ReadPointer(vec + 0x8) 45 | 46 | local current = mBegin 47 | while current < mEnd do 48 | local playerid = MEMORY:ReadInt(current + 0x0) 49 | local buying_team = MEMORY:ReadInt(current + 0x4) 50 | local selling_team = MEMORY:ReadInt(current + 0x8) 51 | 52 | -- print(string.format("get_succeeded_ai_club_transfers %X %d %d %d", current, playerid, buying_team, selling_team)) 53 | 54 | -- IsValid 55 | if (playerid > 0 and buying_team > 0 and selling_team > 0) then 56 | local seller_accepted = MEMORY:ReadBool(current + 0x6C) 57 | local buyer_accepted = MEMORY:ReadBool(current + 0x6D) 58 | 59 | -- Is Success 60 | if (seller_accepted or buyer_accepted) then 61 | 62 | local final_fee = 0 63 | local exchange_value = 0 64 | if seller_accepted then 65 | final_fee = MEMORY:ReadInt(MEMORY:ReadPointer(current + 0x28) - 0xC) 66 | else 67 | local mLastReq = MEMORY:ReadPointer(current + 0x48) 68 | final_fee = MEMORY:ReadInt(mLastReq - 0x14 + 0x0) 69 | exchange_value = MEMORY:ReadInt(mLastReq - 0x14 + 0x8) 70 | end 71 | 72 | local key = string.format("T%d-%d-%d", playerid, buying_team, selling_team) 73 | out[key] = { 74 | final_fee = final_fee, 75 | exchange_value = exchange_value 76 | } 77 | 78 | end 79 | end 80 | 81 | current = current + obj_size 82 | end 83 | end 84 | 85 | function get_succeeded_user_club_transfers(out, storage) 86 | -- size of each entry in this eastl::vector 87 | local obj_size = 0xA0 88 | 89 | -- playerid at 0x0 90 | -- buying_team at 0x4 91 | -- selling_team at 0x8 92 | 93 | -- Offers at 0x18 94 | -- Requests at 0x38 95 | -- Actions at 0x58 96 | 97 | local vec = MEMORY:ReadPointer(storage + 0x28) 98 | local mBegin = MEMORY:ReadPointer(vec + 0x0) 99 | local mEnd = MEMORY:ReadPointer(vec + 0x8) 100 | 101 | local current = mBegin 102 | while current < mEnd do 103 | local playerid = MEMORY:ReadInt(current + 0x0) 104 | local buying_team = MEMORY:ReadInt(current + 0x4) 105 | local selling_team = MEMORY:ReadInt(current + 0x8) 106 | 107 | -- print(string.format("get_succeeded_user_club_transfers %X %d %d %d", current, playerid, buying_team, selling_team)) 108 | 109 | -- IsValid 110 | if (playerid > 0 and buying_team > 0 and selling_team > 0) then 111 | local mActionsBegin = MEMORY:ReadPointer(current + 0x58) 112 | local mActionsEnd = MEMORY:ReadPointer(current + 0x60) 113 | 114 | -- Not empty 115 | if (mActionsBegin ~= mActionsEnd) then 116 | local last_action = MEMORY:ReadChar(mActionsEnd - 0xC + 0x8) 117 | local seller_accepted = last_action == 0 118 | local buyer_accepted = last_action == 4 119 | 120 | -- Is Success 121 | if (seller_accepted or buyer_accepted) then 122 | local final_fee = 0 123 | local exchange_value = 0 124 | local exchange_player = 0 125 | if seller_accepted then 126 | local mLastOff = MEMORY:ReadPointer(current + 0x20) 127 | exchange_player = MEMORY:ReadInt(mLastOff - 0x30 + 0x0) 128 | exchange_value = MEMORY:ReadInt(mLastOff - 0x30 + 0x4) 129 | final_fee = MEMORY:ReadInt(mLastOff - 0x30 + 0xC) 130 | else 131 | local mLastReq = MEMORY:ReadPointer(current + 0x40) 132 | exchange_player = MEMORY:ReadInt(mLastReq - 0x30 + 0x0) 133 | exchange_value = MEMORY:ReadInt(mLastReq - 0x30 + 0x8) 134 | final_fee = MEMORY:ReadInt(mLastReq - 0x30 + 0xC) 135 | end 136 | 137 | local key = string.format("T%d-%d-%d", playerid, buying_team, selling_team) 138 | out[key] = { 139 | final_fee = final_fee, 140 | exchange_player = exchange_player, 141 | exchange_value = exchange_value 142 | } 143 | end 144 | end 145 | end 146 | 147 | current = current + obj_size 148 | end 149 | end 150 | 151 | function get_succeeded_ai_player_transfers(out, storage) 152 | -- size of each entry in this eastl::vector 153 | local obj_size = 0xB0 154 | 155 | -- playerid at 0x0 156 | -- buying_team at 0x4 157 | -- selling_team at 0x8 158 | 159 | -- buyer_accepted at 0xC 160 | -- seller_accepted at 0xF 161 | 162 | -- last action idx at 0x6C 163 | 164 | local vec = MEMORY:ReadPointer(storage + 0x10) 165 | local mBegin = MEMORY:ReadPointer(vec + 0x0) 166 | local mEnd = MEMORY:ReadPointer(vec + 0x8) 167 | 168 | local current = mBegin 169 | while current < mEnd do 170 | local playerid = MEMORY:ReadInt(current + 0x0) 171 | local buying_team = MEMORY:ReadInt(current + 0x4) 172 | local selling_team = MEMORY:ReadInt(current + 0x8) 173 | 174 | -- print(string.format("get_succeeded_ai_player_transfers %X %d %d %d", current, playerid, buying_team, selling_team)) 175 | 176 | -- IsValid 177 | if (playerid > 0 and buying_team > 0 and selling_team > 0) then 178 | local seller_accepted = MEMORY:ReadBool(current + 0xF) 179 | 180 | -- Is Success 181 | if (seller_accepted) then 182 | local last_action_idx = MEMORY:ReadInt(current + 0x6C) 183 | local last_action_date = MEMORY:ReadInt(current + 0x70 + (0xC * (last_action_idx - 1))) 184 | local key = string.format("T%d-%d-%d", playerid, buying_team, selling_team) 185 | out[key] = { 186 | playerid = playerid, 187 | buying_team = buying_team, 188 | selling_team = selling_team, 189 | date = last_action_date, 190 | type = "transfer" 191 | } 192 | end 193 | end 194 | 195 | current = current + obj_size 196 | end 197 | end 198 | 199 | function get_succeeded_ai_player_exchanges(out, storage) 200 | -- size of each entry in this eastl::vector 201 | local obj_size = 0xB0 202 | 203 | -- playerid at 0x0 204 | -- buying_team at 0x4 205 | -- selling_team at 0x8 206 | 207 | -- buyer_accepted at 0xC 208 | -- seller_accepted at 0xF 209 | 210 | local vec = MEMORY:ReadPointer(storage + 0x10) 211 | local mBegin = MEMORY:ReadPointer(vec + 0x0) 212 | local mEnd = MEMORY:ReadPointer(vec + 0x8) 213 | 214 | local current = mBegin 215 | while current < mEnd do 216 | local playerid = MEMORY:ReadInt(current + 0x0) 217 | local buying_team = MEMORY:ReadInt(current + 0x4) 218 | local selling_team = MEMORY:ReadInt(current + 0x8) 219 | 220 | -- print(string.format("get_succeeded_ai_player_exchanges %X %d %d %d", current, playerid, buying_team, selling_team)) 221 | 222 | -- IsValid 223 | if (playerid > 0 and buying_team > 0 and selling_team > 0) then 224 | local seller_accepted = MEMORY:ReadBool(current + 0xF) 225 | 226 | -- Is Success 227 | if (seller_accepted) then 228 | local last_action_idx = MEMORY:ReadInt(current + 0x6C) 229 | local last_action_date = MEMORY:ReadInt(current + 0x70 + (0xC * (last_action_idx - 1))) 230 | local key = string.format("T%d-%d-%d", playerid, buying_team, selling_team) 231 | out[key] = { 232 | playerid = playerid, 233 | buying_team = buying_team, 234 | selling_team = selling_team, 235 | date = last_action_date, 236 | type = "transfer" 237 | } 238 | end 239 | end 240 | 241 | current = current + obj_size 242 | end 243 | end 244 | 245 | function get_succeeded_user_player_transfers(out, storage) 246 | -- size of each entry in this eastl::vector 247 | local obj_size = 0x98 248 | 249 | -- playerid at 0x0 250 | -- buying_team at 0x4 251 | -- selling_team at 0x8 252 | 253 | -- Actions at 0x50 254 | 255 | local vec = MEMORY:ReadPointer(storage + 0x38) 256 | local mBegin = MEMORY:ReadPointer(vec + 0x0) 257 | local mEnd = MEMORY:ReadPointer(vec + 0x8) 258 | 259 | local current = mBegin 260 | while current < mEnd do 261 | local playerid = MEMORY:ReadInt(current + 0x0) 262 | local buying_team = MEMORY:ReadInt(current + 0x4) 263 | local selling_team = MEMORY:ReadInt(current + 0x8) 264 | 265 | -- print(string.format("get_succeeded_user_player_transfers %X %d %d %d", current, playerid, buying_team, selling_team)) 266 | 267 | -- IsValid 268 | if (playerid > 0 and buying_team > 0 and selling_team > 0) then 269 | local mActionsBegin = MEMORY:ReadPointer(current + 0x50) 270 | local mActionsEnd = MEMORY:ReadPointer(current + 0x58) 271 | 272 | -- Not empty 273 | if (mActionsBegin ~= mActionsEnd) then 274 | local last_action = MEMORY:ReadChar(mActionsEnd - 0xC + 0x8) 275 | local seller_accepted = last_action == 0 276 | local buyer_accepted = last_action == 4 277 | 278 | if (seller_accepted or buyer_accepted) then 279 | local last_action_date = MEMORY:ReadInt(mActionsEnd - 0xC + 0x0) 280 | local key = string.format("T%d-%d-%d", playerid, buying_team, selling_team) 281 | out[key] = { 282 | playerid = playerid, 283 | buying_team = buying_team, 284 | selling_team = selling_team, 285 | date = last_action_date, 286 | type = "transfer" 287 | } 288 | end 289 | end 290 | end 291 | 292 | current = current + obj_size 293 | end 294 | end 295 | 296 | function get_succeeded_user_player_exchanges(out, storage) 297 | -- size of each entry in this eastl::vector 298 | local obj_size = 0x98 299 | 300 | -- playerid at 0x0 301 | -- buying_team at 0x4 302 | -- selling_team at 0x8 303 | 304 | -- Actions at 0x50 305 | 306 | local vec = MEMORY:ReadPointer(storage + 0x48) 307 | local mBegin = MEMORY:ReadPointer(vec + 0x0) 308 | local mEnd = MEMORY:ReadPointer(vec + 0x8) 309 | 310 | local current = mBegin 311 | while current < mEnd do 312 | local playerid = MEMORY:ReadInt(current + 0x0) 313 | local buying_team = MEMORY:ReadInt(current + 0x4) 314 | local selling_team = MEMORY:ReadInt(current + 0x8) 315 | 316 | -- IsValid 317 | if (playerid > 0 and buying_team > 0 and selling_team > 0) then 318 | local mActionsBegin = MEMORY:ReadPointer(current + 0x50) 319 | local mActionsEnd = MEMORY:ReadPointer(current + 0x58) 320 | 321 | -- Not empty 322 | if (mActionsBegin ~= mActionsEnd) then 323 | local last_action = MEMORY:ReadChar(mActionsEnd - 0xC + 0x8) 324 | local seller_accepted = last_action == 0 325 | local buyer_accepted = last_action == 4 326 | 327 | if (seller_accepted or buyer_accepted) then 328 | local last_action_date = MEMORY:ReadInt(mActionsEnd - 0xC + 0x0) 329 | local key = string.format("T%d-%d-%d", playerid, buying_team, selling_team) 330 | out[key] = { 331 | playerid = playerid, 332 | buying_team = buying_team, 333 | selling_team = selling_team, 334 | date = last_action_date, 335 | type = "transfer" 336 | } 337 | end 338 | end 339 | end 340 | 341 | current = current + obj_size 342 | end 343 | end 344 | 345 | function get_succeeded_ai_player_loans(out, storage) 346 | -- size of each entry in this eastl::vector 347 | local obj_size = 0x98 348 | 349 | -- playerid at 0x0 350 | -- buying_team at 0x4 351 | -- selling_team at 0x8 352 | 353 | -- seller_accepted at 0x50 354 | -- last action idx at 0x58 355 | 356 | local vec = MEMORY:ReadPointer(storage + 0x20) 357 | local mBegin = MEMORY:ReadPointer(vec + 0x0) 358 | local mEnd = MEMORY:ReadPointer(vec + 0x8) 359 | 360 | local current = mBegin 361 | while current < mEnd do 362 | local playerid = MEMORY:ReadInt(current + 0x0) 363 | local buying_team = MEMORY:ReadInt(current + 0x4) 364 | local selling_team = MEMORY:ReadInt(current + 0x8) 365 | 366 | -- print(string.format("get_succeeded_ai_player_loans %X %d %d %d", current, playerid, buying_team, selling_team)) 367 | 368 | -- IsValid 369 | if (playerid > 0 and buying_team > 0 and selling_team > 0) then 370 | local seller_accepted = MEMORY:ReadBool(current + 0x50) 371 | 372 | -- Is Success 373 | if (seller_accepted) then 374 | local last_action_idx = MEMORY:ReadInt(current + 0x58) 375 | local last_action_date = MEMORY:ReadInt(current + 0x5C + (0xC * (last_action_idx - 1))) 376 | local key = string.format("L%d-%d-%d", playerid, buying_team, selling_team) 377 | out[key] = { 378 | playerid = playerid, 379 | buying_team = buying_team, 380 | selling_team = selling_team, 381 | date = last_action_date, 382 | type = "loan" 383 | } 384 | end 385 | end 386 | 387 | current = current + obj_size 388 | end 389 | end 390 | 391 | function get_succeeded_ai_club_loans(out, storage) 392 | -- size of each entry in this eastl::vector 393 | local obj_size = 0xC0 394 | 395 | -- playerid at 0x0 396 | -- buying_team at 0x4 397 | -- selling_team at 0x8 398 | -- seller_accepted at 0x78 399 | -- buyer_accepted at 0x79 400 | 401 | local vec = MEMORY:ReadPointer(storage + 0x18) 402 | local mBegin = MEMORY:ReadPointer(vec + 0x0) 403 | local mEnd = MEMORY:ReadPointer(vec + 0x8) 404 | 405 | local current = mBegin 406 | while current < mEnd do 407 | local playerid = MEMORY:ReadInt(current + 0x0) 408 | local buying_team = MEMORY:ReadInt(current + 0x4) 409 | local selling_team = MEMORY:ReadInt(current + 0x8) 410 | 411 | -- print(string.format("get_succeeded_ai_club_loans %X %d %d %d", current, playerid, buying_team, selling_team)) 412 | 413 | -- IsValid 414 | if (playerid > 0 and buying_team > 0 and selling_team > 0) then 415 | local seller_accepted = MEMORY:ReadBool(current + 0x78) 416 | local buyer_accepted = MEMORY:ReadBool(current + 0x79) 417 | 418 | -- Is Success 419 | if (seller_accepted or buyer_accepted) then 420 | local key = string.format("L%d-%d-%d", playerid, buying_team, selling_team) 421 | out[key] = { 422 | final_fee = 0 423 | } 424 | end 425 | end 426 | 427 | current = current + obj_size 428 | end 429 | end 430 | 431 | function get_succeeded_user_club_loans(out, storage) 432 | -- size of each entry in this eastl::vector 433 | local obj_size = 0xF8 434 | 435 | -- playerid at 0x0 436 | -- buying_team at 0x4 437 | -- selling_team at 0x8 438 | -- seller_accepted at 0x78 439 | -- buyer_accepted at 0x79 440 | 441 | local vec = MEMORY:ReadPointer(storage + 0x30) 442 | local mBegin = MEMORY:ReadPointer(vec + 0x0) 443 | local mEnd = MEMORY:ReadPointer(vec + 0x8) 444 | 445 | local current = mBegin 446 | while current < mEnd do 447 | local playerid = MEMORY:ReadInt(current + 0x0) 448 | local buying_team = MEMORY:ReadInt(current + 0x4) 449 | local selling_team = MEMORY:ReadInt(current + 0x8) 450 | 451 | -- IsValid 452 | if (playerid > 0 and buying_team > 0 and selling_team > 0) then 453 | local seller_accepted = MEMORY:ReadBool(current + 0x78) 454 | local buyer_accepted = MEMORY:ReadBool(current + 0x79) 455 | 456 | -- Is Success 457 | if (seller_accepted or buyer_accepted) then 458 | local key = string.format("L%d-%d-%d", playerid, buying_team, selling_team) 459 | out[key] = { 460 | final_fee = 0 461 | } 462 | end 463 | end 464 | 465 | current = current + obj_size 466 | end 467 | end 468 | 469 | local transfer_mgr = GetManagerObjByTypeId(ENUM_FCEGameModesFCECareerModeTransferManager) 470 | assert(transfer_mgr ~= 0, "Cant find FCEGameModesFCECareerModeTransferManager") 471 | 472 | -- NegotiationsStorage at 0x1A70 473 | local neg_storage = MEMORY:ReadPointer(transfer_mgr + 0x1A70) 474 | 475 | local player_negos = {} 476 | local club_negos = {} 477 | 478 | get_succeeded_ai_player_transfers(player_negos, neg_storage) 479 | get_succeeded_ai_player_exchanges(player_negos, neg_storage) 480 | 481 | get_succeeded_ai_player_loans(player_negos, neg_storage) 482 | 483 | get_succeeded_user_player_transfers(player_negos, neg_storage) 484 | get_succeeded_user_player_exchanges(player_negos, neg_storage) 485 | 486 | get_succeeded_ai_club_transfers(club_negos, neg_storage) 487 | get_succeeded_ai_club_loans(club_negos, neg_storage) 488 | 489 | get_succeeded_user_club_transfers(club_negos, neg_storage) 490 | get_succeeded_user_club_loans(club_negos, neg_storage) 491 | 492 | local file = io.open(file_path, "w+") 493 | io.output(file) 494 | io.write(table.concat(columns, ",")) 495 | io.write("\n") 496 | 497 | for key, player_nego in pairs(player_negos) do 498 | local club_nego = club_negos[key] or {} 499 | 500 | local row = {} 501 | for i=1, #columns do 502 | local colname = columns[i] 503 | local v = "" 504 | 505 | if colname == "playername" then 506 | v = GetPlayerName(player_nego.playerid) 507 | elseif colname == "exchangeplayername" then 508 | if (club_nego.exchange_player and club_nego.exchange_player > 0) then 509 | v = GetPlayerName(club_nego.exchange_player) 510 | else 511 | v = " " 512 | end 513 | elseif colname == "exchangeplayerid" then 514 | v = club_nego.exchange_player or " " 515 | elseif colname == "teamfromid" then 516 | v = player_nego.selling_team 517 | elseif colname == "teamtoid" then 518 | v = player_nego.buying_team 519 | elseif colname == "teamfromname" then 520 | v = GetTeamName(player_nego.selling_team) 521 | elseif colname == "teamtoname" then 522 | v = GetTeamName(player_nego.buying_team) 523 | elseif colname == "fee" then 524 | v = club_nego.final_fee or 0 525 | elseif colname == "total_deal_value" then 526 | v = (club_nego.final_fee or 0) + (club_nego.exchange_value or 0) 527 | else 528 | v = player_nego[colname] 529 | end 530 | 531 | table.insert(row, v) 532 | end 533 | io.write(table.concat(row, ",")) 534 | io.write("\n") 535 | end 536 | 537 | io.close(file) 538 | 539 | LOGGER:LogInfo("Done") -------------------------------------------------------------------------------- /lua/scripts/extend_cpu_players_contracts.lua: -------------------------------------------------------------------------------- 1 | require 'imports/career_mode/helpers' 2 | require 'imports/other/helpers' 3 | 4 | -- This script will automatically extend the contracts of all players, but not these in your team 5 | -- 5 years by default 6 | 7 | local extend_by = 5 -- 5 years 8 | 9 | -- Don't touch anything below 10 | -- For Career Mode 11 | local user_team_playerids = GetUserSeniorTeamPlayerIDs() 12 | 13 | -- Get Players Table 14 | local players_table = LE.db:GetTable("players") 15 | local current_record = players_table:GetFirstRecord() 16 | local count = 0 17 | 18 | local playerid = 0 19 | while current_record > 0 do 20 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 21 | 22 | -- Update only players that are not in user team 23 | if user_team_playerids[playerid] == nil then 24 | local new_contractvaliduntil = players_table:GetRecordFieldValue(current_record, "contractvaliduntil") 25 | 26 | -- Can't go beyond this limit 27 | if new_contractvaliduntil > 2047 then 28 | new_contractvaliduntil = 2047 29 | end 30 | 31 | players_table:SetRecordFieldValue(current_record, "contractvaliduntil", new_contractvaliduntil) 32 | 33 | count = count + 1 34 | end 35 | 36 | current_record = players_table:GetNextValidRecord() 37 | end 38 | 39 | MessageBox("Done", string.format("Edited %d players\n", count)) 40 | -------------------------------------------------------------------------------- /lua/scripts/extend_user_team_players_contracts.lua: -------------------------------------------------------------------------------- 1 | -- This script will automatically extend the contracts of players in your team 2 | -- 4 years by default 3 | 4 | require 'imports/other/helpers' 5 | 6 | local new_contract_length = 12 * 4 -- 4 years 7 | 8 | -- Don't Touch anything below 9 | assert(IsInCM(), "Script must be executed in career mode") 10 | 11 | function update_contractvaliduntil(contracts) 12 | local contracts_to_update = 0 13 | local updated_contracts = 0 14 | 15 | for playerid, contractvaliduntil in pairs(contracts) do 16 | contracts_to_update = contracts_to_update + 1 17 | end 18 | 19 | -- Get Players Table 20 | local players_table = LE.db:GetTable("players") 21 | local current_record = players_table:GetFirstRecord() 22 | 23 | local playerid = 0 24 | local contractvaliduntil = nil 25 | while current_record > 0 do 26 | if updated_contracts >= contracts_to_update then 27 | break 28 | end 29 | 30 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 31 | 32 | contractvaliduntil = contracts[playerid] 33 | if contractvaliduntil ~= nil then 34 | players_table:SetRecordFieldValue(current_record, "contractvaliduntil", contractvaliduntil) 35 | updated_contracts = updated_contracts + 1 36 | end 37 | 38 | current_record = players_table:GetNextValidRecord() 39 | end 40 | 41 | local failed_to_update = contracts_to_update - updated_contracts 42 | 43 | if failed_to_update > 0 then 44 | Log(string.format("Failed to update %d contracts", failed_to_update)) 45 | end 46 | 47 | Log(string.format("Updated Contracts: %d", updated_contracts)) 48 | end 49 | 50 | function update_contracts() 51 | local result = {} 52 | 53 | local currentdate = GetCurrentDate() 54 | local int_current_date = currentdate:ToInt() 55 | 56 | -- Get career_playercontract Table 57 | local career_playercontract_table = LE.db:GetTable("career_playercontract") 58 | local current_record = career_playercontract_table:GetFirstRecord() 59 | 60 | local playerid = 0 61 | local contract_status = 0 62 | local is_loaned_in = false 63 | local contract_date = 0 64 | local last_status_change_date = 0 65 | local contractvaliduntil = 0 66 | while current_record > 0 do 67 | contract_status = career_playercontract_table:GetRecordFieldValue(current_record, "contract_status") 68 | is_loaned_in = (contract_status == 1) or (contract_status == 3) or (contract_status == 5) 69 | 70 | -- Ignore players that are loaned in 71 | if not is_loaned_in then 72 | contract_date = career_playercontract_table:GetRecordFieldValue(current_record, "contract_date") 73 | last_status_change_date = career_playercontract_table:GetRecordFieldValue(current_record, "last_status_change_date") 74 | 75 | -- Set contract date to current date 76 | if contract_date < int_current_date then 77 | career_playercontract_table:SetRecordFieldValue(current_record, "contract_date", int_current_date) 78 | end 79 | 80 | -- last_status change date to current date 81 | if last_status_change_date < int_current_date then 82 | career_playercontract_table:SetRecordFieldValue(current_record, "last_status_change_date", int_current_date) 83 | end 84 | 85 | career_playercontract_table:SetRecordFieldValue(current_record, "duration_months", new_contract_length) 86 | 87 | contractvaliduntil = currentdate.year + math.floor(new_contract_length / 12) 88 | 89 | playerid = career_playercontract_table:GetRecordFieldValue(current_record, "playerid") 90 | result[playerid] = contractvaliduntil 91 | end 92 | 93 | current_record = career_playercontract_table:GetNextValidRecord() 94 | end 95 | 96 | return result 97 | end 98 | 99 | update_contractvaliduntil(update_contracts()) 100 | LOGGER:LogInfo("Done") -------------------------------------------------------------------------------- /lua/scripts/find_teams_no_gk.lua: -------------------------------------------------------------------------------- 1 | local squad_sizes = {} 2 | local player_position = {} 3 | 4 | -- Get players Table 5 | local players = LE.db:GetTable("players") 6 | local current_record = players:GetFirstRecord() 7 | local playerid = 0 8 | local preferredposition1 = 0 9 | 10 | while current_record > 0 do 11 | playerid = players:GetRecordFieldValue(current_record, "playerid") 12 | preferredposition1 = players:GetRecordFieldValue(current_record, "preferredposition1") 13 | 14 | player_position[playerid] = preferredposition1 15 | 16 | current_record = players:GetNextValidRecord() 17 | end 18 | 19 | -- Get Teamplayerlinks Table 20 | local teamplayerlinks = LE.db:GetTable("teamplayerlinks") 21 | current_record = teamplayerlinks:GetFirstRecord() 22 | 23 | local teamid = 0 24 | local player_preferredposition = 0 25 | 26 | while current_record > 0 do 27 | playerid = teamplayerlinks:GetRecordFieldValue(current_record, "playerid") 28 | teamid = teamplayerlinks:GetRecordFieldValue(current_record, "teamid") 29 | 30 | if squad_sizes[teamid] == nil then 31 | squad_sizes[teamid] = { 32 | player_count = 0, 33 | goalkeepers = 0, 34 | defenders = 0, 35 | midfielders = 0, 36 | attackers = 0 37 | } 38 | end 39 | 40 | player_preferredposition = player_position[playerid] 41 | squad_sizes[teamid].player_count = squad_sizes[teamid].player_count + 1 42 | 43 | if player_preferredposition == 0 then 44 | squad_sizes[teamid].goalkeepers = squad_sizes[teamid].goalkeepers + 1 45 | elseif player_preferredposition >= 1 and player_preferredposition <= 8 then 46 | squad_sizes[teamid].defenders = squad_sizes[teamid].defenders + 1 47 | elseif player_preferredposition >= 9 and player_preferredposition <= 19 then 48 | squad_sizes[teamid].midfielders = squad_sizes[teamid].midfielders + 1 49 | else 50 | squad_sizes[teamid].attackers = squad_sizes[teamid].attackers + 1 51 | end 52 | 53 | current_record = teamplayerlinks:GetNextValidRecord() 54 | end 55 | 56 | for teamid,squadsize in pairs(squad_sizes) do 57 | if squadsize.player_count <= 17 then 58 | print(string.format("Small Squad Size detected: Team %s ID: %d, players: %d", GetTeamName(teamid), teamid, squadsize.player_count)) 59 | end 60 | 61 | if squadsize.goalkeepers == 0 then 62 | print(string.format("Found team without goalkeepers. %s ID: %d", GetTeamName(teamid), teamid)) 63 | end 64 | end 65 | 66 | MessageBox("Done", "Done") 67 | -------------------------------------------------------------------------------- /lua/scripts/fix_vpro_nationality.lua: -------------------------------------------------------------------------------- 1 | require 'imports/services/enums' 2 | FCECareerModeUserManager = require 'imports/career_mode/fcecareermodeusermanager' 3 | 4 | -- You can change the ID if you want to apply that to other player 5 | local cm_user_mgr = FCECareerModeUserManager:new() 6 | 7 | local VPRO_PLAYERID = cm_user_mgr:GetPAPID() 8 | local nationality_id = 27 -- Italy 9 | 10 | -- Get Players Table 11 | local players_table = LE.db:GetTable("players") 12 | local current_record = players_table:GetFirstRecord() 13 | local playerid = 0 14 | 15 | while current_record > 0 do 16 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 17 | if (playerid == VPRO_PLAYERID) then 18 | players_table:SetRecordFieldValue(current_record, "nationality", nationality_id) 19 | 20 | -- Write new nationality in VProService 21 | if (VPRO_PLAYERID = 30999) { 22 | MEMORY:WriteShort( 23 | MEMORY:ReadPointer(GetPlugin(ENUM_djb2VProServiceVPRO_CLSS) + 0x18) + 0x343D4, 24 | nationality_id 25 | ) 26 | } 27 | 28 | break 29 | end 30 | 31 | current_record = players_table:GetNextValidRecord() 32 | end -------------------------------------------------------------------------------- /lua/scripts/generate_minifaces.lua: -------------------------------------------------------------------------------- 1 | -- Generate miniface for everyplayer in playable league. 2 | -- THIS WILL TAKE A WHILE TO COMPLETE, like around 10h... 3 | -- and... if the game will crash (which is very possible) you will have to start from beginning... 4 | require 'imports/other/helpers' 5 | 6 | 7 | -- Execute only if we are in career mode 8 | if not IsInCM() then return end 9 | 10 | -- List of teams that cause game crashes or other problems 11 | local BLACKLISTED_TEAMS = { 12 | [112264] = true -- YOUTH ACADEMY 13 | } 14 | 15 | -- List of leagues that we want to skip 16 | local BLACKLISTED_LEAGUES = { 17 | [78] = true, -- International 18 | [2136] = true, -- International Women 19 | [76] = true, -- Rest of World 20 | [383] = true, -- Create Player League 21 | [2028] = true -- Youth Squad League 22 | } 23 | 24 | -- Path is relative to the game installation directory 25 | -- means that the minifaces will be generated to your current Live Editor Mods directory (C:\FIFA 23 Live Editor\mods\root\Legacy\data\ui\imgAssets\heads if you didn't changed it') 26 | PlayerCaptureSetOutputDirectory("") 27 | 28 | -- 0 - Head and shoulders 29 | -- 1 - Head 30 | -- 2 - Body 31 | PlayerCaptureSetCamera(1) 32 | 33 | -- 256x256 34 | PlayerCaptureSetSize(256, 256) 35 | 36 | -- Image Type 37 | -- 0 - PNG 38 | -- 1 - DDS 39 | PlayerCaptureSetType(1) 40 | 41 | -- We need goalkeepers to generate proper kit. 42 | local goalkeepers = GetGoalkeepers() 43 | 44 | -- Get all rows for leagueteamlinks table 45 | local leagueteamlinks_table = LE.db:GetTable("leagueteamlinks") 46 | local leagueteamlinks_current_record = leagueteamlinks_table:GetFirstRecord() 47 | 48 | local leagueid = 0 49 | local teamid = 0 50 | while leagueteamlinks_current_record > 0 do 51 | leagueid = leagueteamlinks_table:GetRecordFieldValue(leagueteamlinks_current_record, "leagueid") 52 | 53 | if BLACKLISTED_LEAGUES[leagueid] then 54 | teamid = leagueteamlinks_table:GetRecordFieldValue(leagueteamlinks_current_record, "teamid") 55 | BLACKLISTED_TEAMS[teamid] = true 56 | end 57 | 58 | leagueteamlinks_current_record = leagueteamlinks_table:GetNextValidRecord() 59 | end 60 | 61 | -- Get all rows for teamplayerlinks table 62 | local teamplayerlinks_table = LE.db:GetTable("teamplayerlinks") 63 | local teamplayerlinks_current_record = teamplayerlinks_table:GetFirstRecord() 64 | 65 | local playerid = 0 66 | while teamplayerlinks_current_record > 0 do 67 | teamid = teamplayerlinks_table:GetRecordFieldValue(teamplayerlinks_current_record, "teamid") 68 | if not BLACKLISTED_TEAMS[teamid] then 69 | playerid = teamplayerlinks_table:GetRecordFieldValue(teamplayerlinks_current_record, "playerid") 70 | PlayerCaptureAddPlayer(playerid, teamid, goalkeepers[playerid] ~= nil) 71 | end 72 | 73 | teamplayerlinks_current_record = teamplayerlinks_table:GetNextValidRecord() 74 | end 75 | 76 | -- Start Capturing 77 | PlayerCaptureStart() 78 | -------------------------------------------------------------------------------- /lua/scripts/generate_minifaces_for_players_with_realface.lua: -------------------------------------------------------------------------------- 1 | -- Generate miniface for everyplayer with real face model in playable league. 2 | -- THIS WILL TAKE A WHILE TO COMPLETE, like around 10h... 3 | -- and... if the game will crash (which is very possible) you will have to start from beginning... 4 | require 'imports/other/helpers' 5 | 6 | 7 | -- Execute only if we are in career mode 8 | if not IsInCM() then return end 9 | 10 | -- List of teams that cause game crashes or other problems 11 | local BLACKLISTED_TEAMS = { 12 | [112264] = true -- YOUTH ACADEMY 13 | } 14 | 15 | -- List of leagues that we want to skip 16 | local BLACKLISTED_LEAGUES = { 17 | [78] = true, -- International 18 | [2136] = true, -- International Women 19 | [76] = true, -- Rest of World 20 | [383] = true, -- Create Player League 21 | [2028] = true -- Youth Squad League 22 | } 23 | 24 | -- Path is relative to the game installation directory 25 | -- means that the minifaces will be generated to your current Live Editor Mods directory (C:\FIFA 23 Live Editor\mods\root\Legacy\data\ui\imgAssets\heads if you didn't changed it') 26 | PlayerCaptureSetOutputDirectory("") 27 | 28 | -- 0 - Head and shoulders 29 | -- 1 - Head 30 | -- 2 - Body 31 | PlayerCaptureSetCamera(1) 32 | 33 | -- 256x256 34 | PlayerCaptureSetSize(256, 256) 35 | 36 | -- Image Type 37 | -- 0 - PNG 38 | -- 1 - DDS 39 | PlayerCaptureSetType(1) 40 | 41 | -- We need goalkeepers to generate proper kit. 42 | local goalkeepers = GetGoalkeepers() 43 | 44 | -- Get all rows for leagueteamlinks table 45 | local leagueteamlinks_table = LE.db:GetTable("leagueteamlinks") 46 | local leagueteamlinks_current_record = leagueteamlinks_table:GetFirstRecord() 47 | 48 | local leagueid = 0 49 | local teamid = 0 50 | while leagueteamlinks_current_record > 0 do 51 | leagueid = leagueteamlinks_table:GetRecordFieldValue(leagueteamlinks_current_record, "leagueid") 52 | 53 | if BLACKLISTED_LEAGUES[leagueid] then 54 | teamid = leagueteamlinks_table:GetRecordFieldValue(leagueteamlinks_current_record, "teamid") 55 | BLACKLISTED_TEAMS[teamid] = true 56 | end 57 | 58 | leagueteamlinks_current_record = leagueteamlinks_table:GetNextValidRecord() 59 | end 60 | 61 | -- Get all rows for teamplayerlinks table 62 | local teamplayerlinks_table = LE.db:GetTable("teamplayerlinks") 63 | local teamplayerlinks_current_record = teamplayerlinks_table:GetFirstRecord() 64 | 65 | local playerid = 0 66 | local player_teams = {} 67 | while teamplayerlinks_current_record > 0 do 68 | teamid = teamplayerlinks_table:GetRecordFieldValue(teamplayerlinks_current_record, "teamid") 69 | if not BLACKLISTED_TEAMS[teamid] then 70 | playerid = teamplayerlinks_table:GetRecordFieldValue(teamplayerlinks_current_record, "playerid") 71 | player_teams[playerid] = teamid 72 | end 73 | 74 | teamplayerlinks_current_record = teamplayerlinks_table:GetNextValidRecord() 75 | end 76 | 77 | -- Get all rows for players table 78 | local players_table = LE.db:GetTable("players") 79 | local players_current_record = players_table:GetFirstRecord() 80 | 81 | local player_gen_count = 0 82 | local headassetid = 0 83 | local headclasscode = 0 84 | while players_current_record > 0 do 85 | playerid = players_table:GetRecordFieldValue(players_current_record, "playerid") 86 | headassetid = players_table:GetRecordFieldValue(players_current_record, "headassetid") 87 | headclasscode = players_table:GetRecordFieldValue(players_current_record, "headclasscode") 88 | 89 | if headassetid > 0 and headclasscode == 0 then 90 | teamid = player_teams[playerid] 91 | 92 | if teamid then 93 | PlayerCaptureAddPlayer(playerid, teamid, goalkeepers[playerid] ~= nil) 94 | end 95 | end 96 | 97 | players_current_record = players_table:GetNextValidRecord() 98 | end 99 | 100 | -- Start Capturing 101 | PlayerCaptureStart() 102 | -------------------------------------------------------------------------------- /lua/scripts/generate_minifaces_user_team.lua: -------------------------------------------------------------------------------- 1 | -- Generate miniface for everyplayer in the user team 2 | -- May take around 5 mins to complete, so be patient. 3 | 4 | require 'imports/career_mode/helpers' 5 | require 'imports/other/helpers' 6 | 7 | -- Execute only if we are in career mode 8 | if not IsInCM() then return end 9 | 10 | -- Path is relative to the game installation directory 11 | -- means that the minifaces will be generated to your current Live Editor Mods directory (C:\FIFA 23 Live Editor\mods\root\Legacy\data\ui\imgAssets\heads if you didn't changed it') 12 | PlayerCaptureSetOutputDirectory("") 13 | 14 | -- 0 - Head and shoulders 15 | -- 1 - Head 16 | -- 2 - Body 17 | PlayerCaptureSetCamera(1) 18 | 19 | -- 256x256 20 | PlayerCaptureSetSize(256, 256) 21 | 22 | -- Image Type 23 | -- 0 - PNG 24 | -- 1 - DDS 25 | PlayerCaptureSetType(1) 26 | 27 | -- We need goalkeepers to generate proper kit. 28 | local goalkeepers = GetGoalkeepers() 29 | 30 | local user_teamid = GetUserTeamID() 31 | 32 | -- Get all rows for teamplayerlinks table 33 | local teamplayerlinks_table = LE.db:GetTable("teamplayerlinks") 34 | local teamplayerlinks_current_record = teamplayerlinks_table:GetFirstRecord() 35 | 36 | local playerid = 0 37 | while teamplayerlinks_current_record > 0 do 38 | if user_teamid == teamplayerlinks_table:GetRecordFieldValue(teamplayerlinks_current_record, "teamid") then 39 | playerid = teamplayerlinks_table:GetRecordFieldValue(teamplayerlinks_current_record, "playerid") 40 | PlayerCaptureAddPlayer(playerid, user_teamid, goalkeepers[playerid] ~= nil) 41 | end 42 | 43 | teamplayerlinks_current_record = teamplayerlinks_table:GetNextValidRecord() 44 | end 45 | 46 | -- Start Capturing 47 | PlayerCaptureStart() 48 | -------------------------------------------------------------------------------- /lua/scripts/import_legend_player_from_csv.lua: -------------------------------------------------------------------------------- 1 | function split(s, delimiter) 2 | local result = {}; 3 | for match in (s .. delimiter):gmatch("(.-)" .. delimiter) do 4 | table.insert(result, match); 5 | end 6 | return result; 7 | end 8 | 9 | function createPlayer(entry) 10 | -- Example creates Jerzy Dudek in Free Agents team 11 | local playerid = entry["playerid"] 12 | 13 | -- Make sure we won't create duplicate 14 | if PlayerExists(playerid) then 15 | Log(string.format("Player with ID: playerid %d already exists", playerid)) 16 | return 17 | end 18 | assert(PlayerExists(playerid) == false, string.format("Can't create. Player with ID: playerid %d already exists", playerid)) 19 | 20 | -- That will be inserted into players table 21 | -- Missing fields will be replaced with lowest possible value by default (except playerid) 22 | local player_data = { 23 | skintypecode = entry["skintypecode"], 24 | trait2 = entry["trait2"], 25 | haircolorcode = entry["haircolorcode"], 26 | facialhairtypecode = entry["facialhairtypecode"], 27 | curve = entry["curve"], 28 | jerseystylecode = entry["jerseystylecode"], 29 | agility = entry["agility"], 30 | tattooback = entry["tattooback"], 31 | accessorycode4 = entry["accessorycode4"], 32 | gksavetype = entry["gksavetype"], 33 | positioning = entry["positioning"], 34 | tattooleftarm = entry["tattooleftarm"], 35 | hairtypecode = entry["hairtypecode"], 36 | standingtackle = entry["standingtackle"], 37 | preferredposition3 = entry["preferredposition3"], 38 | longpassing = entry["longpassing"], 39 | penalties = entry["penalties"], 40 | animfreekickstartposcode = entry["animfreekickstartposcode"], 41 | isretiring = entry["isretiring"], 42 | longshots = entry["longshots"], 43 | gkdiving = entry["gkdiving"], 44 | interceptions = entry["interceptions"], 45 | shoecolorcode2 = entry["shoecolorcode2"], 46 | crossing = entry["crossing"], 47 | potential = entry["potential"], 48 | gkreflexes = entry["gkreflexes"], 49 | finishingcode1 = entry["finishingcode1"], 50 | reactions = entry["reactions"], 51 | composure = entry["composure"], 52 | vision = entry["vision"], 53 | contractvaliduntil = entry["contractvaliduntil"], 54 | finishing = entry["finishing"], 55 | dribbling = entry["dribbling"], 56 | slidingtackle = entry["slidingtackle"], 57 | accessorycode3 = entry["accessorycode3"], 58 | accessorycolourcode1 = entry["accessorycolourcode1"], 59 | headtypecode = entry["headtypecode"], 60 | driref = entry["driref"], 61 | sprintspeed = entry["sprintspeed"], 62 | height = entry["height"], 63 | hasseasonaljersey = entry["hasseasonaljersey"], 64 | tattoohead = entry["tattoohead"], 65 | preferredposition2 = entry["preferredposition2"], 66 | strength = entry["strength"], 67 | shoetypecode = entry["shoetypecode"], 68 | birthdate = "153928", 69 | preferredposition1 = entry["preferredposition1"], 70 | tattooleftleg = entry["tattooleftleg"], 71 | ballcontrol = entry["ballcontrol"], 72 | phypos = entry["phypos"], 73 | shotpower = entry["shotpower"], 74 | trait1 = entry["trait1"], 75 | socklengthcode = entry["socklengthcode"], 76 | weight = entry["weight"], 77 | hashighqualityhead = entry["hashighqualityhead"], 78 | gkglovetypecode = entry["gkglovetypecode"], 79 | tattoorightarm = entry["tattoorightarm"], 80 | balance = entry["balance"], 81 | gender = entry["gender"], 82 | headassetid = entry["headassetid"], 83 | gkkicking = entry["gkkicking"], 84 | defspe = entry["defspe"], 85 | internationalrep = entry["internationalrep"], 86 | shortpassing = entry["shortpassing"], 87 | freekickaccuracy = entry["freekickaccuracy"], 88 | skillmoves = entry["skillmoves"], 89 | faceposerpreset = entry["faceposerpreset"], 90 | usercaneditname = entry["usercaneditname"], 91 | avatarpomid = entry["avatarpomid"], 92 | attackingworkrate = entry["attackingworkrate"], 93 | finishingcode2 = entry["finishingcode2"], 94 | aggression = entry["aggression"], 95 | acceleration = entry["acceleration"], 96 | paskic = entry["paskic"], 97 | headingaccuracy = entry["headingaccuracy"], 98 | iscustomized = entry["iscustomized"], 99 | eyebrowcode = entry["eyebrowcode"], 100 | runningcode2 = entry["runningcode2"], 101 | modifier = entry["modifier"], 102 | gkhandling = entry["gkhandling"], 103 | eyecolorcode = entry["eyecolorcode"], 104 | jerseysleevelengthcode = entry["jerseysleevelengthcode"], 105 | accessorycolourcode3 = entry["accessorycolourcode3"], 106 | accessorycode1 = entry["accessorycode1"], 107 | playerjointeamdate = entry["playerjointeamdate"], 108 | headclasscode = entry["headclasscode"], 109 | defensiveworkrate = entry["defensiveworkrate"], 110 | defensiveawareness = entry["defensiveawareness"], 111 | tattoofront = entry["tattoofront"], 112 | nationality = entry["nationality"], 113 | preferredfoot = entry["preferredfoot"], 114 | sideburnscode = entry["sideburnscode"], 115 | weakfootabilitytypecode = entry["weakfootabilitytypecode"], 116 | jumping = entry["jumping"], 117 | personality = entry["personality"], 118 | gkkickstyle = entry["gkkickstyle"], 119 | stamina = entry["stamina"], 120 | marking = entry["marking"], 121 | accessorycolourcode4 = entry["accessorycolourcode4"], 122 | gkpositioning = entry["gkpositioning"], 123 | headvariation = entry["headvariation"], 124 | skillmoveslikelihood = entry["skillmoveslikelihood"], 125 | shohan = entry["shohan"], 126 | skintonecode = entry["skintonecode"], 127 | shortstyle = entry["shortstyle"], 128 | overallrating = entry["overallrating"], 129 | smallsidedshoetypecode = entry["smallsidedshoetypecode"], 130 | emotion = entry["emotion"], 131 | runstylecode = entry["runstylecode"], 132 | jerseyfit = entry["jerseyfit"], 133 | accessorycode2 = entry["accessorycode2"], 134 | shoedesigncode = entry["shoedesigncode"], 135 | shoecolorcode1 = entry["shoecolorcode1"], 136 | hairstylecode = entry["hairstylecode"], 137 | bodytypecode = entry["bodytypecode"], 138 | animpenaltiesstartposcode = entry["animpenaltiesstartposcode"], 139 | pacdiv = entry["pacdiv"], 140 | runningcode1 = entry["runningcode1"], 141 | preferredposition4 = entry["preferredposition4"], 142 | volleys = entry["volleys"], 143 | accessorycolourcode2 = entry["accessorycolourcode2"], 144 | tattoorightleg = entry["tattoorightleg"], 145 | facialhaircolorcode = entry["facialhaircolorcode"] 146 | } 147 | 148 | local created_playerid = CreatePlayer(playerid, player_data) 149 | 150 | -- Create the name 151 | local editedplayernames_row_data = { 152 | playerid = string.format("%d", created_playerid), 153 | firstname = entry["firstname"], 154 | lastname = entry["lastname"], 155 | surname = entry["lastname"], 156 | commonname = entry["commonname"], 157 | playerjerseyname = entry["playerjerseyname"] 158 | } 159 | 160 | local row = InsertDBTableRow("editedplayernames", editedplayernames_row_data) 161 | 162 | Log(string.format("Created Player - %s %s (ID: %s). Check Free Agents.", editedplayernames_row_data.firstname, editedplayernames_row_data.surname, editedplayernames_row_data.playerid)) 163 | end 164 | 165 | function readCSV(filename) 166 | local file = io.open(filename, "r") 167 | if not file then 168 | error("Failed to open file: " .. filename) 169 | end 170 | 171 | local header = file:read() 172 | local headerArr = split(header, ",") 173 | print("length of headerArr: " .. #headerArr) 174 | 175 | local data = {} 176 | 177 | for line in file:lines() do 178 | line = line:gsub("\n", ""):gsub("\r", "") 179 | print("line: " .. line) 180 | local valuesArr = split(line, ",") 181 | print("length of valuesArr: " .. #valuesArr) 182 | 183 | local entry = {} 184 | 185 | for i = 1, #valuesArr do 186 | -- print("headerArr[" .. i .. "]:" .. headerArr[i]) 187 | -- print("valuesArr[" .. i .. "]:" .. valuesArr[i]) 188 | -- print("headerArr[" .. i .. "] key = '" .. headerArr[i] .. "' , value = " .. valuesArr[i]) 189 | -- print(string.format("headerArr[%d] key = '%s' , value = '%s'", i, headerArr[i], valuesArr[i])) 190 | entry[headerArr[i]] = valuesArr[i] 191 | end 192 | 193 | print(">>> createPlayer") 194 | createPlayer(entry) 195 | end 196 | 197 | file:close() 198 | 199 | return data 200 | end 201 | 202 | -- Usage example 203 | -- Please change the filename to your own path 204 | -- You can download the csv file from https://www.mediafire.com/file/v006dt1yr9kl386/FIFA_24_LE_ICONS.csv/file 205 | local filename = "C:/Users/Veeja.Liu/Downloads/FC_24_LE_ICONS.csv" 206 | readCSV(filename) 207 | -------------------------------------------------------------------------------- /lua/scripts/is_retiring=0.lua: -------------------------------------------------------------------------------- 1 | --- This script sets isretiring on 0 for all players. 2 | 3 | -- Get Players Table 4 | local players_table = LE.db:GetTable("players") 5 | local current_record = players_table:GetFirstRecord() 6 | 7 | while current_record > 0 do 8 | players_table:SetRecordFieldValue(current_record, "isretiring", 0) 9 | 10 | current_record = players_table:GetNextValidRecord() 11 | end 12 | 13 | MessageBox("Done", "Done") 14 | -------------------------------------------------------------------------------- /lua/scripts/is_retiring=1.lua: -------------------------------------------------------------------------------- 1 | --- This script sets isretiring on 1 for all players. 2 | 3 | -- Get Players Table 4 | local players_table = LE.db:GetTable("players") 5 | local current_record = players_table:GetFirstRecord() 6 | 7 | while current_record > 0 do 8 | players_table:SetRecordFieldValue(current_record, "isretiring", 1) 9 | 10 | current_record = players_table:GetNextValidRecord() 11 | end 12 | 13 | MessageBox("Done", "Done") 14 | -------------------------------------------------------------------------------- /lua/scripts/list_players.lua: -------------------------------------------------------------------------------- 1 | -- Get Players Table 2 | local players_table = LE.db:GetTable("players") 3 | local current_record = players_table:GetFirstRecord() 4 | local playerid = 0 5 | local teamid = 0 6 | local teamname = "" 7 | 8 | while current_record > 0 do 9 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 10 | if (playerid < 280000) then 11 | teamid = GetTeamIdFromPlayerId(playerid) 12 | teamname = GetTeamName(teamid) 13 | LOGGER:LogInfo(string.format("%d;%d;%s", playerid, teamid, teamname)) 14 | end 15 | 16 | current_record = players_table:GetNextValidRecord() 17 | end 18 | 19 | MessageBox("Done", "Done") -------------------------------------------------------------------------------- /lua/scripts/mass_edit_age.lua: -------------------------------------------------------------------------------- 1 | -- This script will change: 2 | -- Age of all players 3 | -- By default it will make all players 16 yo 4 | 5 | require 'imports/other/helpers' 6 | 7 | 8 | -- All players will be 16 you 9 | -- Feel free to change 16 to any other number you want. 10 | local new_age = 16 11 | 12 | 13 | -- Don't touch anything below 14 | local current_date = GetCurrentDate() 15 | 16 | -- Get Players Table 17 | local players_table = LE.db:GetTable("players") 18 | local current_record = players_table:GetFirstRecord() 19 | 20 | local birthdate = 0 21 | local age = 0 22 | local normalized_birthdate = DATE:new() 23 | while current_record > 0 do 24 | birthdate = players_table:GetRecordFieldValue(current_record, "birthdate") 25 | 26 | normalized_birthdate:FromGregorianDays(birthdate) 27 | normalized_birthdate.year = current_date.year - new_age 28 | birthdate = normalized_birthdate:ToGregorianDays() 29 | 30 | players_table:SetRecordFieldValue(current_record, "birthdate", birthdate) 31 | 32 | current_record = players_table:GetNextValidRecord() 33 | end 34 | 35 | MessageBox("Done", "Done") 36 | -------------------------------------------------------------------------------- /lua/scripts/mass_edit_age_linearly.lua: -------------------------------------------------------------------------------- 1 | -- This script will change: 2 | -- Age of all players 3 | -- -- This script will linearly scale the ages of players 4 | -- -- Players aged between 16 and 46 will be scaled to be between 16 and 26 5 | -- -- Players aged 15 or younger will not be changed 6 | -- -- Players aged 47 or older will be set to 26 yo (If exist) 7 | 8 | require 'imports/other/helpers' 9 | 10 | 11 | -- Define the age range for scaling 12 | -- Calculation method: 13 | -- y = (x - min_old_age) * ((max_new_age - min_new_age) / (max_old_age - min_old_age)) + min_new_age 14 | -- for example: 15 | -- Player aged 26, 16 | -- y = (26 - 16) * ((26 - 16) / (46 - 16)) + 16 17 | -- Here is a simple way to understand: 18 | -- If a player reaches the age of 16 or above, in the following years, they will only age 1 year for every 3 years that pass. 19 | -- y = (26 - 16) * ((26 - 16) / (46 - 16)) + 16 20 | -- y = 10 * ( 10 / 30 ) + 16 21 | -- y = 19.3333 ≈ 19 22 | local min_old_age = 16 23 | local max_old_age = 46 24 | local min_new_age = 16 25 | local max_new_age = 26 26 | 27 | -- Get current date 28 | local current_date = GetCurrentDate() 29 | 30 | -- Get Players Table 31 | local players_table = LE.db:GetTable("players") 32 | local current_record = players_table:GetFirstRecord() 33 | 34 | local birthdate = 0 35 | local age = 0 36 | local normalized_birthdate = DATE:new() 37 | 38 | -- Iterate through all player records 39 | while current_record > 0 do 40 | -- Get the birthdate of the player 41 | birthdate = players_table:GetRecordFieldValue(current_record, "birthdate") 42 | 43 | -- Convert birthdate to age 44 | local normalized_birthdate = DATE:new() 45 | normalized_birthdate:FromGregorianDays(birthdate) 46 | -- Calculate the age of the player 47 | local age = current_date.year - normalized_birthdate.year 48 | 49 | if age >= min_old_age and age <= max_old_age then 50 | -- If the player is aged between min_old_age and max_old_age, scale the age 51 | age = (age - min_old_age) * ((max_new_age - min_new_age) / (max_old_age - min_old_age)) + min_new_age 52 | age = math.floor(age) 53 | elseif age >= 47 then 54 | -- If the player is aged 47 or older, set the age to 26 55 | age = max_new_age 56 | end 57 | 58 | -- Calculate the new birthdate based on the scaled age 59 | normalized_birthdate.year = current_date.year - age 60 | birthdate = normalized_birthdate:ToGregorianDays() 61 | -- Set the new birthdate 62 | players_table:SetRecordFieldValue(current_record, "birthdate", birthdate) 63 | 64 | current_record = players_table:GetNextValidRecord() 65 | end 66 | 67 | MessageBox("Done", "Done") 68 | -------------------------------------------------------------------------------- /lua/scripts/mass_edit_squadrole.lua: -------------------------------------------------------------------------------- 1 | -- This script will change squadrole for all players that are in your club 2 | -- 1: Crucial 3 | -- 2: Important 4 | -- 3: Rotation 5 | -- 4: Sporadic 6 | -- 5: Prospect 7 | 8 | require 'imports/career_mode/helpers' 9 | 10 | local squadrole = 3 -- Rotation 11 | 12 | -- Don't touch anything below 13 | assert(IsInCM(), "Script must be executed in career mode") 14 | 15 | -- Get Players Table 16 | local career_playercontract_table = LE.db:GetTable("career_playercontract") 17 | local current_record = career_playercontract_table:GetFirstRecord() 18 | 19 | local playerid = 0 20 | local contract_status = 0 21 | local is_loaned_in = false 22 | 23 | while current_record > 0 do 24 | contract_status = career_playercontract_table:GetRecordFieldValue(current_record, "contract_status") 25 | is_loaned_in = contract_status == 1 or contract_status == 3 or contract_status == 5 26 | 27 | -- Ignore players that are loaned in 28 | if not is_loaned_in then 29 | playerid = career_playercontract_table:GetRecordFieldValue(current_record, "playerid") 30 | 31 | SetSquadRole(playerid, squadrole) 32 | career_playercontract_table:SetRecordFieldValue(current_record, "playerrole", squadrole) 33 | end 34 | 35 | current_record = career_playercontract_table:GetNextValidRecord() 36 | end 37 | 38 | MessageBox("Done", "Done") 39 | -------------------------------------------------------------------------------- /lua/scripts/medium_socklenghtcode.lua: -------------------------------------------------------------------------------- 1 | --- This script change socks length on medium 2 | 3 | -- Get Players Table 4 | local players_table = LE.db:GetTable("players") 5 | local current_record = players_table:GetFirstRecord() 6 | 7 | while current_record > 0 do 8 | players_table:SetRecordFieldValue(current_record, "socklengthcode", 0) 9 | 10 | current_record = players_table:GetNextValidRecord() 11 | end 12 | 13 | MessageBox("Done", "Done") 14 | -------------------------------------------------------------------------------- /lua/scripts/modifier=0.lua: -------------------------------------------------------------------------------- 1 | --- This script will set modifier to 0 for all players. 2 | 3 | -- Get Players Table 4 | local players_table = LE.db:GetTable("players") 5 | local current_record = players_table:GetFirstRecord() 6 | 7 | while current_record > 0 do 8 | players_table:SetRecordFieldValue(current_record, "modifier", 0) 9 | 10 | current_record = players_table:GetNextValidRecord() 11 | end 12 | 13 | MessageBox("Done", "Done") 14 | -------------------------------------------------------------------------------- /lua/scripts/pap_all_playstyles.lua: -------------------------------------------------------------------------------- 1 | require 'imports/career_mode/enums' 2 | require 'imports/other/playstyles_enum' 3 | FCECareerModeUserManager = require 'imports/career_mode/fcecareermodeusermanager' 4 | 5 | -- Script that will give your player all playstyles in player career mode (Play As Player) and will reapply them after reset 6 | 7 | -- Playstyles 8 | -- you can find "IDs" in \lua\libs\v2\imports\other\playstyles_enum.lua 9 | 10 | -- Playstyles1 to apply 11 | local playstyles1 = 1073741823 12 | 13 | -- Playstyles2 to apply 14 | -- It also includes hidden traits (except Injury Prone) 15 | local playstyles2 = 1535 -- With GK playstyles, 1520 without GK playstyles 16 | 17 | -- DON'T CHANGE ANYTHING BELOW 18 | function set_allplaystyles() 19 | local cm_user_mgr = FCECareerModeUserManager:new() 20 | 21 | local PAP_PlayerID = cm_user_mgr:GetPAPID() 22 | 23 | -- Get Players Table 24 | local players_table = LE.db:GetTable("players") 25 | local current_record = players_table:GetFirstRecord() 26 | local playerid = 0 27 | 28 | while current_record > 0 do 29 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 30 | if (playerid == PAP_PlayerID) then 31 | -- Playstyles 32 | players_table:SetRecordFieldValue(current_record, "trait1", playstyles1) 33 | players_table:SetRecordFieldValue(current_record, "icontrait1", playstyles1) 34 | 35 | players_table:SetRecordFieldValue(current_record, "trait2", playstyles2) 36 | players_table:SetRecordFieldValue(current_record, "icontrait2", playstyles2) 37 | return 38 | end 39 | 40 | current_record = players_table:GetNextValidRecord() 41 | end 42 | LOGGER:LogError(string.format("Can't find player %d to apply playstyles", PAP_PlayerID)) 43 | end 44 | 45 | function handle_playstyles_reset(events_manager, event_id, event) 46 | -- Events that reset playstyles 47 | if ( 48 | event_id == ENUM_CM_EVENT_MSG_USER_MATCH_COMPLETED or 49 | event_id == ENUM_CM_EVENT_MSG_USER_MATCH_COMPLETED_IN_TOURNAMENT or 50 | event_id == ENUM_CM_EVENT_MSG_USER_INTERNATIONAL_MATCH_COMPLETED or 51 | event_id == ENUM_CM_EVENT_MSG_ENTERED_HUB_FIRST_TIME or 52 | event_id == ENUM_CM_EVENT_MSG_POST_LOAD_PREPARE 53 | ) then 54 | set_allplaystyles() 55 | end 56 | end 57 | 58 | AddEventHandler("post__CareerModeEvent", handle_playstyles_reset) 59 | -------------------------------------------------------------------------------- /lua/scripts/print_team_jersey_numbers.lua: -------------------------------------------------------------------------------- 1 | -- This script will print out all kit numbers used by players in given team 2 | 3 | -- Change the ID to team you want to check 4 | local teamid = 1 5 | 6 | -- Get Teamplayerlinks Table 7 | local teamplayerlinks_table = LE.db:GetTable("teamplayerlinks") 8 | local current_record = teamplayerlinks_table:GetFirstRecord() 9 | 10 | local playername = "" 11 | local number = "" 12 | 13 | while current_record > 0 do 14 | if (teamid == teamplayerlinks_table:GetRecordFieldValue(current_record, "teamid")) then 15 | playername = GetPlayerName(teamplayerlinks_table:GetRecordFieldValue(current_record, "playerid")) 16 | number = teamplayerlinks_table:GetRecordFieldValue(current_record, "jerseynumber") 17 | 18 | LOGGER:LogInfo(string.format("Number: %d, Player: %s", number, playername)) 19 | end 20 | 21 | current_record = teamplayerlinks_table:GetNextValidRecord() 22 | end 23 | 24 | MessageBox("Done", "Done") 25 | -------------------------------------------------------------------------------- /lua/scripts/small_squad_find.lua: -------------------------------------------------------------------------------- 1 | local squad_sizes = {} 2 | 3 | -- Get Teamplayerlinks Table 4 | local teamplayerlinks = LE.db:GetTable("teamplayerlinks") 5 | local current_record = teamplayerlinks:GetFirstRecord() 6 | local teamid = 0 7 | 8 | while current_record > 0 do 9 | teamid = teamplayerlinks:GetRecordFieldValue(current_record, "teamid") 10 | 11 | if squad_sizes[teamid] then 12 | squad_sizes[teamid] = squad_sizes[teamid] + 1 13 | else 14 | squad_sizes[teamid] = 1 15 | end 16 | 17 | current_record = teamplayerlinks:GetNextValidRecord() 18 | end 19 | 20 | for teamid,squadsize in pairs(squad_sizes) do 21 | if (squadsize <= 17) then 22 | print(string.format("Small Squad Size detected: Team %s ID: %d, players: %d", GetTeamName(teamid), teamid, squadsize)) 23 | end 24 | end 25 | 26 | MessageBox("Done", "Done") 27 | -------------------------------------------------------------------------------- /lua/scripts/terminate_player_loans.lua: -------------------------------------------------------------------------------- 1 | --- This script will terminate all player loans 2 | 3 | -- Get playerloans Table 4 | local playerloans_table = LE.db:GetTable("playerloans") 5 | local current_record = playerloans_table:GetFirstRecord() 6 | 7 | while current_record > 0 do 8 | TerminateLoan(playerloans_table:GetRecordFieldValue(current_record, "playerid")) 9 | 10 | current_record = playerloans_table:GetNextValidRecord() 11 | end 12 | 13 | MessageBox("Done", "Done") 14 | -------------------------------------------------------------------------------- /lua/scripts/track_cm_events.lua: -------------------------------------------------------------------------------- 1 | require 'imports/career_mode/helpers' 2 | 3 | -- This script will log the name of the career event 4 | -- You can use this to figure out what & when is happening 5 | 6 | -- Example screenshot from a few days of simming: 7 | -- https://i.imgur.com/alYWoSR.png 8 | 9 | function log_career_mode_event(events_manager, event_id, event) 10 | LOGGER:LogInfo(string.format("Career Mode Event %d (%s)", event_id, GetCMEventNameByID(event_id))) 11 | end 12 | 13 | 14 | AddEventHandler("pre__CareerModeEvent", log_career_mode_event) -------------------------------------------------------------------------------- /lua/scripts/unlock_boots.lua: -------------------------------------------------------------------------------- 1 | --- This script unlocks all boots 2 | 3 | -- Get playerboots table 4 | local boot_table = LE.db:GetTable("playerboots") 5 | local current_record = boot_table:GetFirstRecord() 6 | 7 | while current_record > 0 do 8 | boot_table:SetRecordFieldValue(current_record, "isavailableinstore", 1) 9 | 10 | current_record = boot_table:GetNextValidRecord() 11 | end 12 | 13 | MessageBox("Done", "Done") -------------------------------------------------------------------------------- /lua/scripts/unlock_mgr_clothes.lua: -------------------------------------------------------------------------------- 1 | --- This script unlocks all clothes for manager 2 | 3 | -- Get table 4 | local wc_table = LE.db:GetTable("wardrobecloset") 5 | local current_record = wc_table:GetFirstRecord() 6 | 7 | while current_record > 0 do 8 | wc_table:SetRecordFieldValue(current_record, "isavailableincustomizationmenu", 1) 9 | wc_table:SetRecordFieldValue(current_record, "isavailableinmanagercustomization", 1) 10 | 11 | current_record = wc_table:GetNextValidRecord() 12 | end 13 | 14 | MessageBox("Done", "Done") -------------------------------------------------------------------------------- /lua/scripts/untuck_shirts.lua: -------------------------------------------------------------------------------- 1 | --- This script untuck shirts 2 | 3 | -- Get Players Table 4 | local players_table = LE.db:GetTable("players") 5 | local current_record = players_table:GetFirstRecord() 6 | 7 | while current_record > 0 do 8 | players_table:SetRecordFieldValue(current_record, "jerseystylecode", 1) 9 | 10 | current_record = players_table:GetNextValidRecord() 11 | end 12 | 13 | MessageBox("Done", "Done") 14 | -------------------------------------------------------------------------------- /lua/scripts/vpro_99ovr.lua: -------------------------------------------------------------------------------- 1 | require 'imports/career_mode/enums' 2 | require 'imports/other/playstyles_enum' 3 | FCECareerModeUserManager = require 'imports/career_mode/fcecareermodeusermanager' 4 | 5 | -- Script that will keep your VPRO player in player career mode at 99 OVR 6 | 7 | -- Playstyles 8 | -- you can find "IDs" in \lua\libs\v2\imports\other\playstyles_enum.lua 9 | 10 | -- Playstyles1 to apply 11 | local playstyles1 = ENUM_PLAYSTYLE1_POWER_SHOT + ENUM_PLAYSTYLE1_POWER_HEADER + ENUM_PLAYSTYLE1_RAPID 12 | 13 | -- Playstyles2 to apply 14 | local playstyles2 = ENUM_PLAYSTYLE2_GK_QUICK_REFLEXES 15 | 16 | -- Playstyle1+ 17 | local iconplaystyle1 = ENUM_PLAYSTYLE1_TRIVELA 18 | 19 | -- Playstyle2+ 20 | local iconplaystyle2 = 0 21 | 22 | -- DON'T CHANGE ANYTHING BELOW 23 | 24 | local fields_to_edit = { 25 | -- GK 26 | "gkdiving", 27 | "gkhandling", 28 | "gkkicking", 29 | "gkpositioning", 30 | "gkreflexes", 31 | 32 | -- ATTACK 33 | "crossing", 34 | "finishing", 35 | "headingaccuracy", 36 | "shortpassing", 37 | "volleys", 38 | 39 | -- DEFENDING 40 | "defensiveawareness", 41 | "standingtackle", 42 | "slidingtackle", 43 | 44 | -- SKILL 45 | "dribbling", 46 | "curve", 47 | "freekickaccuracy", 48 | "longpassing", 49 | "ballcontrol", 50 | 51 | -- POWER 52 | "shotpower", 53 | "jumping", 54 | "stamina", 55 | "strength", 56 | "longshots", 57 | 58 | -- MOVEMENT 59 | "acceleration", 60 | "sprintspeed", 61 | "agility", 62 | "reactions", 63 | "balance", 64 | 65 | -- MENTALITY 66 | "aggression", 67 | "composure", 68 | "interceptions", 69 | "positioning", 70 | "vision", 71 | "penalties", 72 | 73 | "overallrating" 74 | } 75 | 76 | function set_99ovr() 77 | local cm_user_mgr = FCECareerModeUserManager:new() 78 | 79 | local VPRO_PLAYERID = cm_user_mgr:GetPAPID() 80 | 81 | -- Get Players Table 82 | local players_table = LE.db:GetTable("players") 83 | local current_record = players_table:GetFirstRecord() 84 | local playerid = 0 85 | 86 | while current_record > 0 do 87 | playerid = players_table:GetRecordFieldValue(current_record, "playerid") 88 | if (playerid == VPRO_PLAYERID) then 89 | for j=1, #fields_to_edit do 90 | players_table:SetRecordFieldValue(current_record, fields_to_edit[j], 99) 91 | end 92 | 93 | -- Playstyles 94 | players_table:SetRecordFieldValue(current_record, "trait1", playstyles1) 95 | players_table:SetRecordFieldValue(current_record, "trait2", playstyles2) 96 | players_table:SetRecordFieldValue(current_record, "icontrait1", iconplaystyle1) 97 | players_table:SetRecordFieldValue(current_record, "icontrait2", iconplaystyle2) 98 | 99 | -- Clear Player modifier to not affect his ovr 100 | players_table:SetRecordFieldValue(current_record, "modifier", 0) 101 | 102 | -- 99 Potential 103 | players_table:SetRecordFieldValue(current_record, "potential", 99) 104 | 105 | SaveVPRO() 106 | return 107 | end 108 | 109 | current_record = players_table:GetNextValidRecord() 110 | end 111 | LOGGER:LogError(string.format("Can't find player %d to apply 99ovr", VPRO_PLAYERID)) 112 | end 113 | 114 | function handle_vpro_reset(events_manager, event_id, event) 115 | -- Events that reset the vpro attributes 116 | if ( 117 | event_id == ENUM_CM_EVENT_MSG_USER_MATCH_COMPLETED or 118 | event_id == ENUM_CM_EVENT_MSG_USER_MATCH_COMPLETED_IN_TOURNAMENT or 119 | event_id == ENUM_CM_EVENT_MSG_USER_INTERNATIONAL_MATCH_COMPLETED or 120 | event_id == ENUM_CM_EVENT_MSG_ENTERED_HUB_FIRST_TIME or 121 | event_id == ENUM_CM_EVENT_MSG_POST_LOAD_PREPARE 122 | ) then 123 | set_99ovr() 124 | end 125 | end 126 | 127 | AddEventHandler("post__CareerModeEvent", handle_vpro_reset) 128 | -------------------------------------------------------------------------------- /lua/scripts/vpro_always_starter.lua: -------------------------------------------------------------------------------- 1 | require 'imports/career_mode/enums' 2 | require 'imports/other/playstyles_enum' 3 | FCECareerModeUserManager = require 'imports/career_mode/fcecareermodeusermanager' 4 | 5 | -- Script that will keep your VPRO player in starting XI 6 | 7 | function set_reputation() 8 | local pap_mgr = GetManagerObjByTypeId(ENUM_FCEGameModesFCECareerModePlayAsPlayerManager) 9 | if (pap_mgr <= 0) then return end 10 | 11 | local club_rep_offset = 0x1DC 12 | local nat_rep_offset = club_rep_offset + 0x4 13 | local club_role_offset = nat_rep_offset + 0x4 14 | local nat_role_offset = club_role_offset + 0x1 15 | 16 | MEMORY:WriteInt(pap_mgr + club_rep_offset, 300) 17 | MEMORY:WriteInt(pap_mgr + nat_rep_offset, 300) 18 | 19 | MEMORY:WriteBytes(pap_mgr + club_role_offset, { 3 }) 20 | MEMORY:WriteBytes(pap_mgr + nat_role_offset, { 3 }) 21 | end 22 | 23 | function handle_set_player_rep(events_manager, event_id, event) 24 | if ( 25 | event_id == ENUM_CM_EVENT_MSG_USER_MATCH_COMPLETED or 26 | event_id == ENUM_CM_EVENT_MSG_USER_MATCH_COMPLETED_IN_TOURNAMENT or 27 | event_id == ENUM_CM_EVENT_MSG_USER_INTERNATIONAL_MATCH_COMPLETED or 28 | event_id == ENUM_CM_EVENT_MSG_ABOUT_TO_ENTER_PREMATCH or 29 | event_id == ENUM_CM_EVENT_MSG_ENTERED_HUB_FIRST_TIME or 30 | event_id == ENUM_CM_EVENT_MSG_POST_LOAD_PREPARE 31 | ) then 32 | set_reputation() 33 | end 34 | end 35 | 36 | AddEventHandler("post__CareerModeEvent", handle_set_player_rep) 37 | -------------------------------------------------------------------------------- /mods/Coaches/Coaches.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xAranaktu/FC-24-Live-Editor/e7fb905bd0666d30fdbc42b2dffa2e971b1a7102/mods/Coaches/Coaches.zip -------------------------------------------------------------------------------- /mods/Coaches/README.md: -------------------------------------------------------------------------------- 1 | **Coaches** 2 | 3 | **Mod Version**: 1.0 4 | 5 | ``` 6 | This mod modifies "coaches.ini" file. 7 | Start with more coaches slots, boost coaches avilable for hire 8 | 9 | REQUIRES TO START NEW CAREER. WON'T WORK ON EXISTING CAREER 10 | 11 | ``` 12 | 13 | **Edited files:** 14 | ``` 15 | - dlc\dlc_FootballCompEng\dlc\FootballCompEng\data\Staff\coaches.ini 16 | ``` 17 | 18 | **Changelog:** 19 | ``` 20 | 1.0: 21 | - Initial number of available coach slots 4 -> 20 22 | - Number of weeks after which the coach hire list is refreshed 2 -> 1 23 | - Percentage of coaches that will disappear after refresh 40 -> 100 24 | - Probability to generate a coach with the current playstyle play style 45 -> 100 25 | - Probability to generate a coach with a higher number of stars in the first department 25 -> 100 26 | - Coach Master Probabilities boosted to 5, 5, 90 (Novice, Competent, Master) 27 | ``` 28 | **How to install:** 29 | ``` 30 | 1. Unzip archive 31 | 2. Move the root folder to C:\FC 24 Live Editor\mods (replace files if needed) 32 | 3. Run the game & Live Editor 33 | ``` 34 | 35 | https://i.imgur.com/AVlGGKZ.png -------------------------------------------------------------------------------- /mods/Extended Player and Manager Editor/Extended Player and Manager Editor.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xAranaktu/FC-24-Live-Editor/e7fb905bd0666d30fdbc42b2dffa2e971b1a7102/mods/Extended Player and Manager Editor/Extended Player and Manager Editor.zip -------------------------------------------------------------------------------- /mods/Extended Player and Manager Editor/README.md: -------------------------------------------------------------------------------- 1 | **Extended Player & Manager Editor** 2 | 3 | **Mod Version**: 1.1 4 | 5 | 6 | ``` 7 | Things you can edit through "Edit Manager" in manager career mode: 8 | - First Name 9 | - Last Name 10 | - Nationality 11 | - Gender 12 | - Head 13 | - Outfits 14 | 15 | Things you can edit through "Edit Player" in manager career mode: 16 | - Everything under "Info" except Team & Commentary Name 17 | - Height (130cm-255cm) 18 | - Weight (30kg-150kg) 19 | - Attributes (sprint speed, dribbling, shot power etc.) 20 | - Hairs (for players which don't have scanned face) 21 | - Animations (Goal celeb, freekick & pen style, run style) 22 | - Outfits (Only few will work) 23 | ``` 24 | 25 | There is tattoo tab also in players editor, but for 99% it won't work. 26 | 27 | **Edited files:** 28 | ``` 29 | - root\Legacy\data\avatar\avatarcustomizationcfg_mainmenu_edit_created.json 30 | - root\Legacy\data\avatar\avatarcustomizationcfg_mainmenu_edit_real.json 31 | - root\Legacy\data\avatar\avatarcustomizationcfg_managercareer_create.JSON 32 | - root\Legacy\data\avatar\avatarcustomizationcfg_managercareer_create_real.JSON 33 | - root\Legacy\data\avatar\avatarcustomizationcfg_managercareer_edit.json 34 | - root\Legacy\data\avatar\avatarcustomizationcfg_managercareer_edit_custom_player.JSON 35 | - root\Legacy\data\avatar\avatarcustomizationcfg_managercareer_edit_retiredreal.JSON 36 | - root\Legacy\data\avatar\avatarcustomizationcfg_managercareer_editplayers.json 37 | - root\Legacy\data\avatar\avatarcustomizationcfg_playercareer_create.JSON 38 | - root\Legacy\data\avatar\avatarcustomizationcfg_playercareer_edit_realplayer.json 39 | - root\Legacy\data\avatar\avatarcustomizationcfg_playercareer_edit_vpro.json 40 | - root\Legacy\data\avatar\avatarcustomizationcfg_playercareer_editplayers.json 41 | - root\Legacy\data\avatar\avatarcustomizationcfg_tournament_editplayers.json 42 | ``` 43 | 44 | **Changes:** 45 | ``` 46 | 1.1: 47 | - Fixed overallrating drop 48 | - Fixed crash when trying to open "Athletic->Position" panel. 49 | - Disabled option to edit player commentary to avoid game crashes. 50 | ``` 51 | 52 | **How to install:** 53 | ``` 54 | 1. Unzip archive 55 | 2. Move the root folder to C:\FC 24 Live Editor\mods (replace files if needed) 56 | 3. Run the game & Live Editor 57 | ``` 58 | 59 | ![](https://i.imgur.com/ICsTnBp.png) 60 | -------------------------------------------------------------------------------- /mods/Increased PCM Level Cap/Increased PCM Level Cap.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xAranaktu/FC-24-Live-Editor/e7fb905bd0666d30fdbc42b2dffa2e971b1a7102/mods/Increased PCM Level Cap/Increased PCM Level Cap.zip -------------------------------------------------------------------------------- /mods/Increased PCM Level Cap/README.md: -------------------------------------------------------------------------------- 1 | **Increased Player Career Mode Level Cap** 2 | 3 | **Mod Version**: 1.0 4 | 5 | ``` 6 | This mod increases the level cap in player career mode from 50 to 99 7 | 8 | IT DOESN'T GIVE YOU 99 LEVEL... 9 | ``` 10 | 11 | **Edited files:** 12 | ``` 13 | - dlc\dlc_FootballCompEng\dlc\FootballCompEng\data\PlayerGrowth\player_growth.json 14 | ``` 15 | 16 | **Changelog:** 17 | ``` 18 | 19 | ``` 20 | **How to install:** 21 | ``` 22 | 1. Unzip archive 23 | 2. Move the root folder to C:\FC 24 Live Editor\mods (replace files if needed) 24 | 3. Run the game & Live Editor 25 | ``` 26 | 27 | ![](https://i.imgur.com/AVlGGKZ.png) 28 | ![](https://i.imgur.com/7puQBqY.png) -------------------------------------------------------------------------------- /mods/More Stupid Transfers/More Stupid Transfers.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xAranaktu/FC-24-Live-Editor/e7fb905bd0666d30fdbc42b2dffa2e971b1a7102/mods/More Stupid Transfers/More Stupid Transfers.zip -------------------------------------------------------------------------------- /mods/More Stupid Transfers/README.md: -------------------------------------------------------------------------------- 1 | **More Stupid Transfers** 2 | 3 | Trying to reproduce what was available in FIFA 18 cheat table. 4 | Basically, this "mod" should increase the transfer activity which means more transfers between teams, but don't expect that the transfers done will be somewhat "real". 5 | 6 | 7 | **Mod Version**: 1.0 8 | 9 | 10 | **Edited files:** 11 | ``` 12 | - dlc\dlc_FootballCompEng\dlc\FootballCompEng\data\Transfers\TransfersShortlistConfig.csv 13 | ``` 14 | 15 | **Changelog:** 16 | ``` 17 | 1.0: 18 | - "Random Activity Chance Inside Deadline Day" changed from 30 to 90 19 | - "Random Activity Chance Inside Transfer Window" changed from 15 to 75 20 | - "Random Activity Chance Outside Transfer Window" changed from 0 to 55 21 | - "Max Number Of Teams To Search" changed from 5 to 8 22 | - "Min Days Between Offers" changed from 3 to 2 23 | - "Max Attempts To Find Suitable Team" changed from 2 to 6 24 | - "Overall Difference Per Attempt Transfer" changed from 4 to 3 25 | - "Overall Difference Per Attempt Loan" changed from 8 to 6 26 | ``` 27 | **How to install:** 28 | ``` 29 | 1. Unzip archive 30 | 2. Move the root folder to C:\FC 24 Live Editor\mods (replace files if needed) 31 | 3. Run the game & Live Editor 32 | 33 | ``` 34 | 35 | ![](https://i.imgur.com/AVlGGKZ.png) -------------------------------------------------------------------------------- /mods/Quicksim Settings/Quicksim Settings.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xAranaktu/FC-24-Live-Editor/e7fb905bd0666d30fdbc42b2dffa2e971b1a7102/mods/Quicksim Settings/Quicksim Settings.zip -------------------------------------------------------------------------------- /mods/Quicksim Settings/README.md: -------------------------------------------------------------------------------- 1 | **Quicksim Settings** 2 | 3 | No cards & No injuries during quick sims 4 | 5 | **Mod Version**: 1.0 6 | 7 | 8 | **Edited files:** 9 | ``` 10 | - dlc\dlc_FootballCompEng\dlc\FootballCompEng\data\simsettings.ini 11 | ``` 12 | 13 | **Changelog:** 14 | ``` 15 | 1.0: 16 | - Max number of cards in a game 4 -> 0 17 | - Chance of a yellow card in the game 45 -> 0 18 | - Percentage chance of a red card being brandished 32 -> 0 19 | - Percentage chance of receiving two reds in a game 2 -> 0 20 | - Possible maximum number of injuries in a game 2 -> 0 21 | 22 | ``` 23 | **How to install:** 24 | ``` 25 | 1. Unzip archive 26 | 2. Move the root folder to C:\FC 24 Live Editor\mods (replace files if needed) 27 | 3. Run the game & Live Editor 28 | ``` 29 | 30 | ![](https://i.imgur.com/AVlGGKZ.png) --------------------------------------------------------------------------------