Fitness.com
Advertisement

Go Back   Sports Forum > Community > Football Manager > Skinning Hideout

Skinning Hideout

Use this forum to help edit the cosmetic side of Football Manager.


» Site Navigation
 > Shop
» Current Poll
Best 5 club teams in history of Football:
Liverpool 1977-1978 - 100.00%
1 Vote
Real Madrid 1956-1960 - 0%
0 Votes
Juventus 1985 - 0%
0 Votes
Milan 1989-1990 - 100.00%
1 Vote
Ajax 1971-1973 - 0%
0 Votes
Santos 1962-1963 - 0%
0 Votes
Torinho 1940's - 100.00%
1 Vote
Ajax 1995 - 0%
0 Votes
Flamengo 1981 - 100.00%
1 Vote
Benfica 1961-1962 - 100.00%
1 Vote
Total Votes: 1
You may not vote on this poll.
» Stats
Members: 103,531
Threads: 85,004
Posts: 1,031,271
Top Poster: Karky (9,546)
Welcome to our newest member, samule456
» Fitness Shop
If you register for free, you will be able to post threads, vote on polls and lots more. If you have problems with the registration or logging in, please contact the administrator.

Reply
 
LinkBack Thread Tools Display Modes
Old 06-14-2003, 10:50 PM   Pre-game database format information Post #21
Newb
 
Join Date: Oct 2007
Posts: 0
Rep Power: 0
retired_gstb_07 is an unknown quantity at this point
Default

<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by EdL:
I'll have to run those files through grep when I can be arsed, to look for anything else amusing.<HR></BLOCKQUOTE>

One I particularly like is the constants ( tut tut SI, not very type safe are they ), indicating where an injury occured, in injury.h

<pre class="ip-ubbcode-code-pre">// how the injury was received...#define INJURY_RECEIVED_IN_PUB 3</pre>

Also spotted a constant there for "FAITH_HEALING_INJURY_ID".

Incidentally, ( one for SI ) should there be an additional injury category to cover back injuries specifically, or is that covered by other categories sufficiently?
retired_gstb_07 is offline   Reply With Quote
Old 06-15-2003, 11:24 AM   Pre-game database format information Post #22
Registered User
 
Join Date: Sep 2007
Posts: 0
Rep Power: 0
retired_ss2miraitrunks is an unknown quantity at this point
Default

Back injuries are in the upper body injuries section.

VB, erm, i'll try and do it at some point. Are there any other VB people out there anyway?

A question for you editor geeks - re: constants and the like. How do you deal with them in your editor UI? Say you have all those injury ones defined in your injury class. And you have a function to add/edit an injury - how do you go about mapping the injury ID to a "display name" for it? I never used to bother, instead opting to add the display names of the injuries to a listbox (injury ID conveniently mapping to listbox listindex). But it's stupid and messy (it was 4 years ago :p ) and i'll need to rethink it. So what's the best way to do it then? Just an array of strings?
retired_ss2miraitrunks is offline   Reply With Quote
Old 06-15-2003, 02:21 PM   Pre-game database format information Post #23
Newb
 
Join Date: Oct 2007
Posts: 0
Rep Power: 0
retired_gstb_07 is an unknown quantity at this point
Default

Not much help for you, I guess, but the way I do it is to utilise a Type Safe Enumeration pattern within Java.

As it stands, because constants defined within C++ are IIRC ints, it means different constants with the same value can become interchangeable, ie

<pre class="ip-ubbcode-code-pre">#define GRAEME_KELLY 2#define POT_NOODLE 2</pre>

Both constants there are theoretically belonging to a different problem domain space, but resolve to the same value, hence can be used interchangeably.

I therefore spend hours converting the constants into Java objects; for example...

<pre class="ip-ubbcode-code-pre">public final class InjuryCategoryType{ private String text; private InjuryCategoryType(String text) {this.text = text; } public String toString() {return text; } public static final InjuryCategoryType ANY = new InjuryCategoryType("Any"); public static final InjuryCategoryType INTERNAL = new InjuryCategoryType("Internal"); public static final InjuryCategoryType FOOT = new InjuryCategoryType("Foot"); public static final InjuryCategoryType SHIN = new InjuryCategoryType("Shin"); public static final InjuryCategoryType KNEE = new InjuryCategoryType("Knee"); public static final InjuryCategoryType THIGH = new InjuryCategoryType("Thigh"); public static final InjuryCategoryType GROIN = new InjuryCategoryType("Groin"); public static final InjuryCategoryType UPPER_BODY = new InjuryCategoryType("Upper Body"); public static final InjuryCategoryType HAND = new InjuryCategoryType("Hand"); public static final InjuryCategoryType ARM = new InjuryCategoryType("Arm"); public static final InjuryCategoryType SHOULDER = new InjuryCategoryType("Shoulder"); public static final InjuryCategoryType NECK = new InjuryCategoryType("Neck"); public static final InjuryCategoryType HEAD = new InjuryCategoryType("Head"); public static final InjuryCategoryType REHABILITATION = new InjuryCategoryType("Rehabilitation"); public static final InjuryCategoryType[] CM4_INJURY_CATEGORY_TYPES = new InjuryCategoryType[] { ANY, INTERNAL, FOOT, SHIN, KNEE, THIGH, GROIN, UPPER_BODY, HAND, ARM, SHOULDER, NECK, HEAD, REHABILITATION }; public static InjuryCategoryType getInjuryTypeByIndex(Version version, int index){ int tempIndex = index+1; if ( version == Version.CM4 ) { if (( tempIndex &gt;= 0 ) && ( tempIndex &lt; CM4_INJURY_CATEGORY_TYPES.length)) { return CM4_INJURY_CATEGORY_TYPES[tempIndex]; } } return ANY;}}</pre>

