CynicalSyllables Posted May 17, 2022 Share Posted May 17, 2022 (edited) Hi all, I want to create a fairly simple mod which adds a terminal that lets you trade with an NPC by executing the console command "[npc ref id].showbartermenu" (or the papyrus equivalent) when you activate a particular terminal entry (or just an activator)How can I translate this from the console format into the papyrus format? I'm having trouble getting the Papyrus script fragment to compile in the CK. Here's what I've got so far; first script compiled successfully whereas the fragment did not: Scriptname TradeScript01 extends ObjectReferenceFunction Fragment_Terminal_01(ObjectReference akTerminalRef) EndFunctionActor Property kTinkerTom Auto ; filled with desired merchant actorObjectReference Property TinkerTomREF auto constActorBase Property pTinkerTom Auto Const Fragment: kTinkerTom.ShowBarterMenu() Error:Papyrus Compiler Version 2.8.0.4 for Fallout 4Copyright © ZeniMax Media. All rights reserved.Starting 1 compile threads for 1 files...Compiling "Fragments:Terminals:TERM_InstituteTradeTerminal_01000F99"...C:\Users\Cynic\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_InstituteTradeTerminal_01000F99.psc(16,19): script property pTinkerTom already definedC:\Users\Cynic\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_InstituteTradeTerminal_01000F99.psc(16,19): script variable ::pTinkerTom_var already definedC:\Users\Cynic\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_InstituteTradeTerminal_01000F99.psc(16,19): script property pTinkerTom already has a get function definedC:\Users\Cynic\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_InstituteTradeTerminal_01000F99.psc(20,19): script property pTinkerTomTrade already definedC:\Users\Cynic\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_InstituteTradeTerminal_01000F99.psc(20,19): script variable ::pTinkerTomTrade_var already definedC:\Users\Cynic\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_InstituteTradeTerminal_01000F99.psc(20,19): script property pTinkerTomTrade already has a get function definedNo output generated for Fragments:Terminals:TERM_InstituteTradeTerminal_01000F99, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on Fragments:Terminals:TERM_InstituteTradeTerminal_01000F99 Edited May 17, 2022 by CynicalSyllables Link to comment Share on other sites More sharing options...
SKKmods Posted May 17, 2022 Share Posted May 17, 2022 That fragment is screwed. Looks like you have been trying to edit it in an external editor rather than the fragment UI as it should start with the clear warning: ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment Also when you do get the script working, you may not be able to pop a modal trade/barter menu ontop of an open Terminal screen. Link to comment Share on other sites More sharing options...
CynicalSyllables Posted May 17, 2022 Author Share Posted May 17, 2022 That fragment is screwed. Looks like you have been trying to edit it in an external editor rather than the fragment UI as it should start with the clear warning: ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment Also when you do get the script working, you may not be able to pop a modal trade/barter menu ontop of an open Terminal screen.Thanks. I'll start over and see if that fixes the fragment.What problems do you forsee with the barter menu/trade terminal conflict? Would I need to exit the terminal or would it just not work at all? Link to comment Share on other sites More sharing options...
CynicalSyllables Posted May 17, 2022 Author Share Posted May 17, 2022 (edited) Okay, now I'm getting a different error. It doesn't recognize showbartermenu, so I think I need to define more, not sure exactly what. Redone script: Scriptname TradeScript02 extends ObjectReference ConstFunction Fragment_New((ObjectReference akTerminalREF)Endfunction Fragment compilation result: Papyrus Compiler Version 2.8.0.4 for Fallout 4Copyright © ZeniMax Media. All rights reserved.Starting 1 compile threads for 1 files...Compiling "Fragments:Terminals:TERM_DefaultTerminalInstitut_001B2362"...C:\Users\Cynic\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_DefaultTerminalInstitut_001B2362.psc(7,11): ShowBarterMenu is not a function or does not existNo output generated for Fragments:Terminals:TERM_DefaultTerminalInstitut_001B2362, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on Fragments:Terminals:TERM_DefaultTerminalInstitut_001B2362 Edited May 17, 2022 by CynicalSyllables Link to comment Share on other sites More sharing options...
CynicalSyllables Posted May 18, 2022 Author Share Posted May 18, 2022 Nevermind, was able to solve previous issue by using Actor instead of ActorBase. Link to comment Share on other sites More sharing options...
Recommended Posts