-
July 22nd, 2024, 05:53 #41
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 21,164
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
-
July 22nd, 2024, 07:59 #42
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):
-
July 22nd, 2024, 17:17 #43
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 21,164
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
-
July 22nd, 2024, 18:05 #44
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
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'
Last edited by SilentRuin; July 22nd, 2024 at 18:09.
Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
July 22nd, 2024, 18:15 #45
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 21,164
Actually it would still trigger; because your override goes before the checks I added.
Regards,
JPG
-
July 22nd, 2024, 18:41 #46
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):
-
July 23rd, 2024, 01:39 #47
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 21,164
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
-
July 23rd, 2024, 16:04 #48
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);
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):
-
July 23rd, 2024, 18:06 #49
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 21,164
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
-
July 23rd, 2024, 18:18 #50
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=UaQ3XECqQ3YFree(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks