Jump to content

ModBuddy won't save my changes.


serratemplar

Recommended Posts

EDIT. Apologies for posting this in very much the wrong place; Google Search lead me here, but I just discovered there are forums for modding specifically here. Sorry. :\

 

Things work fine for a while but then the IDE gets into this weird state.

 

  • I make a change (to one of my own custom-created listener classes).
  • I save the change (Ctrl-S).
  • The IDE's status bar (at the bottom) tells me the file's been saved.
  • I run Build.
  • The IDE pops up a window explaining that "This file has been modified outside of the source editor. Do you want to reload it?"
  • Clicking yes reloads the file pre-changes, revealing the file was never saved, effectively reverting my changes. (Clicking No doesn't change the fact that my changes weren't ever actually saved.)

This persists through restarts of the IDE and is super, super, super frustrating. :\

 

I can still get stuff done if I go ahead and actually use an external editor (e.g. Notepad++) to make changes to the file, but I can't do it in the IDE anymore which is really annoying. Has anybody encountered this behavior before? Any idea what causes it and how to prevent it?

 

Thanks in advance!

Edited by serratemplar
Link to comment
Share on other sites

I think I found a fix, although I'm no closer to understanding the cause nor am I certain this fix is either permanent or even causal. Nonetheless, prompted by this StackOverflow post, here's what I did:

 

The post suggested deleting targets from bin (e.g. DLL, exe) so I verified that running Clean actually did this: the mod folder under Steam\SteamApps\common\XCOM 2 SDK\XComGame\Mods was deleted entirely by running Clean. Running Build Solution ran me straight into the same problem.

 

Running Clean (explicitly, again...not Rebuild) I verified that the folder was again purged, then I explicit built my project instead of running Build Solution...and now it seems to be working again. My changes are being saved.

 

Not clear whether this will last (I assume it won't) so I'll likely be able to re-test this "fix" in the near future.

Link to comment
Share on other sites

The plot thickens.

 

Now every so often my project vanishes from the Build menu, so I can't explicitly build/clean just it; and, of course, running Build Solution just returns me to the problem in the OP.

 

And just now, I saved the file and here's a funny thing.

 

My changes were saved to the SDK's folder instead of my project folder!

 

Saved here:

Steam\SteamApps\common\XCOM 2 SDK\Development\Src\...

 

instead of here:

Documents\Firaxis ModBuddy\XCOM\...

 

WinMerge is showing me the opposite diff that I'd expect. Very frustrating. Almost makes me think I have my paths mixed up in ModBuddy's settings, but I keep checking them against the Quick Start guide (and common sense) and so far I haven't found any mistakes.

Link to comment
Share on other sites

Okay, I can tell you what your initial issue was. You were double-clicking on an error message in the Build output window, right? For some reason, when you do that it will bring up some sort of intermediate copy of the file that was taken during the build, rather than the actual source file, so when you run Build again the intermediate copy (with your changes) gets overwritten.

Link to comment
Share on other sites

Okay, I can tell you what your initial issue was. You were double-clicking on an error message in the Build output window, right? For some reason, when you do that it will bring up some sort of intermediate copy of the file that was taken during the build, rather than the actual source file, so when you run Build again the intermediate copy (with your changes) gets overwritten.

:O

 

Yes, that's precisely what I was doing; it's a super convenient way to get to the error.

 

Why. Would. It. Not take me to the file itself. o_O

 

Thanks for cluing me in there. :)

Link to comment
Share on other sites

Lucubration's note there seems to account for everything weird I'm seeing.

 

Double-clicking on an error in the output log opens this intermediate file (clever trap).

 

Changes to this intermediate file don't actually change anything. (Hence the apparent reversions.)

 

While this intermediate file is open in the editor, the project is removed from the Build menu.

 

Thanks again, both of you.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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