pcsx2
pcsx2 copied to clipboard
[Feature Request]: General commentary lines for patch files
Description
Hello! Currently the patch files need per-code commentary lines so they may show in the user interface, such as this:
And then this will look like this in the interface:
But there may be some games with only one author for the patches, so instead of adding an "author" line for every code in the file we could just put it in the beginning of the file, something like this:
And then these loose commentary lines would show in the head of the patch interface or, if it's too complicated to implement it like this, they could be applied below every code in the file. My idea is that this could also work for the "comment" and "description" lines, even though a generic "description" could be rare to find in a patch collection.
PS: interestingly a loose "author" line in the beginning of the patch file is already recognized in the graphical interface, but it is applied just for the first code.
Reason
- Useful for patch files with just one author, comment or description to avoid repetition in every code.
- Easier to create patch files with just one author, or with the same comment and/or description.
- In the situation the program finds both loose and specific commentary lines for codes, the specific commentary lines would show in the interface for those codes instead.
Examples
Examples are provided above.
Finally, perhaps we could italicize the "Author: Unknown" information in the interface to avoid any misunderstandings in relation to "Unknown" being a username for the author of the code, such as we have here:
An then we could likewise italicize the "No description provided." information when the description line is not present in the file.
Anyway, these are just some ideas I had when adapting some old patches for the new patch system. I'm not sure if anyone would be interested in them though.
Thank you so much for your time and work.
I don't really want comments for every patch line showing in the interface, you're just going to be overloading the user with information they have no interest in knowing. Users want to know what the patch does, the end goal, not what each individual line achieves.
if you want to comment the patch for others looking at the patch file, you can put a comment on the end of the line like
patch=1,ee,01234567,extended,12345678 // This part does a thing
if you want to comment the patch for others looking at the patch file, you can put a comment on the end of the line like
patch=1,ee,01234567,extended,12345678 // This part does a thing
Thank you for your reply. I understand your point and I agree with you. But I'm not sure if this is related to my request. The comment I mentioned in my original post is the one that may go right before the codes, such as this:
It is generally used as a synonym for "description" in some patches as far as I've noticed.
By the way, if you have both "comment" and "description" lines for a code, only "description" will show in the interface. The comment line is ignored. I'm not sure if this is intended. I followed the pnach 2.0 tutorial in PCSX2 forum here: https://forums.pcsx2.net/Thread-Sticky-Important-Patching-Notes-1-7-4546-Pnach-2-0
Perhaps this conflict should be resolved or at least mentioned in the tutorial. Most of the old patches use a "comment" line instead of a "description" one.
Thank you so much again for your time and work.
description was intended to replace comment, but comment was kept around for legacy compatibility purposes, they weren't intended to be separate.
I think they're giving comment
just as an example.
I don't think they want to have comments for every patch line, but for every patch group.
It seems like they want an option to set an author
once at the top of the file and have it auto-fill for the rest of the patches, and suggested it could also be done for comment
or description
.
Not sure I'm too keen on the idea for a few reasons, but in particular if someone copies just one patch group, all context and attribution is gone if they don't include the info at the top.
It seems best to just copy your author
and description
or comment
for each IMO.
having the having a global description which applies to every patch doesn't make much sense, also having the author at the top is very unlikely to be true for us, since we bundle patches and the files are normally a compilation of no interlace, widescreen and QoL patches which have come all from different authors. What if one of the authors forgets to put their name in, do we attribute somebody else to it with a global author?
I don't think having global stuff (to that patch file) is a good idea, honestly.
if someone copies just one patch group, all context and attribution is gone if they don't include the info at the top. It seems best to just copy your
author
anddescription
orcomment
for each IMO.
Thank you for your reply. I understand your point. My request would be useful for users creating their own patch files mostly provided by just one author, which happens with a bunch of titles.
What if one of the authors forgets to put their name in, do we attribute somebody else to it with a global author?
I understand your concern. My idea is that this rule would apply only for the patches provided by the user, not the ones embedded in the program. I'm not sure if this is possible in the current patch interface though.
Anyway, if it's too complicated just leave as it is. Maybe you could at least consider the following minor changes reported above:
- a loose "author" line in the beginning of the patch file is recognized in the graphical interface as a line for the first code, which wasn't supposed to happen, in my understanding.
- italicize "Author: Unknown" (or just "Unknown") information in the interface when no author is provided to avoid any misunderstandings in relation to "Unknown" being a possible username for an author, and do the same for "No description provided." to standardize the text formatting.
- Include an observation in the pnach creation tutorial that "comment" lines work as "description" lines in the new system.
Thank you again for your time and work.
PS: you can use he/his/him pronouns to refer to me with no problem.
I think they're giving
comment
just as an example. I don't think they want to have comments for every patch line, but for every patch group. It seems like they want an option to set anauthor
once at the top of the file and have it auto-fill for the rest of the patches, and suggested it could also be done forcomment
ordescription
.
I actually came across this issue a few weeks ago when i ported the Growlanser 5 / 6 cheats to the new pnach format. Very annoying that i had to copy and paste the same text (author=
) over and over:
https://github.com/Risae/Growlanser-6-English-Translation/blob/main/tools/GL5%20and%206%20PCSX2%20Cheats/818169A6-%20Growlanser%20V%20-%20Heritage%20of%20War%20SLUS-21571.pnach
An easier way to do this would be greatly appreciated.
I actually came across this issue a few weeks ago when i ported the Growlanser 5 / 6 cheats to the new pnach format. Very annoying that i had to copy and paste the same text (
author=
) over and over:
Thank you for your support. I took a look at your patch file and noticed you have 1 code from an author and 32 from another author. I think my idea would also work for your case because I have defined the following rule:
- In the situation the program finds both loose and specific commentary lines for codes, the specific commentary lines would show in the interface for those codes instead.
So for the very code with a different author in your file you could insert the specific commentary lines and they would show in the interface instead, while all the other 32 codes would take the commentary lines loosely inserted in the beginning of the file.
I'm using the term "commentary lines" but I'm not sure if this is the appropriate programming jargon for this case. Maybe "attribute lines"?
Anyway, thank you again for your reply.
@dezraj if a patch has more than one author , just mention all the at authors in the author space?
@dezraj if a patch has more than one author , just mention all the at authors in the author space?
Hello! I'm not sure if I understood your suggestion correctly. You mean an "authors" line (in the plural) in the patch file? I don't think this attribute is recognized by the program.
Could you take a look at Risae's patch file linked above and use it to describe your suggestion?
Thank you for your reply.
I actually came across this issue a few weeks ago when i ported the Growlanser 5 / 6 cheats to the new pnach format. Very annoying that i had to copy and paste the same text (
author=
) over and over:Thank you for your support. I took a look at your patch file and noticed you have 1 code from an author and 32 from another author. I think my idea would also work for your case because I have defined the following rule:
- In the situation the program finds both loose and specific commentary lines for codes, the specific commentary lines would show in the interface for those codes instead.
So for the very code with a different author in your file you could insert the specific commentary lines and they would show in the interface instead, while all the other 32 codes would take the commentary lines loosely inserted in the beginning of the file.
I'm using the term "commentary lines" but I'm not sure if this is the appropriate programming jargon for this case. Maybe "attribute lines"?
Anyway, thank you again for your reply.
A solution to this would be to use some kind of yaml syntax. Here's an example of AWS CloudFormation, which creates a Security Group that has the property GroupDescription
and a bunch of SecurityGroupIngress
under it:
SecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: Security Group to test ping
VpcId: !Ref VPC
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: 22
ToPort: 22
CidrIp: 10.0.0.0/24
- IpProtocol: icmp
FromPort: 8
ToPort: -1
CidrIp: 10.0.0.0/24
The gamedb already uses yaml, example: https://github.com/PCSX2/pcsx2/blob/master/pcsx2/Docs/GameIndex.md
Not sure if the PCSX2 devs want to port pnach/patch files to yaml - i don't believe that is easy to accomplish.
I don't want to completely rewrite how patches work as that will destroy the backwards compatibility, it's too well established of a system to go changing it drastically now.
PNACH 2.0 was a compromise upgrade without breaking old patches.
It also isn't really possible with the way patches work internally. We enumerate patches from all files and store them in a list, there's no association between the actual file that the patch was stored in, and the patch data itself. That's how, for example, both built-in batches will show and co-exist with on-disk patches.
+1 to what refraction said, it would require a significant refactor, for arguably little benefit. Instead, you could combine multiple patches into one group, this way the user has fewer options to toggle in the first place. The patch UI wasn't intended to have hundreds of checkboxes anyway, that's more a thing for cheats.