Jump to content

Show player face on goal popup - match caption panel small.xml ?


Recommended Posts

Very strange thing for them to take out - has anyone managed to get it back yet? I'm pretty sure I got the right panel file from the resource archiver (match caption panel small.xml, match caption panel.xml looks like it's just VAR this year), but the "best" I could do was show the comp icon twice instead of just blank space. I copy-pasted someone's code from the faces on the bench thread but I can't get it to call on the player UID instead of the comp.

image.png.741704153f9c32b6815ef37f42c169b6.png

Edited by Ruh Roh
Link to post
Share on other sites

Would also be interested in this - sounds like you've taken same steps as I would (trying to borrow the code to show player face) - mind sharing the file where you've got to for the above and I'll take a look as well and see if i can spot anything between panels too? Hopefully one of the more experienced Skinners can help point to the fix in the code for it!

Link to post
Share on other sites
  • 2 weeks later...

I am currently looking to add this to my skin also. Anyone know how to do this? I have borrowed this code:

Spoiler

        <!-- Player picture -->
                <widget class="object_portrait_picture" id="pict" scale_picture="true" image_alignment="left, bottom">
                    <layout class="stick_to_sides_attachment" alignment="vertical" inset="0"/>
                    <layout class="stick_to_sides_attachment" alignment="horizontal" inset="0"/>

                    <record id="object_property">
                        <integer id="get_property" value="objt"/>
                        <integer id="set_property" value="objt"/>
                    </record>
                </widget>

But I am unsure of where to put it in match caption panel small.xml, or indeed, if the code will work as intended.

Thanks.

Edited by Tyburn
Link to post
Share on other sites
8 hours ago, Tyburn said:

I am currently looking to add this to my skin also. Anyone know how to do this? I have borrowed this code:

  Hide contents

        <!-- Player picture -->
                <widget class="object_portrait_picture" id="pict" scale_picture="true" image_alignment="left, bottom">
                    <layout class="stick_to_sides_attachment" alignment="vertical" inset="0"/>
                    <layout class="stick_to_sides_attachment" alignment="horizontal" inset="0"/>

                    <record id="object_property">
                        <integer id="get_property" value="objt"/>
                        <integer id="set_property" value="objt"/>
                    </record>
                </widget>

But I am unsure of where to put it in match caption panel small.xml, or indeed, if the code will work as intended.

Thanks.

@Ruh Roh - is this what you'd already tried? If you can share the panel for where you've got to with the Comp logo appearing might be one that can be tweaked/fixed with the above?

Link to post
Share on other sites

The fact a logo appears to be able to be added makes me believe that adding player pictures to the in match pop ups (goal scorers/yellow cards etc) must be possible.

Is there really no one who knows how to do this? Would be such a great little immersion feature. I’m happy to play around with different code. I just need to know where to put it.

Thanks.

Link to post
Share on other sites

I have managed to get the file to the same point as @Ruh Roh seemed to. The added code is around half way down and labelled <!Player Picture>. I haven't had enough time to play around fully with it and as such it is showing the league/comp logo on the right of the pop up. I have mashed code from all over the place, and it works, bar it searching for logos instead of player faces.

Perhaps someone could have a look at the file and point us in the right direction for getting player faces to show. Otherwise I'll take more of a look at it again soon.

match caption panel small.xml

Edited by Tyburn
Link to post
Share on other sites

So playing around for a little bit I’m really confused. I don’t understand the entity_id. I don’t think it’s needed in the player picture block (as I’ve had the comp logo pop up without it) However it must be doing something. The entity_id that’s in the code posted was my own. I just picked a random number that wasn’t used in the list of codes at the start of the file. Perhaps finding the correct entity_id for player pics is what’s needed, and then to register it at the start.

Basically I’ve found that trying to add any image (kits, player pics) to this file doesn’t seem to work, if it’s not already registered. I’ve managed to get the club logo to show on the right of the top bar (container) on the pop up for example, and of course the comp logo ... as these seem to already be registered to the file. 

