Fooling around with new Inventory ideas....

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
dx_blaster
Thug
Posts: 43
Joined: Fri Aug 12, 2011 2:47 am

Fooling around with new Inventory ideas....

Post by dx_blaster »

Hi all,

I was reading though old DXEditing posts and found this:
Expanding the Inventory - A Joint Venture by CorinthMaxwell
viewtopic.php?f=36&t=7019

And I was asking my self, what I would change to make the inventory more useful / handy for me.

Well I found 2 things which annoy me a little bit:
1st four items a wasting space in my eyes very much:
lockpicks, multitools, medkits, and energy cells;
Why? Well as I understand it a lockpick is a nano augmented device. When I pick up a new lockpick, I really only add an extra authorization to used it an +1 time.
Like a software client license agreement today. :) Same goes for the multitool.

As with the medkit and energiecell, I rarely use them but they are useful sometimes.

So I would like have an extra 4 slot inventory, exclusively for those items, instate of ‘wasting’ my already very few Item slots.

2nd: sometimes, I want to carry just a little more stuff, mostly because I collect the weapon mods for later use.

As above mentioned, someone already tried to mess with the inventory but was not successful in the end (but nearly). So worked my self through the code changes and I’m not sure if this are all the needed modifications it takes to make it work.

Also I believe a 6x6 array is not very elegant idea because it messes with the upper task bar length. So I think a 5 times 7 array might work better (-> an extra row of 5 inventory slots).

Also it fits better with the concept of an extra 4 slot exclusive inventory.
To demonstrate what I have in mind I have cut and past a quick and dirty inventory prototype picture.
Now the reason why I post this idea is, to share it with you.
Comment here what you think about a new inventory.
Is it a good bad or a terrible idea?
What would you rather have changed about the inventory handling in the game?

I guess to expand the inventory by an extra 5x1 row will be easier, so ill try this first.
Also I fear to script the new extra 4 slot inventory with all its behaviour might be nearly impossible for me with my little programming skills. So if you want to help, or suggest some ideas how it might be done, feel free to tell them here.
Attachments
New Inventory prototype, nothing is ingame done right now, just a dirty cut and past study.
New Inventory prototype, nothing is ingame done right now, just a dirty cut and past study.
wbr
DX_Blaster
sorry for my bad English it is not my native tongue

latest cool thing i found on the net:
http://www.youtube.com/watch?v=Y414Q7vV ... re=related
http://www.youtube.com/watch?v=QoFe8hRy ... r_embedded
dx_blaster
Thug
Posts: 43
Joined: Fri Aug 12, 2011 2:47 am

Re: Fooling around with new Inventory ideas....

Post by dx_blaster »

Update:
Well turns out the new UI texturing part was the easy part.
I ran into the same problems as CorinthMaxwell, the Game turns buggy as soon as I i change the dimension of the Inventory array.
var travel byte invSlots[30]; -> this i guess is the Inventory array.
If I make it bigger than 31 the game crashes as soon as I try to open the inventory with this error:
Inventory Array Crash
Inventory Array Crash
funny thing is i can shrink the inventory size without any problems, so I guess the max inv storage is either hardcoded into the binary (DeusEx .dll or .exe) or the there is a bug in the DeusExplayer.u.
i tried to walk myself though the Inventory handling code in DeusExplaye.u, but I’m not a good coder so i can't find any suspicious things.

Maybe (hoefully) someone much more experienced in c++ and unreal script codeing can figure out what the actual showstopper here is. Right now I will focus on creating a 2nd smaller (4x1) inventory array for the lock pick, multi tool, energy cell and med kit. Hope I’m have more success with that.
wbr
DX_Blaster
sorry for my bad English it is not my native tongue

latest cool thing i found on the net:
http://www.youtube.com/watch?v=Y414Q7vV ... re=related
http://www.youtube.com/watch?v=QoFe8hRy ... r_embedded
dx_blaster
Thug
Posts: 43
Joined: Fri Aug 12, 2011 2:47 am

Re: Fooling around with new Inventory ideas....

Post by dx_blaster »

Well I guess I figured out what the problem is, but I have no idea how to avoid or fix it.
Looks like the variable declaration in DeusEx is broken, or something breaks it at runtime.

I did some trial and error and figured out that following declaration will crash the game:
‘var byte testArray[64];’
it will compile without any error or warning, but it will crash at any number grater than 31, no matter if it’s a ‘byte’, ‘int’,…

But a ‘local’ declaration of an array works without error in game.
‘local byte testArray[64];’ or ‘local travel byte testArray[64]; ‘

As the player script uses: ‘var travel byte invSlots[30];’
I don’t know it the 'travel' function correctly if the Array is declared as 'local' or if it has to be declared as 'var'. Also I have no f****** idea why DeusEx breaks at a values higher than '31' !!! Looks like its a DeusEx bug, because I saw declaration like 'var int myArray[100];' used in native unreal scripts, and there seems to be no problem at all.

What needs to be done:
1st find the bug -> good luck with that... (I'm not skilled enough, someone else has to do that)
2nd find a way around, like using 'local' instead of 'var' and hope it will work.

Edit: Error, Local variables are only allowed in functions
so that a definitive show-stopper, i have no idea how to fix this bug!
wbr
DX_Blaster
sorry for my bad English it is not my native tongue

latest cool thing i found on the net:
http://www.youtube.com/watch?v=Y414Q7vV ... re=related
http://www.youtube.com/watch?v=QoFe8hRy ... r_embedded
Morpheus
X-51
Posts: 967
Joined: Thu Jan 27, 2005 9:56 am
Location: A planet near mars

Re: Fooling around with new Inventory ideas....

Post by Morpheus »

You have a good idea there, forgive me, I'll read it properly later, need to eat and go out soon, but I tried once getting the MP belt working for SP as it had specific items in the first few slots and they couldn't be changed (can't remember what) so maybe instead of adding new inventory slots, how about modifying the belt instead to allow the first 4 slots to be used how you tried to get the inventory working? But instead of having the items in the inventory screen too, how about just having them in the 4 slots of the belt only so that would free up a little more space in inventory? granted you'd have less slots on belt, but you don't need too many anyway, just a couple for weapons and one for baton/crowbar/knife (or that is how I have it anyway)
My nature videos: http://www.youtube.com/user/DynamixWarePro
My whistle/flute videos (and some other videos): http://www.youtube.com/user/DXMorpheus
Post Reply