Adding/Editing Items at NPC -> Gameserver crashes

07/07/2022 11:29 OracleSilkroad#1
Hello everyone,

So, we're trying to add/edit the items at some of our NPCs (Jangan, Donwhang & Constantinople). We've edited items (scrolls, avatars, ...) at NPCs before and it worked out just fine.


We want to give our players the possibility to acquire D11 and D12 full blue & SoX.

So far, everytime we tried to edit anything about those NPCs, our gameserver just crashes/closes upon trying to start it.

This is what we've tried so far:

1) Used a tool to edit our NPCs -> gameserver just crashes/closes

2) Manually add the lines in _RefShopGoods, _RefPackageItem, _RefScrapOfPackageItem, _RefPricePolicyOfItem -> gameserver just crashes/closes

3) Edit the existing lines in all of those tables, for example ONLY changing the lines for the D1 Sword in Jangan's NPC to D11 Sword -> gameserver just crashes/closes


This is what the lines looked like. In this example, we wanted to edit the D1 Sword from Weapon Trader NPC at Jangan to D11 for testing purposes:

RefPackageItem:
PHP Code:
1    15    2697    PACKAGE_ITEM_CH_SWORD_11_C_RARE    0    EXPAND_TERM_ALL    SN_ITEM_CH_SWORD_11_C_RARE    SN_ITEM_CH_SWORD_11_C_RARE_TT_DESC    item\china\weapon\sword_11.ddj    -1    xxx    -1    xxx    -1    xxx    -1    xxx 
RefScrapOfPackageItem (126 referring to the durability, we also tried it with 0, same result)
PHP Code:
1    15    PACKAGE_ITEM_CH_SWORD_11_C_RARE    ITEM_CH_SWORD_11_C_RARE    8    0    126    0    0    0    0    0    0    0    0    0    0    0    0    0    -1    xxx    -1    xxx    -1    xxx    -1    xxx 
RefPriceOfPolicyItem
PHP Code:
1    15    PACKAGE_ITEM_CH_SWORD_11_C_RARE    1    0    100000000    0    xxx    0    xxx    0    xxx    0    xxx 
RefShopGoods
PHP Code:
1    15    STORE_CH_SMITH_TAB1    PACKAGE_ITEM_CH_SWORD_11_RARE    0    -1    xxx    -1    xxx    -1    xxx    -1    xxx 

We are at a point where we don't know what we might be forgetting or missing out. Is there anything you see that we simply don't!?

Would appreciate any form of idea or insight!
07/07/2022 11:58 Judgelemental#2
Quote:
Originally Posted by OracleSilkroad View Post
Hello everyone,

So, we're trying to add/edit the items at some of our NPCs (Jangan, Donwhang & Constantinople). We've edited items (scrolls, avatars, ...) at NPCs before and it worked out just fine.


We want to give our players the possibility to acquire D11 and D12 full blue & SoX.

So far, everytime we tried to edit anything about those NPCs, our gameserver just crashes/closes upon trying to start it.

This is what we've tried so far:

1) Used a tool to edit our NPCs -> gameserver just crashes/closes

2) Manually add the lines in _RefShopGoods, _RefPackageItem, _RefScrapOfPackageItem, _RefPricePolicyOfItem -> gameserver just crashes/closes

3) Edit the existing lines in all of those tables, for example ONLY changing the lines for the D1 Sword in Jangan's NPC to D11 Sword -> gameserver just crashes/closes


This is what the lines looked like. In this example, we wanted to edit the D1 Sword from Weapon Trader NPC at Jangan to D11 for testing purposes:

