PlaneShift
Gameplay => General Discussion => Topic started by: bilbous on October 03, 2007, 07:14:25 pm
-
I just noticed that the resale price for looted longswords has been drastically reduced from 960 to little over 300, was this intended or is it a glitch? At the moment they are worth pretty much the same as short swords which does not seem right considering the amount of metal difference. Sold to Veja Pontor.
-
It has been like that already for a while now - 2 months maybe?
My guess is that it was a decision to make repairing longswords available to lower repair levels.
The price for longswords with modifiers did not change in my experience, so it seems like the basic LS price is the same (and that the plain LS got a modifier for its price (times 0.25), or the basic price was lowered by a factor of 4 and all other modified longswords' price modifier was multiplied by 4.
Whether or not the whole repair system being based on price only is a good idea or not is another story. (And I hope there are plans to change that at one point).
-
Strangely enough I was always able to repair a longsword right from level 1. It took a few minutes but it was possible. This is the second time I have heard that repair is based on price and it never seemed that way to me. Maybe it has changed since I gained my first twenty levels, I have been rather inactive for the last couple of updates. I always thought it was the number and nature of buffs combined with weapon size. It may be I was wrong but that was what I thought.
So basically then the prime lootable non magic weapon IS the short sword because it has the best price/weight ratio. I guess I'll go back to the thugs because I can carry plenty of short swords, don't need the PPs and rogues drop too many potions and daggers. The potions are not too bad for looting as they weigh little. Hopefully the thugs have not been ganked too much.
-
The price for a longsword got reduced since the old price of 960 was not suitable. If we look at it from a crafting point of view, a longsword requires only 2 more stocks than a short sword, hence, longswords can't be worth drastically more than a short sword. A claymore, which requires 12 stocks (I believe), was worth 640 in comparsion and is a lot heavier, or in other words, it has a higher quantity in terms of material.
-
Repair can't be based on price, I can repair certain weapons that cost more than others that I can't. It is not based on the speed or damadge factor as those influence price too, and still that harks back to being able to repair deadlier ones and not its lesser kind. Mind you, the ones I am refering to are magic weapons, I could repair all the crafted kind at level 1.
-
Indeed crafted weapons seem no different than store bought weapons as far as repair is concerned. Of course their standard valuation (i.e. what an NPC will pay) is no different than store bought weapons. I think it would be appropriate for higher quality crafted weapons to be more difficult to repair or lower skill repairmen have greater quality losses at the top end. It would seem to me that if it takes 20+ smith levels to make a 300/300 weapon a similar expertise in repair ought to be needed. I also think that the smith levels are not that cut and dried, so to speak, currently but the best weapon I have made was little better than a store bought one as I do not have too much skill. Certainly there should be only one system for repairing weapons and not two completely different ones for magic and crafted. The better the weapon, the harder to repair.
-
Repair can't be based on price, I can repair certain weapons that cost more than others that I can't.
Can you PM me the names of the weapons you can repair that cost more than another you cannot?
I have never encountered yet a difference from the formula based on merchant price.
But then my informations are based solely on repair skills below 20.
-
Below is how it once was, and as far as I can tell from experience in repairing, not much has changed since then. Maybe a dev could give a statement whether or not it's still up to date.
<script name="Calculate Repair Time">
Result = Object:SalePrice/100;
Factor = Worker:getSkillValue(Object:RequiredRepairSkill) / (Object:SalePrice/20);
Result = Result / Factor;
</script>
<script name="Calculate Repair Result">
Factor = Worker:getSkillValue(Object:RequiredRepairSkill) / (Object:SalePrice/20);
Result = ((Object:SalePrice/25) * Factor) * (rnd(1)+0.5);
</script>
-
a Little rudimentary algebra would seem to suggest that in the second algorithm simplification make the repair result = 4/5*required repair skill*random number between 0.5 and 1.5.
Result = saleprice/25 x factor x random
Result = saleprice/25 x (required repair skill/ (sale price/20)) x rand
Result = saleprice/25 x ((20 x repair skill)/ sale price) x rand
Result = 20/25 x repair skill x rand
Similarly in the first algorithm the sale price cancels out by being in both the numerator and the denominator.
Is that right?
*EDIT*
Lets see, that would look like:
(saleprice/100)/(Repairskill/(saleprice/20))
(saleprice/100)/((20 x repairskill)/saleprice)
(saleprice x saleprice)/ (100 x 20 x repair skill)
saleprice2/(2000 x repairskill)
Looks like I was wrong. The first algorithm is divisive while the second is multiplicative, so repair time is based on the square of the sale price and the repair result (how much quality is repaired, I suppose) is unnecessarily complicated by use of the identity: sale price/sale price. Is that the intention here?
*RE_EDIT*
Upon further thought this cannot be the only algorithm involved with repair time as there has to be some further tweaking to get the observed minimum 20 second repair time. For a seasoned repairman an ax a dagger and short, long and broad swords all take 20 seconds.
dagger: 50 trias: 2500/(2000 x 20) = 25/400 = 1/16 for 20 levels of repair
axe: 100 trias: 10,000/(2000 x 20) = 1/4
SS: 200 : 40,000/(2000 x 20) = 1
etc.
-
Upon further thought this cannot be the only algorithm involved with repair time as there has to be some further tweaking to get the observed minimum 20 second repair time. For a seasoned repairman an ax a dagger and short, long and broad swords all take 20 seconds.
well of course the maximum of (result, 20) is taken.
more interesting than the time it takes is the actual calculation of Worker:getSkillValue(Object:RequiredRepairSkill), where the required repair skill is also determined by the price.
-
I do not agree with that. RequiredRepairSkill is divided by the sale price, not determined by it. I am uncertain what the rationale is for this algorithm. It seems really odd. Must have something to do with the rest of the code, I guess. Either script could apparently be replaced with a single calculation.
This turn of the conversation should perhaps be attached to the "Repair needs work" (http://hydlaa.com/smf/index.php?topic=30205.0)thread in the wish list rather than continued here as it has less and less to do with the price of swords and more to do with repair.
-
you need to look also at the c++ source and not only at the scripted rules.
from the source (which need not be the same used on the laanx server)
int rankneeded = repairTarget->GetPrice().GetTotal() / 150;
if (repairskillrank<rankneeded)
psserver->SendSystemError(client->GetClientNum(),"This item is too complex for your current repair skill. You cannot repair it." );
This makes clear that the required rank is dependent on price of the object.
again on laanx it could be different but besides the factor i never encountered anything different than a dependancy on price for skill rank needed.
int repair_time = (int)var_time_Result->GetValue();
if (repair_time < 20)
repair_time = 20;
here the quote for having a minimum of 20 seconds for repairing.
whatever it says in the scripted rules and why it is not combined to a simpler form is that it is more readable like this. you have a common factor for duration and quality making it easier to tweak both the same way.
factor gets larger when you have a higher rank and a less valueable item. therefore repair time should go down with a higher factor while regained quality should go up, hence once division and once multiplication. whenever you want to add another dependency to that formula (e.g. current quality) just tweak the factor if you want to tweak for both otherwise tweak the result term.
-
Ok then. Lets use some more algebra to reduce even further, just for practice.
Lets take rank needed to be saleprice/150 to go along with the notation in the other post.
the second algorithm I looked at was saleprice2/(2000 x repairskill)
substituting we get:
saleprice2/(2000 x (saleprice/150))=
saleprice2/(80saleprice/3)=
3/80 x saleprice == repair time
The first algorithm was 20/25 x repair skill x rand
substituting we get:
4/5 x (saleprice/150) x rand =
2/375 x saleprice x rand == repair result
So what you get is an arbitrary fraction times the sales price and in the case of the repair result a random number between about .5 and 1.5 depending on the random function's details.
Now if we can find where the sales price gets determined we might get close to tying this back to the original thread topic.
-
the second algorithm I looked at was saleprice2/(2000 x repairskill)
substituting we get:
saleprice2/(2000 x (saleprice/150))=
you substituted with the calculation that determines if the rank is sufficient for that weapon.
you cannot do that because the number put into the timing formula is the repair skill and not the calculation whether you have a sufficient repair skill for that specific weapon.
e.g. if the weapon costs 600 and you have skill 12
then it is still 12 that goes into that formula and not 4 (600/150).
but 12 is higher than 4 so you can repair that item.
as to the question for the prices: very likely a table in the DB on the server that says the price. maybe even an xml file, but whatever it is, it is surely not public and different from what you can download to make a test environment.
-
Hmm, I know a formula that works fine for me:
Level: divide the sale price from a NPC (means you have to check the price a NPC offers you, divide it with 0,8 because the
price NPCs give you is 80% of their selling price) with 150
If price is <300 then required level is 0
Time: multiple the sale price with itself and divide it with the product of 400 and your skill level
Minimum time is 20 seconds so if time <20 then time=20. Also, if level=0, then the time ios usually 20 seconds
-
What you say about my substitution is true enough I suppose but there is an exit algorithm for the repair skill if it is insufficient. Perhaps you could point out where the players actual skill is considered in all that mess. There is nothing in the first two scripts that uses that particular value and neither is there anything in the snippet of source code. I suppose if I am really interested I could download the source myself, I am not too good at following other peoples code and get confused by object oriented modality.
As for the price of weapons I think the base and crafted weapons have an arbitrary value and the looted weapons with modifiers have the value calculated at their time of generation; that is, in whatever algorithm that is used to randomly generate them. I think weapons should have a valuation based on a standard archetype whereby a 50/50 quality merchant/crafted weapon has an arbitrary value for its particular type, axe, battle axe, dagger, long sword and etc. and as you get away from 50/50 or start adding modifiers to the weapon its value changes. I suspect this is the ultimate plan. Under such a system you could have a factor of, say, 10% of the current quality and 100% of the maximum quality with additional factors for specific modifiers. I suggest the difference between the current and maximum qualities because a 10/250 sword is still better than a 50/50 in that it can be repaired to a greater quality which makes maximum quality a more significant factor. As far as the modified loot weapons go they all currently max out at 50/50 but the modifiers make them better or worse than mundane ones, so that this will need to be considered. Of course they already have their own valuation algorithm but they could have the quality factors adjusting their "as new" prices when they get used.
-
What you say about my substitution is true enough I suppose but there is an exit algorithm for the repair skill if it is insufficient. Perhaps you could point out where the players actual skill is considered in all that mess. There is nothing in the first two scripts that uses that particular value and neither is there anything in the snippet of source code. I suppose if I am really interested I could download the source myself, I am not too good at following other peoples code and get confused by object oriented modality.
Well Cumeri summed it up pretty well and i think these are the same formulas i sued when i made a spreadhseet table for calculating the time and needed repairskill.
Worker:getSkillValue(Object:RequiredRepairSkill) is the actual repairskill you have, but it gets only evaluated when you have the needed rank as written in c++ code.
As for the price of weapons I think the base and crafted weapons have an arbitrary value and the looted weapons with modifiers have the value calculated at their time of generation; that is, in whatever algorithm that is used to randomly generate them. I think weapons should have a valuation based on a standard archetype whereby a 50/50 quality merchant/crafted weapon has an arbitrary value for its particular type, axe, battle axe, dagger, long sword and etc. and as you get away from 50/50 or start adding modifiers to the weapon its value changes. I suspect this is the ultimate plan. Under such a system you could have a factor of, say, 10% of the current quality and 100% of the maximum quality with additional factors for specific modifiers. I suggest the difference between the current and maximum qualities because a 10/250 sword is still better than a 50/50 in that it can be repaired to a greater quality which makes maximum quality a more significant factor. As far as the modified loot weapons go they all currently max out at 50/50 but the modifiers make them better or worse than mundane ones, so that this will need to be considered. Of course they already have their own valuation algorithm but they could have the quality factors adjusting their "as new" prices when they get used.
i fully agree that current quality and maximum quality should influence the actual price, and - as stated in the other thread about "repair needs work" - that the needed repair skill should be based on that plus the other modifiers and not the price. (although if the price depends also on modifiers AND current quality and max quality then the repair formula can be based solely on the price as well).
but i am quite sure that the team is already aware of that since long before i started the game and that it is their ultimate goal to implement it this way at one point :).