So my guess is that we need to register an entity_id for player pics, as any (and all) other instances of player pic code I’ve pulled from various other sources, on it’s own, as is, doesn’t work. As above, I’ve also tried kit code, to no avail.

If someone more knowledgeable, perhaps a moderator ;) could assist, it would be much appreciated.

Thanks.

Edited by Tyburn
Link to post
Share on other sites
2 hours ago, Tyburn said:

So playing around for a little bit I’m really confused. I don’t understand the entity_id. I don’t think it’s needed in the player picture block (as I’ve had the comp logo pop up without it) However it must be doing something. The entity_id that’s in the code posted was my own. I just picked a random number that wasn’t used in the list of codes at the start of the file. Perhaps finding the correct entity_id for player pics is what’s needed, and then to register it at the start.

Basically I’ve found that trying to add any image (kits, player pics) to this file doesn’t seem to work, if it’s not already registered. I’ve managed to get the club logo to show on the right of the top bar (container) on the pop up for example, and of course the comp logo ... as these seem to already be registered to the file. 

So my guess is that we need to register an entity_id for player pics, as any (and all) other instances of player pic code I’ve pulled from various other sources, on it’s own, as is, doesn’t work. As above, I’ve also tried kit code, to no avail.

If someone more knowledgeable, perhaps a moderator ;) could assist, it would be much appreciated.

Thanks.

This is massively further than I could get to. I guess its because its dynamic to the player who's scored - is there anything in the code for where the game/panel gets the player name from that could be translated/help with pulling the same reference but for player image? Not sure if i've explained it coherently but hopefully you get what I mean! 

Link to post
Share on other sites
1 minute ago, giglet13 said:

This is massively further than I could get to. I guess its because its dynamic to the player who's scored - is there anything in the code for where the game/panel gets the player name from that could be translated/help with pulling the same reference but for player image? Not sure if i've explained it coherently but hopefully you get what I mean! 

That’s a good shout. Will look at that piece of code when I next can ... unless someone else can beat me to it and lend a hand? ;)  ;) 

Link to post
Share on other sites
4 minutes ago, Tyburn said:

That’s a good shout. Will look at that piece of code when I next can ... unless someone else can beat me to it and lend a hand? ;)  ;) 

At work so can't do much in terms of with the game itself ,but  looking at the file - this is the line for player name - so guesses from here (again anyone who can tell me better!)

<widget class="text" entity_layout_id="at00" alignment="centre_y,left" id="PlTx">

Entity id is for the goalscorer / player so this can remain? Essentially its saying which entity to provide the text for and where to put it as I understand it.

Widget class needs to change acorss to image/picture, but then the id 'PiTx' is the final thing that needs to change to reference the players face instead?  The rest of the code then is where it appears, animation and text formatting

Link to post
Share on other sites

Yep. Just looked at it now too. I think you’re right. Good place to start. Will look into it when I can. If you’re up for playing around too @giglet13 when you can, maybe we can get this working!

Link to post
Share on other sites

So i've started by editing the entity ID where you'd placed the player picture code to at00 matching the text for goalscorer entity - but this just gets me:

1686476525_ScreenShot2021-01-12at19_08_19.png.8baecc6f8c768b5001f62c87dbfa5e30.png

So wondered if the 'ID' (currently listed as Pict) needed to refer to something else - note the name for scorer refers to id PlTx , any idea where those ID's are listed to navigate the equivalent id Pl... Pic? Pc? Lg? Icn? etc. - I've tried to borrow from the tactic overview  and Dynamics (player hierarchy) panel where there is the ID 'prop'  but this gets me...

1395842861_ScreenShot2021-01-12at18_55_18.png.dae31f5fd26c35249b732d0997a07a1e.png

So then found in the Player Portrait  and description widget this line;

<container class="object_portrait_picture" entity_layout_id="at01" id="port" width="50" name="person pic"> 

So borrowed port for id and at01 for entity layout. This though again... just gave me:

