vasiliipupkin1 Posted yesterday at 02:05 AM Share Posted yesterday at 02:05 AM Good day. I am a beginner modder and want to learn. I do not understand how scripts work, how to edit them... can you please help me? There is a script that works with Chop Wood. Here is a link to Wikipedia https://elderscrolls.fandom.com/wiki/Chop_Wood I have a question.. how to edit it? I tried everything, reread all the methods, but nothing works for me. Can you write detailed instructions? From the programs there is sseedit and Creation Kit. I want it to chop wood longer. In the original, it chops 3 times and gets 6 Firewood and leaves, you have to click again to chop wood. Is it possible to make it chop 12 or 24 times (longer)? how to do it? Link to comment Share on other sites More sharing options...
scorrp10 Posted yesterday at 06:03 AM Share Posted yesterday at 06:03 AM Papyrus coding is a bit too large subject to explain in one post. That said, there is one thing to be aware of: you need to have the source code (.psc) files in place for any object type your script mentions. For SSE, the source code is generally expected to be in Data\Source\Scripts (at least if using CK to compile). A few steps you need to do: Take everything you might already have in Data\Source\Scripts and copy it to some other location. (just in case) In your Data folder, there should be a Scripts.zip file - unzip it in place. It will populate a LOT of .psc files into Data\Source\Scripts If you have anything in Data\Scripts\Source, copy it over to Data\Source\Scripts. Overwrite files if prompted. This SHOULD put you in a good position to compile stuff. Now, CK does have a script editor - but it kinda sucks. Personally, I use NetBeans for my script editing. The trick is to associate the .psc extension with it. Oh, make sure you got Creation Kit Platform Extended So, after launching CK, and loading up Skyrim.esm as master (no active file needed), I go to the furniture section, and locate 'WoodChoppingBlock'. Opening it up, I sse it has two scripts attached: hardworkerwoodscript resourcefurniturescript The first one has to do with achievements and is of no consequence. But the other one is what we are after. I right-click it and select 'Open in External Editor'. So, looking at script properties at the top, I notice these: int Property ResourceCount = 1 Auto {how many resources you get per use} int property MaxResourcePerActivation = 6 auto {How many times can this object be used before the player has to re-activate?} However, as these are properties, those 1 and 6 are just default values. Selecting the script in CK and clicking Properties button, shows that ResourceCount is actually 2 and MaxResourcePerActivation is filled with a 6. So REALLY, you don't need to change this script - you just need to fill those properties with a different values. For example, you can set them to 4 and 12, where you still do 3 chops, but get 4 firewood each. Or you can leave the ResourceCount the same and set MaxResourcePerActivation to 12. After editing properties, click OK to close properties window, and OK to close Furniture record window. Under File menu, save your plugin (you will be prompted for a name). However, if you did need to change the script, you would make changes to it in NetBeans, then Save it. Then, in CK, from Gameplay menu, you choose 'Papyrus Script Manager'. To easier find needed script, type part of its name in the filter window. Right-click on the script and choose Compile. 1 Link to comment Share on other sites More sharing options...
vasiliipupkin1 Posted yesterday at 12:05 PM Author Share Posted yesterday at 12:05 PM (edited) I did everything as you described. When right-clicking on resourcefurniturescript - Open in External Editor (Open in External Editor), it is crossed out, you can't click there! Clicked on Properties - changed the values to 4 and 12. Saved. The values have changed. Enabled my created plugin in vortex. It still chops 2 Firewood, and I specified ResourceCount - 4. And it also continues to chop 3 times (it turns out 6 Firewood). In general, nothing has changed. Nothing works ((( Edited yesterday at 12:08 PM by vasiliipupkin1 Link to comment Share on other sites More sharing options...
vasiliipupkin1 Posted yesterday at 12:15 PM Author Share Posted yesterday at 12:15 PM (edited) I redid everything again. I did as you described. I specified completely different values in the properties. Still nothing works((( I don't understand why it doesn't work... Edited yesterday at 12:16 PM by vasiliipupkin1 Link to comment Share on other sites More sharing options...
scorrp10 Posted yesterday at 04:26 PM Share Posted yesterday at 04:26 PM I do not know your setup or what other mods you got. Something could be affecting it. For example Complete Crafting Overhaul Remastered changes how chopping blocks work by replacing the Scripts\resourcefurniturescript.pex with its own (in its .bsa) That script ignores the mentioned properties and uses instead the settings from the mod. If you have that mod installed, you can just go into its MCM, "Mining and Materials" page, it has settings for firewood. Now, if you right-clicked on a script in CK, and its 'Edit Source' or 'Open in External Editor' options are disabled, it means that CK does not see the source code for this script in the proper location. If this is for SSE, the default location for source files is Data\Source\Scripts. If this is for LE, default source location is Data\Scripts\Source. In your game install directory, check CreationKit.ini, [Papyrus] section, if it has sScriptSourceFolder setting, indicating a different location. Have you unpacked Scripts.zip in your Data folder? Now, the game itself uses compiled .pex script files that go under Data\Scripts. Normally, all vanilla .pex files are not actually in that directory, but are packaged into 'Skyrim - Misc.bsa' archive. Mods can also package their files into their own .bsa, rather than keep them as loose files - which is what Crafting Overhaul does. If I look into my Data\Scripts, resourcefurniturescript.pex is not there, it is being sourced from a .bsa I look into my Data\Source\Scripts, and resourcefurniturescript.psc is there - it is the file unpacked from Scripts.zip So, if you have a mod that overrides that script, changing property values would have no effect. You actually need to make the game use the vanilla script. This can be accomplished in two ways: 1. you can use BAE to extract Scripts\resourcefurniturescript.pex from 'Skyrim - Misc.bsa' and put it into your Data\Scripts 2. you can compile resourcefurniturescript.psc - which will generate the .pex file in Data\Scripts. Gameplay menu - Papyrus Script Manager - filter for resource. Make sure 'Has Source' says Yes. Right-click, choose Compile. You now should have the .pex file in Data\Scripts. 1 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted yesterday at 05:05 PM Share Posted yesterday at 05:05 PM For your information I have a mod for both LE and SE that allows one to continuously chop until reaching the character's maximum carry weigh capacity. You're free to look at how the stock script was edited to achieve this result. For LE: https://www.nexusmods.com/skyrim/mods/21132 For SE: https://www.nexusmods.com/skyrimspecialedition/mods/4443 1 Link to comment Share on other sites More sharing options...
scorrp10 Posted yesterday at 06:08 PM Share Posted yesterday at 06:08 PM Oh, especially if you don't have any crafting mods installed, the reason it is not working for you is because of how you are testing it. Most likely, you have a game saved next to a wood chopping block, and after making your changes, you load that save and try using this block. This will not work. You see, when you first time enter a place that has a chopping block, the game will generate in memory an instance of resourcefurnuturescript - that is, all of its variables, filled properties, current state, stuff like that. That instance will also be written to your save game. The changes you made on the base object script are only going to come into effect when creating a NEW instance of that object. The block you saved the game next to will still have its properties set to 6 and 2. So how can you actually test your change? Option 1: test it on a new game. No need to suffer the usual cart ride. Launch game, and at main menu, open console, and type : coc whiterunorigin There is a chopping block by the 3rd house on the right (right after Breezehome) Option 2: spawn a new chopping block. Load up your save, open console, type: player.placeatme 7022e This will spawn a brand new chopping block under your feet. You can also use ReSaver to take that script instance out of your save. But this is a bit more involved. NOW. If you want your change to work seamlessly on a game in progress, on chopping blocks that already been loaded, you need to do a bit more work. The most blunt approach: in 'OnActivate' function, right at the top, add: ResourceCount = 4 MaxResourcePerActivation = 12 to make it 3 chops of 4 each. (12 firewood total). Then, recompile the script. In fact, if you make this change, you will no longer need the .esp with changed prroperties. 1 Link to comment Share on other sites More sharing options...
vasiliipupkin1 Posted 16 hours ago Author Share Posted 16 hours ago Thank you very much for the clear explanation, I didn't know it was so difficult((( there are people like you who understand this. I will definitely do everything as you described, test it, and let you know. I think it should work. But I think modding is not my thing((( I don't understand much. In any case, THANK YOU SO MUCH for taking the time to answer the questions. Link to comment Share on other sites More sharing options...
vasiliipupkin1 Posted 13 hours ago Author Share Posted 13 hours ago (edited) 13 hours ago, scorrp10 said: I did as you described. What I got: This doesn't work, I don't get a .pex file created in Data\Scripts 2. you can compile resourcefurniturescript.psc - which will generate the .pex file in Data\Scripts. Gameplay menu - Papyrus Script Manager - filter for resource. Make sure 'Has Source' says Yes. Right-click, choose Compile. You now should have the .pex file in Data\Scripts. But I have good news. The script works when I create a new game as you described: Option 1: test it on a new game. No need to suffer the usual cart ride. Launch game, and at main menu, open console, and type: coc whiterunorigin There is a chopping block by the 3rd house on the right (right after Breezehome) Option 2: spawn a new chopping block. Load up your save, open console, type: player.placeatme 7022e This will spawn a brand new chopping block under your feet. That is, it works in a new game and when I create a new chopping block for firewood (player.placeatme 7022e). I don't understand what you wrote below. 11 hours ago, scorrp10 said: NOW. If you want your change to work seamlessly on a game in progress, on chopping blocks that already been loaded, you need to do a bit more work. The most blunt approach: in 'OnActivate' function, right at the top, add: ResourceCount = 4 MaxResourcePerActivation = 12 to make it 3 chops of 4 each. (12 firewood total). Then, recompile the script. In fact, if you make this change, you will no longer need the .esp with changed prroperties. Please sorry for my bad English. So as not to torment you... How do I get this to work for the old wood chopping areas in my saves? Edited 13 hours ago by vasiliipupkin1 Link to comment Share on other sites More sharing options...
scorrp10 Posted 13 hours ago Share Posted 13 hours ago The main question is: did you get to a point where you can edit the script? That is, did you get all the .psc file from Scripts.zip to where CK can see them? 1 Link to comment Share on other sites More sharing options...
Recommended Posts