Ability/Attribute thingy - how to check through scripting

Ok, I’m going crazy at the moment since this should be simple, but now my knowledge in english words is lacking (I know what this is called in my native language and the translation of D&D). :tired_face:

I want a script that checks, throws a dice, the attribute/ability (or what it’s called) - The Dexterity - of a character. I would want to throw a dice, take into account the dexterity of the player (or companion), set a difficulty, and see if the player/character succeeds. Do you get what I mean? I hope so.
Like, in another script, that @kevL_s made for me some years ago, the function GetIsSkillSuccessful was used, but this time it’s not a skill but an attribute…So, what function do I use for this? I’ve searched but can’t find it, and sometimes it’s difficult to search because you need to know what it’s called exactly.

Can you do something like this perhaps?

   if(GetAbilityModifier(ABILITY_DEXTERITY,oPlayer) + Random(20) >= 14)
	{

		SendMessageToPC(oPlayer,"You made it");

	}

EDIT: It seems to be working, but I would like to have some feedback to the player like when you do a GetIsSkillSuccessful…

EDIT2: I’m slowly getting there but it doesn’t look like I want to just yet:

   int nAbility = GetAbilityModifier(ABILITY_DEXTERITY,oPlayer);
   int nRandom = Random(20);

	if(GetAbilityModifier(ABILITY_DEXTERITY,oPlayer) + Random(20) >= 14)
	{
		
		SendMessageToPC(oPlayer,"Dexterity" + IntToString(nAbility) + "DC" + IntToString(nRandom));

	}

EDIT3: I really don’t know how to code this, but could this be right?

int nAbility = GetAbilityModifier(ABILITY_DEXTERITY,oPlayer);
int nRandom = Random(20);
int nNewValue = nAbility + nRandom;

	if(GetAbilityModifier(ABILITY_DEXTERITY,oPlayer) + Random(20) >= 14)
	{
		string sAbility = IntToString(nAbility);
		string sRandom = IntToString(nRandom);
		string sNewValue = IntToString(nNewValue);
		 
		//SendMessageToPC(oPlayer,"Dexterity" + IntToString(nAbility) + "DC" + IntToString(nRandom));
		SendMessageToPC(oPlayer,"Climb: *Success*: (" + sAbility + "+" + sRandom + "=" + sNewValue + " vs. DC=14)");
		
	}

EDIT4: It seems that the calculations somehow does the opposite of what I want…so it kind of works but…I don’t get quite get it…

EDIT5: Ok, now I think it’s more correct (but I would have liked the color of the text to be blue ingame):

int nAbility = GetAbilityModifier(ABILITY_DEXTERITY,oPlayer);
int nRandom = Random(20);
int nNewValue = nAbility + nRandom;

string sAbility = IntToString(nAbility);
string sRandom = IntToString(nRandom);
string sNewValue = IntToString(nNewValue);

	if(nAbility + nRandom >= 14)
	{
	
		SendMessageToPC(oPlayer,"Climb: *Success*: (" + sAbility + "+" + sRandom + "=" + sNewValue + " vs. DC=14)");
		
	}

hi Ag, looks good but you should put a fail-message in (if appropriate)

int bResult;
string sResult;
if (nAbility + nRandom >= 14)
{
	bResult = TRUE;
	sResult = "*Success*";
}
else
{
	bResult = FALSE;
	sResult = "*Failure*";
}

SendMessageToPC(oPlayer,"Climb: " + sResult + ": (" + sAbility + "+" + sRandom + "=" + sNewValue + " vs. DC=14)");
return bResult;

and color like so:

sResult = "<color=blue>*Success*</c>";

or simpler

sResult = "<c=blue>*Success*</c>";

 
Ps. you might find this helpful or /amusing →

// 'printcolors'
//
// Prints examples of colors contained in NWN2_Colors.2da to the chat window.
// kevL 2011 aug 18
// TODO: use Get2DAString()


