Jump to content

FOMOD Scripting - Change file in memory


DoctorL

Recommended Posts

I'm looking to do something very specific.

 

1 I want to load a file from Data/Shaders (for example) that is already stored on the user's machine.

2. Then, load that file in to a memorystream.

3. Then, recreate it as a new file that is saved to the same directory with a different name.

 

The security built in to FOMM and the available scripting seems to catch this even though it'd be the same as writing a file from the FOMOD itself in essence.

 

Alternatively, is here a way to load a dummy file from the FOMOD using GetFileFromFomod, overwrite that in memory with the data from the memorystream and then save that file?

 

I know this sounds like a bit much, but if it's possible, there are a number of applications here I'd like to make use of.

Link to comment
Share on other sites

I am actually very curious about this issue. I have often done scripts for it but I have been equally frustrated by the (necessary) security built into it. I am going to do a little research into the program and more specifically the function you wish to do. Hopefully some sort of solution can be found so that it does not violate the security of the program. If I find anything of interest I will let you know.

Link to comment
Share on other sites

  • 2 weeks later...

Been looking some into this issue and I just wanted to get a little clarification on what you want to have done here.

 

Does it mater if the old file is deleted or not?

Are you looking to make changes to the file itself or just the name of the file?

 

If you can let me know the answer to these I would appreciate it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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