Jump to content

[HELP!] Conditional picture based on text string


GIMN
 Share

Recommended Posts

Good afternoon you lovely people,

I have an idea.  An idea for which I lack the skill to achieve, and so I call upon you, the wonderful Skinning Hideout, to ail me of my troubles.

I would like to incorporate value_based_pictures or custom classes into my staff profile to show something specific based on a text string.  For example, if the staff member prefers a "Balanced" mentality, I would like an image that represents that, but a different image should their preference be "Attacking" or "Cautious".  See image below for reference.

image.thumb.png.25722f8eed7a2b671e58f71eb8f265d7.png

In the past I've had joy with manipulating numerical values, but none whatsoever with text strings.  Has anyone had any luck either converting certain strings into numerical database values, or creating rules based on specific text values?

Or...maybe you haven't ever tried before, but you've got an idea that might work!?  Any help would be appreciated!

Link to post
Share on other sites

I have previously used a text based class to tell me what the numerical database value is.

For the text based class:

           <class class="textstringnum" parent="text" multiline="true" font="text" autosize="all" alignment="left" appearance=""/>

If you then call this class as a widget it will show you the text number string.

            <widget class="textstringnum" alignment="left,multiline" auto_size="vertical">
                            <record id="object_property" get_property="nppm" />
            </widget>

Hope this is helpful and works for you!

Link to post
Share on other sites

3 hours ago, johnwalker said:

I have previously used a text based class to tell me what the numerical database value is.

For the text based class:

           <class class="textstringnum" parent="text" multiline="true" font="text" autosize="all" alignment="left" appearance=""/>

If you then call this class as a widget it will show you the text number string.

            <widget class="textstringnum" alignment="left,multiline" auto_size="vertical">
                            <record id="object_property" get_property="nppm" />
            </widget>

Hope this is helpful and works for you!

That's fantastic, thank you.  Now to build a table of all the possible entries!!

Link to post
Share on other sites

With that in mind, these are my findings, for anyone for which this will be useful.  It is worth noting that I have put the boundaries so they overlap (1-5 is probably 1-4.9999999, but whole numbers are cleaner):

TACTICAL PREFERENCES
   
MENTALITY
Value Label
1 - 5 Very Cautious
5 - 8 Cautious
8 - 13 Balanced
13 - 15 Adventurous
15 - 20 Attacking
   
PRESSING STYLE
Value Label
1 - 7 Less Often
7 - 14 Balanced
14 - 20 More Often
   
MARKING STYLE
Value Label
1 - 7 Zonal
7 - 14 Mixed
14 - 20 Man

SET PIECES
   
DELIVERY
Value Label
0 Inswinging
1 Outswinging
   
DEFENDING POSTS
Value Label
0 Neither Post
1 Near Post
2 Both Posts
   
AIM FOR
Value Label
0 Near Post
1 Central
2 Far Post
   
DEFENSIVE MARKING
Value Label
0 Zonal
1 Balanced
2 Tight
   
ATTACKING NUMBERS
Value Label
0 Defend Transition
1 Balanced
2 Attack the Box
   
DEFENSIVE NUMBERS
Value Label
0 Defend the Box
1 Balanced
2 Counter Attack
   
DEFENSIVE LINE
Value Label
0 High Line
1 Balanced
2 Defend the Box
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...