Potřebujem vytvořit jednoduchý nástroj, který na základě vstupu z 2da souborů, obsahujících ceny předmětů, properties a jejich parametrů dynamicky spočítá cenu zadaného předmětu.
Zároveň je třeba, aby bylo v nástroji možné měnit ceny jednotlivých předmětů a vlastností a tyto změny se okamžitě projevovaly na viditelné ceně předmětu.
Nástroj by mohl být formou excelového dokumentu, do kterého se vloží potřebná data a bude je možno snadno měnit.
Dovedu si i představit javovou aplikaci, nebo jinou možnost.
Co to tedy znamená.
* Nástroj přečte data z 2da tabulek, nebo je do něj bude možné jednoduše vložit.
* Uživatel bude moci tyto data měnit. Jakákoliv změna se okamžitě projeví.
* Bude možné poskládat libovolný předmět. Tzn. vybere se baseitem, a až pět item properties, včetně volby jejich síly (např. bonus do síly +5)
* Nástroj podle toho spočítá cenu předmětu.
Někdo komu by se chtělo něco takového vyrobit?
Poptávka - nástroj pro výpočet ceny předmětu
Poptávka - nástroj pro výpočet ceny předmětu
Neaktivní a nezasahující do vývoje. Pouze nouzový support pro WB/DM.
***********************************************
Les jambes en l'air, comme une femme lubrique,
Brûlante et suant les poisons,
Ouvrait d'une façon nonchalante et cynique
Son ventre plein d'exhalaisons.
***********************************************
Les jambes en l'air, comme une femme lubrique,
Brûlante et suant les poisons,
Ouvrait d'une façon nonchalante et cynique
Son ventre plein d'exhalaisons.
Re: Poptávka - nástroj pro výpočet ceny předmětu
Postni sem příklad toho 2da souboru
Jake Buchar, Kybernautický detektiv
A když se to těm ouřadům na radnici nelíbí, můžou si strčit do tý svý zazobaný zadnice tenhle prostředníček a tak hluboko, až budou pištět jako prasata na líbánkách!
Azhael Morten Hbitý tiefling s vyššími zájmy, uctívač Helgarona a prince pekla Astarotha
Grombo Omborg Vychytralý půlkork s velikými ambicemi, PRASOBIJEC
A když se to těm ouřadům na radnici nelíbí, můžou si strčit do tý svý zazobaný zadnice tenhle prostředníček a tak hluboko, až budou pištět jako prasata na líbánkách!
Azhael Morten Hbitý tiefling s vyššími zájmy, uctívač Helgarona a prince pekla Astarotha
Grombo Omborg Vychytralý půlkork s velikými ambicemi, PRASOBIJEC
Re: Poptávka - nástroj pro výpočet ceny předmětu
Ty bych musel teprve vysosat z nwn.
Neaktivní a nezasahující do vývoje. Pouze nouzový support pro WB/DM.
***********************************************
Les jambes en l'air, comme une femme lubrique,
Brûlante et suant les poisons,
Ouvrait d'une façon nonchalante et cynique
Son ventre plein d'exhalaisons.
***********************************************
Les jambes en l'air, comme une femme lubrique,
Brûlante et suant les poisons,
Ouvrait d'une façon nonchalante et cynique
Son ventre plein d'exhalaisons.
Re: Poptávka - nástroj pro výpočet ceny předmětu
Tady je balik 2da, mezi kterymi jsou i iprp, ze kterych se generuje cena.
V podstate je to takhle:
* Zakladni cena predmetu je stanovena v baseitems.2da
* K tomu se pricte druha mocnina souctu cen properties nasoben 1000
* To cele se pak jeste vynasobi base multiplikatorem z baseitems.2da
Jak ale ten vypocet funguje - to je potreba vyzkoumat
V podstate je to takhle:
* Zakladni cena predmetu je stanovena v baseitems.2da
* K tomu se pricte druha mocnina souctu cen properties nasoben 1000
* To cele se pak jeste vynasobi base multiplikatorem z baseitems.2da
Jak ale ten vypocet funguje - to je potreba vyzkoumat
- Attachments
-
- nwn_standard.rar
- (602.44 KiB) Downloaded 292 times
Neaktivní a nezasahující do vývoje. Pouze nouzový support pro WB/DM.
***********************************************
Les jambes en l'air, comme une femme lubrique,
Brûlante et suant les poisons,
Ouvrait d'une façon nonchalante et cynique
Son ventre plein d'exhalaisons.
***********************************************
Les jambes en l'air, comme une femme lubrique,
Brûlante et suant les poisons,
Ouvrait d'une façon nonchalante et cynique
Son ventre plein d'exhalaisons.
Re: Poptávka - nástroj pro výpočet ceny předmětu
http://social.bioware.com/%252520http:/ ... 20#6285176
Vypocet ceny predmetu.
ItemCost = [BaseCost + 1000*(Multiplier^2 - NegMultiplier^2) + SpellCosts]*MaxStack*BaseMult +
The Multiplier is the sum of the costs of all the Item Properties whose costs are positive.
So now we need the formula to find the value of a Item Properties. Just Keep in mind that by the formula above all of the Item Properties values are going to be added together, Squared them multiplied by 1000 before being added to the value of the item. example an item with only one Item Properties with a value of 5. would end up adding 5^2 * 1000 = 2,500 to the value of the item. If the Item has 2 Item Properties with values of 5 it would add (5+5)^2 * 1000 = 100,000 to the value of the item. This is why most number you see for the cost will be low.
Any way here is the formula :
ItemPropertyCost = PropertyCost * SubtypeCost + CostValue
PropertyCost
In itempropdef.2da, get the floating point value in the Cost column, at the row indexed by the
PropertyName Field of the ItemProperty Struct. If the Cost column value is ****, treat it as 0. This
floating point value is the PropertyCost
SubtypeCost
If the PropertyCost obtained above from itempropdef.2da was 0, then get the ResRef in the
SubTypeResRef column of itempropdef.2da, at the row indexed by the 2PropertyName Field of the
ItemProperty Struct. This is the resref of the subtype table 2da.
In the subtype 2da, get the floating point value in the Cost column at the row indexed by the Subtype
Field of the ItemProperty Struct. This floating point value is the SubtypeCost.
Only get the SubtypeCost if the PropertyCost was 0. If the PropertyCost was greater than 0, then the
SubtypeCost is automatically 0 instead.
CostValue
In iprp_costtable.2da, get the string in the Name column at the row indexed by the CostTable Field in
the ItemProperty Struct. This is the ResRef of the cost table 2da.
In the cost table, get the floating point value in the Cost column in the row indexed by the CostValue
Field in the ItemProperty Struct. This floating point value is the CostValue.
I hope that helps.
Vypocet ceny predmetu.
ItemCost = [BaseCost + 1000*(Multiplier^2 - NegMultiplier^2) + SpellCosts]*MaxStack*BaseMult +
The Multiplier is the sum of the costs of all the Item Properties whose costs are positive.
So now we need the formula to find the value of a Item Properties. Just Keep in mind that by the formula above all of the Item Properties values are going to be added together, Squared them multiplied by 1000 before being added to the value of the item. example an item with only one Item Properties with a value of 5. would end up adding 5^2 * 1000 = 2,500 to the value of the item. If the Item has 2 Item Properties with values of 5 it would add (5+5)^2 * 1000 = 100,000 to the value of the item. This is why most number you see for the cost will be low.
Any way here is the formula :
ItemPropertyCost = PropertyCost * SubtypeCost + CostValue
PropertyCost
In itempropdef.2da, get the floating point value in the Cost column, at the row indexed by the
PropertyName Field of the ItemProperty Struct. If the Cost column value is ****, treat it as 0. This
floating point value is the PropertyCost
SubtypeCost
If the PropertyCost obtained above from itempropdef.2da was 0, then get the ResRef in the
SubTypeResRef column of itempropdef.2da, at the row indexed by the 2PropertyName Field of the
ItemProperty Struct. This is the resref of the subtype table 2da.
In the subtype 2da, get the floating point value in the Cost column at the row indexed by the Subtype
Field of the ItemProperty Struct. This floating point value is the SubtypeCost.
Only get the SubtypeCost if the PropertyCost was 0. If the PropertyCost was greater than 0, then the
SubtypeCost is automatically 0 instead.
CostValue
In iprp_costtable.2da, get the string in the Name column at the row indexed by the CostTable Field in
the ItemProperty Struct. This is the ResRef of the cost table 2da.
In the cost table, get the floating point value in the Cost column in the row indexed by the CostValue
Field in the ItemProperty Struct. This floating point value is the CostValue.
I hope that helps.
Neaktivní a nezasahující do vývoje. Pouze nouzový support pro WB/DM.
***********************************************
Les jambes en l'air, comme une femme lubrique,
Brûlante et suant les poisons,
Ouvrait d'une façon nonchalante et cynique
Son ventre plein d'exhalaisons.
***********************************************
Les jambes en l'air, comme une femme lubrique,
Brûlante et suant les poisons,
Ouvrait d'une façon nonchalante et cynique
Son ventre plein d'exhalaisons.