Jump to content

Script Fragment Compiling Issue


gammons123

Recommended Posts

Posted

Has anyone encountered the following using the creation kit for scripting?

 

Write a quest script which works fine, does stuff

add some script fragments to a dialogue result script, compile them

Open quest script again, top 10-20 lines of the script including the name has been overwritten with the output from the compiler as it compiled the result script?

 

I may have explained that a few times now and not sure what causes it.

 

I was able to rewrite the script from memory, and everything works OK except (as an aside) my AAF calls no longer work, though AAF still does. (this might be something else I changed though it FEELS related).

 

is it because I'm launching the CK from MO2? not sure how else I can use it.

 

any suggestions appreciated.

 

rant over.

Posted
On 9/29/2019 at 3:26 PM, gammons123 said:

Has anyone encountered the following using the creation kit for scripting?

 

Write a quest script which works fine, does stuff

add some script fragments to a dialogue result script, compile them

Open quest script again, top 10-20 lines of the script including the name has been overwritten with the output from the compiler as it compiled the result script?

 

I may have explained that a few times now and not sure what causes it.

 

I was able to rewrite the script from memory, and everything works OK except (as an aside) my AAF calls no longer work, though AAF still does. (this might be something else I changed though it FEELS related).

 

is it because I'm launching the CK from MO2? not sure how else I can use it.

 

any suggestions appreciated.

 

rant over.

I feel your pain. 

 

As much as I'd like to follow @dagobaking's advice. I've never been able to get Fallout 4 compiling to work with any of the major text editors. I dunno if it's because I use MO2, custom namespaces, or what. 

 

If you are gonna compile from the CK, and this keeps happening. First always have your source open in a text editor in case it eats it, so you can just resave. and Second stop using Fragments. I got this advice from @Flashy (JoeR). Use Topic Info scripts instead which can do everything fragments can do. This will happen a lot less often with real scripts than Fragments... but unfortnately not NEVER as I at first thought. :(

 

The most fucked up thing is this just started happening one day several months ago Right after I did a long coming update of MO2 and a big Windows update. I am not sure which (if either) caused it because Windows updates have caused HUGE CK and compiler issues issues in the past (skyrim)

 

EDIT: And of frigging course I get Sublime to work right after posting this. I tried it a while back but didn't run it through MO2 and was already flustered so didn't realize my mistake. That said, the first compile I did gave me that wonderful old "Assembly failed" though the 2nd try without changing anything compiled fine in the virtual directory. Only time will tell if this will stop the source code corrupting or not... but at least my development should go faster now Thanks @dagobaking 

Posted
2 hours ago, dagobaking said:

The scripts you wrote probably ended up in the MO2 overwrite folder.

 

Anyway, don't use the CK to write scripts.

 

Follow this and use Sublime Text instead: https://www.creationkit.com/fallout4/index.php?title=Sublime_Text

Thanks for the adice - I'll look into setting that up,

4 minutes ago, Tentacus said:

If you are gonna compile from the CK, and this keeps happening. First always have your source open in a text editor in case it eats it, so you can just resave. and 2 stop using Fragments. I got this advice from @Flashy (JoeR). Use Topic Info scripts instead which can do everything fragments can do. This will happen a lot less often with real scripts than Fragments... but unfortnately not as I at first thought never. :(

 

The most fucked up thing is this just started happening one day several months ago Right after I did a long coming update of MO2 and a big Windows update. I am not sure which (if either) caused it because Windows updates have caused HUGE CK and compiler issues issues in the past (skyrim)

Thanks, keeping the soure open is a good short term tip.  Topic info scripts could be a good shout I'll look into them. At the moment I'm trying not to do anything more than calling a function in my quest script where possible.

 

I'm used to modding/ck being buggy as anything, but right now it feels actively malicious :P

Posted
7 hours ago, Tentacus said:

EDIT: And of frigging course I get Sublime to work right after posting this. I tried it a while back but didn't run it through MO2 and was already flustered so didn't realize my mistake. That said, the first compile I did gave me that wonderful old "Assembly failed" though the 2nd try without changing anything compiled fine in the virtual directory. Only time will tell if this will stop the source code corrupting or not... but at least my development should go faster now Thanks @dagobaking 

I don't run Sublime through MO2. I wouldn't recommend that. (And I do use MO2 and namespaces otherwise).

 

This is all well worth the additional time/effort to configure and get working right. Giving up on a proper text editor will cause long-term agony, imo.

 

It sounds like you are running into some kind of issue with how you are configuring the Papyrus plugin within Sublime Text. Or, maybe you are not updating the config at all?

 

Essentially, you have to make a separate configuration entry (instructions are in the config file) for each mod that you are working on. I have an "AAF_DEV" mod in MO2 that the Sublime Text Papyrus config looks into for scripts to compile. It is also configured to look at the Fallout 4 game folder for scripts. So, you can put the vanilla and F4SE source files there (including the two scripts hidden within the LooksMenu bsa).

 

Then configure the output for that configuration to be in your mod folder. Now you get your source and deployable files neatly organized in one folder that you can quickly zip up and send out as a new build whenever you need to.

 

Its a bit of a hassle if you want to quickly jump in and compile things for some random new mod. But, you could actually set up a "DEV_SANDBOX" mod with the Papyrus Plugin configured for it and put new mods in there to quickly edit and compile them. The Papyrus Plugin config allows you to have unlimited additional configs and it figures out which one to use based on the folder the files you are working on are in.

 

Posted
17 minutes ago, dagobaking said:

I don't run Sublime through MO2. I wouldn't recommend that. (And I do use MO2 and namespaces otherwise).

 

This is all well worth the additional time/effort to configure and get working right. Giving up on a proper text editor will cause long-term agony, imo.

 

It sounds like you are running into some kind of issue with how you are configuring the Papyrus plugin within Sublime Text. Or, maybe you are not updating the config at all?

 

Essentially, you have to make a separate configuration entry (instructions are in the config file) for each mod that you are working on. I have an "AAF_DEV" mod in MO2 that the Sublime Text Papyrus config looks into for scripts to compile. It is also configured to look at the Fallout 4 game folder for scripts. So, you can put the vanilla and F4SE source files there (including the two scripts hidden within the LooksMenu bsa).

 

Then configure the output for that configuration to be in your mod folder. Now you get your source and deployable files neatly organized in one folder that you can quickly zip up and send out as a new build whenever you need to.

 

Its a bit of a hassle if you want to quickly jump in and compile things for some random new mod. But, you could actually set up a "DEV_SANDBOX" mod with the Papyrus Plugin configured for it and put new mods in there to quickly edit and compile them. The Papyrus Plugin config allows you to have unlimited additional configs and it figures out which one to use based on the folder the files you are working on are in.

 

Thanks for the tip.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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