SrJardel Posted December 14, 2016 Share Posted December 14, 2016 (edited) Hello. I am trying to understand how to create a mod which does the following: Spoiler Player press a button. A popup appears on screen with an *x* item slot grid. Each of the slot content images are located at placeholder.tex -(just like inventoryimages.tex)- When clicked, each slot does: ThePlayer.components.Component:Function1("image_name_here") If image name contains "_this" or "_that" suffix, then it does: ThePlayer.components.Component:Function2("image_name_here") -Player.components.Component:Function1/2 currently only works if the user is admin. I would like to make it available to all users if possible, but this is not mandatory.- Player press the button again and the popup is closed. Given the wonders I see/subscribe on Steam Workshop, it seems to be a simple job. The thing is that, although I have done the art, I'm not skilled enough at Lua, so I would like to request some support on this task, if possible. I don't even need the code to be written if by any chance I find some other mod to use as basis, or a widget tutorial, etc... But at the moment, the only mod I found that seems to be the closest of what I want to do is Too Many Items DST. Unfortunatelly, I could not understand how to extract only the basics of what I need. Thanks in advance. Edited December 14, 2016 by SrJardel Link to comment https://forums.kleientertainment.com/forums/topic/72516-help-specific-support-needed/ Share on other sites More sharing options...
Serpens Posted December 14, 2016 Share Posted December 14, 2016 Unfortunately I also have no knowledge with UI and such stuff... But the "waypoint" and also the "auto-actions" mod do have an UI when pressing a key. So maybe the code of these mods will help. Link to comment https://forums.kleientertainment.com/forums/topic/72516-help-specific-support-needed/#findComment-848660 Share on other sites More sharing options...
SrJardel Posted December 14, 2016 Author Share Posted December 14, 2016 1 minute ago, Serpens said: Unfortunately I also have no knowledge with UI and such stuff... But the "waypoint" and also the "auto-actions" mod do have an UI when pressing a key. So maybe the code of these mods will help. Thank you mate, I will check it out. Link to comment https://forums.kleientertainment.com/forums/topic/72516-help-specific-support-needed/#findComment-848662 Share on other sites More sharing options...
SrJardel Posted December 17, 2016 Author Share Posted December 17, 2016 (edited) I've got it to work, it just need minor tweaks. I will attach the files, in case someone are willing to take a look at it. The only thing I need to figure out is all commented on "scripts/widgets/TMI_Invslot.lua" (Yes, I took TMI as base), it should be self explanatory. EDIT: I figured what "table.contains" does and got it to work as intended. My only request now is to be able to show the menu via opening a container instead of pressing a button. I will include a placeholder container in the attachment later. Thanks in advance. [DST]Test.zip Edited December 17, 2016 by SrJardel Link to comment https://forums.kleientertainment.com/forums/topic/72516-help-specific-support-needed/#findComment-849515 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now