Greslin Posted March 13, 2017 Author Share Posted March 13, 2017 Rolled back to a much, much earlier save. Changed object to NukaCola, cleared Piper's inventory altogether - she's carrying nothing at all. Shot her in the head, down she goes. Log says she has 4 Nukas on her. I thought perhaps companions/NPCs had hidden inventory items, maybe just in bleedout, and that I was registering those somehow. But while I can imagine a hidden Stim stash, having a secret reserve of sweet, sweet Nuka is probably unlikely. So that theory's out. I keep coming back to reference pointers, and some memory pointer set on what it THINKS is an actor ref but isn't, and so I'm getting junk memory data. I know the engine is supposed to be much better at memory management than that, but still, that's what this feels like. That, or something to do with variable type casting. Have not tried fooling with ReferenceAlias again yet, but will next. Link to comment Share on other sites More sharing options...
vkz89q Posted March 13, 2017 Share Posted March 13, 2017 (edited) Check my last reply from last page, maybe it will help you. Edit: Also make new game without your mod active, use console to cheat whatever you need, map markers, items etc, save. Then never lose that save. Enable your mod and test on that save everytime. I know companions make some events return player. For example, Event OnDying(actor akKiller), if companion kills someone and you check who is akKiller, it's player, not companion. Current companions kills are "player made" kills atleast. But the item count should work. It might be older version of your script running on that save. Edited March 13, 2017 by vkz89q Link to comment Share on other sites More sharing options...
shavkacagarikia Posted March 13, 2017 Share Posted March 13, 2017 Ok, I just tried this on my custom companion reference alias in quest: Scriptname XX:StimpakTest extends ReferenceAlias Potion Property Stimpak Auto Const Event OnEnterBleedOut() StimpakCheck() EndEvent function StimpakCheck() int stimcount = 0 Actor tempActor = Self.GetReference() as Actor stimcount = tempActor.GetItemCount(Stimpak) Debug.Notification("stims:"+stimcount) EndFunction I gave my companion 10 stimpaks and I had 4 in player inventory. First result says 29. Then I noticed I forgot to FILL the stimpak Property, so it was empty and took random item to count on. Then I filled the property and the result was 10 every time. Test on clean save and make sure your Properties are filled right. I don't get something, if companion had 10 stimpacks and notification wrote 10 too, wasn't that right number? Link to comment Share on other sites More sharing options...
vkz89q Posted March 13, 2017 Share Posted March 13, 2017 Yes. I did two tests: Test1: I forgot to fill Property stimpak and it was Empty and returned 29. Test2: I filled Property stimpak with Stimpak and it returned 10 and worked right. Link to comment Share on other sites More sharing options...
shavkacagarikia Posted March 13, 2017 Share Posted March 13, 2017 Yes. I did two tests: Test1: I forgot to fill Property stimpak and it was Empty and returned 29. Test2: I filled Property stimpak with Stimpak and it returned 10 and worked right.So that means that you don't have problems with that anymore right? Link to comment Share on other sites More sharing options...
vkz89q Posted March 13, 2017 Share Posted March 13, 2017 Check my last reply from last page, maybe it will help you. Edit: Also make new game without your mod active, use console to cheat whatever you need, map markers, items etc, save. Then never lose that save. Enable your mod and test on that save everytime. I know companions make some events return player. For example, Event OnDying(actor akKiller), if companion kills someone and you check who is akKiller, it's player, not companion. Current companions kills are "player made" kills atleast. But the item count should work. It might be older version of your script running on that save. Yes. I did two tests: Test1: I forgot to fill Property stimpak and it was Empty and returned 29. Test2: I filled Property stimpak with Stimpak and it returned 10 and worked right.So that means that you don't have problems with that anymore right? I'm not the one who posted this thread but no, I don't have problems. But the OP might have :tongue: Link to comment Share on other sites More sharing options...
Greslin Posted March 13, 2017 Author Share Posted March 13, 2017 Yeah, I'm still dealing with problems. Working through a clean save now. Will report results. Link to comment Share on other sites More sharing options...
Greslin Posted March 13, 2017 Author Share Posted March 13, 2017 Completely clean save, no mods other than mine. All DLCs installed. Normal difficulty. COC'ed to Red Rocket after leaving 111, met up with Dogmeat, ran through the molerat sequence. Set up trade with Dogmeat, gave him 6 Stimpaks. Shot him multiple times until he hit bleedout. Checked logs. 6 Stimpaks. Okay.. so that works. Possibilities now are: 1. Gunked up save game file, probably the issue. Will need to try now with a completely fresh game and see what happens. 2. Something that works great in Normal, but FUBARs in Survival. Unlikely, but possible. 3. Something that works great on Dogmeat, but FUBARs on Piper. Unlikely, but I suppose anything's possible. 4. Mod conflict. Possible, but I don't think so. I'll run on clean with my full mod loadout and see if I get the same results. So thanks, guys. The FNV savegames were never this finicky. I'll declare this "working" and try a clean runthrough, and see what happens when I reach Piper. If I turn up anything interesting, I'll post here. Link to comment Share on other sites More sharing options...
vkz89q Posted March 13, 2017 Share Posted March 13, 2017 Good job. Yeah, try on Piper and post results. If I have learned something about Fallout 4 modding, it's that clean saves are needed many times. I have had so many strange things that all clean up with clean save. You can always try on old save, disable your mod, make a save, and re-enable mod. Sometimes it can work but sometimes not. Link to comment Share on other sites More sharing options...
shavkacagarikia Posted March 13, 2017 Share Posted March 13, 2017 Completely clean save, no mods other than mine. All DLCs installed. Normal difficulty. COC'ed to Red Rocket after leaving 111, met up with Dogmeat, ran through the molerat sequence. Set up trade with Dogmeat, gave him 6 Stimpaks. Shot him multiple times until he hit bleedout. Checked logs. 6 Stimpaks. Okay.. so that works. Possibilities now are: 1. Gunked up save game file, probably the issue. Will need to try now with a completely fresh game and see what happens. 2. Something that works great in Normal, but FUBARs in Survival. Unlikely, but possible. 3. Something that works great on Dogmeat, but FUBARs on Piper. Unlikely, but I suppose anything's possible. 4. Mod conflict. Possible, but I don't think so. I'll run on clean with my full mod loadout and see if I get the same results. So thanks, guys. The FNV savegames were never this finicky. I'll declare this "working" and try a clean runthrough, and see what happens when I reach Piper. If I turn up anything interesting, I'll post here.glad to hear that I'm not the one who posted this thread but no, I don't have problems. But the OP might have :tongue: :D my bad sorry, what the f..ck I was thinking about Link to comment Share on other sites More sharing options...
Recommended Posts