Starfinder Playlist
Page 5 of 7 First ... 34567 Last
  1. #41
    I added an getter/setter for currency name field used for each record type; and set the currency name field for "treasureparcel" to "description". This should fix the issue with handleCurrencyTransfer for treasure parcels.

    Also, I added some more code in ItemManager/RecordDataManager to reach into CT and determine record type there.

    Regards,
    JPG

  2. #42
    Quote Originally Posted by Moon Wizard View Post
    I added an getter/setter for currency name field used for each record type; and set the currency name field for "treasureparcel" to "description". This should fix the issue with handleCurrencyTransfer for treasure parcels.

    Also, I added some more code in ItemManager/RecordDataManager to reach into CT and determine record type there.

    Regards,
    JPG
    That did fix the issue with handleCurrencyTransfer and I was able to remove my override. My main goal here.

    Not sure what the changes you mentioned for reaching into the CT were though - as I still need this override to interpret source types for NPC/VEHICLE CT nodes (needed to resolve new checks added into TEST for bCurrency etc.)... Which is fine. I'm good to go with this override and am OK with it. Just mentioning it in case you thought you did something to resolve it.

    Code:
    	savegetRecordTypeFromListPath = RecordDataManager.getRecordTypeFromListPath;
    	RecordDataManager.getRecordTypeFromListPath = getRecordTypeFromListPath;
    Code:
    -- insure combattracker entries can return record type
    function getRecordTypeFromListPath(sListPath)
    	local sRecordType = savegetRecordTypeFromListPath(sListPath);
    	if sRecordType == "" and StringManager.startsWith(sListPath, "combattracker") then
    		local nodeCT = DB.findNode(sListPath);
    		if nodeCT then
    			sRecordType, _ = DB.getValue(nodeCT, "link", "npc", "");
    		end
    	end
    	return sRecordType; 
    end
    Last edited by SilentRuin; July 22nd, 2024 at 08:08.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  3. #43
    That's exactly what I'm talking about. Look at ItemManager.getItemSourceType and RecordDataManager.getRecordTypeFromRecordPath additions around CT record handling. I don't think you'll need that override anymore either, but wanted to make sure.

    Regards,
    JPG

  4. #44
    Quote Originally Posted by Moon Wizard View Post
    That's exactly what I'm talking about. Look at ItemManager.getItemSourceType and RecordDataManager.getRecordTypeFromRecordPath additions around CT record handling. I don't think you'll need that override anymore either, but wanted to make sure.

    Regards,
    JPG
    Still need that override - which is fine. I'm delivering my Map Parcel extension fixes to TEST today sometime so all is good - all is in working order.

    If your curious why its still needed - the following code has a Debug.printstack and Debug.console print to show you that it still requires the fix (comes back with sRecordType of "")...

    Code:
    -- insure combattracker entries can return record type
    function getRecordTypeFromListPath(sListPath)
    	local sRecordType = savegetRecordTypeFromListPath(sListPath);
    	if sRecordType == "" and StringManager.startsWith(sListPath, "combattracker") then
    		Debug.printstack();
    		Debug.console(sListPath);
    		local nodeCT = DB.findNode(sListPath);
    		if nodeCT then
    			sRecordType, _ = DB.getValue(nodeCT, "link", "npc", "");
    		end
    	end
    	return sRecordType; 
    end
    There are several different stacks calls that require it but I think I only need show the one... This is triggered from a drag drop of a treasureparcel sheet link (upper left) dropped onto an NPC inventory tab sheet.

    Code:
    [7/22/2024 11:59:18 AM] 
    stack traceback:
    	[string "MapParcel:scripts/manager_mapparcel.lua"]:1929: in function 'getRecordTypeFromListPath'
    	[string "CoreRPG:scripts/manager_record_data.lua"]:415: in function 'getRecordTypeFromRecordPath'
    	[string "CoreRPG:scripts/manager_item.lua"]:258: in function 'savegetItemSourceType'
    	[string "MapParcel:scripts/manager_mapparcel.lua"]:202: in function 'getItemSourceType'
    	[string "MapParcel:scripts/manager_mapparcel.lua"]:464: in function 'addItemToList'
    	[string "CoreRPG:scripts/manager_item.lua"]:628: in function 'fHandler'
    	[string "CoreRPG:scripts/manager_oob.lua"]:28: in function <[string "CoreRPG:scripts/manager_oob.lua"]:20>
    	[C]: in function 'deliverOOBMessage'
    	[string "MapParcel:scripts/manager_mapparcel.lua"]:370: in function 'sendItemTransfer'
    	[string "CoreRPG:scripts/manager_item.lua"]:484: in function 'handleItem'
    	[string "MapParcel:scripts/manager_mapparcel.lua"]:387: in function 'fHandler'
    	[string "CoreRPG:scripts/manager_oob.lua"]:28: in function <[string "CoreRPG:scripts/manager_oob.lua"]:20>
    	[C]: in function 'deliverOOBMessage'
    	[string "CoreRPG:scripts/manager_item.lua"]:1008: in function 'sendParcelTransfer'
    	[string "CoreRPG:scripts/manager_item.lua"]:515: in function 'handleParcel'
    	[string "MapParcel:scripts/manager_mapparcel.lua"]:328: in function <[string "MapParcel:scripts/manager_mapparcel.lua"]:265>
    	(tail call): ?
    [7/22/2024 11:59:18 AM] s'combattracker.list.id-00028'
    If it was not required it would have never triggered the debug outputs. But as I said - I'm good with this as it is and will be delivering this override along with my other fixes for Map Parcel Extension. All is good as far as I'm concerned in TEST. At least as far as I know.
    Last edited by SilentRuin; July 22nd, 2024 at 18:09.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  5. #45
    Actually it would still trigger; because your override goes before the checks I added.

    Regards,
    JPG

  6. #46
    Quote Originally Posted by Moon Wizard View Post
    Actually it would still trigger; because your override goes before the checks I added.

    Regards,
    JPG
    Unless some update snuck in, I'm pretty sure I tried removing my override after you said you added new CT checks and removing this override causes my stuff fail. As per debug dump the node received that did not work without override was "combattracker.list.id-00028" so if your successfully getting a record type for that I'm at a loss to know why I still require my override. Not really going to worry about it now as its all working again per video dropped in grim press discord (not appropriate for it to be in here) - if you wanted to see what I was actually doing in terms of drag/drop data transfers (move not copy) between sheets.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  7. #47
    The version I set up would require that the record type of the CT entry be one that supports inventory according to the "bInventory" flag on the record data. But, I did test that specific setting by turning on inventory in Core for NPCs in the combat tracker (without any supporting UI) just to test that scenario.

    Regards,
    JPG

  8. #48
    Quote Originally Posted by Moon Wizard View Post
    The version I set up would require that the record type of the CT entry be one that supports inventory according to the "bInventory" flag on the record data. But, I did test that specific setting by turning on inventory in Core for NPCs in the combat tracker (without any supporting UI) just to test that scenario.

    Regards,
    JPG
    As I've already told you I do set those flags:

    Code:
    	RecordDataManager.setRecordTypeOption("npc", "bInventory", true);
    	RecordDataManager.setRecordTypeOption("npc", "bCurrency", true);
    	RecordDataManager.setRecordTypeOption("vehicle", "bInventory", true);
    	RecordDataManager.setRecordTypeOption("vehicle", "bCurrency", true);
    I can guarantee you (just verified) that if I remove my override and I drag the NPC sheet link (upper left) into the map parcel (treasure parcel) it will not delete the data from the NPC sheet (i.e. copies instead of moves). This is because it does not recognize the record type.

    In any case, with my override it works - and its delivered and works. For me I'm done with it. FYI that function is called in numerous places also. Not just the one you overrode.
    Last edited by SilentRuin; July 23rd, 2024 at 16:09.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  9. #49
    By default, items are not "transferred" when moved from actors or partysheet to parcels but "copied", by design.
    Parcels are generally designed to be groups of items to transfer in one link; not as containers for transferring stuff in/out of.

    For the long term; you might be better off making a new "record type" for these "container" objects, instead of trying to override parcels. Or maybe re-use vehicles.

    Regards,
    JPG

  10. #50
    Quote Originally Posted by Moon Wizard View Post
    By default, items are not "transferred" when moved from actors or partysheet to parcels but "copied", by design.
    Parcels are generally designed to be groups of items to transfer in one link; not as containers for transferring stuff in/out of.

    For the long term; you might be better off making a new "record type" for these "container" objects, instead of trying to override parcels. Or maybe re-use vehicles.

    Regards,
    JPG
    Don't be silly. Extensions are to do things you do not and to make the code more flexible in order to do things you have not thought of. My solution is simple - minimal code changes - and worked for years. Nothing should be "copied" when transferring inventory between sheets or map parcels - it defeats the point of it all. Since its obvious you don't know what I'm doing I'll add this video here after all - there is no case where I do not want inventory data moved in the examples I give in video.

    Next you'll be telling me something crazy like players should be able to cheat and see/target things in CT that they cannot see in map due to LOS or token visibility, denying a whole range of game play. Or that players should be able to have clairvoyance and plan on who goes when next turn because the init has not been randomized every turn.

    Bat guano crazy stuff, which I would never allow in my games. Gist being - you limit your code your ways - I'll expand it my way - why I like FGU - it lets me make the game sane and curtail the insanity

    https://www.youtube.com/watch?v=UaQ3XECqQ3Y
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

Page 5 of 7 First ... 34567 Last

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
TALES of the VALIANT

Log in

Log in