Jump to content

Script Edit Source greyed out (story time?)


Recommended Posts

I wanted to make the cages repairs free, so that capturing ragstags for example, would not cost 1 steel, carrot, copper and gear.

Fairly simple I thought, having some background experience.

I installed the creation kit from the Bethesda launcher, edited the ini to allow multiple masterfiles and extracted Base.zip when the creation kit asked for it.

 

I created my esp and went: File>Data and since I wasn't sure where to start, I checked Fallout4.esm, DLCworkshop01, DLCworkshop02, DLCworkshop03 and my plugin, then set my plugin as active file.

 

So far so good right?

After letting it load it all, I go into the Object Window, select *All and enter "cage" as filter.

Bam, so proud of myself. I double click on "DLC02WorkshopCageRadstag" (FURN)

and in the window that pops up, in the scripts section I can see "DLC02:WorkshopCageScript"

I found what I wanted in less time than I anticipated.

I right click on it, Edit Source is greyed out...

I google about it, get told it is not finding the .psc files.
I go to File>Preferences>Scripts> and I check the source folders.
It says Source\User and Source\Base

I start unpacking all the DLC archives and shove them in all subfolders that made sense.

(Source has all scripts, Source\Base has all scripts and Source\user has all scripts (3,122 scripts))

 

I restart the Creation Kit, reload my plugin as I did before and try edit source again but it is still greyed out.
So I manually go into one of the folders and open the "WorkshopCageScript" and start reading the script.

Of course, I find what I believe is what I wanted, Line 215 and 216.

 

Now here I am, wondering what to do next.

If the Creation Kit doesn't let me edit scripts, can I manually edit them?
If so, how do I create a plugin out of it?

I need help.

 

Link to comment
Share on other sites

You likely don't need to modify the script.

 

Somewhere in the "Constructible Objects" section of the Object Window, you can find the recipe that is used to repair cages and change the requirements to 1 Steel or something equally dumb.

Link to comment
Share on other sites

Thanks for the suggestion.

 

I went ahead and tried that.

I found the "DLC02workshop_co_WorkshopCageRadstag" (COBJ)

