PDA

View Full Version : custom inventory list



deff
May 29th, 2017, 16:24
I'm working on an extension of corerpg, and i would like to modify the behavior of the inventory list, which is a list_charinv if im not wrong.

There should be a default item when you create your new character, and it should not be possible for the player to remove it, he could just modify the number of it (0 to 10+)

I did not see in the windowlist doc a way to do this.

Could someone help me please ? :)

Ken L
May 29th, 2017, 18:01
You could simply just add a label/field to an area above the inventory.

deff
May 29th, 2017, 18:46
Hehe too easy ;) But I really need it as an item object, in order to drag and drop it from and to the party sheet.

Ken L
May 29th, 2017, 19:39
You can create a custom onDrag for the various destinations to check a flag if the item moved is your special item and on removing/adding quantities you do not exceed 10 nor does the item get removed when reduced to 0.

Oh, and you need to put some lua in the window such that it can't be deleted either by modifying the delete logic.

deff
May 31st, 2017, 07:06
ok, it sounds a little tricky and i do not see really the point, but i will explore this path. Thanks a lot Ken L