180997207_ScreenShot2021-01-12at19_16_50.png.9118d6f2ebef50fd4b62f9bb4c96a65a.png

I've cleared cache and reloaded skin each time before anyone suggests :)

So i'm struggling for options here (largely because I'm chopping an changing and guessing to see if anything works) - if anyone with more experience knows how the entity id and id's work (and if thats the way to fix this?) or in general can have a crack at it with their knowledge of skinning that'd be gratefully received. 

Link to post
Share on other sites
10 minutes ago, giglet13 said:

So i've started by editing the entity ID where you'd placed the player picture code to at00 matching the text for goalscorer entity - but this just gets me:

1686476525_ScreenShot2021-01-12at19_08_19.png.8baecc6f8c768b5001f62c87dbfa5e30.png

So wondered if the 'ID' (currently listed as Pict) needed to refer to something else - note the name for scorer refers to id PlTx , any idea where those ID's are listed to navigate the equivalent id Pl... Pic? Pc? Lg? Icn? etc. - I've tried to borrow from the tactic overview  and Dynamics (player hierarchy) panel where there is the ID 'prop'  but this gets me...

1395842861_ScreenShot2021-01-12at18_55_18.png.dae31f5fd26c35249b732d0997a07a1e.png

So then found in the Player Portrait  and description widget this line;

<container class="object_portrait_picture" entity_layout_id="at01" id="port" width="50" name="person pic"> 

So borrowed port for id and at01 for entity layout. This though again... just gave me:

180997207_ScreenShot2021-01-12at19_16_50.png.9118d6f2ebef50fd4b62f9bb4c96a65a.png

I've cleared cache and reloaded skin each time before anyone suggests :)

So i'm struggling for options here (largely because I'm chopping an changing and guessing to see if anything works) - if anyone with more experience knows how the entity id and id's work (and if thats the way to fix this?) or in general can have a crack at it with their knowledge of skinning that'd be gratefully received. 

Did also just try using the PlTx and at00 code from goalscorer code above and this gave me...

 956992247_ScreenShot2021-01-12at19_28_10.png.dc8faab9d35d66ce4b93fa591bc84b95.png

(no Troy isnt at Chelsea)

So idea was add an Entity ID to the document at the top, just used at0z for a placeholder, revert to your original code @Tyburn and simply use that as a new entity ID (perhaps they each identify a unique entity to be added - so when using any other it just goes back to its first reference?)  but guess what that gives me?

327505855_ScreenShot2021-01-12at19_38_48.png.c5a10b0fa0f6f28904beb01849ff1b9e.png

Link to post
Share on other sites

Bah. You’ve tried a lot man!

I’ve noticed some very experienced skinners come and go whilst looking at this thread and it has me confused. Either they don’t care, they think we can work it out ourselves, or, more worryingly, think it can’t be done.

Just some advice from one of you guys would be really appreciated.

Thanks.

 

Link to post
Share on other sites
12 minutes ago, Tyburn said:

Bah. You’ve tried a lot man!

I’ve noticed some very experienced skinners come and go whilst looking at this thread and it has me confused. Either they don’t care, they think we can work it out ourselves, or, more worryingly, think it can’t be done.

Just some advice from one of you guys would be really appreciated.

Thanks.

 

Agree - even if one of the experienced guys could let me know not to waste my time if its hardcoded! :)

Link to post
Share on other sites

Can’t test this atm, but my next idea would be to change the comp logo code id from “ComP” to something that might work for player pics. So “pict” or “prod” etc to see what that did. Also to try changing the widget class to one of the other player pic ID’s found around the game in what is the current comp logo code.

Clutching at straws I guess ...

Edited by Tyburn
Link to post
Share on other sites
1 hour ago, Tyburn said:

Bah. You’ve tried a lot man!

I’ve noticed some very experienced skinners come and go whilst looking at this thread and it has me confused. Either they don’t care, they think we can work it out ourselves, or, more worryingly, think it can’t be done.

