Thalie


Persistentní svět hry Neverwinter Nights
It is currently 02:10 23. Jun 2025

All times are UTC + 1 hour [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Poptávka - nástroj pro výpočet ceny předmětu
PostPosted: 16:46 31. Jan 2012 
Offline
Temnota
User avatar
 WWW  ICQ  Profile

Joined: 10:42 10. May 2007
Posts: 16270
Location: Somewhere around nothing
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?

_________________
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.


Top
Reply with quote  

 Post subject: Re: Poptávka - nástroj pro výpočet ceny předmětu
PostPosted: 11:31 01. Feb 2012 
Offline
Velmistr
User avatar
 Profile

Joined: 13:55 05. Oct 2008
Posts: 1491
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


Top
Reply with quote  

 Post subject: Re: Poptávka - nástroj pro výpočet ceny předmětu
PostPosted: 12:15 01. Feb 2012 
Offline
Temnota
User avatar
 WWW  ICQ  Profile

Joined: 10:42 10. May 2007
Posts: 16270
Location: Somewhere around nothing
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.


Top
Reply with quote  

 Post subject: Re: Poptávka - nástroj pro výpočet ceny předmětu
PostPosted: 22:05 01. Feb 2012 
Offline
Temnota
User avatar
 WWW  ICQ  Profile

Joined: 10:42 10. May 2007
Posts: 16270
Location: Somewhere around nothing
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 :)


Attachments:
nwn_standard.rar [602.44 KiB]
Downloaded 226 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.
Top
Reply with quote  

 Post subject: Re: Poptávka - nástroj pro výpočet ceny předmětu
PostPosted: 13:28 03. Feb 2012 
Offline
Temnota
User avatar
 WWW  ICQ  Profile

Joined: 10:42 10. May 2007
Posts: 16270
Location: Somewhere around nothing
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.

_________________
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.


Top
Reply with quote  

Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]



Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group  
Design By Poker Bandits