Premiership Coach

Remove this Banner Ad

Not yet. Getting to the opening screen was a big deal. :)

Yeah, I noticed that there were only 16 teams available - with GC and GWS missing. I haven't delved further into the data files or the inner workings yet to find out what the issue is. Next step is to see where the program is attempting to load the data from since the starting list file is coming up as blank.

It's like trying to eat an elephant. One bite at a time.
 
Not yet. Getting to the opening screen was a big deal. :)

Yeah, I noticed that there were only 16 teams available - with GC and GWS missing. I haven't delved further into the data files or the inner workings yet to find out what the issue is. Next step is to see where the program is attempting to load the data from since the starting list file is coming up as blank.

It's like trying to eat an elephant. One bite at a time.

The data is being loaded from Premiership Coach UI > Premiership Coach App > Bin > Data. If you take a look at the folder, you will see that its similar to what we have for the actual PC2011 game.

The 2010 lists are stored in Premiership Coach UI > Premiership Coach App > Data. You can copy that over to the Bin folder and the game will detect the lists. Unfortunately due to errors, you will only get as far as loading the teams before the game crashes.
 

Log in to remove this ad.

sorry, moving house this week and not going to be online much but hopefully this helps get you moving.

When you build & run this the first time you've going to see all of the compiled code appear in here:
Premiership Coach UI\Premiership Coach App\bin

That's the output that you'd roll into an installer and whack on a CD.
By design that stuff is never checked into source control, since it gets built from the source code each time. But in that output is also reference data that gets pulled in for the base clubs, players etc. That all lives in here: Premiership Coach UI\Premiership Coach App\Data\Base\Base2010

Since it was all still mid-development cycle that reference data was never finalised, so whats in Premiership Coach UI\Premiership Coach App\Data\Base\Base2010 is still from PC2011. I had some mock data that I was developing against (you'll see in here the 18 AFL clubs, plus not all of the regional clubs split out into full clubs in that same directory)

If you take this:
http://www.filedropper.com/base2010

And extract it over the top of what you have in here, It should look like this & work:
~\Premiership Coach UI\Premiership Coach App\bin\Data\Base\Base2010

Reference data is set to only copy if its missing or newer than whats out here, so each time you build now this wont get overwritten.
upload_2017-10-22_8-49-54.png
 

Attachments

  • upload_2017-10-22_8-49-44.png
    upload_2017-10-22_8-49-44.png
    15.3 KB · Views: 115
sorry, moving house this week and not going to be online much but hopefully this helps get you moving.

When you build & run this the first time you've going to see all of the compiled code appear in here:
Premiership Coach UI\Premiership Coach App\bin

That's the output that you'd roll into an installer and whack on a CD.
By design that stuff is never checked into source control, since it gets built from the source code each time. But in that output is also reference data that gets pulled in for the base clubs, players etc. That all lives in here: Premiership Coach UI\Premiership Coach App\Data\Base\Base2010

Since it was all still mid-development cycle that reference data was never finalised, so whats in Premiership Coach UI\Premiership Coach App\Data\Base\Base2010 is still from PC2011. I had some mock data that I was developing against (you'll see in here the 18 AFL clubs, plus not all of the regional clubs split out into full clubs in that same directory)

If you take this:
http://www.filedropper.com/base2010

And extract it over the top of what you have in here, It should look like this & work:
~\Premiership Coach UI\Premiership Coach App\bin\Data\Base\Base2010

Reference data is set to only copy if its missing or newer than whats out here, so each time you build now this wont get overwritten.
View attachment 431024

I had the feeling that there was something you missed. It all loads now. Even though I don't plan on helping/working on the project, I will probably take a look at how some of it works incase I may want to help.
 
I haven't done any full testing yet but I have been able to get all 18 teams showing up when selecting a new game. I have been doing this in my free periods (teacher) instead of working.

Grenville's files had the 18 teams showing up in game but there were still only 16 available when starting a new game. It has taken a lot of stepping through the running of the code to track down where the game was getting this information (Config > GameLabels).

I am still not able to see the XAML UI in VS - it shows up as blank in the design view. I don't know if I am missing any references/components but I am fumbling my way through.
 
21C Hopefully you can understand what I have typed down below. It's a fix to a problem that should help with testing the game.

There is a problem with the lists that causes players of any team except for GWS to not have their stats loaded up properly when you load a save. For example, if you made a new game and simmed 3 games and a player had kicked 10 goals from those 3 games. On reloading the save, the stats for the player will show that he has played no games for the season and those 3 games from before won't be counted towards their career totals.

I had a look at the problem, and it turns out in the base lists, the file names for all non GWS players were named in the format of "Team Name - Player Name". When you make a new save, it copies over these player files to the save, however it also creates another copy of the files for the non GWS players that have the usual file names (with the player ID). The problem is that the players stats are actually being saved to the files that are named based on the player ID, but when the save is being loaded, it loads the files with format "Team Name - Player Name" instead.

You can get around this by making a new save, opening up the player folder for the save and copying over all the files named based on the player id to the base lists. This way, all the player files in the base lists are named based on the player id.
 
Anyone else getting a crash when you click on the Staff button in game?

Aside from this, after a cursory glance with my non programmer eyes, to get 18 teams into the comp do we need to:?

add team names in GameLabels.xml
add team home ground and ground name
add all team players for new teams
change LEAGUE_AFL_CLUB_COUNT to 18
add/change fixturing

I'm betting it's more involved than this though :)

edit: Late night edit
Grab the 2017-2022 Collective Barng Agreement (CBA) from http://www.aflplayers.com.au/resources/ and also http://www.afl.com.au/policies if you need to clarify any rules etc. for the game.
 
Last edited:
Anyone else getting a crash when you click on the Staff button in game?

Aside from this, after a cursory glance with my non programmer eyes, to get 18 teams into the comp do we need to:?

add team names in GameLabels.xml
add team home ground and ground name
add all team players for new teams
change LEAGUE_AFL_CLUB_COUNT to 18
add/change fixturing

I'm betting it's more involved than this though :)

