FMScoutFramework icon indicating copy to clipboard operation
FMScoutFramework copied to clipboard

Contract clauses

Open joshlit opened this issue 9 years ago • 3 comments

Any idea how these currently work in FM15? I've been trying to add them to the framework over the past few days but they seem to have changed since FM14. It looks like in FM14 (according to the framework anyway) each clause was next to each other in memory but I've looked at 2 clauses attached to a player in FM15 and they're pretty far away from each other.

joshlit avatar Jul 24 '15 14:07 joshlit

Sure, I don't remember FM14 specifically, but here's how FM15 currently is:

  • "Clauses" offset is @ 0x3C in the Player Contract object.
  • There is an array there, that points to Contract Clause objects of 0x8 length
  • Then, you have the following:
Object Offset Type
Value 0x0 Int32
Type 0x4 Byte
Info 0x5 Byte
  • Type is an Enum type, with the following values:
public enum ContractClauseType 
{
    CCTMinFeeRelease                                    = 0,
    CCTRelegationRelease                                = 1,
    CCTNonPromotionRelease                              = 2,
    CCTYearlyWageRisePercentage                         = 3,
    CCTPromotionWageIncrease                            = 4,
    CCTRelegationWageDecrease                           = 5,
    CCTManagerCoachJobRelease                           = 6,
    CCTSellOnFeePercentage                              = 8,
    CCTSellOnFeeProfitPercentage                        = 9,
    CCTSeasonalLandmarkGoalBonus                        = 10,
    CCTOneYearExtensionAfterLeagueGamesFinalSeason      = 11,
    CCTMatchHighestEarner                               = 12,
    CCTWageAfterReachingClubCareerLeagueGames           = 13,
    CCTTopDivisionPromotionWageRise                     = 14,
    CCTTopDivisionRelegationWageDrop                    = 15,
    CCTMinFeeReleaseForeignClubs                        = 16,
    CCTMinFeeReleaseHigherDivisionClubs                 = 17,
    CCTMinFeeReleaseDomesticClubs                       = 18,
    CCTWageAfterReachingCaps                            = 19,
    CCTOptionalContractExtensionByClubYears             = 22
}

ThanosSiopoudis avatar Jul 24 '15 14:07 ThanosSiopoudis

Have you got it working on FM15 with 0xC length? I just looked into it and it looks like the length is 0x08, I changed it to that now it works perfectly in the framework.

Thanks again for all of your help btw :)

joshlit avatar Jul 24 '15 18:07 joshlit

Yeap, sorry, my bad. 0xC was FM14, FM15 is 0x8

ThanosSiopoudis avatar Jul 24 '15 18:07 ThanosSiopoudis