• This is a reminder of 3 IMPORTANT RULES:

    1- External self-promotion websites or apps are NOT allowed here, like Discord/Twitter/Patreon/etc.

    2- Do NOT post in other languages. English-only.

    3- Crack/Warez/Piracy talk is NOT allowed.

    Breaking any of the above rules will result in your messages being deleted and you will be banned upon repetition.

    Please, stop by this thread SoccerGaming Forum Rules And Guidelines and make sure you read and understand our policies.

    Thank you!

Doctor+ Productions 18 Exclusive Worldwide Mods & Tools

crabshank

Youth Team
For passionated, interesting FIFA 18/19 career mode core functions:

Code:
function DetermineAvgRatingForTeam( teamId, numPlayers )
    teamId = Engine.StackRankTeamByOverall( teamId )
    local totalOverall = 0
    for playerCount = 1, numPlayers do
        local currPlayer = Engine.GetPlayer( teamId, playerCount )
        totalOverall = totalOverall + Engine.GetPlayerOverall( currPlayer )
    end --for playerCount = 1, numPlayers do
    local average = totalOverall / numPlayers
    return average
end

function ModifyTeamMorale( teamId, change )
   local numPlayersOnTeam = Engine.GetNumPlayers( teamId )
   for playerCount = 1, numPlayersOnTeam do
       local currentPlayer = Engine.GetPlayer( teamId, playerCount )
       Engine.ModifyPlayerMorale( teamId, currentPlayer, change )
   end
end

function MakeCPUOfferForPlayer( teamId, playerId, numOffers, startRandom )
   local inWindow = Engine.IsWithinTransferWindow()
   if( inWindow == true ) then
       local maxOffers = 5
       if( numOffers > maxOffers ) then
           numOffers = maxOffers
       end --if( numOffers > maxOffers ) then
       local offers = {}
       local offer1 = 0
       local offer2 = 0
       local offer3 = 0
       local offer4 = 0
       local offer5 = 0
       local actualOffers, offer1, offer2, offer3, offer4, offer5 = Engine.FindSuitableTeamsForPlayer( teamId, playerId, numOffers, true )
       offers[ 1 ] = offer1
       offers[ 2 ] = offer2
       offers[ 3 ] = offer3
       offers[ 4 ] = offer4
       offers[ 5 ] = offer5
       if( actualOffers < startRandom ) then
           startRandom = actualOffers
       end --if( actualOffers < startRandom ) then
       if( actualOffers < numOffers ) then
           numOffers = actualOffers
       end --if( actualOffers < numOffers ) then
       local teamChoice = Engine.GetRandomNumber( startRandom, numOffers )
       Engine.CreateOfferForPlayer( teamId, playerId, offers[ teamChoice ] )
   end --if( inWindow == true ) then
end

-- Player Upset With Club Functions
function GetReasonForPlayerUpset( teamId, playerId )
   local match = 0  
   if( IsUnderachieving( teamId, playerId ) == true ) then
       match = 1      
   elseif( IsTooBigForTeam( teamId, playerId ) == true ) then
       match = 2
   elseif( IsUnhappyWithSalary( teamId, playerId ) == true ) then
       match = 3
   end
   return match
end

function IsTooBigForTeam( teamId, playerId )
   local tooBig = false
   teamId = Engine.StackRankTeamByOverall( teamId )
   local playerRank = Engine.GetPlayerIndexById( teamId, playerId )
   if( playerRank == 1 ) then -- top play
       local playerOverall = Engine.GetPlayerOverall( playerId )
       local secondBestPlayer = Engine.GetPlayer( teamId, 2 )
       local secondBestOverall = Engine.GetPlayerOverall( secondBestPlayer )
       local overallDiff = Tuning.MISC.ovrDiff_BestPlayer
       if( playerOverall >= secondBestOverall + overallDiff ) then
           tooBig = true
       end
   elseif( playerRank <= Tuning.MISC.topPlayerCount ) then -- top five player
       local potentialDiff = Tuning.MISC.potDiff_TopPlayers
       local playerOverall = Engine.GetPlayerOverall( playerId )
       local playerPotential = Engine.GetPlayerPotential( teamId, playerId )
       if( playerPotential >= playerOverall + potentialDiff ) then
           tooBig = true
       end
   end
   return tooBig
end