GWS is already mainly in the game, but there are still some things that need to be fixed. I think 21C pointed out that you can't select the 2 new teams on starting up a new game, so GameLabels.xml is probably the fix for that. I've also noticed that when you try click to view stats on any game that involves GWS, the game crashes. Seems to be because there is no rounded icon for GWS, so that has to be fixed too.
 
When I get a chance (weekend?), I will post what I have done to date so that others can replicate and take things further.

I did try to change the start date to 2018 but got some errors about the range being exceeded when the game started and the newspaper was being displayed. I didn't go much further but I am guessing that the ages of some players from the 2010 base might have been the problem.

Yeah, I did get the 18 teams to show at the start. If I started as any team other than GWS, it started OK. If I chose GWS, it had an error about TopBar_ClubLogos_gws.png being missing in the Images>Icons>ClubTitleIcons folder. I copied another file into that location and renamed it but kept getting the error. (Although now when I just checked that folder, that file was missing again).

Been busy at work and evenings have been taken up with the NFL.
 

(Log in to remove this ad.)

I have documented my steps so far and have uploaded them here:


There is probably stuff that I have forgotten but I'll add more as I go. I haven't had a chance to explore the stuff that netslave posted either.

I was able to see some of the XAML in VS. Maybe it was there all of the time. I still cannot see PCmain.xaml (which I thought was the main all purpose page) but I can view many of the other pages. I did manage to find a copy of PresentationDesignDeveloper.DLL from another project online which may have helped(?).

Please don't think that I am leading this project as I am really just fumbling my way through this thing. I'm still taking tiny bites.
 
Last edited:
I just had a small victory with changing the game to start in 2018. It crashed as before but I restarted PremCo and was able to load this league successfully.
 
I just had a small victory with changing the game to start in 2018. It crashed as before but I restarted PremCo and was able to load this league successfully.
Awesome work mate. I have got things working as well with the steps you provided. There is still a bit to go in terms of getting GWS players into the game as the game crashes when you go to click on GWS match results.
 
Some great info. there guys, I'll get those changes done too.
In \Premiership Coach Game Engine\BaseLogic\C.vb I changed Public Const LEAGUE_AFL_CLUB_COUNT As Integer = 17 to 18, not sure if it's needed but made sense to me.
In \Premiership Coach Game Engine\BaseLogic\Utility.vb we need to set Public Enum AwardType for gcs and gws, not sure if the numbers matter.
I know there's code in there somewhere to generate new players but I'm thinking of just making a copy of the GoldCoast Suns team and giving them new player IDs and changing thier team contract IDs to make them play for GWS.
That should keep me out of trouble for a while.
 
>I still cannot see PCmain.xaml (which I thought was the main all purpose page) but I can view many of the >other pages.

Mine is just blank too, I think it might just be the main blank screen that all the other UI resources are placed onto and it just isn't populated with anything yet.
 
>I still cannot see PCmain.xaml (which I thought was the main all purpose page) but I can view many of the >other pages.

Mine is just blank too, I think it might just be the main blank screen that all the other UI resources are placed onto and it just isn't populated with anything yet.

This is expected i think - PCmain.xaml contains the frames that pages get loaded into. Has been a long while since i looked at this, but if i remember righly until something gets loaded into rootFrame you wont see anything there.

Start looking in here - thats what'll get loaded on app start: Premiership Coach UI\Premiership Coach App\UIcomponents\MainMenu
 
Some great info. there guys, I'll get those changes done too.
In \Premiership Coach Game Engine\BaseLogic\C.vb I changed Public Const LEAGUE_AFL_CLUB_COUNT As Integer = 17 to 18, not sure if it's needed but made sense to me.
In \Premiership Coach Game Engine\BaseLogic\Utility.vb we need to set Public Enum AwardType for gcs and gws, not sure if the numbers matter.
I know there's code in there somewhere to generate new players but I'm thinking of just making a copy of the GoldCoast Suns team and giving them new player IDs and changing thier team contract IDs to make them play for GWS.
That should keep me out of trouble for a while.

GWS already has players on its list. Its the old 2012 ones though and some other players which are meant to be playing for other teams but for some reason are playing for GWS.
 
