Jump to content

Adding a hyperlink to a scout


Tyburn
 Share

Recommended Posts

This may have been asked before, but I can't find any info on it.

I'm pretty sure, when looking at a player that's been/being scouted, in previous FM's, the scout mentioned as being the last to scout, or currently being scouted by, used to have a link on his name to take you to his profile. This now seems to be missing in FM21.

I'm mainly talking about in the report tab of a player not at the club. Either the overview page or the scout report page. Where the last scout is named.

What is the code needed to add a link to the scout in question?

Thanks.

Link to post
Share on other sites

I'm still having difficulty finding an elegant solution for the coach report panel, for a scout/coach hyperlink to not make the knowledge bar disappear. My understanding of layout is limited and so far my tinkering with the code manages to have the report widget viewable OR the knowledge widget viewable, but not BOTH as intended (when I change the widget class from label to link_text for the scout/coach).

This is the code in the panel. If someone could advise as to what I can change to make this work I'd be very grateful. Thanks.

Spoiler

    <container id="lll">
            <attachment_group class="horizontal_arrange_autosize_all_centre" horizontal_alignment="left" horizontal_offset="0" horizontal_gap="10" vertical_offset="0" />

            <widget class="label" id="perl" size="large" colour="contrast" auto_size="all" font="title">
                <translation id="text" translation_id="248079" type="use" value="Report" />
            </widget>

            <widget class="label" id="lsdt" auto_size="all"/>
        </container>

        <container>
            <attachment_group class="horizontal_arrange_vertical_autosize_centre" horizontal_alignment="right" horizontal_offset="0" horizontal_gap="8" vertical_offset="0" />

            <container class="inner_subtle_box" id="klba" appearance="boxes/custom/scouting knowledge/paper" width="55" height="12">
                <layout class="centre_in_parent_attachment" alignment="vertical" offset="0" apply_to_children="true" />
                <layout class="stick_to_sides_attachment" alignment="horizontal" apply_to_children="true" inset="0" />
                <global id="hidden" name="is_fmt"/>

                <widget class="horizontal_percentage_bar" height="4" maximum_value="100" bar_value_colour="knowledge level" show_label_on_bar="false" label_width="0" appearance="charts/bar/custom/knowledge" id="kbar" />

            </container>

            <widget class="label" id="ktxt" auto_size="all" size="11" />

            <widget class="button" id="ytab" auto_size="all" mouse_entered_event="ytin" mouse_exited_event="ytou" />


        </container>

 

Link to post
Share on other sites

That code doesn't seem to play nice when you change it from a label to link_text (It looks like the link_text class has some hard-coded alignment/layout code that seems to override the settings from the file. quite possibly why it was changed for FM21).

If you don't care about the positioning you can get the link and knowledge by moving the knowledge code into the top container above the last scouted by [X] bit like so:

 

<container id="lll">
  <attachment_group class="horizontal_arrange_autosize_all_centre" horizontal_alignment="left" horizontal_offset="0" horizontal_gap="10" vertical_offset="0" />

  <widget class="label" id="perl" size="large" colour="contrast" auto_size="all" font="title">
    <translation id="text" translation_id="248079" type="use" value="Report" />
  </widget>

  <container class="inner_subtle_box" id="klba" appearance="boxes/custom/scouting knowledge/paper" width="55" height="12">
    <layout class="centre_in_parent_attachment" alignment="vertical" offset="0" apply_to_children="true" />
    <layout class="stick_to_sides_attachment" alignment="horizontal" apply_to_children="true" inset="0" />
    <global id="hidden" name="is_fmt"/>

    <widget class="horizontal_percentage_bar" height="4" maximum_value="100" bar_value_colour="knowledge level" show_label_on_bar="false" label_width="0" appearance="charts/bar/custom/knowledge" id="kbar" />

  </container>

  <widget class="label" id="ktxt" auto_size="all" size="11" />

  <widget class="button" id="ytab" auto_size="all" mouse_entered_event="ytin" mouse_exited_event="ytou" />

  <widget class="link_text" id="lsdt" auto_size="all" />

</container>

Then delete the bottom now empty container.

(For search purposes it's the Player - Reports - Coach Reports and Player - Reports - Overview screens, controlled by the player coach reports xml file located in the panels\player folder extracted from the panels fmf file).

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...