function GetTeamPlayerAvg( teamId, numPlayers )
   local totalAvg = 0
   teamId = Engine.StackRankTeamByOverall( teamId )
   local loopToPlayers = numPlayers
   local numPlayersOnTeam = Engine.GetNumPlayers( teamId )
   if( numPlayersOnTeam < loopToPlayers ) then
       loopToPlayers = numPlayersOnTeam
   end
   for playerCount = 1, loopToPlayers do
       local currPlayer = Engine.GetPlayer( teamId, playerCount )
       local playerOverall = Engine.GetPlayerOverall( currPlayer )
       totalAvg = totalAvg + playerOverall
   end
   totalAvg = totalAvg / numPlayers
   return totalAvg
end

function GetUserImportance()
   local fixture = Engine.GetCurrentGameFixtureData()
   local team1, team2 = Engine.GetTeamsFromFixtureData( fixture )
   local teamMI1, teamMI2 = Engine.GetMatchImportance( fixture )
   local matchImp = 0
   if( team1 == Engine.GetUserTeam() ) then
       matchImp = teamMI1
   else
       matchImp = teamMI2
   end
   return matchImp
end

function GetUserCpuTeamFromIds( team1, team2 )
   local userTeam = team1
   local cpuTeam = team2
   if( team1 ~= Engine.GetUserTeam() ) then
       cpuTeam = team1
       userTeam = team2
   end
   return userTeam, cpuTeam
end

function GetTeamsFromFixture( fixture )
   local team1, team2 = Engine.GetTeamsFromFixtureData( fixture )
   local userTeam, cpuTeam = GetUserCpuTeamFromIds( team1, team2 )
   return userTeam, cpuTeam
end

function GetAudioPositionId( teamId, playerId )
   local posId = 14           -- Defaults to the striker positions
   local position = Engine.GetPlayerPosition( teamId, playerId )
   if( position == "GK" ) then
       posId = 06
   elseif( position == "SW" ) then
       posId = 07
   elseif( position == "RWB" ) then
       posId = 08
   elseif( position == "RB" ) then
       posId = 08
   elseif( position == "RCB" ) then
       posId = 07
   elseif( position == "CB" ) then
       posId = 07
   elseif( position == "LCB" ) then
       posId = 07
   elseif( position == "LB" ) then
       posId = 09
   elseif( position == "LWB" ) then
       posId = 09
   elseif( position == "RDM" ) then
       posId = 10
   elseif( position == "CDM" ) then
       posId = 10
   elseif( position == "LDM" ) then
       posId = 10
   elseif( position == "RM" ) then
       posId = 11
   elseif( position == "RCM" ) then
       posId = 10  
   elseif( position == "CM" ) then
       posId = 10  
   elseif( position == "LCM" ) then
       posId = 10          
   elseif( position == "LM" ) then
       posId = 12
   elseif( position == "RAM" ) then
       posId = 13
   elseif( position == "CAM" ) then
       posId = 13
   elseif( position == "LAM" ) then
       posId = 13  
   elseif( position == "RW" ) then
       posId = 11
   elseif( position == "LW" ) then
       posId = 12
   end
   return posId
end

function WouldPlayerEvenLeaveClub( teamId, playerId )
   local monthsJoined = Engine.GetNumberOfMonthsSincePlayerJoined( teamId, playerId )
   local numYears = Engine.GetNumberOfYearsSincePlayerJoined( teamId, playerId )
   local playerAge = Engine.GetPlayerAge( teamId, playerId )
   local oneClubPlayer = Engine.HasPlayerTrait( teamId, playerId, "ONE_CLUB_PLAYER" )
   local isListed = Engine.IsPlayerOnTransferList( playerId )
   local loanListed = Engine.IsPlayerOnLoanList( playerId )
   local inOnLoan = Engine.IsPlayerInOnLoan( teamId, playerId )
   local isRetiring = Engine.IsRetiring( playerId )
   local isPap = ( playerId == Engine.GetPlayAsPlayerID() )
   local injuryDuration = Engine.GetInjuryDuration( teamId, playerId )
   local numDaysOfInjury = Tuning.MISC.numDaysInjured
   local playerFitEnough = ( injuryDuration < numDaysOfInjury )
   local hasSignedPreContract = Engine.HasSignedPreContract( playerId )
   local retireStory = Engine.IsPlayerInvolvedInStoryId( playerId, "POTRET" )
   local wouldLeave = ( ( numYears <= Tuning.MISC.numYearsOnTeam or playerAge <= Tuning.MISC.playerAge ) and ( oneClubPlayer == false ) and ( inOnLoan == false ) and ( isRetiring == false ) and ( monthsJoined >= Tuning.MISC.monthsJoined ) and ( isPap == false ) and ( playerFitEnough == true ) and ( isListed == false ) and ( loanListed == false ) and ( hasSignedPreContract == false ) and ( retireStory == false ) )
   return wouldLeave
end

function GetSuitableTeamsForPlayer( teamId, playerId, numOffers, ignoreBudget )
   local offer = { -1, -1, -1 }
   local actualOffers = 0
   if( numOffers <= 3 ) then
       local badOfferFound = false
       actualOffers, offer[ 1 ], offer[ 2 ], offer[ 3 ] = Engine.FindSuitableTeamsForPlayer( teamId, playerId, numOffers, ignoreBudget )
       for offerCount = 1, actualOffers do
           if( offer[ offerCount ] == -1 ) then
               badOfferFound = true
               break
           end
       end
       if( badOfferFound == true ) then
           offer[ 1 ], offer[ 2 ], offer[ 3 ] = FindSuitablePlayersSafety( playerId, numOffers )
       end
   else
       Engine.LuaAssert( "FindSuitablePlayers - Too many offers requested: " .. numOffers )
   end
   return actualOffers, offer[ 1 ], offer[ 2 ], offer[ 3 ]
end

function FindSuitablePlayersSafety( playerId, numOffers )
   local highTeam = Tuning.MISC.highTeamIds
   local numHighTeams = table.getn( highTeam )
   local userTeam = Engine.GetUserTeam()
   if( numOffers == nil ) then
       numOffers = 3
   end
   for teamCount = 1, numHighTeams do
       if( userTeam == highTeam[ teamCount ] ) then
           table.remove( highTeam, teamCount )
           numHighTeams = table.getn( highTeam )
           break
       end
   end
   randNum = Engine.GetRandomNumber( 1, numHighTeams - numOffers )
   return highTeam[ randNum ], highTeam[ randNum + 1 ], highTeam[ randNum + 2 ]
end

Hi,
Where did you find this code?
 

juanka220

Club Supporter
frosty manager 1.0.4.4 is not working, error appears.
some help ?

http://[img]http://img.fenixzone.net/i/8DVg6Po.png
 

Fidel Gameplay

Senior Squad
Hey Fidel do u know how i can make Fifa 19 gameplay Speed more Slower for Career modus. ?

Hello bro,
browse and read millions tips shared by me, bangus, pedrito during the various modding's seasons,
then apply tips/tricks/suggested game settings, sliders, squads db mods, etc.
but but everything based on your preferred gp style. Or just wait for new AGPE DB+AI.
Bye
 

Fidel Gameplay

Senior Squad
Master GalaxyMan shared a new tip about modded game issues in Win 10:

Code:
https://i.imgur.com/FxHYq69.png

So take care because is confirmed on many forums that this 1809 update (in some cases)
ruin completely the OS stability, on addon personal files will be deleted and more.
Not tried and I will never try. Have fun with your Super Spyware 10.
Bye

If you already updated the OS try out my solution already shared,
if works well, don't worry you will be able to run Frosty Mods,
so you can use the Mod Manager only to apply mods and then run game with my solution but on addon
+ one new required solution tip to enable the ModData folder (unique cmd parameter in the main exe).
 
Last edited:

campeador

Reserve Team
Hello bro,
browse and read millions tips shared by me, bangus, pedrito during the various modding's seasons,
then apply tips/tricks/suggested game settings, sliders, squads db mods, etc.
but but everything based on your preferred gp style. Or just wait for new AGPE DB+AI.
Bye

Brandon, you can slow down the game with cheatengine.
 

Fidel Gameplay

Senior Squad
To brandon and everyone interested:
a little preview of the new 19 AGPE DB (here in IMMERSIVE Version with new OVR system stats + impressive traits addon after attribute scan).
Download this Uefa Champions League file, put in 19 profile folder, load. Play. Let me know!
You can see correct re-calculated OVR in match (as example CR7 new ovr 84).
Immersive is the most decreased version about players ovr.

The incoming full gp pack will include also the AGPE DB Default Version
(default ovr stats, only a bit changed + impressive traits addon only),
as usual the custom based on AGPE AI locale.ini, suggested custom sliders, gamepad, game settings.

Only for players who love real football.

Testing in career mode (immersive):



 
Last edited:


Top