Remember you only get the inventory that has already been set up in the script.
Tue Feb 22, 2011 3:20 pm
Pantera1993
Joined: Wed Jul 06, 2011 5:11 pm Posts: 226
Re: Visible Inventory [1.1]
So, I've implemented the script into my mod, I've defined all the weapons in Inventory.lua and I've attached the holster properly to my actors. The problem is that when I try to switch weapons, they don't show up on my actors back. Does anyone know how I could fix this?
Try uploading the mod and we'll see what you're doing wrong.
Wed Jul 13, 2011 5:05 pm
Pantera1993
Joined: Wed Jul 06, 2011 5:11 pm Posts: 226
Re: Visible Inventory [1.1]
Seems that this doesn't work with build 25...
Fri Aug 05, 2011 5:07 am
ShadowStorm
Joined: Thu Jan 21, 2010 10:59 pm Posts: 151
Re: Visible Inventory [1.1]
I implanted this mod into my own and it works fine on build 25...
Fri Aug 05, 2011 5:59 am
Pantera1993
Joined: Wed Jul 06, 2011 5:11 pm Posts: 226
Re: Visible Inventory [1.1]
That's pretty weird because the console tells me that gunback and gunside aren't defined when they worked perfectly fine in b24 with no changes to the code.. Even just the Holster Man has the same problem in build 25.
There should be no reason why this mod will not work in B25, as far as I'm aware the vanilla content it references hasn't relocated at all, but I'll check it out for you.
EDIT: Ah no, I see what it is. Azukki put a GibThis script on both holsters, in the full knowledge that scripted attachables didn't work in B24. Now that they do, they're both gibbing on creation, hahaha. The fix is to open up Index.ini, and comment out lines 40 and 69. I'll upload a fixed version asap.
EDIT 2: Here, one successfully B25 compatible holster mod. I recommend to all those who already had a mod made out of this that they simply use this fix posted just above this edit. Download.
Fri Aug 05, 2011 12:13 pm
Pantera1993
Joined: Wed Jul 06, 2011 5:11 pm Posts: 226
Re: Visible Inventory [1.1]
Ah that explains it. Thanks Roast!
Fri Aug 05, 2011 1:44 pm
Pantera1993
Joined: Wed Jul 06, 2011 5:11 pm Posts: 226
Re: Visible Inventory [1.1]
It seems that the build 25 fix only works on the surface. When an actor using the visible inventory dies, it spams the console with "gunback not defined..." which will lag the hell out of the game. I'm no good with lua so I can't really come up with a fix so I'm just letting everyone know this problem so someone could whip something up if they feel like it!
Tue Aug 23, 2011 4:37 am
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
Re: Visible Inventory [1.1]
Roast Veg wrote:
Azukki put a GibThis script on both holsters, in the full knowledge that scripted attachables didn't work in B24. Now that they do, they're both gibbing on creation, hahaha.
Yeah, I basically set up a bullseye on the mod for incompatibility the moment attachable scripting came along, by exploiting its absence to avoid doppleganger weapons lying around that aren't actually weapons, just a graphic for a holstered weapon of a guy who got gibbed/lost his leg.
If your fix only made it so the old method still works, I'll update it sooner or later to not just be compatible with attachable scripting, but primarily done using attachable scripting, since that's more suitable to the application. I also have an idea for a method for making this dynamically work with all weapons instead of a predefined list, but I'm not tremendously optimistic about it.
So, Pantera, lag on death shouldn't be a problem once I do that, but I'm sure I'll have a nice set of fresh new problems for users of this mod/template/guide/proofofconcept to deal with on the new one.
Short term fix is to insert an if gunback with a Gibthis on else.
Tue Aug 23, 2011 11:50 pm
Pantera1993
Joined: Wed Jul 06, 2011 5:11 pm Posts: 226
Re: Visible Inventory [1.1]
Could you put it in some form of code please? I'm not too good with lua
Wed Aug 24, 2011 1:49 am
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
Re: Visible Inventory [1.1]
Here's a new script that utilizes b25's attachable scripting accessibility. This script is just intended for modders who want to incorporate this feature into their mod for their actors and guns, I'll make an actual .rte later for those less interested in making their own that just want the feature ingame to play around with.
Code:
function Create(self)
--The visible inventory system was originally made by Azukki, optimized by Roast Veg, and then modified to better utilize b25's features by Azukki
--"Define your weapons here by following the pattern. The number relates to the sprite frame and display priority. Big guns go in the latter entries and frames" --"You could also define extra information about the weapon in new categories if you need it."
--First, find the parent actor of the holster if self.Age > 20 then self.rootofdevice = MovableMan:GetMOFromID(self.RootID) if self.rootofdevice:IsActor() then self.operator = ToActor(self.rootofdevice) for d = 1, #self.Back do self.Back[d]["Held"] = false self.Back[d]["Active"] = false end
self.Frame = 0
if self.operator.Health > 0 then for c = 1, #self.Back do if self.operator:HasObject(self.Back[c]["PresetName"]) then self.Back[c]["Held"] = true for t = 1,MovableMan:GetMOIDCount()-1 do self.finder4 = MovableMan:GetMOFromID(t) if self.finder4.PresetName == self.Back[c]["PresetName"] and self.finder4.RootID == self.operator.ID then self.Back[c]["Active"] = true end end if self.Back[c]["Active"] == false and self.Back[c]["Held"] == true then self.Frame = c end end end end end end end
If you have a suggestion, comment, or problem with this code, reply here or PM me.
Oh hey, check out that OP up at the beginning of the thread.
Sat Sep 03, 2011 11:50 pm
Natti
Data Realms Elite
Joined: Fri Jul 03, 2009 11:05 am Posts: 3878
Re: Visible Inventory [2.0 Full Vanilla Arsenal, B25]
I'd love if you made this so that all the vanilla actors would have it. I would love it so goddamn much.
Sun Sep 04, 2011 9:44 am
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
Re: Visible Inventory [2.0 Full Vanilla Arsenal, B25]
Natti wrote:
I'd love if you made this so that all the vanilla actors would have it. I would love it so goddamn much.
That's what I was waiting to hear, to get started. I'm on it. It will have to replace some vanilla files, though, so it would conflict with other vanilla-editing mods, and installing it incorrectly could have DIREly inconvenient consequences.
I might also look into a way to stop same-name-different-faction weapons from getting mixed up. Now that I've put some thought into it, instead of just accepting the problem, I think it shouldn't be terribly hard.
Edit: There is something really strangely gratifying about editing Base.rte without the intention of just personal use. Bah, BG legs are always copies of FG legs, this'll be harder than I thought. (A longer, more tedious process, that is)
Attachments:
File comment: Crazy little green clones, always thinking they can carry an uber cannon, revolver cannon, peacemaker, and desert eagle. youareoverencumbered.bmp [20.87 KiB]
Not downloaded yet
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum