Jump to content

Modified Companions Radiant Quest Script Not Working – USLEEP Conflict?


Recommended Posts

Posted (edited)

Hey!

I wanted to increase the payout for Companion radiant quests, so I modified the CompanionsRadiantQuest.psc script. Here’s the new if-block I added:

int level = Game.GetPlayer().GetLevel()
if     (level < 10) 
  RewardAmount = 500 
elseif (level < 20) 
  RewardAmount = 600 
elseif (level < 30) 
  RewardAmount = 700 
elseif (level < 40) 
  RewardAmount = 800 
elseif (level < 50) 
  RewardAmount = 900 
else 
  RewardAmount = 1000 
endif

I compiled the script using the Papyrus Compiler CLI. Initially, I had issues with compilation, but I got it working after placing the TESV_Papyrus_Flags.flg file in the Skyrim directory and passing it as a parameter to the CLI using the -f flag.

I tried placing the compiled .pex file in both:

  • /Data/scripts
  • /Data/scripts/Scripts

However, no matter what I try, I still only get 150 gold as a reward.

The original script contained a faulty if-block with three < 20 checks, and I read somewhere that the Unofficial Skyrim Legendary Edition Patch (USLEEP) fixes this bug. Since I am using USLEEP, I suspect that it might be overriding my modified script. If this is the case, I’m not sure how to ensure that my version of the script takes priority over the patch.

Any help or insight would be greatly appreciated. Thanks in advance!

Edited by willywalrus
Posted

Anyone? :cyclops:

Posted

Hi, try it out with the CK as a new plugin, then load it after the USLEEP, should be good to go for the game. Include it in a quest to fire it off at after some event. :) 

Posted

There's only ever going to be one CompanionsRadiantQuest.psc file, this sits in the data/scripts/source folder. The compiled .pex file sits in the data/scripts folder.

Yours needs to overwrite both the original and the USLEEP versions. Did you do your changes on the USLEEP version of the script?

Also, any changes probably won't take effect unless you start a new game.

Posted (edited)
5 hours ago, Hana said:

There's only ever going to be one CompanionsRadiantQuest.psc file, this sits in the data/scripts/source folder. The compiled .pex file sits in the data/scripts folder.

Yours needs to overwrite both the original and the USLEEP versions. Did you do your changes on the USLEEP version of the script?

Also, any changes probably won't take effect unless you start a new game.

I just realized my folder structure might be messed up, probably due to a mod. Here's what it looks like:

/Data/scripts
/Data/scripts/Scripts/Source

The scripts folder has a bunch of .pex files (like actor.pex), a DialogueViews folder, and a Scripts folder (with a capital S). Inside Scripts, there’s only a Source folder with around 10k .psc files. Could this cause errors?

I haven’t touched USLEEP since I’m not confident with unpacking and repacking .bsa files yet. The script USLEEP modifies is still inside its .bsa.

Regarding your last point - are you sure? The .psc file has a comment saying the script is triggered when a radiant quest is initialized, before being accepted. So theoretically, every time I "ask for work," the script should run. Does each savegame "cache" scripts, keeping the old version instead?

Edited by willywalrus
Posted
14 hours ago, lmstearn said:

Hi, try it out with the CK as a new plugin, then load it after the USLEEP, should be good to go for the game. Include it in a quest to fire it off at after some event. :) 

I should give this a try ...

Posted

Last bump before I give up. :redface:

Posted

Regarding your scripts folder, yes it is and always should be;

Data/Scripts
Data/Scripts/Source

If your companionsradiantquest.pex script is not sitting in data/scripts it is not overriding the USLEEP version. Your loose script will override the .bsa packed USLEEP script. Now, having said that, I still strongly recommend you at least unpack the companionsradiantquest.psc from the USLEEP bsa and use that as your base to make your changes, or you'll just revert whatever else USLEEP changed in it.

Regarding starting a new game, there is a ton of information in save files, half of it nobody even knows what's in there but yes, scripts are one of them. The Companions overarching quest is Start Game Enabled, it is now inside your save game and changes won't come easy. So, have you tried starting a new game? (once you make sure the script is in the right place)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...