Just some advice from one of you guys would be really appreciated.

Thanks.

 

Mostly this for me tbh. Regardless

the entitys at the top aren't relevant, they won't do anything. If you delete them all then the file will load the exact same, I'm just presuming SI use an external programs to create code for particularly picky panels. You're wasting your time with that.

Gave it a quick look, don't think its possible tbh. The same code that is used to load player faces loads comp logos.

Link to post
Share on other sites
14 minutes ago, bluestillidie00 said:

Mostly this for me tbh. Regardless

the entitys at the top aren't relevant, they won't do anything. If you delete them all then the file will load the exact same, I'm just presuming SI use an external programs to create code for particularly picky panels. You're wasting your time with that.

Gave it a quick look, don't think its possible tbh. The same code that is used to load player faces loads comp logos.

Thanks for responding.

Can we not delete the comp logo bit (change it) so it shows player pics? Personally I’d be ok with losing the comp logo if we could get player pics instead.

The code to load player pictures works elsewhere (obviously) in the game code, and doesn’t load comp pics. So why does it here, in this code? What part of the code makes logos take precedence?

For my understanding and knowledge, if you don’t mind.

Edited by Tyburn
Link to post
Share on other sites
12 minutes ago, Tyburn said:

Ha. Not just you mate ;)

Thanks for responding.

Can we not delete the comp logo bit (change it) so it shows player pics? Personally I’d be ok with losing the comp logo if we could get player pics instead.
 

The code to load player pictures works elsewhere (obviously) in the game code, and doesn’t load comp pics. So why does it here, in this code? 

For my understanding and knowledge, if you don’t mind.

no. so the game has predefined things that show on certain screens. for example there's no use in loading match stuff on a player overview panel. its a similar premise, they don't need the player face on the caption, so the game isn't set to load it in. @michaeltmurrayukis far more knowledgeable than me with stuff like this so when hes on next maybe he can have a look.

Link to post
Share on other sites
4 minutes ago, majesticeternity said:

is there code from FM20 to copy from?

It's not the coding that is the issue here, please read through "bluestillidie00"'s comments. There are areas in the games/panels that simply don't allow certain code to be input (kits on manager overview, pitches on certain (inbox)panels) and it appears no code works here either. Several people have input numerous coding options and "face coding" only gives an icon.

Link to post
Share on other sites
27 minutes ago, a31632 said:

It's not the coding that is the issue here, please read through "bluestillidie00"'s comments. There are areas in the games/panels that simply don't allow certain code to be input (kits on manager overview, pitches on certain (inbox)panels) and it appears no code works here either. Several people have input numerous coding options and "face coding" only gives an icon.

ok

Link to post
Share on other sites

Every year I seem to always pick something to change that can’t be done. I don’t believe it’s ever totally illogical. Having player faces appear on the goal scorer card seems totally reasonable to me. Immersive even.

Oh well. Perhaps I should ask for a feature request. Or rather a feature that used to be in the game, that now seems, inexplicably, removed, to be considered for reinstatement.

Link to post
Share on other sites
8 hours ago, Tyburn said:

Every year I seem to always pick something to change that can’t be done. I don’t believe it’s ever totally illogical. Having player faces appear on the goal scorer card seems totally reasonable to me. Immersive even.

Oh well. Perhaps I should ask for a feature request. Or rather a feature that used to be in the game, that now seems, inexplicably, removed, to be considered for reinstatement.

it’s not that black and white. maybe that had it in but it was buggy and wasn’t fixable in time for release, maybe they couldn’t find a design where it looked old and since they don’t owe skinners a thing, took the code out. i can almost guarantee it wasn’t removed for the sake of it or to spite anyone. it’s just how UI design and game development goes. 

Link to post
Share on other sites
28 minutes ago, bluestillidie00 said:

it’s not that black and white. maybe that had it in but it was buggy and wasn’t fixable in time for release, maybe they couldn’t find a design where it looked old and since they don’t owe skinners a thing, took the code out. i can almost guarantee it wasn’t removed for the sake of it or to spite anyone. it’s just how UI design and game development goes. 