So, where a field value points to an Injury Category, rather than defining it within the particular class as a primitive data type, I instead define it's type as being InjuryCategoryType. This gives me type safety, as any attempt to push an invalid object into the attribute gives a compile time error, so I avoid any potential run time logic errors.

From a GUI perspective, I also define an array enumerating the values allowed for a specific game version. Hence, to populate them into say a JComboBox in Java, it's as simple as

<pre class="ip-ubbcode-code-pre">JComboBox tempComboBox = new JComboBox(InjuryCategoryType.CM4_INJURY_CATEGORY_T YPES);</pre>

As a consequence, it means I can be more confident that those particular fields are therefore validated correctly if they are change, because you can only select an allowed value object.

The obvious other issue required is to code load/save functionality to map between the primitive value defined in the files and the objects I define.

In VB, then I'd guess an array / list of Strings is probably the way you have to do it; try to encapsulate the Strings, constant values, lookup code into a separate file if possible.

[This message was edited by Graeme Kelly on 15 June 2003 at 15:17.]
retired_gstb_07 is offline   Reply With Quote
Old 06-15-2003, 02:22 PM   Pre-game database format information Post #24
Newb
 
Join Date: Oct 2007
Posts: 0
Rep Power: 0
retired_gstb_07 is an unknown quantity at this point
Default

And if a kindly mod ( or Kelly ) could sort the editing out on the last post ( ie ANY, } misplaced ) would be appreciated.

Now people know why my code hasn't been released
retired_gstb_07 is offline   Reply With Quote
Old 06-15-2003, 04:32 PM   Pre-game database format information Post #25
Registered User
 
Join Date: Sep 2007
Posts: 0
Rep Power: 0
retired_ss2miraitrunks is an unknown quantity at this point
Default

Geek.

That would be:
<pre class="ip-ubbcode-code-pre">Enum InjuryTypes ANY, INTERNAL, FOOT, SHIN, KNEE, THIGH, GROIN, UPPER_BODY, HAND, ARM, SHOULDER, NECK, HEAD, REHABILITATIONEnd Enum</pre>

In VB. But you can't add them to a combobox(i meant combobox above, well spotted) because VB has no equivalent (I don't think) to "this", so you can't ever return their names in string format. I suppose I'd need to have an array of strings, under the assumption that array index = injury type ID.

Anyways, purely hypothetical, everyone knows that Cm3 editors > Cm4 editors :cool:
retired_ss2miraitrunks is offline   Reply With Quote
Old 06-15-2003, 06:10 PM   Pre-game database format information Post #26
Newb
 
Join Date: Oct 2007
Posts: 0
Rep Power: 0
retired_gstb_07 is an unknown quantity at this point
Default

<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Graeme Kelly:
Geek.<HR></BLOCKQUOTE>

Doofus.

<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>But you can't add them to a combobox(i meant combobox above, well spotted) because VB has no equivalent (I don't think) to "this", so you can't ever return their names in string format. I suppose I'd need to have an array of strings, under the assumption that array index = injury type ID.<HR></BLOCKQUOTE>

Well, you can write code to maintain the mapping, that shouldn't be a problem. The thrust of my code was that you can easily put an array/Vector of objects as the data model for a ComboBox in Java - as a consequence, what gets displayed is the <&lt;object>>.toString() value. Hence, storing a description within a type safe enumerated object means you're not storing / processing strings, but dealing with the objects directly - ie <<comboBox>>.getSelectedItem() returns the Object the user selected.

Hence, knowing that the comboBox is for Injury Categories, you just cast the selected object back to an InjuryCategoryType object. Simple.

<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Anyways, purely hypothetical, everyone knows that Cm3 editors > Cm4 editors :cool:<HR></BLOCKQUOTE>

Just because you're a lazy boy who hasn't written his yet...

[This message was edited by Graeme Kelly on 15 June 2003 at 17:13.]
retired_gstb_07 is offline   Reply With Quote
Old 06-18-2003, 12:31 AM   Pre-game database format information Post #27
Registered User
 
Join Date: Sep 2007
Posts: 0
Rep Power: 0
retired_ss2miraitrunks is an unknown quantity at this point
Default

ToString() is far too java-esque for me :shudders:

I'll do VB equivalents of this still(maybe) when i get a minute. haven't seen anyone ask, so i'll hold off for a bit anyways.
retired_ss2miraitrunks is offline   Reply With Quote
Old 06-18-2003, 03:41 PM   Pre-game database format information Post #28
Newb
 
