• Help Support The Rugby Forum :

Your Help Needed! - tornament creating

K

kingwilko

Guest
Rsg files let you change a few things round before the tournament starts but the tmt's themselves are great for changing stuff once the tourny is underway. For c2k5 I managed to remove teams, take out fixtures, change results etc so I reckon it should be possible for rugby2005 too.
From the file posted in this thread fixtures seem to be 12 bytes long and start at 392. I don't have the game so I can't check it out though (if that is correct there should be about 90 fixtures in that tmt file). It looks like the teamoffset is 48 and the user team controlled offset is 104 onwards (at 4 byte intervals). There would appear to be between 14 and 16 teams in the file.
If someone could provide a little bit of info on what the teams and fixtures are for the file posted I might be able to help some more.
Cheers,
Colin

Originally posted by EVOL
i had a go at the world league myself, i just changed england in for the chiefs, but at the selection screen the chiefs still popped up but no england, i chose the chiefs anyway and when it went into the main bit i was another team, um cant remember but like another starting team.

i had a look through the stats pages and sure enough england had replaced chiefs, only i couldnt select them, weird

sorry im typing in a hurry
I had that problem when I was experimenting. Basically editing the RSG files will never get you as good results.

edit: a closer look at the fixtures bytes. I'm sure the 5th and 6th byte of each fixture string are the two teams. That would make the first 6 fixtures as follows:

28 vs 31
80 vs 84
75 vs 74
29 vs 30
83 vs 81
76 vs 82

These are all values found in the teams section above. The 14 teams are:

28, 30, 29, 73, 76, 74, 75, 77, 81, 82, 83, 80, 31, 84

The user controlled teams are all except 73 using the c2k5 system which makes me think that the binary may be reversed and 1 may show a computer controlled team. i.e. 73 is the user team.

I could get a load more info out if someone can load up that roster and tell me the date, location and teams for the first 10 fixtures (plus any other info that is given).
 
K

kingwilko

Guest
Anyone? I don't mind giving up a bit of my time to help but I'd like some replies to the questions I asked.
 
W

woosaah

Guest
yeah sorry was at the rugby 06 torny all weekend so couldnt answer your quesion. ill have a look at it sometime either today or tomorrow while i am not busy at work
 
K

kingwilko

Guest
yeah sorry was at the rugby 06 torny all weekend so couldnt answer your quesion. ill have a look at it sometime either today or tomorrow while i am not busy at work
[/b]
Np mate. Doesn't have to be you; just anyone with the game who can load that tournament file.
 
W

woosaah

Guest
this might be helpful, its the xml file that shows you which team is what number.

ill post screenshots of the tmt file fixtures in here tonight
 
K

kingwilko

Guest
That would make the teams:

Brumbies, Reds, Waratahs, Blues, Chiefs, Crusaders, Highlanders, Hurricanes, Cats, Sharks, Stormers, Bulls, Western Force, Cheetas

Obviously it's the Super 14 (which I could have guessed with 14 teams!)

Fixtures should be:

Brumbies vs Western Force
Bulls vs Cheetas
Highlanders vs Crusaders
Waratahs vs Reds
Stormers vs Cats
Chiefs vs Sharks

It would be easy enough to whip up a quick fixtures viewer but what I'm interested in atm are the other bytes in the fixtures string.

Fixture 1
Code:
05 C5 FA 31 1C 1F 00 00 00 00 00 00
Fixture 2
Code:
05 CA FA 05 4B 4A 00 00 00 00 00 00
I would suspect that the first 4 bytes are the date and venue. We know 5 and 6 are the teams and then 7 will probably be the result and 8-12 the scores.
A list of stadium codes would also be handy and can you confirm that the Blues are the user-controlled team.

As of now I can confidentally say I could change all 14 teams and make them selectable by human or computer as well as change the teams in the fixtures.
 
W

woosaah

Guest
here is the stadium list.

not sure who the user controlled team is, best if getofmeland told ya that one as he uploaded it.

still at work, kinda bored wanna have a look at it :) want to change the world league personally, but shouldnt be that hard.



here is the stadium list.

not sure who the user controlled team is, best if getofmeland told ya that one as he uploaded it.

still at work, kinda bored wanna have a look at it :) want to change the world league personally, but shouldnt be that hard.
 
K

kingwilko

Guest
Right I've cracked the fixture string :)

It actually starts at 384 and goes as follows:

Code:
4D 49 00 00 00 00 00 00 05 C5 FA 31
Byte 1: team 2
Byte 2: team 1
Byte 3: result (unconfirmed)
Bytes 4-8: scores (unconfirmed)
Byte 9-10: date
Byte 11: unknown (possibly match type)
Byte 12: stadium

