Page 4 of 4

Re: Player Manager Frustration!

Posted: Mon Sep 13, 2010 7:51 am
by Stainy
Hope he develops this tool....

I`m in the process of making the teams harder - the only way at the moment is dropping the age of every player :(

Re: Player Manager Frustration!

Posted: Mon Sep 13, 2010 8:57 pm
by UltimateBinary
Stainy, it would be a trivial change to scale a whole team's ability up or down. If you think that would be a valuable addition to the tool for you and others, I would be able to add that enhancement.

Billy, the name change feature you suggest is not possible as the names are not stored in the save file but in the game itself. It's beyond the scope of this tool.

Peace.
UB

Re: Player Manager Frustration!

Posted: Tue Sep 14, 2010 7:41 am
by Stainy
Hey...

Well for me... and alot of others.. the game gets easy after a certain point.. so upping the other teams stats/ability etc would be a great thing I think! makes more of a challenge.

I`m currently on yeah 180 ( 2170 ) the same game I started back in 1990..

Also while your at it... if you could make an option to enable a Player Manager ( I can`t remember how to do it now )
Because my PM has long gone.. if the game is harder I would like to appoint a new PM you know ? these two additions would be absolutely fantastic... and I would see no other changes needed I think.


Thanks again for your superb tool!

Re: Player Manager Frustration!

Posted: Tue Sep 14, 2010 5:58 pm
by andreasP199
Hi UB.

Great tool!

I see you are able to display the names (last name and initials) of the players. I assume you are generating the names from the 8 hex digits for names stored for each player. I have been wondering how the names are generated. You seem to have figured out the algorithm. If this is the case, are you willing to share the algorithm (source, descripiton or something)?

Re: Player Manager Frustration!

Posted: Wed Sep 15, 2010 12:16 am
by Maragenie
Keep talking fellas this is all music to my ears. 8)

Re: Player Manager Frustration!

Posted: Sun Oct 31, 2010 6:20 pm
by UltimateBinary
andreasP199 wrote:I see you are able to display the names (last name and initials) of the players. I assume you are generating the names from the 8 hex digits for names stored for each player. I have been wondering how the names are generated. You seem to have figured out the algorithm. If this is the case, are you willing to share the algorithm (source, descripiton or something)?


Andreas, maybe this extract from the tool source will be of use. It is light on comments but should be self-explanatory.

UB

Code: Select all

class cKORandom
{
public:
   WORD GetNextRandom();
   WORD GetCurrentRandom();
   BYTE m_RND[6];
};
inline WORD cKORandom::GetNextRandom()
{
   DWORD      adr=(DWORD)&m_RND;
   __asm
   {
      mov      ebx,[adr]
      mov      ah,[ebx+3]
      SHR      ah,3
      mov      al,[ebx+5]
      XOR    ah,al
      RCR      ah,1
      RCL      [ebx+1],1      
      RCL      [ebx+0],1      
      RCL    [ebx+3],1   
      RCL    [ebx+2],1      
      RCL    [ebx+5],1      
      RCL    [ebx+4],1
   };
   return GetCurrentRandom();
}
WORD cKORandom::GetCurrentRandom()
{
   WORD ret=m_RND[0]<<8;
   ret+=m_RND[1];
   return ret;
}




BYTE TheInitialsTableDefault[]=
{
   44, 4,      0x41, 0x44, 0x4a, 0x52,   //if rnd <=44 then one of ADJR
   76, 5,      0x43, 0x45, 0x47, 0x4d, 0x53,  //if rnd <= 76 then one of CEGMS
   99, 8,      0x42, 0x46, 0x48, 0x49, 0x4c, 0x4e, 0x54, 0x57,  //if rnd <= 99 then one of BFHILNTW
   100, 1,      0x4f,  //if rnd < 100 then one of O
};
TCHAR *   Surnames[]=
{
   TEXT("Adams"),
   TEXT("Adcock"),
   TEXT("Addison"),
   TEXT("Aldridge"),
   TEXT("Alexander"),
   TEXT("Allen"),
   TEXT("Anderson"),
   TEXT("Andrews"),
   TEXT("Archer"),
   TEXT("Armstrong"),
   TEXT("Arnold"),
   TEXT("Austin"),
   TEXT("Bailey"),
   TEXT("Baker"),
   TEXT("Barber"),
   TEXT("Barker"),
   TEXT("Barnes"),
   TEXT("Barrett"),
   TEXT("Bell"),
   TEXT("Bennett"),
   TEXT("Berry"),
   TEXT("Bishop"),
   TEXT("Bloomfield"),
   TEXT("Bond"),
   TEXT("Bright"),
   TEXT("Brookes"),
   TEXT("Brown"),
   TEXT("Bryant"),
   TEXT("Carter"),
   TEXT("Chamberlain"),
   TEXT("Chapman"),
   TEXT("Clark"),
   TEXT("Clarke"),
   TEXT("Clements"),
   TEXT("Collins"),
   TEXT("Cole"),
   TEXT("Coleman"),
   TEXT("Collins"),
   TEXT("Cook"),
   TEXT("Cooper"),
   TEXT("Cox"),
   TEXT("Cross"),
   TEXT("Curtis"),
   TEXT("Davies"),
   TEXT("Davis"),
   TEXT("Dawson"),
   TEXT("Day"),
   TEXT("Dennis"),
   TEXT("Dickens"),
   TEXT("Dixon"),
   TEXT("Douglas"),
   TEXT("Downs"),
   TEXT("Dyer"),
   TEXT("Edwards"),
   TEXT("Elliott"),
   TEXT("Ellis"),
   TEXT("Evans"),
   TEXT("Fairweather"),
   TEXT("Farrell"),
   TEXT("Ferguson"),
   TEXT("Fisher"),
   TEXT("Fletcher"),
   TEXT("Foster"),
   TEXT("Gibson"),
   TEXT("Gilbert"),
   TEXT("Goddard"),
   TEXT("Gould"),
   TEXT("Gray"),
   TEXT("Green"),
   TEXT("Gregory"),
   TEXT("Griffiths"),
   TEXT("Hall"),
   TEXT("Hammond"),
   TEXT("Harris"),
   TEXT("Hart"),
   TEXT("Harvey"),
   TEXT("Hill"),
   TEXT("Hodge"),
   TEXT("Hopkins"),
   TEXT("Hudson"),
   TEXT("Hughes"),
   TEXT("Hunt"),
   TEXT("Jackson"),
   TEXT("James"),
   TEXT("Johnson"),
   TEXT("Jones"),
   TEXT("Jordan"),
   TEXT("Judge"),
   TEXT("Kelly"),
   TEXT("Kemp"),
   TEXT("King"),
   TEXT("Knight"),
   TEXT("Kirby"),
   TEXT("Langley"),
   TEXT("Law"),
   TEXT("Lawrence"),
   TEXT("Lee"),
   TEXT("Lewis"),
   TEXT("Lindsey"),
   TEXT("Little"),
   TEXT("Long"),
   TEXT("Longhurst"),
   TEXT("Lowe"),
   TEXT("Macdonald"),
   TEXT("Marshall"),
   TEXT("Martin"),
   TEXT("Martyn"),
   TEXT("Mason"),
   TEXT("Matthews"),
   TEXT("McDermott"),
   TEXT("Miller"),
   TEXT("Mills"),
   TEXT("Mitchell"),
   TEXT("Moore"),
   TEXT("Morgan"),
   TEXT("Morris"),
   TEXT("Morrison"),
   TEXT("Murray"),
   TEXT("Murphy"),
   TEXT("Nelson"),
   TEXT("Newman"),
   TEXT("Nicholls"),
   TEXT("Nixon"),
   TEXT("Oates"),
   TEXT("Osborne"),
   TEXT("Owens"),
   TEXT("Page"),
   TEXT("Palmer"),
   TEXT("Parker"),
   TEXT("Payne"),
   TEXT("Pearce"),
   TEXT("Pearson"),
   TEXT("Phillips"),
   TEXT("Powell"),
   TEXT("Price"),
   TEXT("Quinn"),
   TEXT("Randall"),
   TEXT("Rose"),
   TEXT("Reid"),
   TEXT("Reynolds"),
   TEXT("Richards"),
   TEXT("Richardson"),
   TEXT("Ritchie"),
   TEXT("Roberts"),
   TEXT("Robinson"),
   TEXT("Rogers"),
   TEXT("Russell"),
   TEXT("Rowland"),
   TEXT("Saunders"),
   TEXT("Scott"),
   TEXT("Scanlon"),
   TEXT("Sharp"),
   TEXT("Shaw"),
   TEXT("Simpson"),
   TEXT("Sinclair"),
   TEXT("Smith"),
   TEXT("Sawer"),
   TEXT("Samuel"),
   TEXT("Small"),
   TEXT("Stanley"),
   TEXT("Steel"),
   TEXT("Stevens"),
   TEXT("Stevenson"),
   TEXT("Taylor"),
   TEXT("Thomas"),
   TEXT("Thompson"),
   TEXT("Turner"),
   TEXT("Underwood"),
   TEXT("Walker"),
   TEXT("Walsh"),
   TEXT("Ward"),
   TEXT("Watson"),
   TEXT("Webb"),
   TEXT("Webster"),
   TEXT("Wells"),
   TEXT("West"),
   TEXT("White"),
   TEXT("Wilkins"),
   TEXT("Williams"),
   TEXT("Wilson"),
   TEXT("Wood"),
   TEXT("Wright"),
   TEXT("Young"),
};

void DecodeName(BYTE * pSeed, tstring &outstring)
{
   outstring.clear();
   cKORandom RND;

   RND.m_RND[0]=pSeed[0];
   RND.m_RND[1]=pSeed[1];
   RND.m_RND[2]=pSeed[2];
   RND.m_RND[3]=pSeed[3];
   RND.m_RND[4]=0;
   RND.m_RND[5]=0;

   for (int r=0;r<20;r++)
      RND.GetNextRandom();

   int val=RND.GetNextRandom();

   val=val%100;
   int nInitials=3;
   if (val<75)
      nInitials=1;
   else
   {
      if (val<98)
         nInitials=2;
   }

   for (int i=0;i<nInitials;i++)
   {
      int x=RND.GetNextRandom();
      x=x%100;

      BYTE *A2=TheInitialsTableDefault;
      if (g_bCustomNameMode)
         A2=TheInitialsTableCustom;
      while (x>=*A2++)
      {
         A2+=*A2++;
      }

      DWORD s=*A2++;
      DWORD r=RND.GetNextRandom();
      r=r%s;
      
      BYTE c=A2[r];
      outstring+=c;
      outstring+='.';
   }

   int iSurnameIdx=RND.GetNextRandom();

   int iNumberOfNamesInDB=sizeof(Surnames)/sizeof(TCHAR*);

   iSurnameIdx%=iNumberOfNamesInDB;  //=183
   
   outstring+=Surnames[iSurnameIdx];
}

Re: Player Manager Frustration!

Posted: Sun Oct 31, 2010 9:25 pm
by Steve Camber
Very handy :) Good work!

Re: Player Manager Frustration!

Posted: Sun Feb 20, 2011 11:42 am
by andreasP199
UltimateBinary wrote:Andreas, maybe this extract from the tool source will be of use. It is light on comments but should be self-explanatory.


Thanks for posting the code. It's really cool. (Sorry for not thanking you before).

Re: Player Manager Frustration!

Posted: Fri Nov 16, 2012 12:00 pm
by Hieroglyph
To call up the Data disks/shell to the win directory, Under Win 7 on my Core i7 Dell lappie, I have to use the 3 fingered combo of:

Fn+End+F1

Sometimes pressing End then F1 other times F1 then End - both variations whilst the Fn is depressed.

This is because the Dell has many 'quick buttons' for changing volume/screens and other BIOS level function keys that override the standard IBM keyboard set. So, maybe you need to turn off any similar BIOS related functions on your PC ??