I'm experiencing problems with a custom DB for PCM 2011 that has me about to pull my hair out. Scenario is as follows:
I installed the PCM daily 2012 Expansion DB v2 (and the PCM 1044 fix) and used the PCM daily v2 .cdb file as my starting point for a custom DB. The aim was to create 35 teams and around 95 riders.
I created new sponsors in DYN_sponsor, very carefully. I used 24 empty slots in the DYN_sponsor table and then created an additional 6 new sponsors at the end of the table. I was very careful on selecting fkIDregion, gene_i_contract_end (where the sponsor is attached/linked to a team) and filling out the required values. I made the gene_sz_color entry for the created sponsors 'FFFFFF' for now, since I hadn't got to editing those fully. Everything looks correct.
Then in DYN_team I created my new teams. I added 25 new teams to unused slots on the table (eg, ID 7 was empty, similarly 8, 11, 15 and so on). I have a total of 123 teams, although many of them are empty (no riders), I believe. I haven't touched those teams with no riders registered.
Similarly, in DYN_team I was very careful to fill out all fields as required, including unique values in gene_sz_abbreviation, jersey_sz_abbreviation, etc.
In the DYN_team table I again used FFFFFF as the gene_sz_color, temporarily.
I gave each newly created team their relevant sponsor, from those created above and also used some that were previously in the list but not attached to any team. I've carefully checked that no sponsor is linked to more than one team, either as principle sponsor or secondary.
Next, I created my custom riders at the end of the DYN_cyclists table. I added 95 riders from IDcyclist 4577 through to 4655. There don't appear to be any empty rows in this table so I have 4655 riders, total. I was equally careful to fill out each variable for the new riders. I've treble-checked these.
I then added new riders to new teams and moved some other riders around. All of the created teams have 12+ riders. Some teams have as many as 30.
I've also completed adding team shirts, minishirts, logos, mini-logos and so on to the file structure in the PCM2011 directory. These match, I believe correctly, the appropriate folder names for the newly created teams.
The problem then (ha! to those of you who've the energy to have read this far I thank you) is that after I load into the game, select the DB from the menu and then click Stage, Stage Race, Classic or similar, the game crashes to desktop. I've tested other DBs and everything works fine so I believe I can isolate the issue to this custom DB.
The reason I'm positing is I'm stuck on where to look for the problem/problems with this file. Everything looks right so I wonder if any of the DB makers out there have advice or tips on how to review the tables to find the problems. I'm using Lachi's editor (v10).
All I can think to add/ask is whether there are known issues with any of what I've described above, or strict limits on number of riders per team, number of teams (I understood 140 was considered a 'soft' limit) or other likely causes that more experienced editors could point out. Or, if I post the .cdb file itself if anyone is willing to take a look and can maybe find something. I'd like to avoid starting over again!
It was eleven more than necessary. Jacques Anquetil
I didn't yet remove the empty teams but I can. They were there already though, not created by me. It seemed they might be placeholders? They're there in the 'vanilla' version of the PCM Daily Expansion pack v2 too and that doesn't crash. I'll try it though, if you think it's worth it.
I should maybe have added, I replaced some CYAProTour teams but still have only 18. There are, however, more Professional category teams as a result. Is there a known limit there? I didn't get to editing teams associated with specific races yet so I doubt that matters but still.
It was eleven more than necessary. Jacques Anquetil
My attempts to create a new database only worked when I used exactly the same teamslots as in the database which I used as a starting point. Don't know why, but when I used some of the empty slots my game also crashed.
I read everything but I'm not sure if I understood everything
Well, from reading I couldn't think of any 'obvious' error which could have caused that. I don't think the no-team riders would cause a problem, at least not in single race if they aren't lined up for that race. In PCM11 there were only two divisions (WT and Continental), so replacing teams in the WT wouldn't cause a problem of max teams in Professional, simply because there's no professional
Another thing is that you can't rule out some of the aspects you mentioned as possible crash-causers. Having shirts/minis/etc or not makes no difference (for the crash), the game wouldn't crash because of lack of these files. Which editor did you use btw? Some of them, such as the Full Editor, will crash when trying to export the DB if you have blank columns which shouldn't be blank or similar stuff, so you could rule that possibility out as well (depending on the editor you're using). Some other stuff like too many riders (>30) or inexistent region shouldn't either.
Pretty sure that there are no empty teams, even though I'm not sure which DB are you talking about: PCM11 Exp Pack had no V2, so it could either be 2012 DB V2, or Fenian's Exp Pack (kinda a V2) or the normal Exp Pack (V1) The only placeholder would be the free agents team (ID 119). Which teams did you see that have no riders though? Btw, there are quite a lot of empty rows in DYN_cyclist (not empty rows, but non-used IDs), so the number is much lower than 4577 There should be 3177 riders more specifically
Anyway, one of the things I'd check is conflicting IDs. Especially with the adding the teams on unused slots, it could be that a number slipped and was doubled in the end. Another thing you could is get the original DB again, and slowly re-add the stuff: first one team, one sponsor and one rider, then test in game. Then the rest of the riders of that team, then test in game. If at this point it has worked, then you're probably adding them correctly, but at one point or another did a 'fatal' error. So there'd be two options: go team by team testing in game to see which one could be causing the error, or re-add them all, copying only the crucial info and re-doing the rest (for example: from DYN_cyclist, only re-add names, team, picture, DoB, popularity, potential, region and stats - then re-do the stuff which can have a "pattern", in this case ID, all the columns with 0, tables like age decline, nationalism, etc). Posting the .cdb file could also help, who knows if there's something 'obvious' that's causing the crash but you wasn't mentioned
I should have clarified: I am using the PCM 2012 DB V2 for PCM 2011. Odd that you're sure there are no empty teams. I'm pretty sure I saw them but I'll go back and check. Might be that extra half bottle of wine last night.
Where you say that in PCM 2011 there were only two divisions, WT and Continental; I see two divisions but under the names 'CYAProTour' and 'Professional' - is that what you would expect for a PCM2011 DB? I notice there are differences between the 2011 DBs and 2012.
I'll go through again and check for duplicates.
I am using Laichi's Editor, v10. If, as seems more than possible, I'm stuck with going back and repeating the edits, is there a better option for editing that would allow for faster copying and pasting of data? Obviously, I want to be careful about copying the same broken data (if I have some) but it would save a lot of time to be able to paste rows that I know are good.
It was eleven more than necessary. Jacques Anquetil
harry wrote:
My attempts to create a new database only worked when I used exactly the same teamslots as in the database which I used as a starting point. Don't know why, but when I used some of the empty slots my game also crashed.
Hi Harry,
do you mean you couldn't use any empty slots in the existing team list? For example, in the default state the PCM Daily 2012 Expansion for PCM 2011 has empty rows at row 7, 8, 11 and so on. Did you add them at the end as new rows or edit over existing teams?
It was eleven more than necessary. Jacques Anquetil
Ah, so that's what you meant with Professional - I thought you were talking about Pro Continental, which doesn't exist in PCM11, but was added in 12 In that case, yes, you'd expect that, but the limit, if there's one, should be/is a lot higher than 132 teams
As for going back and repeating the edits, use an editor that extracts the tables into individual files that can be opened with Excel - like the Excel Editor or the Full Editor Then, it's very easy to copy and paste the columns that are good (not sure if you really meant rows in the last line, but I'd rather copy the columns than the rows).
quick follow-up question: you indicated above that not having all the graphics elements like shirts, logos, etc in the right place shouldn't cause a crash like this. Would this apply if the minimaillot files were missing?
It was eleven more than necessary. Jacques Anquetil
No (it won't cause the game to crash - so yes it applies to minimaillots ). Anything external to the .cdb file won't cause the game to crash like this. If you don't have minis, logos, or minilogos, you'll see pink squares. If you don't have the 3D shirt, you'll get the default Cyanide shirt. If you are missing the equipment files, you won't see any equipment in game, and so on
Edited by lluuiiggii on 22-08-2012 03:38
I now have more weirdnesses. I went back to start over, one step at a time, using the Excel editor (faster - thanks). I have a single team and sponsor added and a few riders and am testing and it doesn't crash but the graphics are either missing (main shirt defaults to the Cyanide shirt) or the minimaillot is somehow corrupt.
jersey_sz_abbreviation does point to the directory in 3D/Cyclists/Cloth/Team/xxx, yes? So if the jersey_sz_abbreviation is ban and the directory at that location is ban with the file ban_maillot.tga, doesn't that seem correct?
As for the minimaillot, I've never had such problems before. See the screen cap below. Something up with the transparency? Does PCM 2011 support TGA files for minimaillots or do I need to go through the whole DDS process?
Some idiot (I've no idea who now ) had misnamed the main 3d shirts so that instead of ban_maillot.tga it was banesto_maillot.tga.
As for the minishirt, it seems the alpha layer was mangled so I have to refinish all my minishirts and logos. No big deal.
So far, so good on the rebuild using the Excel editor. I have 5 teams in and no crashes. By the time I get done the next PCM12 patch and PCM Daily Expansion update will be out so then I'll start on the same for that. By the time I get that done PCM 13 will be out and I might give up altogether.
It was eleven more than necessary. Jacques Anquetil