Open Steinny opened 7 months ago
I haven't got the issue, if you think there is a missing code in scripts, you need to open this issue in Scripts-X. If you give an example of the issue, we can take a look.
On my side I removed the value of an item
I use Orion. Value is set to 43 by default.. I don't know why. But its not 1825361101
c_scribe - price of books SELL=i_book_sm,{5 10} SELL=i_book_lg,{5 10}
Maybe there is a misunderstanding, {5 10} is not a price, it's an amount of item can be sold by vendor, in this example {5 10} means it will sell random value from 5 to 10. Like it can sell 7 i_book_sm or next time it restocked it can be 6, 9, 10 etc. Prices comes from VALUE if TAG.OVERRIDE.VALUE isn't set for item.
I know what it is. {5 10}
[ITEMDEF 0ff1] DEFNAME=i_book_sm TYPE=t_book CATEGORY=Items by Professions SUBSECTION=Scribe DESCRIPTION=Dark Brown Book
This was always the case with the X1 version, but an item that was not previously entered would not appear in the vendor and would give a console warning “ non-vendable items”
This was always the case with the X1 version, but an item that was not previously entered would not appear in the vendor and would give a console warning “ non-vendable items”
There is a vendable item class but could you give me an example, because I haven't got what you mean with "item that was not previously entered" while you have to set sell and buy menus statically in script.
I didn't do anything. I just downloaded the scripts
c_scribe_f
of course, we can just agree that this needs to be fixed in the scripts.
This was always the case with the X1 version, but an item that was not previously entered would not appear in the vendor and would give a console warning “ non-vendable items”
There is a vendable item class but could you give me an example, because I haven't got what you mean with "item that was not previously entered" while you have to set sell and buy menus statically in script.
Normalde bir eşyaya hiç value değeri verilmemiş (value=0 girilmesi hariç) bir itemin altında hiç bir şekilde value yazmıyor ise (yukarda verilen book scpsi gibi) o eşya vendorda listelenmeye çalıştığında (tam emin değilim, satış layerine eklendiğinde de olabilir) “bu eşya satılabilen bir eşya değil” gibi bir uyarı verip satış listesine hiç eklemiyor/göstermiyordu ama şu an bir eşyaya hiç bir value değeri belirtmediği zaman yukardakş görselde belirtildiği üzere vendor listesine eklediği gibi bir de anlamsız satış fiyatı gösteriyor veya set ediyor.
On my side I removed the value of an item
I use Orion. Value is set to 43 by default.. I don't know why. But its not 1825361101
Could be that price taken from tiledata?
Consider an item defined as follows:
[ITEMDEF i_empty_valued_item] DEFNAME=i_empty_valued_item ID=i_katana NAME=empty valued TYPE=t_script
In this item definition, there is no 'VALUE' value specified. When we create this item directly without calling the vendor list and check its value using '.xshow value', it shows 0 (although it should ideally be blank). However, after adding this item to a vendor's sell list and then calling the sell menu (i.e., when we 'buy' it), the value of all these 'i_zero_valued_item' items is set to INT32_MIN (-214748....). I've checked older versions but couldn't find the difference. Whatever is happening, it seems to occur after the sell list is retrieved. I think the problem lies here.
The problem is exactly vendorItem->Item_GetDef()->ResetMakeValue();
I think there is a data type mismatch m_iLo and m_iHi are int64 but under CItemBase::GetMakeValue
GetLinear is int
Okay the issue is exactly mismatch of default values
The issue, as you said, is a mismatch problem, but it's just a simple faulty if statement. Instead of the default INT32_MIN, INT64_MIN was used in the if statement, which caused the mismatch for items without prices.
If item in sell list of vendor has no price. (It is a mistake in the default scripts) price set as 1825361101 and the order of the goods list is also broken