Official Inventory Expansion

03/14/2017 20:40 blackdraonx61#1
[Only registered and activated users can see links. Click Here To Register...]
Bugs solved(video1):
#Last Update (21.04.2018):
03/15/2017 13:32 StoneyStyles#2
Nice thanks for share.
03/16/2017 07:33 blackdraonx61#3
Quote:
Originally Posted by sema1995 View Post
You have to be kidding me...

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
What is this?
Another way my smart friend?
03/16/2017 07:36 BosniaWarlord#4
Thanks for it !
03/16/2017 08:15 blackdraonx61#5
Quote:
Originally Posted by BosniaWarlord View Post
Thanks for it !
:)
Update missing codes:
uiiventory.py:
Find
def SetEquipmentPage(self, page):
self.equipmentPageIndex = page
self.equipmentTab[1-page].SetUp()
self.RefreshEquipSlotWindow()
Add;
[Only registered and activated users can see links. Click Here To Register...]
03/16/2017 12:07 .Alpha.#6
Create an List Object containing all the elements so you dont have to hide and show every element manually

ex:
Code:
coverImages = []
coverImages.append((self.GetChild("engel_01_open"), self.GetChild("engel_01_close")))
....


for i, coverImage in enumerate(coverImages):
    (openImage, closeImage) = coverImage
    ....

#or

for coverImage in coverImages:
    (openImage, closeImage) = coverImage
    self.closeImage.Show()

for i in xrange(player.GetEnvanter()):
    (openImage, closeImage) = coverImages[i]
    openImage.Show()
something more like that would be nice,
in programing there are always better ways to achieve your goals
and you well used the knowledge you had and it works its ok i guess
its just not very well written
03/16/2017 13:10 blackdraonx61#7
Quote:
Originally Posted by .Alpha. View Post
Create an List Object containing all the elements so you dont have to hide and show every element manually

ex:
Code:
coverImages = []
coverImages.append((self.GetChild("engel_01_open"), self.GetChild("engel_01_close")))
....


for i, coverImage in enumerate(coverImages):
    (openImage, closeImage) = coverImage
    ....

#or

for coverImage in coverImages:
    (openImage, closeImage) = coverImage
    self.closeImage.Show()

for i in xrange(player.GetEnvanter()):
    (openImage, closeImage) = coverImages[i]
    openImage.Show()
something more like that would be nice,
in programing there are always better ways to achieve your goals
and you well used the knowledge you had and it works its ok i guess
its just not very well written
Sorry my python is bad but they just criticize me
03/16/2017 15:22 redryan#8
Thanks for the release, i know some people that will use this for sure.

sema1995, i dont know what the problem.
Since when on programming you must do things on just one way?
Of course his way is longer to write then how .Alpha. showed, but so what?
At the end of the day what matters is if it works or not.
03/16/2017 19:55 Chris9090909090#9
0316 19:47:16490 ::
uiInventory.py(line:380) __LoadWindow
uiInventory.py(line:127) __init__
uiInventory.py(line:219) __LoadWindow

InventoryWindow.LoadWindow.BindObject - <type 'exceptions.AttributeError'>:'InventoryWindow' object has no attribute 'OverInItem'

0316 19:47:16490 :: ================================================== ================================================== ========
0316 19:47:16490 :: Abort!!!!


kriege den fehler wenn ich connecten will
03/16/2017 21:08 blackdraonx61#10
Quote:
Originally Posted by gerald500 View Post
this code is terrible ^^
Tell me better way but you can't :(
03/16/2017 21:50 mq1n4#11
Quote:
Originally Posted by blackdraonx61 View Post
Tell me better way but you can't :(
It's not hard.







It can be done much simpler. I've wrote for only a example.
03/16/2017 22:18 blackdraonx61#12
Quote:
Originally Posted by mq1n4 View Post
It's not hard.







It can be done much simpler. I've wrote for only a example.
Thanks my python is bad
03/17/2017 02:42 VegaS ♆#13
These criticisms are constructive, you would need to be glad that some people are trying to give you a few tricks of their knowledge for you to be better in the future.
Every day we learn new things, you should gather all the comments that were obtained each time with different parts and to collect them, and then next time you'll have a much better structured code compared to last time.
No one insulted you personally, they just insulted code.
  • The structure of the system itself is 0.1% compared to the official structure.
  • But here is a big part of uiInventory rewritten in some lines. (I have not tested, i just give you some points, also and my points is ugly, all time can be better, but if they works good, doesn't importantly.)

English isn’t my first language, so please excuse any mistakes.

Code:
def get(key):
    inventoryDict = {
        2: [0, 1, 2, 3],
        3: [4, 5],
        4: [6, 7, 8],
        5: [9, 10, 11],
        6: [12, 13, 14],
        7: [15, 16, 17]		
    }
    
    for k, v in inventoryDict.iteritems():
        if key in v:
            return k
Code:
self.main = {
	"elements" : {
		"open" : [GetObject("inventory_0%d_open" % (i+1)) for i in xrange(player.INVENTORY_MAX_LINE)],						
		"close" : [GetObject("inventory_0%d_close" % (i+1)) for i in xrange(player.INVENTORY_MAX_LINE)]
	}
}
for wnd in [self.main["elements"]["open"], self.main["elements"]["close"]]:
	wnd.Hide()
	
for tabButton in self.main["elements"]["open"]:
	self.tabButton.SetEvent(ui.__mem_func__(self.OpenInventoryDialog))
03/17/2017 14:31 Chris9090909090#14
belt iventory is locked why
03/17/2017 21:36 blackdraonx61#15
Quote:
Originally Posted by VegaS ♆ View Post
These criticisms are constructive, you would need to be glad that some people are trying to give you a few tricks of their knowledge for you to be better in the future.
Every day we learn new things, you should gather all the comments that were obtained each time with different parts and to collect them, and then next time you'll have a much better structured code compared to last time.
No one insulted you personally, they just insulted code.
  • The structure of the system itself is 0.1% compared to the official structure.
  • But here is a big part of uiInventory rewritten in some lines. (I have not tested, i just give you some points, also and my points is ugly, all time can be better, but if they works good, doesn't importantly.)

English isn’t my first language, so please excuse any mistakes.

Code:
def get(key):
    inventoryDict = {
        2: [0, 1, 2, 3],
        3: [4, 5],
        4: [6, 7, 8],
        5: [9, 10, 11],
        6: [12, 13, 14],
        7: [15, 16, 17]		
    }
    
    for k, v in inventoryDict.iteritems():
        if key in v:
            return k
Code:
self.main = {
	"elements" : {
		"open" : [GetObject("inventory_0%d_open" % (i+1)) for i in xrange(player.INVENTORY_MAX_LINE)],						
		"close" : [GetObject("inventory_0%d_close" % (i+1)) for i in xrange(player.INVENTORY_MAX_LINE)]
	}
}
for wnd in [self.main["elements"]["open"], self.main["elements"]["close"]]:
	wnd.Hide()
	
for tabButton in self.main["elements"]["open"]:
	self.tabButton.SetEvent(ui.__mem_func__(self.OpenInventoryDialog))
thanks my bro :)