Allow Script DLLs/Simplify Form Design

kaburke
2010-01-13
2013-05-23
  • kaburke

    kaburke - 2010-01-13

    Unless I am missing something, making forms for configuring install options is rather tedious and complex as controls need to be placed in code. Would it be possible to alter how the script engine works to allow custom DLLs to load? Along with that, would it be possible to alter how forms are handled so that they could be designed in (for example) Visual Studio?

    What I envision is referencing fomm.Scripting.dll in a Visual Studio project, writing my script files, including any forms, compiling to a DLL and dropping said DLL into my FOMOD. Optionally I would include my source files so others could alter my script.

    I'm not sure how easy it would be to implement the above; however, if it is something that you would be insterested in I would be happy to write I patch to do it.

     
  • Zumbs

    Zumbs - 2010-01-14

    You can make a VS project, where fomm.Scripting.dll is included. I have all my custom scripts in one VS project. This requires that I change the class name when copy-pasting into Script.cs. It is also possible to use the form designer in VS to build a form, though there are some issues when copy-pasting into Script.cs.

     
  • kaburke

    kaburke - 2010-01-15

    That's exactly what I've been doing, but it is something of a time-consumer. It works, certainly, but not having to copy-paste, and then massage the code to work, would definitively be easier.

     
  • kaburke

    kaburke - 2010-01-15

    It occurred to me after my last post that nothing was stopping me from loading DLLs in the script.cs file. It worked, but I ran up against the sandbox security FOMM puts in place. With out lessening the security, I can't load my own froms (without security warnings), or load other DLLs my first DLL depends on.

    Having said this, the security that is in place makes sense as we don't want these scripts to have access to do arbitrary things to a user's computer, so it seems that, for now, I will have to work with the way things are.

     

Log in to post a comment.