SevenBlue Posted April 27, 2017 Share Posted April 27, 2017 Tried setting up a system that would allow the player to trade in specific items for gold, like the farmers, Sleeping tree sap, and mine foreman, but I clearly didn't grasp the code well enough to have any success. Here's the code I cobbled together. Scriptname SkoomaSellTest extends Quest Potion Property Skooma Auto Int Property PlayerCropCount Auto Int Property PlayerGoldReward Auto MiscObject Property pGold Auto {Function SellSkooma(Actor Foreman) ;Count the amount of wheat the player has PlayerCropCount = Game.GetPlayer().GetItemCount(Skooma) ;Make the Foreman the player's friend If Foreman.GetRelationshipRank(Game.GetPlayer()) == 0 Foreman.SetRelationshipRank(Game.GetPlayer(), 1) EndIf ;Calculate the amount of gold to give the player PlayerGoldReward = (PlayerCropCount * (30())) Game.GetPlayer().RemoveItem(skooma, PlayerCropCount) Game.GetPlayer().AddItem(pGold, PlayerGoldReward) EndFunction}and GetOwningQuest() as SkoomaSellTest).SellSkooma(akSpeaker)and finally the generated fragment ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment ;NEXT FRAGMENT INDEX 2 Scriptname TIF__01000D68 Extends TopicInfo Hidden ;BEGIN FRAGMENT Fragment_1 Function Fragment_1(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE (GetOwningQuest() as SkoomaSellTest).SellSkooma(akSpeaker) ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin commentWhere did I misstep? Link to comment Share on other sites More sharing options...
foamyesque Posted April 27, 2017 Share Posted April 27, 2017 Well, for starters, you remarked out the entire function you're trying to call. Secondly, there's no need for PlayerCropCount or PlayerGoldReward to be properties, unless you're accessing them elsewhere; those can be declared as variables internal to the function. What could be added as a property, though, is the reward per skooma; right now you have that hardcoded to 30, but it would be easier to modify (both in CK and via scripting if you wanted to) if it was a property. What kind of errors are you seeing? Compile errors, or not functioning in game? If the latter, have you added Debug.Trace calls to check that your variables and properties are filled and calculated as expected? Link to comment Share on other sites More sharing options...
SevenBlue Posted April 27, 2017 Author Share Posted April 27, 2017 I basically just cannibalized the way it was set up in vanilla Skyrim. And not functioning in game, and I didn't Debug.Trace as I'm not familiar with the concept. Link to comment Share on other sites More sharing options...
foamyesque Posted April 28, 2017 Share Posted April 28, 2017 (edited) I basically just cannibalized the way it was set up in vanilla Skyrim. And not functioning in game, and I didn't Debug.Trace as I'm not familiar with the concept. Debug.Trace is a function that will let you output a text string to Skyrim's debug log (you may need to tweak your INI settings to turn on logging, as well; there's lots of explanations on how out there). It's invaluable for tracing code flow when things don't go as you expect; you use it to provide output on what your variables are, and which Trace statements fire can tell you where you are in your code execution, what conditionals have fired, etc. Also: PlayerGoldReward = (PlayerCropCount * (30())) Has redundant brackets. You should just need: PlayerGoldReward = PlayerCropCount * 30 Uncomment out the function (remove the curly braces), fix the syntax on the above line, make sure all your properties are filled out, and your code is recompiled (including the Info fragment!) and try again. More details on how it isn't working in game, if it still does not at this point, would be useful. You've got the logic correct as far as I can see, for what it's worth. Hopefully it's syntax issues only that are stopping this. Edited April 28, 2017 by foamyesque Link to comment Share on other sites More sharing options...
SevenBlue Posted April 28, 2017 Author Share Posted April 28, 2017 Removing the superfluous brackets worked like a charm, I had uncommented earlier today and run a test to no avail. But it's working perfectly now, thank you ever so much! One thing, I was unable to get debug.trace to compile inside my script, do you not put it in the script itself? If you do, how would one go about that? I tried looking it up but didn't find it. I know how to enable logging in the ini so I can spare you that tedious explanation. Hahah.Thanks for helping me out, I know I must seem like an idiot. Link to comment Share on other sites More sharing options...
foamyesque Posted April 28, 2017 Share Posted April 28, 2017 (edited) Removing the superfluous brackets worked like a charm, I had uncommented earlier today and run a test to no avail. But it's working perfectly now, thank you ever so much! One thing, I was unable to get debug.trace to compile inside my script, do you not put it in the script itself? If you do, how would one go about that? I tried looking it up but didn't find it. I know how to enable logging in the ini so I can spare you that tedious explanation. Hahah. Thanks for helping me out, I know I must seem like an idiot. Trace is a function, like any other, and part of the Debug set of functions. The syntax goes like this: Debug.Trace("Hello World!") All standard string manipulations, or things that can be cast to strings (which is basically everything) can be put inside the brackets. Say for example you want to check that some calculation had worked: float fValueA = 2.5 float fValueB = 4.0 float fValueC = fValueA * fValueB Debug.Trace("Result: " + fValueC) Or if you want to check and see what is being worked on: Form[] myInventory = GetContainerForms() int i = myInventory.Length while i > 0 i-=1 Debug.Trace(self.GetDisplayName() + " has at least one " + myInventory[i].GetName() + " in its inventory") endwhileEtc. It's a very useful tool; especially so because unlike the version that prints to the screen ingame (Debug.Notification), there's no time lag nor rejection of duplicates, so you can see exactly what happened, and when. For example, when I'm building scripts that use multiple states, I'll add an OnBeginState event that, even if it does nothing else, logs what state the script was put into. I'll use it to check that that conditionals are evaluating as intended, and if not, find out why not. I use it to see if I've got race conditions or conflicting calls, off-by-one errors, all sorts of things. EDIT: It's a good practice to prefix anything you output to the logfile with a unique string of some kind, as you'll notice other mods do when you open one up. It makes identifying which bits are yours in what can be a rather large text wall much easier. I like to put it into Excel and make use of its filter functions to isolate only the stuff I'm working on; the logfile for my current project produces stuff like this: [04/27/2017 - 08:28:16PM] Papyrus log opened (PC) [04/27/2017 - 08:28:50PM] SM: Mannequin: No faction owner! [04/27/2017 - 08:28:50PM] SM: Mannequin: No faction owner! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No faction owner! [04/27/2017 - 08:28:50PM] SM: Mannequin: No faction owner! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No faction owner! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No faction owner! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No faction owner! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:50PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:51PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:51PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:51PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:51PM] SM: Mannequin: No linked chest! [04/27/2017 - 08:28:54PM] SM: Mannequin: RegisterTrap: Registering trap [04/27/2017 - 08:28:54PM] SM: DestructTrap: Entered IGNORE [04/27/2017 - 08:28:54PM] SM: Mannequin: Entered RESTOCKING [04/27/2017 - 08:28:54PM] SM: Mannequin: Cleanup: Cleaning up mannequin ancillaries [04/27/2017 - 08:28:54PM] SM: Mannequin: Entered RESTOCKING [04/27/2017 - 08:28:54PM] SM: Mannequin: Cleanup: Cleaning up mannequin ancillaries [04/27/2017 - 08:28:54PM] SM: DestructTrap: Entered LISTEN [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form array size: 5 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Iron Boots: Added in slot: 0 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Iron Armor: Added in slot: 1 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Iron Gauntlets: Added in slot: 2 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Iron Helmet of Minor Destruction: Added in slot: 3 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Iron Shield of Resist Fire: Added in slot: 4 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 5 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 6 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 7 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 8 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 9 [04/27/2017 - 08:28:54PM] SM: Mannequin: AddDisplayItems: Items to equip: 5 [04/27/2017 - 08:28:54PM] SM: Mannequin: AddDisplayItems: Item: 4: Equipping: Iron Shield of Resist Fire [04/27/2017 - 08:28:54PM] SM: Mannequin: AddDisplayItems: Item: 3: Equipping: Iron Helmet of Minor Destruction [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form array size: 5 [04/27/2017 - 08:28:54PM] SM: Mannequin: AddDisplayItems: Item: 2: Equipping: Iron Gauntlets [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Hide Boots: Added in slot: 10 [04/27/2017 - 08:28:54PM] SM: Mannequin: AddDisplayItems: Item: 1: Equipping: Iron Armor [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Hide Armor: Added in slot: 11 [04/27/2017 - 08:28:54PM] SM: Mannequin: AddDisplayItems: Item: 0: Equipping: Iron Boots [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Hide Bracers of Minor Alchemy: Added in slot: 12 [04/27/2017 - 08:28:54PM] SM: Mannequin: Entered ACTIVE [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Hide Helmet: Added in slot: 13 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Hide Shield: Added in slot: 14 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 15 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 16 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 17 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 18 [04/27/2017 - 08:28:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 19 [04/27/2017 - 08:28:54PM] SM: Mannequin: AddDisplayItems: Items to equip: 5 [04/27/2017 - 08:28:54PM] SM: Mannequin: AddDisplayItems: Item: 4: Equipping: Hide Shield [04/27/2017 - 08:28:54PM] SM: Mannequin: AddDisplayItems: Item: 3: Equipping: Hide Helmet [04/27/2017 - 08:28:54PM] SM: Mannequin: AddDisplayItems: Item: 2: Equipping: Hide Bracers of Minor Alchemy [04/27/2017 - 08:28:54PM] SM: Mannequin: AddDisplayItems: Item: 1: Equipping: Hide Armor [04/27/2017 - 08:28:54PM] SM: Mannequin: AddDisplayItems: Item: 0: Equipping: Hide Boots [04/27/2017 - 08:28:54PM] SM: Mannequin: Entered ACTIVE [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Shield: Added to filter [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Helmet: Added to filter [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Bracers of Minor Alchemy: Added to filter [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Armor: Added to filter [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Boots: Added to filter [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Shield of Resist Fire: Added to filter [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Helmet of Minor Destruction: Added to filter [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Gauntlets: Added to filter [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Armor: Added to filter [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Boots: Added to filter [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: Cleared. Ref:chest [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: Refreshed. Ref:chest [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: Item: Iron Boots: Added [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: Item: Iron Armor: Added [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: Item: Iron Gauntlets: Added [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: Item: Hide Bracers of Minor Alchemy: Added [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: Item: Iron Shield of Resist Fire: Added [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: Item: Hide Boots: Added [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: Item: Hide Armor: Added [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: Item: Hide Helmet: Added [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: Item: Hide Shield: Added [04/27/2017 - 08:28:55PM] SM: RegistryQuest: Alias: 1675: Item: Iron Helmet of Minor Destruction: Added [04/27/2017 - 08:29:16PM] SM: DestructTrap: Entered IGNORE [04/27/2017 - 08:29:16PM] SM: DestructTrap: UpdateFire: Fire stage: 0: Fire health: 0: Fire delta: 10: Mannequin health: 600 [04/27/2017 - 08:29:16PM] SM: Mannequin: Entered BURNING [04/27/2017 - 08:29:16PM] SM: DestructTrap: OnFireStateChange: New stage: 1 [04/27/2017 - 08:29:16PM] SM: DestructTrap: Entered IGNORE_AND_BURN [04/27/2017 - 08:29:17PM] SM: DestructTrap: Entered LISTEN_AND_BURN [04/27/2017 - 08:29:17PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 10: Fire delta: 0: Mannequin health: 590 [04/27/2017 - 08:29:17PM] SM: DestructTrap: Entered IGNORE_AND_BURN [04/27/2017 - 08:29:17PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 8: Fire delta: 10: Mannequin health: 590 [04/27/2017 - 08:29:18PM] SM: DestructTrap: Entered LISTEN_AND_BURN [04/27/2017 - 08:29:18PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 18: Fire delta: 0: Mannequin health: 580 [04/27/2017 - 08:29:18PM] SM: DestructTrap: Entered IGNORE_AND_BURN [04/27/2017 - 08:29:18PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 19: Fire delta: 10: Mannequin health: 579 [04/27/2017 - 08:29:19PM] SM: DestructTrap: Entered LISTEN_AND_BURN [04/27/2017 - 08:29:19PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 29: Fire delta: 0: Mannequin health: 569 [04/27/2017 - 08:29:19PM] SM: DestructTrap: Entered IGNORE_AND_BURN [04/27/2017 - 08:29:19PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 31: Fire delta: 10: Mannequin health: 567 [04/27/2017 - 08:29:20PM] SM: DestructTrap: Entered LISTEN_AND_BURN [04/27/2017 - 08:29:20PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 41: Fire delta: 0: Mannequin health: 557 [04/27/2017 - 08:29:20PM] SM: DestructTrap: Entered IGNORE_AND_BURN [04/27/2017 - 08:29:21PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 45: Fire delta: 10: Mannequin health: 553 [04/27/2017 - 08:29:22PM] SM: DestructTrap: Entered LISTEN_AND_BURN [04/27/2017 - 08:29:22PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 55: Fire delta: 0: Mannequin health: 543 [04/27/2017 - 08:29:23PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 60: Fire delta: 0: Mannequin health: 538 [04/27/2017 - 08:29:24PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 66: Fire delta: 0: Mannequin health: 532 [04/27/2017 - 08:29:26PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 72: Fire delta: 0: Mannequin health: 526 [04/27/2017 - 08:29:27PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 79: Fire delta: 0: Mannequin health: 519 [04/27/2017 - 08:29:28PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 86: Fire delta: 0: Mannequin health: 512 [04/27/2017 - 08:29:29PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 94: Fire delta: 0: Mannequin health: 504 [04/27/2017 - 08:29:30PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 100: Fire delta: 0: Mannequin health: 495 [04/27/2017 - 08:29:31PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 100: Fire delta: 0: Mannequin health: 485 [04/27/2017 - 08:29:32PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 100: Fire delta: 0: Mannequin health: 475 [04/27/2017 - 08:29:33PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 100: Fire delta: 0: Mannequin health: 465 [04/27/2017 - 08:29:34PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 100: Fire delta: 0: Mannequin health: 455 [04/27/2017 - 08:29:43PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 100: Fire delta: 0: Mannequin health: 445 [04/27/2017 - 08:29:44PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 100: Fire delta: 0: Mannequin health: 435 [04/27/2017 - 08:29:45PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 100: Fire delta: 0: Mannequin health: 425 [04/27/2017 - 08:29:46PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 100: Fire delta: 0: Mannequin health: 415 [04/27/2017 - 08:29:47PM] SM: DestructTrap: UpdateFire: Fire stage: 1: Fire health: 100: Fire delta: 0: Mannequin health: 405 [04/27/2017 - 08:29:47PM] SM: DestructTrap: OnFireStateChange: New stage: 2 [04/27/2017 - 08:29:47PM] SM: DestructTrap: Entered IGNORE_AND_BURN [04/27/2017 - 08:29:48PM] SM: DestructTrap: Entered LISTEN_AND_BURN [04/27/2017 - 08:29:48PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 395 [04/27/2017 - 08:29:49PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 385 [04/27/2017 - 08:29:50PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 375 [04/27/2017 - 08:29:51PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 365 [04/27/2017 - 08:29:52PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 355 [04/27/2017 - 08:29:53PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 345 [04/27/2017 - 08:29:54PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 335 [04/27/2017 - 08:29:55PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 325 [04/27/2017 - 08:29:56PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 315 [04/27/2017 - 08:29:57PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 305 [04/27/2017 - 08:29:58PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 295 [04/27/2017 - 08:29:59PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 285 [04/27/2017 - 08:30:00PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 275 [04/27/2017 - 08:30:01PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 265 [04/27/2017 - 08:30:02PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 255 [04/27/2017 - 08:30:03PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 245 [04/27/2017 - 08:30:04PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 235 [04/27/2017 - 08:30:06PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 225 [04/27/2017 - 08:30:07PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 215 [04/27/2017 - 08:30:08PM] SM: DestructTrap: UpdateFire: Fire stage: 2: Fire health: 100: Fire delta: 0: Mannequin health: 205 [04/27/2017 - 08:30:08PM] SM: DestructTrap: OnFireStateChange: New stage: 3 [04/27/2017 - 08:30:08PM] SM: DestructTrap: Entered IGNORE_AND_BURN [04/27/2017 - 08:30:09PM] SM: DestructTrap: Entered LISTEN_AND_BURN [04/27/2017 - 08:30:09PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 195 [04/27/2017 - 08:30:10PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 185 [04/27/2017 - 08:30:11PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 175 [04/27/2017 - 08:30:12PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 165 [04/27/2017 - 08:30:13PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 155 [04/27/2017 - 08:30:14PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 145 [04/27/2017 - 08:30:15PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 135 [04/27/2017 - 08:30:16PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 125 [04/27/2017 - 08:30:17PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 115 [04/27/2017 - 08:30:18PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 105 [04/27/2017 - 08:30:19PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 95 [04/27/2017 - 08:30:20PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 85 [04/27/2017 - 08:30:21PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 75 [04/27/2017 - 08:30:22PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 65 [04/27/2017 - 08:30:23PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 55 [04/27/2017 - 08:30:24PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 45 [04/27/2017 - 08:30:25PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 35 [04/27/2017 - 08:30:26PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 25 [04/27/2017 - 08:30:27PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 15 [04/27/2017 - 08:30:28PM] SM: DestructTrap: UpdateFire: Fire stage: 3: Fire health: 100: Fire delta: 0: Mannequin health: 5 [04/27/2017 - 08:30:28PM] SM: DestructTrap: OnFireStateChange: New stage: 4 [04/27/2017 - 08:30:28PM] SM: DestructTrap: Entered CHARRED [04/27/2017 - 08:30:29PM] SM: Mannequin: Entered BURNT [04/27/2017 - 08:30:53PM] SM: RegistryQuest: Alias: 1675: ResetMannequins: Reset mannequin in slot: 1 [04/27/2017 - 08:30:53PM] SM: Mannequin: Entered RESTOCKING [04/27/2017 - 08:30:53PM] SM: Mannequin: Cleanup: Cleaning up mannequin ancillaries [04/27/2017 - 08:30:53PM] SM: DestructTrap: Entered LISTEN [04/27/2017 - 08:30:54PM] SM: DestructTrap: Entered IGNORE [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form array size: 5 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Hide Boots: Added in slot: 10 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Hide Armor of Minor Alteration: Added in slot: 11 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Hide Bracers: Added in slot: 12 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Hide Helmet: Added in slot: 13 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Hide Shield: Added in slot: 14 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 15 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 16 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 17 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 18 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 19 [04/27/2017 - 08:30:54PM] SM: Mannequin: AddDisplayItems: Items to equip: 5 [04/27/2017 - 08:30:54PM] SM: Mannequin: AddDisplayItems: Item: 4: Equipping: Hide Shield [04/27/2017 - 08:30:54PM] SM: Mannequin: AddDisplayItems: Item: 3: Equipping: Hide Helmet [04/27/2017 - 08:30:54PM] SM: Mannequin: AddDisplayItems: Item: 2: Equipping: Hide Bracers [04/27/2017 - 08:30:54PM] SM: Mannequin: AddDisplayItems: Item: 1: Equipping: Hide Armor of Minor Alteration [04/27/2017 - 08:30:54PM] SM: Mannequin: AddDisplayItems: Item: 0: Equipping: Hide Boots [04/27/2017 - 08:30:54PM] SM: Mannequin: Entered ACTIVE [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: ResetMannequins: Reset mannequin in slot: 0 [04/27/2017 - 08:30:54PM] SM: Mannequin: Entered RESTOCKING [04/27/2017 - 08:30:54PM] SM: Mannequin: Cleanup: Cleaning up mannequin ancillaries [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form array size: 5 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Iron Boots: Added in slot: 0 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Iron Armor: Added in slot: 1 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Iron Gauntlets: Added in slot: 2 [04/27/2017 - 08:30:54PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Iron Helmet: Added in slot: 3 [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Form: Iron Shield of Resist Frost: Added in slot: 4 [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 5 [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 6 [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 7 [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 8 [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: UpdateLists: Empty Form Array: Form: NULL: Added in slot: 9 [04/27/2017 - 08:30:55PM] SM: Mannequin: AddDisplayItems: Items to equip: 5 [04/27/2017 - 08:30:55PM] SM: Mannequin: AddDisplayItems: Item: 4: Equipping: Iron Shield of Resist Frost [04/27/2017 - 08:30:55PM] SM: Mannequin: AddDisplayItems: Item: 3: Equipping: Iron Helmet [04/27/2017 - 08:30:55PM] SM: DestructTrap: Entered LISTEN [04/27/2017 - 08:30:55PM] SM: Mannequin: AddDisplayItems: Item: 2: Equipping: Iron Gauntlets [04/27/2017 - 08:30:55PM] SM: Mannequin: AddDisplayItems: Item: 1: Equipping: Iron Armor [04/27/2017 - 08:30:55PM] SM: Mannequin: AddDisplayItems: Item: 0: Equipping: Iron Boots [04/27/2017 - 08:30:55PM] SM: Mannequin: Entered ACTIVE [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Shield: Added to filter [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Helmet: Added to filter [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Bracers: Added to filter [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Armor of Minor Alteration: Added to filter [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Boots: Added to filter [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Shield of Resist Frost: Added to filter [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Helmet: Added to filter [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Gauntlets: Added to filter [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Armor: Added to filter [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Boots: Added to filter [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: Cleared. Ref:chest [04/27/2017 - 08:30:55PM] SM: RegistryQuest: Alias: 1675: Refreshed. Ref:chest [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Shield: Added to filter [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Helmet: Added to filter [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Bracers: Added to filter [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Armor of Minor Alteration: Added to filter [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Hide Boots: Added to filter [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Shield of Resist Frost: Added to filter [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Helmet: Added to filter [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Gauntlets: Added to filter [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Armor: Added to filter [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: RebuildList: Form: Iron Boots: Added to filter [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: Cleared. Ref:chest [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: Refreshed. Ref:chest [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: Item: Iron Boots: Added [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: Item: Iron Armor: Added [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: Item: Iron Gauntlets: Added [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: Item: Iron Helmet: Added [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: Item: Hide Boots: Added [04/27/2017 - 08:30:56PM] SM: RegistryQuest: Alias: 1675: Item: Hide Armor of Minor Alteration: Added [04/27/2017 - 08:30:57PM] SM: RegistryQuest: Alias: 1675: Item: Iron Shield of Resist Frost: Added [04/27/2017 - 08:30:57PM] SM: RegistryQuest: Alias: 1675: Item: Hide Bracers: Added [04/27/2017 - 08:30:57PM] SM: RegistryQuest: Alias: 1675: Item: Hide Helmet: Added [04/27/2017 - 08:30:57PM] SM: RegistryQuest: Alias: 1675: Item: Hide Shield: Added Edited April 28, 2017 by foamyesque Link to comment Share on other sites More sharing options...
SevenBlue Posted April 29, 2017 Author Share Posted April 29, 2017 I honestly can't say I follow to be perfectly honest, but I'll bookmark this for future reference for when I'm more advanced. Link to comment Share on other sites More sharing options...
foamyesque Posted April 29, 2017 Share Posted April 29, 2017 (edited) I honestly can't say I follow to be perfectly honest, but I'll bookmark this for future reference for when I'm more advanced. Essentially, Trace will output whatever string is provided as an argument into the debug log. Strings can be any of the following things: 1. Literals, which are specified through quotes. For example: "Hello World!" would be a string literal, and calling Debug.Trace("Hello World!") will print [timestamp] Hello World! into the debug log. 2. Bools. They will be cast strings and display false if they're false and TRUE if they're true, like so: bool bSwitch = false Debug.Trace(bSwitch) Debug.Trace(!bSwitch) This produces: [timestamp] false [timestamp] TRUE 2. Ints and floats. They are numbers, but when put in a place where a string is expected, they will be automatically cast to strings. For example, Debug.Trace(fValueC) will print [timestamp] 6.5 3. Forms (e.g. potion base items, etc) will have their FormID cast to a string. I don't have any formIDs memorized offhand for an example, sadly, but it's easy to try it and see. 4. Any function that returns a string, such as SKSE's GetDisplayName() on ObjectReferences or the base function GetName() on Forms generally. 5. Arrays, which will be cast like so: bool[] bArray = new bool[5] bArray[3] = true Debug.Trace(bArray) Debug log output: [timestamp] [false, false, TRUE, false, false] 6. Any string variables, which follow all of these rules, including this one. You can concatenate strings together to make one string, so e.g. string sHello = "Hello" string sWorld = "World" string sHelloWorld = sHello + sWorld Debug.Trace(sHelloWorld) will get you: [timestamp] HelloWorld Edited April 29, 2017 by foamyesque Link to comment Share on other sites More sharing options...
Recommended Posts