Armors/weapons are still to expensive here a Suggestion

Currently viewing this thread:

public override float GetEquipmentValueFromTier(float itemTierf)
{
return (float)Math.Pow(3.0, (double)MathF.Clamp(itemTierf, -1f, 5.4f));
}
Just how i solve the high prices right now.

The underlined number was 7.5f before/original Programm Code.


here the shop result by selling a high quality armor right out of the cheat inventory with 7.5f:
F1WBpmM.jpg





And here an Image after changing the code to 5.4f:
a2znwgU.jpg

As you can see, the Price is getting really low for the high quality armor, but at least, in this state, the Cities are considering to buy the Armor.
It´s just a number, so i don´t get it why it won´t be changed.
The only reason I can think of is that it would break the Economcy in some way, but in my playthroughs they are all just fine.
 
And what happens if you reduce the 3.0 to 2.0 instead ?


3^7,5=3.787,99
3^5,4=377,098
2^7.5=181,0193359
2^5.4=42,2242

will also result in a lower value number of course, but not only for high tier armours/weapons, but for ALL weapons(all Tiers). since ( double)MathF.Clamp(itemTierf, -1f, 5.4f) chooses always first the mininum of itemTierf and 7.5f/5.4f and than the maximum of the result that would be either itemTierf or 7.5f/5.4f.
value=itemTierf,

minValue=-1f

,maxValue=7,5f/5,4

public static float Clamp(float value, float minValue, float maxValue)
{
return Math.Max(Math.Min(value, maxValue), minValue);
}
So i think it isn´t the optimal choice to reduce the 3 to 2. I hope that you understand what I mean :wink:.
 
Last edited:
The TierValue you get from the method i mentioned above, will be delivered to this Method. For a better oversight i just give you the Information about the MethodName and what the Method will return. In the case of high tier armor:
num=3^7.5(original code)
num2=120(for Armor)
Appearrance is a number of the xml file (for high quality Armors always a "3").

If you calculate it, you will get nearly the price , as it is right now in the original code.

public override int CalculateValue(ItemObject item)
.
.
bla
.
.
return (int)(num2 * num * (1f + 0.2f * (item.Appearance - 1f)) + 100f * Math.Max(0f, item.Appearance - 1f));
 

Theofilos

Knight
Leveling reballance plus mod has this feature and its a must for the moment.I guess they will fix it at some point it doesnt seem like a lot of work.
 
Leveling reballance plus mod has this feature and its a must for the moment.I guess they will fix it at some point it doesnt seem like a lot of work.
You are right, it can be easily solved. I solve this issue for myself after every patch, but with time you know....it becomes a bit annoying XD
 

Akka

Sergeant
So i think it isn´t the optimal choice to reduce the 3 to 2. I hope that you understand what I mean :wink:.
I do think that softening the curve is actually a better choice, the increase is just much too steep.
Now, if just using square instead of cubic leads to prices too low, adding a flat multiplier (like taking the calculation result and multiplying by 10) is acceptable. But I just can't see any form of economy (or leveling) that could work decently with prices/xp costs growing so big so fast.
 
I do think that softening the curve is actually a better choice, the increase is just much too steep.
Now, if just using square instead of cubic leads to prices too low, adding a flat multiplier (like taking the calculation result and multiplying by 10) is acceptable. But I just can't see any form of economy (or leveling) that could work decently with prices/xp costs growing so big so fast.
Sry, but i lost your path of explanation here. I can´t find any squares ore cubics in the code. Its 3^7,5 and not 7,5^3 (or 7,5^2).
 

Akka

Sergeant
Doh, I just inverted everything in my head /facepalm
Dunno if it's due to the forum formatting, but I manage to misread code all the time when it's posted here. Should perhaps copy-paste it in VS to not get confused :p

But my point was that, in the general concept, I'd prefer to simply not have powers at all in the calculation. A more linear increase would be much better.
 
Doh, I just inverted everything in my head /facepalm
Dunno if it's due to the forum formatting, but I manage to misread code all the time when it's posted here. Should perhaps copy-paste it in VS to not get confused :p

But my point was that, in the general concept, I'd prefer to simply not have powers at all in the calculation. A more linear increase would be much better.
Ah OK, thx man now I got your point. I will may be figure something out.
 

Dabos37

Sergeant Knight
public override float GetEquipmentValueFromTier(float itemTierf)
{
return (float)Math.Pow(3.0, (double)MathF.Clamp(itemTierf, -1f, 5.4f));
}
Just how i solve the high prices right now.

The underlined number was 7.5f before/original Programm Code.


here the shop result by selling a high quality armor right out of the cheat inventory with 7.5f:
F1WBpmM.jpg





And here an Image after changing the code to 5.4f:
a2znwgU.jpg

As you can see, the Price is getting really low for the high quality armor, but at least, in this state, the Cities are considering to buy the Armor.
It´s just a number, so i don´t get it why it won´t be changed.
The only reason I can think of is that it would break the Economcy in some way, but in my playthroughs they are all just fine.

Thank you very much for this. For some reason equipment have been ultraexpensive since the release and remain the same until now. I really do not any benefit because we should still have these overpriced armors but who knows...

I think that devs are simply overwhelmed and they do not have time to check these issue to fix things if they are not considered top priority.
 
Or you could just declare a dictionary and have a modifier by tier, like so

C#:
internal class ItemPriceByTier {

        private static Dictionary<float, float> TierModifier = new Dictionary<float, float> {
            {1, 7.5f },
            {2, 6.8f },
            {3, 6.2f },
            {4, 5.7f },
            {5, 5f },
            {6, 4.4f }
        };

        public override float GetEquipmentValueFromTier(float itemTierf) {
            return (float)Math.Pow(3.0, (double)MathF.Clamp(itemTierf, -1f, TierModifier[itemTierf]));
        }
    }

That same way you could also define a specific formula for each tier, like so:

C#:
internal class ItemPriceByTier2 {

        private static Dictionary<float, Func<float>> TierPrice = new Dictionary<float, Func<float>> {
            {1, TierOneCalculation },
            {2, TierTwoCalculation}
        };

        private static float TierOneCalculation() {
            return (float)Math.Pow(3.0, (double)MathF.Clamp(1, -1f, 5.4f));
        }

        private static float TierTwoCalculation() {
            return 2 * 600000;
        }

        public override float GetEquipmentValueFromTier(float itemTierf) {
            return TierPrice[itemTierf].Invoke();
        }
    }
 
Top Bottom