Join Date: Oct 2007
Posts: 0
Rep Power: 0
retired_muggles is an unknown quantity at this point
Default

I was wondering if it would be possible to convert the data (CM4) to CM01/02. You'd need the base code for 01/02. I think it'd be possible.
retired_muggles is offline   Reply With Quote
Old 06-19-2003, 12:13 PM   Pre-game database format information Post #29
Registered User
 
Join Date: Sep 2007
Posts: 0
Rep Power: 0
retired_ss2miraitrunks is an unknown quantity at this point
Default

Not impossible, but an awful amount of work. Essentially you'd be creating the CM0102 database from scratch - all the normal data etc you would just read from the CM4 one, but you'd need to take the record IDs from a CM0102 database (as these remain constant in some/most(?) cases). You'd also run into problems where any of the variable length strings/arrays were larger than the fixed size ones in the CM0102 database - certainly too many players for some of the clubs I would think.
retired_ss2miraitrunks is offline   Reply With Quote
Old 06-19-2003, 12:31 PM   Pre-game database format information Post #30
Newb
 
Join Date: Mar 2008
Posts: 0
Rep Power: 0
retired_suneluv77 is an unknown quantity at this point
Default

&gt; VB, erm, i'll try and do it at some point.
&gt; Are there any other VB people out there
&gt; anyway?

Yep - VB6, none of this .NET rubbush though.

Come on Graeme we're waiting

Alan
retired_suneluv77 is offline   Reply With Quote
Reply

Go Back   Sports Forum > Community > Football Manager > Skinning Hideout

Bookmarks

Thread Tools
Display Modes


Similar threads to Pre-game database format information
Thread Thread Starter Forum Replies Last Post
Any know description of the database format FM2008
Any know description of the database format FM2008: I was trying to create a couple of screenshots of...
DrBernhard Skinning Hideout 0 01-01-2008 08:51 PM
Database format changed?!
Database format changed?!: in FM2008 the pre-game (and save-game prob) has...
Stefan dV Skinning Hideout 3 10-19-2007 01:41 PM
Database format FM 2007
Database format FM 2007: Is it already known whether the database format...
DJ Sir Matthew Skinning Hideout 1 06-28-2006 01:26 PM
FM 2005 Save Game Format and/or Real time format
FM 2005 Save Game Format and/or Real time format: Hey all, I'm looking for information...
xaositec Skinning Hideout 6 08-16-2005 03:07 PM
What format is the database used for football manager?
What format is the database used for football manager?:
SuperGerryTaggart Skinning Hideout 0 01-01-1970 01:00 AM

More threads of Marc Vaughan
Thread Date Forum Replies Last Post
FMH2008 Editor available for download
FMH2008 Editor available for download: Hi, The Football Manager Handheld 2008...
11-30-2007 Football Manager 4 11-30-2007 08:33 PM
FMH Editors any interest in a Mac or Linux version?
FMH Editors any interest in a Mac or Linux version?: Hi, Just out of interest I've built the...
11-30-2007 Football Manager 1 11-30-2007 06:24 PM
Pre-Ordering Football Manager Handheld 2008
Pre-Ordering Football Manager Handheld 2008: Hi, I've noticed that amazon has it up for...
09-26-2007 Football Manager 7 09-26-2007 03:16 PM
FMH PSP 2007 Hints and tips now available
FMH PSP 2007 Hints and tips now available: Hi, A hints and tips document for Football...
02-01-2007 Football Manager 19 09-21-2007 09:35 PM
Random Managers
Random Managers: The players involved aren't truly random...
05-15-2006 Football Manager 0 05-15-2006 01:05 PM

Other threads in forum Skinning Hideout
Thread Date Thread Starter Replies Last Post
RANDOM PROBLEM WITH APPLYING NEW DATABASES TO A NEW FM08 GAME
RANDOM PROBLEM WITH APPLYING NEW DATABASES TO A NEW FM08 GAME: well basically the problem i have is that when i...
02-18-2008 trigg_travers 3 02-18-2008 09:28 PM
Graphics
Graphics: i have found new kits and badges for 08 how do...
11-06-2007 andyhug 1 11-06-2007 10:28 AM
Things I cannot find, Help needed please..
Things I cannot find, Help needed please..: Standard Logo's for football manager 2007 ...
01-14-2007 FowlerGod23 3 01-14-2007 01:04 PM
FMM 2.1 English 'Real Time Editor' for FM 2007
FMM 2.1 English 'Real Time Editor' for FM 2007: I know that there is a seperate thread for this,...
10-31-2006 Kevyinus 16 11-18-2006 09:07 PM
Budget Question FM07
Budget Question FM07:
01-01-1970 adamsmith1903 0 01-01-1970 01:00 AM

» Online Users: 28
1 members and 27 guests
samule456
Most users ever online was 2,128, 07-21-2008 at 08:27 PM.

All times are GMT +1. The time now is 12:45 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Fitness.com | Weight Loss | Training & Fitness | BodyBuilding | Chinese | Spanish | French | Germany | Italian | Friend Codes |
You are viewing Pre-game database format information - Page 3.