void main()
{
    object oPC = OBJECT_SELF;

    SendMessageToPC(oPC, "<c=AliceBlue>This is 0                AliceBlue               F0F8FF</c>");
    SendMessageToPC(oPC, "<c=AntiqueWhite>This is 1             AntiqueWhite            FAEBD7</c>");
    SendMessageToPC(oPC, "<c=Aqua>This is 2                     Aqua                    00FFFF</c>");
    SendMessageToPC(oPC, "<c=Aquamarine>This is 3               Aquamarine              7FFFD4</c>");
    SendMessageToPC(oPC, "<c=Azure>This is 4                    Azure                   F0FFFF</c>");
    SendMessageToPC(oPC, "<c=Beige>This is 5                    Beige                   F5F5DC</c>");
    SendMessageToPC(oPC, "<c=Bisque>This is 6                   Bisque                  FFE4C4</c>");
    SendMessageToPC(oPC, "<c=Black>This is 7                    Black                   000000</c>");
    SendMessageToPC(oPC, "<c=BlanchedAlmond>This is 8           BlanchedAlmond          FFEBCD</c>");
    SendMessageToPC(oPC, "<c=Blue>This is 9                     Blue                    0000FF</c>");
    SendMessageToPC(oPC, "<c=BlueViolet>This is 10              BlueViolet              8A2BE2</c>");
    SendMessageToPC(oPC, "<c=Brown>This is 11                   Brown                   A52A2A</c>");
    SendMessageToPC(oPC, "<c=BurlyWood>This is 12               BurlyWood               DEB887</c>");
    SendMessageToPC(oPC, "<c=CadetBlue>This is 13               CadetBlue               5F9EA0</c>");
    SendMessageToPC(oPC, "<c=Chartreuse>This is 14              Chartreuse              7FFF00</c>");
    SendMessageToPC(oPC, "<c=Chocolate>This is 15               Chocolate               D2691E</c>");
    SendMessageToPC(oPC, "<c=Coral>This is 16                   Coral                   FF7F50</c>");
    SendMessageToPC(oPC, "<c=CornflowerBlue>This is 17          CornflowerBlue          6495ED</c>");
    SendMessageToPC(oPC, "<c=Cornsilk>This is 18                Cornsilk                FFF8DC</c>");
    SendMessageToPC(oPC, "<c=Crimson>This is 19                 Crimson                 DC143C</c>");
    SendMessageToPC(oPC, "<c=Cyan>This is 20                    Cyan                    00FFFF</c>");
    SendMessageToPC(oPC, "<c=DarkBlue>This is 21                DarkBlue                00008B</c>");
    SendMessageToPC(oPC, "<c=DarkCyan>This is 22                DarkCyan                008B8B</c>");
    SendMessageToPC(oPC, "<c=DarkGoldenRod>This is 23           DarkGoldenRod           B8860B</c>");
    SendMessageToPC(oPC, "<c=DarkGray>This is 24                DarkGray                A9A9A9</c>");
    SendMessageToPC(oPC, "<c=DarkGreen>This is 25               DarkGreen               006400</c>");
    SendMessageToPC(oPC, "<c=DarkKhaki>This is 26               DarkKhaki               BDB76B</c>");
    SendMessageToPC(oPC, "<c=DarkMagenta>This is 27             DarkMagenta             8B008B</c>");
    SendMessageToPC(oPC, "<c=DarkOliveGreen>This is 28          DarkOliveGreen          556B2F</c>");
    SendMessageToPC(oPC, "<c=DarkOrange>This is 29              DarkOrange              FF8C00</c>");
    SendMessageToPC(oPC, "<c=DarkOrchid>This is 30              DarkOrchid              9932CC</c>");
    SendMessageToPC(oPC, "<c=DarkRed>This is 31                 DarkRed                 8B0000</c>");
    SendMessageToPC(oPC, "<c=DarkSalmon>This is 32              DarkSalmon              E9967A</c>");
    SendMessageToPC(oPC, "<c=DarkSeaGreen>This is 33            DarkSeaGreen            8FBC8F</c>");
    SendMessageToPC(oPC, "<c=DarkSlateBlue>This is 34           DarkSlateBlue           483D8B</c>");
    SendMessageToPC(oPC, "<c=DarkSlateGray>This is 35           DarkSlateGray           2F4F4F</c>");
    SendMessageToPC(oPC, "<c=DarkTurquoise>This is 36           DarkTurquoise           00CED1</c>");
    SendMessageToPC(oPC, "<c=DarkViolet>This is 37              DarkViolet              9400D3</c>");
    SendMessageToPC(oPC, "<c=DeepPink>This is 38                DeepPink                FF1493</c>");
    SendMessageToPC(oPC, "<c=DeepSkyBlue>This is 39             DeepSkyBlue             00BFFF</c>");
    SendMessageToPC(oPC, "<c=DimGray>This is 40                 DimGray                 696969</c>");
    SendMessageToPC(oPC, "<c=DodgerBlue>This is 41              DodgerBlue              1E90FF</c>");
    SendMessageToPC(oPC, "<c=Feldspar>This is 42                Feldspar                D19275</c>");
    SendMessageToPC(oPC, "<c=FireBrick>This is 43               FireBrick               B22222</c>");
    SendMessageToPC(oPC, "<c=FloralWhite>This is 44             FloralWhite             FFFAF0</c>");
    SendMessageToPC(oPC, "<c=ForestGreen>This is 45             ForestGreen             228B22</c>");
    SendMessageToPC(oPC, "<c=Fuchsia>This is 46                 Fuchsia                 FF00FF</c>");
    SendMessageToPC(oPC, "<c=Gainsboro>This is 47               Gainsboro               DCDCDC</c>");
    SendMessageToPC(oPC, "<c=GhostWhite>This is 48              GhostWhite              F8F8FF</c>");
    SendMessageToPC(oPC, "<c=Gold>This is 49                    Gold                    FFD700</c>");
    SendMessageToPC(oPC, "<c=GoldenRod>This is 50               GoldenRod               DAA520</c>");
    SendMessageToPC(oPC, "<c=Gray>This is 51                    Gray                    808080</c>");
    SendMessageToPC(oPC, "<c=Green>This is 52                   Green                   008000</c>");
    SendMessageToPC(oPC, "<c=GreenYellow>This is 53             GreenYellow             ADFF2F</c>");
    SendMessageToPC(oPC, "<c=HoneyDew>This is 54                HoneyDew                F0FFF0</c>");
    SendMessageToPC(oPC, "<c=HotPink>This is 55                 HotPink                 FF69B4</c>");
    SendMessageToPC(oPC, "<c=IndianRed>This is 56               IndianRed               CD5C5C</c>");
    SendMessageToPC(oPC, "<c=Indigo>This is 57                  Indigo                  4B0082</c>");
    SendMessageToPC(oPC, "<c=Ivory>This is 58                   Ivory                   FFFFF0</c>");
    SendMessageToPC(oPC, "<c=Khaki>This is 59                   Khaki                   F0E68C</c>");
    SendMessageToPC(oPC, "<c=Lavender>This is 60                Lavender                E6E6FA</c>");
    SendMessageToPC(oPC, "<c=LavenderBlush>This is 61           LavenderBlush           FFF0F5</c>");
    SendMessageToPC(oPC, "<c=LawnGreen>This is 62               LawnGreen               7CFC00</c>");
    SendMessageToPC(oPC, "<c=LemonChiffon>This is 63            LemonChiffon            FFFACD</c>");
    SendMessageToPC(oPC, "<c=LightBlue>This is 64               LightBlue               ADD8E6</c>");
    SendMessageToPC(oPC, "<c=LightCoral>This is 65              LightCoral              F08080</c>");
    SendMessageToPC(oPC, "<c=LightCyan>This is 66               LightCyan               E0FFFF</c>");
    SendMessageToPC(oPC, "<c=LightGoldenRodYellow>This is 67    LightGoldenRodYellow    FAFAD2</c>");
    SendMessageToPC(oPC, "<c=LightGrey>This is 68               LightGrey               D3D3D3</c>");
    SendMessageToPC(oPC, "<c=LightGreen>This is 69              LightGreen              90EE90</c>");
    SendMessageToPC(oPC, "<c=LightPink>This is 70               LightPink               FFB6C1</c>");
    SendMessageToPC(oPC, "<c=LightSalmon>This is 71             LightSalmon             FFA07A</c>");
    SendMessageToPC(oPC, "<c=LightSeaGreen>This is 72           LightSeaGreen           20B2AA</c>");
    SendMessageToPC(oPC, "<c=LightSkyBlue>This is 73            LightSkyBlue            87CEFA</c>");
    SendMessageToPC(oPC, "<c=LightSlateBlue>This is 74          LightSlateBlue          8470FF</c>");
    SendMessageToPC(oPC, "<c=LightSlateGray>This is 75          LightSlateGray          778899</c>");
    SendMessageToPC(oPC, "<c=LightSteelBlue>This is 76          LightSteelBlue          B0C4DE</c>");
    SendMessageToPC(oPC, "<c=LightYellow>This is 77             LightYellow             FFFFE0</c>");
    SendMessageToPC(oPC, "<c=Lime>This is 78                    Lime                    00FF00</c>");
    SendMessageToPC(oPC, "<c=LimeGreen>This is 79               LimeGreen               32CD32</c>");
    SendMessageToPC(oPC, "<c=Linen>This is 80                   Linen                   FAF0E6</c>");
    SendMessageToPC(oPC, "<c=Magenta>This is 81                 Magenta                 FF00FF</c>");
    SendMessageToPC(oPC, "<c=Maroon>This is 82                  Maroon                  800000</c>");
    SendMessageToPC(oPC, "<c=MediumAquaMarine>This is 83        MediumAquaMarine        66CDAA</c>");
    SendMessageToPC(oPC, "<c=MediumBlue>This is 84              MediumBlue              0000CD</c>");
    SendMessageToPC(oPC, "<c=MediumOrchid>This is 85            MediumOrchid            BA55D3</c>");
    SendMessageToPC(oPC, "<c=MediumPurple>This is 86            MediumPurple            9370D8</c>");
    SendMessageToPC(oPC, "<c=MediumSeaGreen>This is 87          MediumSeaGreen          3CB371</c>");
    SendMessageToPC(oPC, "<c=MediumSlateBlue>This is 88         MediumSlateBlue         7B68EE</c>");
    SendMessageToPC(oPC, "<c=MediumSpringGreen>This is 89       MediumSpringGreen       00FA9A</c>");
    SendMessageToPC(oPC, "<c=MediumTurquoise>This is 90         MediumTurquoise         48D1CC</c>");
    SendMessageToPC(oPC, "<c=MediumVioletRed>This is 91         MediumVioletRed         C71585</c>");
    SendMessageToPC(oPC, "<c=MidnightBlue>This is 92            MidnightBlue            191970</c>");
    SendMessageToPC(oPC, "<c=MintCream>This is 93               MintCream               F5FFFA</c>");
    SendMessageToPC(oPC, "<c=MistyRose>This is 94               MistyRose               FFE4E1</c>");
    SendMessageToPC(oPC, "<c=Moccasin>This is 95                Moccasin                FFE4B5</c>");
    SendMessageToPC(oPC, "<c=NavajoWhite>This is 96             NavajoWhite             FFDEAD</c>");
    SendMessageToPC(oPC, "<c=Navy>This is 97                    Navy                    000080</c>");
    SendMessageToPC(oPC, "<c=OldLace>This is 98                 OldLace                 FDF5E6</c>");
    SendMessageToPC(oPC, "<c=Olive>This is 99                   Olive                   808000</c>");
    SendMessageToPC(oPC, "<c=OliveDrab>This is 100              OliveDrab               6B8E23</c>");
    SendMessageToPC(oPC, "<c=Orange>This is 101                 Orange                  FFA500</c>");
    SendMessageToPC(oPC, "<c=OrangeRed>This is 102              OrangeRed               FF4500</c>");
    SendMessageToPC(oPC, "<c=Orchid>This is 103                 Orchid                  DA70D6</c>");
    SendMessageToPC(oPC, "<c=PaleGoldenRod>This is 104          PaleGoldenRod           EEE8AA</c>");
    SendMessageToPC(oPC, "<c=PaleGreen>This is 105              PaleGreen               98FB98</c>");
    SendMessageToPC(oPC, "<c=PaleTurquoise>This is 106          PaleTurquoise           AFEEEE</c>");
    SendMessageToPC(oPC, "<c=PaleVioletRed>This is 107          PaleVioletRed           D87093</c>");
    SendMessageToPC(oPC, "<c=PapayaWhip>This is 108             PapayaWhip              FFEFD5</c>");
    SendMessageToPC(oPC, "<c=PeachPuff>This is 109              PeachPuff               FFDAB9</c>");
    SendMessageToPC(oPC, "<c=Peru>This is 110                   Peru                    CD853F</c>");
    SendMessageToPC(oPC, "<c=Pink>This is 111                   Pink                    FFC0CB</c>");
    SendMessageToPC(oPC, "<c=Plum>This is 112                   Plum                    DDA0DD</c>");
    SendMessageToPC(oPC, "<c=PowderBlue>This is 113             PowderBlue              B0E0E6</c>");
    SendMessageToPC(oPC, "<c=Purple>This is 114                 Purple                  800080</c>");
    SendMessageToPC(oPC, "<c=Red>This is 115                    Red                     FF0000</c>");
    SendMessageToPC(oPC, "<c=RosyBrown>This is 116              RosyBrown               BC8F8F</c>");
    SendMessageToPC(oPC, "<c=RoyalBlue>This is 117              RoyalBlue               0000B8</c>");
    SendMessageToPC(oPC, "<c=SaddleBrown>This is 118            SaddleBrown             8B4513</c>");
    SendMessageToPC(oPC, "<c=Salmon>This is 119                 Salmon                  FA8072</c>");
    SendMessageToPC(oPC, "<c=SandyBrown>This is 120             SandyBrown              F4A460</c>");
    SendMessageToPC(oPC, "<c=SeaGreen>This is 121               SeaGreen                2E8B57</c>");
    SendMessageToPC(oPC, "<c=SeaShell>This is 122               SeaShell                FFF5EE</c>");
    SendMessageToPC(oPC, "<c=Sienna>This is 123                 Sienna                  A0522D</c>");
    SendMessageToPC(oPC, "<c=Silver>This is 124                 Silver                  C0C0C0</c>");
    SendMessageToPC(oPC, "<c=SkyBlue>This is 125                SkyBlue                 87CEEB</c>");
    SendMessageToPC(oPC, "<c=SlateBlue>This is 126              SlateBlue               6A5ACD</c>");
    SendMessageToPC(oPC, "<c=SlateGray>This is 127              SlateGray               708090</c>");
    SendMessageToPC(oPC, "<c=Snow>This is 128                   Snow                    FFFAFA</c>");
    SendMessageToPC(oPC, "<c=SpringGreen>This is 129            SpringGreen             00FF7F</c>");
    SendMessageToPC(oPC, "<c=SteelBlue>This is 130              SteelBlue               4682B4</c>");
    SendMessageToPC(oPC, "<c=Tan>This is 131                    Tan                     D2B48C</c>");
    SendMessageToPC(oPC, "<c=Teal>This is 132                   Teal                    808000</c>");
    SendMessageToPC(oPC, "<c=Thistle>This is 133                Thistle                 D8BFD8</c>");
    SendMessageToPC(oPC, "<c=Tomato>This is 134                 Tomato                  FF6347</c>");
    SendMessageToPC(oPC, "<c=Turquoise>This is 135              Turquoise               40E0D0</c>");
    SendMessageToPC(oPC, "<c=Violet>This is 136                 Violet                  EE82EE</c>");
    SendMessageToPC(oPC, "<c=VioletRed>This is 137              VioletRed               D02090</c>");
    SendMessageToPC(oPC, "<c=Wheat>This is 138                  Wheat                   F5DEB3</c>");
    SendMessageToPC(oPC, "<c=White>This is 139                  White                   FFFFFF</c>");
    SendMessageToPC(oPC, "<c=WhiteSmoke>This is 140             WhiteSmoke              F5F5F5</c>");
    SendMessageToPC(oPC, "<c=Yellow>This is 141                 Yellow                  FFFF00</c>");
    SendMessageToPC(oPC, "<c=YellowGreen>This is 142            YellowGreen             9ACD32</c>");
    SendMessageToPC(oPC, "<c=Text>This is 143                   Text                    C0C0C0</c>");
    SendMessageToPC(oPC, "<c=TextPositive>This is 144           TextPositive            0DFEF8</c>");
    SendMessageToPC(oPC, "<c=TextNegative>This is 145           TextNegative            FB2D2D</c>");
    SendMessageToPC(oPC, "<c=TextNeutral>This is 146            TextNeutral             DEDEDE</c>");
    SendMessageToPC(oPC, "<c=ItemUseable>This is 147            ItemUseable             FFFFFF</c>");
    SendMessageToPC(oPC, "<c=ItemNotUseable>This is 148         ItemNotUseable          FF0000</c>");
    SendMessageToPC(oPC, "<c=Unidentified>This is 149           Unidentified            00FFFF</c>");
    SendMessageToPC(oPC, "<c=HotbarText>This is 150             HotbarText              BCBCBC</c>");
    SendMessageToPC(oPC, "<c=HotbarDisabled>This is 151         HotbarDisabled          666666</c>");
    SendMessageToPC(oPC, "<c=HotbarItmNoUse>This is 152         HotbarItmNoUse          FF0000</c>");
}

