Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2.3.0.2 The car types requirement in the db do not match ingame values
#6
I did say "approximately." The stars are skewed to avoid scaring users away from 35-rated designs. This was important back when we had 0-100 limited ratings.
Please note that stars are completely irrelevant in the game. They're just visual symbols for the numbers for the players who hate numbers. All numbers use the same star code.


Here is the code we use for stars if you want to know where the rating number falls in the stars for some reason:
value = the rating of the component category, "#star.dds" is the number of stars, and "#hstar.dds" means the number of stars and a half.
Code:
if(value > .9)
{
    static_cast<QuickGUI::Image*>(gameSheet->findWidget(name))->setImage("5stars.dds");
}
else if(value > .8)
{
    static_cast<QuickGUI::Image*>(gameSheet->findWidget(name))->setImage("4hstars.dds");
}
else if(value > .7)
{
    static_cast<QuickGUI::Image*>(gameSheet->findWidget(name))->setImage("4stars.dds");
}
else if(value > .55)
{
    static_cast<QuickGUI::Image*>(gameSheet->findWidget(name))->setImage("3hstars.dds");
}
else if(value > .45)
{
    static_cast<QuickGUI::Image*>(gameSheet->findWidget(name))->setImage("3stars.dds");
}
else if(value > .35)
{
    static_cast<QuickGUI::Image*>(gameSheet->findWidget(name))->setImage("2hstars.dds");
}
else if(value > .25)
{
    static_cast<QuickGUI::Image*>(gameSheet->findWidget(name))->setImage("2stars.dds");
}
else if(value > .15)
{
    static_cast<QuickGUI::Image*>(gameSheet->findWidget(name))->setImage("1hstars.dds");
}
else if(value > .05 )
{
    static_cast<QuickGUI::Image*>(gameSheet->findWidget(name))->setImage("1stars.dds");
}
else if(value <= .05)
{
    static_cast<QuickGUI::Image*>(gameSheet->findWidget(name))->setImage("hstars.dds");
}
"great writers are indecent people, they live unfairly, saving the best part for paper.
good human beings save the world, so that bastards like me can keep creating art, become immortal.
if you read this after I am dead it means I made it." ― Charles Bukowski
Reply


Messages In This Thread
RE: 2.3.0.2 The car types requirement in the db do not match ingame values - by Eric.B - 06-03-2024, 08:25 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)