I'll post the method for how to extract the month and day from bytes 9 and 10 later as I don't have time now. Everything else is simple decimal code.
 
K

kingwilko

Guest
Here is how the date bytes work. It sounds complex but it works...

Byte 9 = A and Byte 10 = B

Day: Int(A/128) + (16ModB)*2
Month: 1 + (Int((128ModA)/16))*4 + Int((16ModA)/4)

Example 1:

005 197

Day: Int(5/128) + (16Mod197)*2 = 10
Month: 1 + (Int((128Mod5)/16))*4 + Int((16Mod5)/4) = 2
Therefore: 10 February

Example 2:

013 206
Day: Int(13/128) + (16Mod206)*2 = 28
Month: 1 + (Int(128Mod13)/16))*4 + Int((16Mod13)/4) = 4
Therefore: 28 April

Example 3:

144 198
Day: Int(144/128) + (16Mod198)*2 = 13
Month: 1 + (Int(128Mod144)/16))*4 + Int((16Mod144)/4) = 5
Therefore: 13 May

(As a side note if we think of the hex characters that make up the byte day can effectively be expressed as B2*2 + A1/8 and month as 1 + A1*4 + A2/4. However I think it is easier to code it in decimal)

If I want to make a fixture between England and Scotland at Twickenham on 3 October it would look something like this:

Code:
11 05 00 00 00 00 00 00 A5 C1 FA 0E
Perhaps someone could enter that with their hex editor and check.
 
E

EVOL

Guest
Right I've cracked the fixture string :)

It actually starts at 384 and goes as follows:

Code:
4D 49 00 00 00 00 00 00 05 C5 FA 31
Byte 1: team 2
Byte 2: team 1
Byte 3: result (unconfirmed)
Bytes 4-8: scores (unconfirmed)
Byte 9-10: date
Byte 11: unknown (possibly match type)
Byte 12: stadium

I'll post the method for how to extract the month and day from bytes 9 and 10 later as I don't have time now. Everything else is simple decimal code. [/b]
Byte 3: team 2 score
Byte 5: team 1 score

byte 9 also controls whether the game has been played or not.

for the first game (blues v hurricanes)byte 9's 05 hex changes to 07 as the binary for it changes from
00000101 to
00000111

hope that made sense


Also with this editor woosaah will you be editing already made tournaments or will it create fresh ones, just wondering as the tournaments lock player stats as of when you create the tourny.

eg with the test.tmt that getofmeland posted i have to use the player ratings that he had, dya get me
</span>
 
K

kingwilko

Guest
Yup, byte 9 changes with the result (same as in c2k5).
The reason Scotland or England can't be selected is that neither are selected in the team list at offset 48 or as a userteam at offset 104.
WRT your second question it's only possible to modify existing tournaments however it is possible to reduce the number of teams and cancel certain fixtures. The tmt contains all the player info the roster file does so Woosaah should be able to modify his editor to change those stats too.
Best way to go is to start a new tournament (which will generate its player stats from the current roster), save it and then do your editing.
I feel there has to be a simpler way of explaining the date/result bytes. I coded them as hex for the editor I wrote but it was never very elegant.
 
C

captainamerica

Guest
looking at woosah's .xml things - is it a case where ea bit off more than they could chew with international teams like Chile and Tunisia, and then (wtf!) 15 u.s. collegiate teams(!).
 
K

kingwilko

Guest
looking at woosah's .xml things - is it a case where ea bit off more than they could chew with international teams like Chile and Tunisia, and then (wtf!) 15 u.s. collegiate teams(!).
[/b]
I assume none of them are in the game then? I don't have it to check.
You never know, they might just be hidden and only accessible through hex editing... ;)
 
W

woosaah

Guest
yeah i wounder if they have their own kits, thats kinda why i want to do this, i want to see if we can get the other teams in there to play. I know you have to put players in the team but it will be worth a look anyway
 
K

kingwilko

Guest
I'd have thought not tbh. If they are selectable and can be given players (do they have a nationality code and a team list in the roster?) then the kit will just be the no texture orange and green thing.
If you look at the XML it shows the colours as 0,0,255,255 or simular.
 
W

woosaah

Guest
ok i am working on it now, just trying to get the fixture viewer up, after thats its easy to change the values (well easier)

It looks like the date is pretty much the same as the date in the roster thing so i just need to copy that code that i did there.

this is also dependant on work, as i am at work :)
 
K

kingwilko

Guest
It would be good to see another example of a tmt file (preferably a tour) so I can try and work out what that mystery byte number 11 is.
 
W

woosaah

Guest
there is a nationality code in the player details, and in the team deatils it refers to the players id.

the teams have also been carried over, it wouldnt be difficult to add this into the program as well. but i dont really see the point
 
Top