and changed the required items but as I expected this is the price of the cage itself, so now all radstag cages are worth 1 steel.
I also found "fWorkshopRepairComponentMult" in the game settings but lowering it to 0.0 did not change anything (or couldn't go below 1)

 

I'll gladly try any other suggestions.

Link to comment
Share on other sites

Well, if I'm doing something wrong, I don't know what it is.
I deleted all traces of Fallout 4 and the creation kit, then reinstalled everything.

 

I followed these instructions:
https://gamerpoets.com/text-tutorials/fallout4-text/fallout-4-creation-kit-installation-setup/

 

I re-enabled UAC, I gave the creation kit admin rights and tried all sorts of compatibility settings.

I unzipped the DLC01 to DLC06 in their own folders (\Data\Scripts\Source\DLC01\DLC01\) (Didn't work)

I try to let the files loose in their own folders (\Data\Scripts\Source\DLC01\) (Didn't work)

Tried to put them in Base (\Data\Scripts\Source\Base\)

 

But nothing works.

At this point, I have to believe this isn't user error...

If you, whomever is reading this, could try to double click on "DLC02WorkshopCageRadstag" (FURN) and right click on the script "DLC02:WorkshopCageScript" then Edit Source and tell me if YOU can edit it because this is maddening.

This whole endeavor should have taken an hour top and here I am, 3 days later still unable to simply edit a script...

I never had problems like that with the GECK =(

I hope someone can understand my frustrations and find a way to help me out.
I'll try anything, even if I tried it already, even if it is something basic.

Work-arounds would be fine, although I'd rather be able to fix the greyed out edit source.

 

[EDIT] Well I might be a step closer to solving it, I went ahead and loaded Fallout4.esm only with my plugin, no DLCs.

I found some piece of furniture that has a script attached to it (WorkshopStoreWeapon01Counter, workshopobjectscript)

and was able to edit the source of that. So I'm able to edit SOME scripts, just not the DLCs.

Gotta figure out why it is not picking up on the DLC scripts and maybe I'll manage to fix my own problem.

Edited by TheJMC17
Link to comment
Share on other sites

Alright, thank you Payl0ad for trying to help me out.

 

I fixed it on my own, as usual :sad:

For anyone else unfortunate enough to have this problem, here's the problem and how you fix it:

 

  • The Creation Kit doesn't see the .psc files, that much is true but why?

It seems that the CK will not look for subfolders nor will it look for the .psc files directly.

The CK wants archives, like Base.zip and DLC02.zip.

 

  • How to fix it?

Since the Preferences>Scripts option is read only, you need to open CreationKit.ini

In the Papyrus section, at the bottom, change the AdditionalImports line to this:

sAdditionalImports = "$(source);.\Data\Scripts\Source\Base;.\Data\Scripts\Source\DLC01;.\Data\Scripts\Source\DLC02;.\Data\Scripts\Source\DLC03;.\Data\Scripts\Source\DLC04;.\Data\Scripts\Source\DLC05;.\Data\Scripts\Source\DLC06"

Effectively telling the CK where to find the DLC archives.

Save CreationKit.ini and restart the CK.

You should see a similar prompt as you have seen with the Base.zip but for all DLCs.

 

If you don't have all the DLCs, don't bother removing portions of the above line unless you run into issues, the CK will simply not find the DLCs you're missing.

From now on, you should be able to "Edit Source" on all scripts.

 

  • I'm still having issues!

If you're still having issues, here's how things are working on my end :

 

CK is installed in Fallout4 folder.

 

The DLC01.zip is located here:

C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\DLC01

 

Same with other DLCs:

C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\DLC02\DLC02.zip

C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\DLC03\DLC03.zip

C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\DLC04\DLC04.zip

C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\DLC05\DLC05.zip

C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\DLC06\DLC06.zip

 

Hopefully you installed the CK inside Fallout4, if you did you should find CreationKit.ini here:

C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\CreationKit.ini

 

In the Papyrus section, the line "sAdditionalImports = "$(source);.\Data\Scripts\Source\Base;" can be broken down this way:

$(source) refers to the line right above (sScriptSourceFolder) and is followed by ";" which signals the end of that line.

"." refers to the root directory, in this case where the CK was installed: "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\"

 

Using these pointers, you should be able to understand how it works.

Don't forget to restart the CK, it will try to load the archives when starting.

Edited by TheJMC17
Link to comment
Share on other sites

Sorry, for some reason I thought repairing workshop objects follows the same rules everything else in workshop mode does. Turns out that was wrong. I've taken a look myself but can't make out how workshop objects are repaired. If somebody could shed some light on that, that would probably help.

 

Still thinking that what you want to do should not be done in a script.

Link to comment
Share on other sites

Well, so far I can tell that changing Gameplay>GameSetting>fWorkshopRepairComponentMult does what it says on the tin.

I changed it from 0.1 to 2.0 and repairing the cage now costs me a multiplier of what it takes to build it.

 

Unfortunately, setting it to 0 still requires at least 1 of each component.

One of my major worries by poking around the scripts is that, these things might be used for more than just the cages.
I'm not familiar enough with the DLC to tell if there's anything else that can potentially be damaged and require repairs.

 

I tried a few things with the script (WorkshopCageScript) but nothing really worked.

Preventing it from being damaged breaks the script and even after fixing the script to work despite the thing being damaged or not, it still asked me to repair the damn thing. It might have worked to recapture more but it didn't prevent the thing from being asked to be repaired.

I also tried reverting the damage done on OpenCage() (DamageObject(-9999.0)) but that didn't do anything.

 

Right now I'm considering "refunding" the costs of the mats but I am sure it is harder than it sounds and could potentially be abused.

 

[EDIT]

 

I took another approach and decided to repair the thing after it is being damaged.

Right now I've got a thing working but it was more about testing it than a good implementation.

I added this event in the WorkshopCageScript.
When I get more free time, I'll find a way to implement it seamlessly.

After that, I think I'll 10x the base price of the cages, in an attempt to balance things out.

Event OnPowerOn(ObjectReference akPowerGenerator)
Debug.MessageBox("Object powered!")
		Repair()
EndEvent

[EDIT]

Yep, I put Repair() at the end of OpenCage(), right after the actor being spawned and everything is perfect.
You don't need to repair them anymore this way.
I made the base price for the cages 5x so if it required 4 meat, it now requires 20.

I thought 10x for certain cages was a bit much, having to find 40 mirelurk eggs to build one cage would be discouraging.

 

I'll play with it for awhile and once I'm sure I haven't messed up anything, I'll publish the plugin in case someone else didn't like cage repairs. After all, I decided to do this because I couldn't find a mod that did it.

Edited by TheJMC17
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...