Completely get it , always feels painful though when it’s something that’s removed (and hard coded not to be amendable/game prevents it being amendable) - more so than something added you don’t like necessarily. 
 

But again, I don’t know enough on game development if that comment in itself is madness too! 

Link to post
Share on other sites

In basic terms the game has two layers - the xml layer that we have access to and can edit is just basically the graphical layer and tells the game where to place stuff on the screen, you then have the underlying game code (C++ or C#) which generates of the stuff.

Some screens and some items have a set id which is used to call them and can be displayed on various screens (which you can generally grab from the various properties files), whilst other things are tied to one screen and other screens use generic ids which means they are called by the game code rather than the xml files.

As for why different screens act in different ways not exactly sure, but most likely it's due to the complexity of the code - for example the players screens are only used to display player stuff so it's reasonable for most of the player ids to work across the different player screens, but the match screen calls a lot more info - take the team colours on most screens you just need to call the primary/secondary colour and it'll show the team colours, but the match screens has your team, the opposition team and the comp colours hence the normal code doesn't work there.

 

For the Match Caption file have you tried looking at the code from FM20 as the mugshot code is different it just uses the picture widget class with the id of PerP so you can try them, the fact you got the extra comp logo to show up is a good sign you just need to experiment with the ids to hope that you find one that might work.

If changing the id from Pic to PerP doesn't work then have at look at the other ids in the file, if there is a pattern to the other ids you may be able to work our the id format the game likes on that panel.

Also note the id and entity_layout_id are two different things - the id is used to call some game data, whilst the entity id is more like the container id where the game just generally wants a unique id to place your item.

Link to post
Share on other sites

So I’ve now done a fair amount of further testing with this and I can still only get either the team logo to show “TeaB” or the competition logo.

When changing the class to “picture”, or anything other than “object_portrait_picture”, no matter what ID I have used “lPer”, “PerP”, “Prop”, “port”, “pict” I just get the default blank space on the right hand side.

If I use “object_portrait_picture” then all ID’s bar “TeaB” will show the competition logo, while “TeaB” will show the team logo. So basically I can only get it to show images that the file already knows.

Had a good look at the file “match caption panel” from FM20 (where I plucked out the ID “lPer”) but no other ID jumped out at me.

Any other ID’s I could try? Why is it not showing anything with the picture class? There is other code in the FM21 file “Match caption panel small” that uses it (mainly icons I believe) although they all seem to point to a specific file, where a player face would be ‘as and when’ and not specific.

Thanks for any further help.

Edited by Tyburn
Link to post
Share on other sites

Looks like the player is now using the PlTx id so you can try that, or something like PlPx.

Another option is to copy over the file from FM20 (and rename it to match the changed file for FM21) and see if that still works, if the face doesn't show up using the old file then most likely it isn't possible, especially as it's a new file so may not be linked to the old code.

Link to post
Share on other sites
1 minute ago, michaeltmurrayuk said:

Looks like the player is now using the PlTx id so you can try that, or something like PlPx.

Another option is to copy over the file from FM20 (and rename it to match the changed file for FM21) and see if that still works, if the face doesn't show up using the old file then most likely it isn't possible, especially as it's a new file so may not be linked to the old code.

First thing i tried yesterday. (ignore the stats, set myself up to get battered to get as much access to the caption panel as possible 😂)

20210112211441_1.thumb.jpg.725e0e8ae1c3282010ebbeed227b8c9b.jpg

Link to post
Share on other sites

Tried all the latest ideas. The ID’s still call the comp logo (or nothing if the class is “picture”) and moving the “match caption panel” as is from fm20 into the match folder, in the base21dark skin I am using, turned the whole screen a very messy blue when a goal was scored (as image above from bluestillidie00 - but the whole screen).

I’m starting to imagine this might be the end of the line ...

Edited by Tyburn
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...