RefPackageItem:
PHP Code:
1    15    2697    PACKAGE_ITEM_CH_SWORD_11_C_RARE    0    EXPAND_TERM_ALL    SN_ITEM_CH_SWORD_11_C_RARE    SN_ITEM_CH_SWORD_11_C_RARE_TT_DESC    item\china\weapon\sword_11.ddj    -1    xxx    -1    xxx    -1    xxx    -1    xxx 
RefScrapOfPackageItem (126 referring to the durability, we also tried it with 0, same result)
PHP Code:
1    15    PACKAGE_ITEM_CH_SWORD_11_C_RARE    ITEM_CH_SWORD_11_C_RARE    8    0    126    0    0    0    0    0    0    0    0    0    0    0    0    0    -1    xxx    -1    xxx    -1    xxx    -1    xxx 
RefPriceOfPolicyItem
PHP Code:
1    15    PACKAGE_ITEM_CH_SWORD_11_C_RARE    1    0    100000000    0    xxx    0    xxx    0    xxx    0    xxx 
RefShopGoods
PHP Code:
1    15    STORE_CH_SMITH_TAB1    PACKAGE_ITEM_CH_SWORD_11_RARE    0    -1    xxx    -1    xxx    -1    xxx    -1    xxx 

We are at a point where we don't know what we might be forgetting or missing out. Is there anything you see that we simply don't!?

Would appreciate any form of idea or insight!
Make sure you have either disabled or removed the highlighted line because you might not want to add it onto already existing lines.

[Only registered and activated users can see links. Click Here To Register...]


And second, if you are using a default vSRO 1.188 database the item you are trying to add is disabled

[Only registered and activated users can see links. Click Here To Register...]
07/07/2022 14:15 OracleSilkroad#3
Quote:
Originally Posted by Judgelemental View Post
Make sure you have either disabled or removed the highlighted line because you might not want to add it onto already existing lines.

[Only registered and activated users can see links. Click Here To Register...]


And second, if you are using a default vSRO 1.188 database the item you are trying to add is disabled

[Only registered and activated users can see links. Click Here To Register...]


Thank you so much for your reply!

The item is active, Service is on 1 in _RefObjCommon and we can spawn it ingame just fine.

With regards to disabling/removing the line: we've both tried to add a new line and add the item to a free slot of the NPC and[ to simply edit an existing line but changing the item that it references, but neither of those things worked. Our gameserver just didn't want to initialise and always closed down.
07/07/2022 14:52 Dallin¥#4
according to the line you are adding to your _RefScrapOfPackageItem your data value is wrong


SELECT a.Dur_L FROM SRO_VT_SHARD.dbo._RefObjItem a WITH(NOLOCK)
JOIN SRO_VT_SHARD.dbo._RefObjCommon b WITH(NOLOCK) on a.ID=b.Link
where b.CodeName128 like 'ITEM_CH_SWORD_11_C_RARE'

by using this query you will be able to get the correct data of each item.
07/07/2022 15:04 OracleSilkroad#5
Quote:
Originally Posted by Dallin¥ View Post
according to the line you are adding to your _RefScrapOfPackageItem your data value is wrong


SELECT a.Dur_L FROM SRO_VT_SHARD.dbo._RefObjItem a WITH(NOLOCK)
JOIN SRO_VT_SHARD.dbo._RefObjCommon b WITH(NOLOCK) on a.ID=b.Link
where b.CodeName128 like 'ITEM_CH_SWORD_11_C_RARE'

by using this query you will be able to get the correct data of each item.
Thank you so much, Dallin! We'll try that one out later this evening and will let you know if it worked. :)

Quote:
Originally Posted by Dallin¥ View Post
according to the line you are adding to your _RefScrapOfPackageItem your data value is wrong


SELECT a.Dur_L FROM SRO_VT_SHARD.dbo._RefObjItem a WITH(NOLOCK)
JOIN SRO_VT_SHARD.dbo._RefObjCommon b WITH(NOLOCK) on a.ID=b.Link
where b.CodeName128 like 'ITEM_CH_SWORD_11_C_RARE'

by using this query you will be able to get the correct data of each item.

Update: It worked with your help, thank you so much!

We accidentally entered the wrong data values, they already had the additional values granted from the blue on them.


Thread can be closed. :)