Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix regen ids with r- #189

Closed
wants to merge 1 commit into from

Conversation

Qinusty
Copy link

@Qinusty Qinusty commented Dec 1, 2023

Aims to resolve #186 by prefixing player ids during the writing of portrait records

@trav164
Copy link

trav164 commented Dec 1, 2023

Just about to do this :)

@@ -77,7 +77,7 @@ def write_xml(self, data):
xml_string = []

for dat in data:
xml_string.append("<record from=\"{}\" to=\"graphics/pictures/person/{}/portrait\"/>".format(dat[1]+"/"+dat[2], dat[0]))
xml_string.append("<record from=\"{}\" to=\"graphics/pictures/person/r-{}/portrait\"/>".format(dat[1]+"/"+dat[2], dat[0]))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine we'd want the tool to be backward compatible, and I think the r- stuff is only for FM24. Maybe worth having a conditional here for FM24? Not sure if we have a way to detect which version of FM we're working with... perhaps looking for 2024 in the graphics path?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cant really detect it automatically.

Copy link

@trav164 trav164 Dec 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cant really detect it automatically.

Surely you can read the image directory passed in by the faces?

Here's mine: D:\Files\Sports Interactive\Football Manager 2024\graphics\FMUGens MEGAPACK/

And just search the string for "Football Manager 2024"

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many players use custom location for their FM user folder.

@Maradonna90
Copy link
Owner

Maradonna90 commented Dec 3, 2023

real question is if we have to change something in the xmlparser.py class when we read in the data from the current config file for the preserve function. Anyone has tested that?

otherwise the proposed change looks good to me.

@filipebarros
Copy link
Contributor

One way would be to add a checkbox with the version of FM the user is playing (FM 24 would prepend the r- and other versions would not

@Qinusty
Copy link
Author

Qinusty commented Dec 7, 2023

real question is if we have to change something in the xmlparser.py class when we read in the data from the current config file for the preserve function. Anyone has tested that?

The parse xml regex will pull the id without the r- prefix and the writer should drop the prefix in on write.

I can't actually successfully build the project as I get a variety of issues building with briefcase on my system. Through windows I get the following when trying briefcase dev.

TypeError: No method matches given arguments for Font..ctor: (<class 'int'>, <class 'System.Drawing.FontStyle'>)

For building for windows, I get a bunch of

TypeError: Command.__init__() got an unexpected keyword argument 'label'

and such when trying to run. I assume there are some python version requirements and/or deps incorrectly versioned?

@Maradonna90
Copy link
Owner

real question is if we have to change something in the xmlparser.py class when we read in the data from the current config file for the preserve function. Anyone has tested that?

The parse xml regex will pull the id without the r- prefix and the writer should drop the prefix in on write.
that would be perfect.

I can't actually successfully build the project as I get a variety of issues building with briefcase on my system. Through windows I get the following when trying briefcase dev.

TypeError: No method matches given arguments for Font..ctor: (<class 'int'>, <class 'System.Drawing.FontStyle'>)

For building for windows, I get a bunch of

TypeError: Command.__init__() got an unexpected keyword argument 'label'

and such when trying to run. I assume there are some python version requirements and/or deps incorrectly versioned?

you need to pull the current master branch into your fork.

and use this version for your local installation

python -m pip install beeware==0.3.0.dev3 toga==0.3.0.dev19
python -m pip install dhooks

but if you're certain this works I can build a version and give it some people for testing.

let me know.

@Maradonna90
Copy link
Owner

incorporated in different PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regens got the ids changed with Patch 24.2.0
5 participants