Starfinder Playlist
Page 2 of 2 First 12
  1. #11
    Quote Originally Posted by Kelrugem View Post
    I do understand since I can reproduce it Moreover, for example when you share the parcel with the player, then I can also reproduce it on the client by drag&drop Hence, I am very aware of that (is already the case for a longer time as far as I remember). Simply saying that it is not (yet) intended to distribute items directly from parcels which is why you see such things; not saying that it may or may not be adjusted So, no reason to be blunt
    Sadly I don't have the option of having my extension's user suffer corrupted or loss of data. FGU RAW can leave it if they like - I'm going to at least make the attempt to fix it even with that bizarre overwrite of the data in "count" only when a player is attached which I suspect is being done by engine code since I can't find it anywhere else. Either way - I'm take the shot of at least trying to fix it.

    Oh and your "partysheet" does the same thing with the same bug.

  2. #12
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    2,962
    Quote Originally Posted by SilentRuin View Post
    Sadly I don't have the option of having my extension's user suffer corrupted or loss of data. FGU RAW can leave it if they like - I'm going to at least make the attempt to fix it even with that bizarre overwrite of the data in "count" only when a player is attached which I suspect is being done by engine code since I can't find it anywhere else. Either way - I'm take the shot of at least trying to fix it.

    Oh and your "partysheet" does the same thing with the same bug.
    Yeah, I see why you want to fix that because of the map parcel extension (I still need to try out your extension since it sounds nice)

    About the party sheet: I cannot reproduce the bug there, make sure you did not have your extension loaded because maybe the party sheet behaviour may get overwritten; for me the party sheet works, just tested (and make sure you press shift while dragging, otherwise it will be just a count of 1)

  3. #13
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    2,962
    Okay, correction: Indeed, the party sheet won't work properly now, too Yeah, there it is certainly a bug

    (I think when I quickly tested that, that I accidentally looked at the client One really needs to be careful where to look)

  4. #14
    Quote Originally Posted by Kelrugem View Post
    Okay, correction: Indeed, the party sheet won't work properly now, too Yeah, there it is certainly a bug

    (I think when I quickly tested that, that I accidentally looked at the client One really needs to be careful where to look)
    Yeah, pretty much anything (even parcels in my fixed version) that drops something in charsheet will only not get stomped if no player is attached to host. That logic I can't find that decides to arbitrarily stomp it (only if you have no previous item of the same type in charsheet) is annoying in the extreme.

    I'm going to experiment around and try an elaborate double call of the addItemToList - sadly its even worse than it appears because double calling in the same OOB still gets it stomped in the end - because leaving that routine the node has the correct count. I'll try to double it with another OOB call in hopes I can come in after whatever it is decides to stomp it. Likely have to say - is the item in th e target and is target charsheet? If in the target - just proceed normally. If not in the target - and transfer all is in effect - then call once with transferall set to false (to get it in sheet with count 1) then call again with transferall set to true. I actually tried that directly - but of course the stomping mystery code (only when player attached) managed to still stomp it (plus there was no append logic to apply because the count was correct at this level). Gist is - PAIN.

  5. #15
    FWIW I ran into this same bug when I was creating my Shops extension, and ended up writing my own workaround too.

  6. #16
    I want to give a shout out to all you extension and mod developers. You all are making FGU a better product and I appreciate all the work you all put into this. Thank you!

  7. #17
    Quote Originally Posted by mattekure View Post
    FWIW I ran into this same bug when I was creating my Shops extension, and ended up writing my own workaround too.
    Hopefully you just grabbed the raw data and did the transfer yourself - I'm not so lucky that I can get away with that

  8. #18
    All right I fixed my stuff. Same fixes could be used for FGU but meh - tired of arguing. I'll post in general what I did.

    CoreRPG\scripts\manager_item.lua
    function addItemToList
    Added in this near top
    Code:
    	if bTransferAll then 
    		local bFoundItem = false;
    		-- due to bug with player connected to host stomping count to 1 no matter how many put into new inventory record cannot transfer all without shift 
    		if sTargetRecordType == "charsheet" then
    			for _,vNode in pairs(DB.getChildren(nodeList, "")) do
    				if ItemManager.compareFields(nodeSource, vNode, true) then
    					bFoundItem = true;
    					break;
    				end
    			end
    			-- We only need to fake this if the item does not already exist. 
    			-- has the effect that when you transfer items to charsheet you have to do it potentially twice to get them all in. 
    			if not bFoundItem then 
    				bTransferAll = false;
    			end
    		end
    	end
    Also move if statement as shown here further down:
    Code:
    		elseif (sSourceRecordType == "partysheet" and sTargetRecordType == "charsheet") or
    				(sSourceRecordType == "treasureparcel" and sTargetRecordType == "charsheet") or
     				(sSourceRecordType == "charsheet" and sTargetRecordType == "treasureparcel") or 
    				(sSourceRecordType == "charsheet" and sTargetRecordType == "charsheet") or
    				(sSourceRecordType == "charsheet" and sTargetRecordType == "partysheet") then
    			if bTransferAll then
    				bCountN = true;
    			end
    Also for where I do mass transfers for links I did the same fake logic at top.

    Prevents corruption but will require you to transfer things from partysheet,parcel sheet, charsheet to a charsheet twice in some cases.

    STORY ENDS?
    Last edited by SilentRuin; March 1st, 2021 at 19:29.

  9. #19
    The way that it was built was that treasure parcels were not a "box" for players to use; but a "group" for GMs to use. In that design, it's not expected that you would drag back/forth between a PC and a parcel; and when you did, it was expected that you just wanted to make a copy, not transfer at all.

    The code that you highlighted in red is already surrounded by code that has been modified from original CoreRPG ItemManager; as the current code doesn't match what you posted.

    Given that, I would still be interested in seeing what you came up with to handle the "default" = 1 issue from player's having character open while transferring a stack, instead of 1 at a time. I have to think on whether it makes sense to treat a parcel like a "box" in a general sense.

    Regards,
    JPG

  10. #20
    Quote Originally Posted by Moon Wizard View Post
    The way that it was built was that treasure parcels were not a "box" for players to use; but a "group" for GMs to use. In that design, it's not expected that you would drag back/forth between a PC and a parcel; and when you did, it was expected that you just wanted to make a copy, not transfer at all.

    The code that you highlighted in red is already surrounded by code that has been modified from original CoreRPG ItemManager; as the current code doesn't match what you posted.

    Given that, I would still be interested in seeing what you came up with to handle the "default" = 1 issue from player's having character open while transferring a stack, instead of 1 at a time. I have to think on whether it makes sense to treat a parcel like a "box" in a general sense.

    Regards,
    JPG
    Sure just DM me in discord and I can create a discord server and share my screen and use words as its easier to show and tell then text back and forth. It's not that hard. And yes its different by maybe one extra line because I do full transfer between charsheet/partysheet/parcels in player or host (between any of them) in Map Parcel. Just let me know and I can show you. Also I tend to only do the transfer when I detect is part of an Image or the delete on empty flag is set - that way it does not change behavior on RAW FGU read only type of parcels. If I remember right. Basically, all three work the same when doing a copy or transfer to the charsheet (which will stomp it dead with a 1 if has more than one and SHIFT or link is used to copy it in - and a player is attached). The code that does that is included above. Pretty simple trick really.
    Last edited by SilentRuin; March 4th, 2021 at 01:05.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
PF2E Playlist

Log in

Log in