Wow, that's awesome. I'm sure I could be a big help to this project. My day job involves Xamarin and Entity Framework, so I'm in the .NET space quite a bit. Grenville, you might remember me from the original forums, I think I raised a lot of bugs back in the day (though it was a long time ago so who knows).

Absolutely love this game. So, is it open source to use for whatever or is it specifically so that PC2017 is made?
 
Hendo, I think as leader of this project, your main role will probably be the direction the design of the game goes, sparking up interest and prioritising features. Since it's an open source project, you'll be largely at the whim of whatever anyone wants to do and then you'll be able to decide what actually gets included, etc.

How many people here have professional programming experience?
 
Wow, that's awesome. I'm sure I could be a big help to this project. My day job involves Xamarin and Entity Framework, so I'm in the .NET space quite a bit. Grenville, you might remember me from the original forums, I think I raised a lot of bugs back in the day (though it was a long time ago so who knows).

Absolutely love this game. So, is it open source to use for whatever or is it specifically so that PC2017 is made?

I do remember you Daniel & great to see that you're interested. Thats exactly the skillset thats needed, although keep in mind this was written a long time ago, before entity framework and linq were prominent. I went through a phase where i was going to refactor the whole thing and bring in into c# & use entity framework but the level of effort vs the time i had to work on it meant i didnt get far.

My only stipulation for open source licensing would be that its not used commercially. Outside that, have at it - although it was my hope that it would lead to a community created PC2017 (or 18 more likely). I'm hoping it gets some traction and if so I'll work on it some myself. Specifically I'd like to rewrite the match simulations.

It makes sense for the community to drive the feature set & I dont plan to have any input there although I'll happily help out implementing some of them where its needed. (Free agency etc). One suggestion i do have from a performance standpoint (a lesson learned really) is that Windows doesnt deal well with many small files, so merging the XML into larger files (i.e a club an all associated players in a single file) will be more performant.
 
Here's some of my random notes, hope they make sense to someone...

In C.vb change Public Const LEAGUE_AFL_LONGTERM_INJURED_DAYS As Integer = 56 to new LTI list value in CBA doc. I think 6 weeks for next year
In Club.vb add in gcs and gws seconds sides and also staff? Public Sub ReAssessRequireStaff()
In CLub.vb Public Function CleanName(ByVal name As String) As String add gcs and gws?
In Club.vb Public Function GetShortName(ByVal name As String) As String add gcs and gws?
In CLub.vb Public Function GetColourOneHEX() As String and ColourTwo and Three for gcs and gws?
In MyProject/DataAccess/Provider.vb Private Shared Sub AddBalanceStaff(ByRef c As Club) add staff to gcs and gws?
In StaffProvider.vb there is hardcoded location for file that mayl fail s.ToXML(IsUserCoach).Save("C:\SCS\Development\Premiership Coach\Shared\tmp\" & s.SystemID & ".xml")
In LeagueRecords.vb Public Shared Function ParseClubName(ByVal name As String) As String add gc gw
in Subscriptions/NewspaperStoryGenerator.vb comment out Public Shared Sub TEMPsaveFillerXAML() to stop it from staying onscreen? and hardcoded xml.Save("C:\SCS\Development\Premiership Coach\Shared\2012 News content\Sample.xml")
In GameLogic/UIDisplay/UITeamDisplayObject.vb could be team sheet on selection screen?
In Images/Jumpers add gws jumpers
In Images/RoundedClubIcon.xaml.vb add in gws WestSydney.Opacity = 0
In Images/MainLayout_files/Calendar add gws jumper
In Premiership Coach/MyProject/Data/Base/Base2010/Clubs/Teams add gcs and gws.xmls.
In Misc/Ground.xml add in home grounds for gcs and gws
In Base add gcs and gws to StaticData.xml
In UILogic/Utility.vb add Jumpers reference for gws

UiComponents/ClubCurrent/Selection.xaml.vb is the team selection screen
UiComponents/ClubCurrent/Squad.xaml.vb is the squad screen with their ratings
UiComponents/ClubCurrent/Staffmain.xaml.vb throws up an errors
UiComponents/CurrentSeason/Ladder.xaml.vb is the ladder on the main screen
UiComponents/CurrentSeason/SeasonStatsMain.xaml.vb throws up errors
UiComponents/CurrentSeason/MainMenu/Main_menu.xaml.vb is the main screen
UiComponents/CurrentSeason/MainMenu/Main_screen2011.xaml.vb includes newspaper and ladder menus
UiComponents/CurrentSeason/Misc/DisplayAFLClubs.xaml.vb is the screen that shows the club when you click on the ladder
UiComponents/CurrentSeason/Vcard/Vcard.xaml.vb is the individual player details screen
UIResources/PCres.xaml could be where ladder text size is etc?

Good to see some more people taking interest.
 
Thanks, netslave. I'll have a look at that when I get a chance.

I spent part of yesterday trying to fix the crash when clicking on the Staff button. I couldn't fix it in the end but I did have some luck with removing some chunks of code so that the page could at least (partially) render. When I get some more time, I'll try to isolate the problem.
 

Remove this Banner Ad

Back
Top