IMHO, the color aqua is better displayed instead of blue.

void main()
{
	object oPlayer = GetFirstPC(FALSE);
	int nAbility = GetAbilityModifier(ABILITY_DEXTERITY, oPlayer);
	int nRandom = d20();
	int nNewValue = nAbility + nRandom;
	string sResult = "<c=red>*FAILED*<c=aqua>";
	string s = IntToString(nAbility) + "+" + IntToString(nRandom) + "=" + IntToString(nNewValue) + " vs. DC=14)";

	if (nNewValue >= 14) sResult = "*Success*";
	
	SendMessageToPC(oPlayer, "<c=aqua>Climb: " + sResult + ": (" + s);
}
1 Like

Attribute are a modificator or a basis for an action, or event. But when you perform an action you perform a skill, the attribute will make you better or worse with that skill.

There are different checkskill functions, you may want to have a look at them.

1 Like

@kevL_s - They way I did it was like this:

int nAbility = GetAbilityModifier(ABILITY_DEXTERITY,oPlayer);
int nRandom = Random(20);
int nNewValue = nAbility + nRandom;

string sAbility = IntToString(nAbility);
string sRandom = IntToString(nRandom);
string sNewValue = IntToString(nNewValue);

	if(nAbility + nRandom >= 14)
	{
	
		 
		//SendMessageToPC(oPlayer,"Dexterity" + IntToString(nAbility) + "DC" + IntToString(nRandom));
		SendMessageToPC(oPlayer,"Climb: *Success*: (" + sAbility + "+" + sRandom + "=" + sNewValue + " vs. DC=14)");
		
	}

	else
	{

		SendMessageToPC(oPlayer,"Climb: *Failure*: (" + sAbility + "+" + sRandom + "=" + sNewValue + " vs. DC=14)");

Don’t know if that’s enough, but I think so. I’ll have a look at your and travus’ scripts.
I am trying to make it look something like this:

NWN2

Don’t remember if the color is red when you fail…

Since I’m quite proud of myself to be able to achieve this on my own (apart from the color that is) I think I’ll
keep my code as it is, even though (as usual) @travus script is much more compact. I find it easier to follow and read my own version at the moment.

EDIT2: @kevL_s - So, in the picture with the Appraise, the color is not c=blue and it’s not c=aqua. Do you have any idea of what they are using there?

1 Like

try my ‘printcolors’ script … (copy/paste/save/compile/run @ console)

also for quick reference

Web colors - Wikipedia

(not sure those are identical to the colors defined in NWN2_Colors.2da but should be close … your example might be “mediumblue” – case insensitive)

(or it might be one of the funky ones at the bottom, like “textpositive”)

1 Like

Yes, I didn’t notice your printcolors script at first. Read a bit too fast, I suppose. Will try that.

EDIT: This is weird. I tried your printcolors but I can’t seem to find the exact color they are using when doing skill checks. So odd. DodgerBlue is pretty close though, so I might use that. Maybe people won’t care it’s not the exact same color.

1 Like

yeh… maybe it uses a hardcoded custom color. I think you can use custom color sorta like so

<c=#RRGGBB>text</c>

where RR, GG, and BB are red, green, and blue hexadecimal values (1-byte each). Eg

<c=#FF0000>text</c>

is red

Ok, but how do you know what to type there then to get the right blue color. It feels like one would have to just guess and do a lot of test to find that blue one.

You can use the ColorName column entries from nwn2_colors.2da.

I.e. <c=DarkGoldenRod>…</c>

Eh…yes, that’s what I’m using now. I’m using the <c=DodgerBlue>, but I still don’t know what kind of blue color they are using in the picture in my post above.

Give this one a shot. It’s pretty damn close.
<c=#1f75fe>

2 Likes

Ok, I’ll try that.

EDIT: @travus - Yep, that was really close. Even closer than DodgerBlue. I’ll go with that. Thanks!

2 Likes

(POST REMOVED - I had just made a stupid mistake)