mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
object value terms rework
This commit is contained in:
parent
71a3852be4
commit
9ef0481610
@ -350,11 +350,12 @@ VisitObjEngine::VisitObjEngine()
|
|||||||
|
|
||||||
engine.addInputVariable(objectValue);
|
engine.addInputVariable(objectValue);
|
||||||
|
|
||||||
//objectValue ranges are based on checking RMG priorities of some objects and trying to guess sane value ranges
|
//objectValue ranges are based on checking RMG priorities of some objects and checking LOW/MID/HIGH proportions for various values in QtFuzzyLite
|
||||||
objectValue->addTerm(new fl::Ramp("LOW", 3000, 0)); //I have feeling that concave shape might work well instead of ramp for objectValue FL terms
|
objectValue->addTerm(new fl::Ramp("LOW", 3500.0, 0.0));
|
||||||
objectValue->addTerm(new fl::Triangle("MEDIUM", 2500, 6000));
|
objectValue->addTerm(new fl::Triangle("MEDIUM", 0.0, 8500.0));
|
||||||
objectValue->addTerm(new fl::Ramp("HIGH", 5000, 20000));
|
std::vector<fl::Discrete::Pair> multiRamp = { fl::Discrete::Pair(5000.0, 0.0), fl::Discrete::Pair(10000.0, 0.75), fl::Discrete::Pair(20000.0, 1.0) };
|
||||||
objectValue->setRange(0, 20000); //relic artifact value is border value by design, even better things are scaled down.
|
objectValue->addTerm(new fl::Discrete("HIGH", multiRamp));
|
||||||
|
objectValue->setRange(0.0, 20000.0); //relic artifact value is border value by design, even better things are scaled down.
|
||||||
|
|
||||||
addRule("if objectValue is HIGH then Value is HIGH");
|
addRule("if objectValue is HIGH then Value is HIGH");
|
||||||
addRule("if objectValue is MEDIUM then Value is MEDIUM");
|
addRule("if objectValue is MEDIUM then Value is MEDIUM");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user