Page 3 of 43

Re: [MOD][WIP] FTL: Overdrive

Posted: Tue Sep 25, 2012 8:39 pm
by father_walker
Surfpup wrote:I think it's a nice idea, but the game has been out for less than 2 weeks. What if the devs suddenly decide that they do want to implement better modding support? I would at least wait a month or two before doing something as ambitious as rewriting the game from scratch. Although I'm sure the process of developing this will be a fun learning process.


Yeah, good point. As much as I'd love to see Overdrive finished, I think that you've set the bar pretty high for yourself. I think it's much more probable that we'll see some official modding support before this project is finished (if ever).

Re: [MOD][WIP] FTL: Overdrive

Posted: Tue Sep 25, 2012 8:56 pm
by thomasfn
DiEvAl wrote:Library.cs, line 85:

Code: Select all

public List<string> Weapons { get; set; }

Shouldn't it be List<Weapon>?


That could work, but I decided to use strings and lookup the weapon from the library when needed as it means mods can easily use weapons from other mods (since one mod won't have access to the weapon object added by another).



father_walker wrote:
Surfpup wrote:I think it's a nice idea, but the game has been out for less than 2 weeks. What if the devs suddenly decide that they do want to implement better modding support? I would at least wait a month or two before doing something as ambitious as rewriting the game from scratch. Although I'm sure the process of developing this will be a fun learning process.


Yeah, good point. As much as I'd love to see Overdrive finished, I think that you've set the bar pretty high for yourself. I think it's much more probable that we'll see some official modding support before this project is finished (if ever).


It is an ambitious project, I agree - and if the dev teams magically produces a mod API out of somewhere or this project otherwise becomes obsolete then I'll discontinue it. But I'm sure I read somewhere that they said a modding API is unlikely to happen any time soon (though I may have pulled that out of my arse).

Re: [MOD][WIP] FTL: Overdrive

Posted: Tue Sep 25, 2012 10:16 pm
by DiEvAl
Can there be more than 1 active StateInfo?

Re: [MOD][WIP] FTL: Overdrive

Posted: Tue Sep 25, 2012 10:19 pm
by thomasfn
DiEvAl wrote:Can there be more than 1 active StateInfo?


You can have multiple states active at any given time by using Root.Singleton.mgrState.Activate<MyStateName>();

FSMTransist basically deactivates the current "main" state and activates the one you specify (such as moving from main menu state to new game state). For example, the main menu and options states are both active at once when the user clicks the options button.

You can only have one of each state active at a time though. StateInfos are just used internally by the state manager.

Re: [MOD][WIP] FTL: Overdrive

Posted: Tue Sep 25, 2012 10:36 pm
by marksteele
they stated on their support forum thingy in many places that modding support was unlikely to happen.

Re: [MOD][WIP] FTL: Overdrive

Posted: Wed Sep 26, 2012 3:09 am
by Alextrapolate
I've done quite abit of lua, and I'd love to help getting the vanilla mod finished if there is room for me.

Re: [MOD][WIP] FTL: Overdrive

Posted: Wed Sep 26, 2012 12:45 pm
by thomasfn
Alextrapolate wrote:I've done quite abit of lua, and I'd love to help getting the vanilla mod finished if there is room for me.


Sure! There are probably enough bindings to get a fair amount of work done on that, and if you're feeling adventurous you could add bindings and such for achievements and events and stuff.

Re: [MOD][WIP] FTL: Overdrive

Posted: Wed Sep 26, 2012 7:56 pm
by DiEvAl
When I try to run it, I get this exception:
[spoiler]

Code: Select all

System.IO.FileLoadException was unhandled
  Message=Сборка для смешанного режима построена на основе версии "v2.0.50727" среды выполнения и не может быть загружена в среде выполнения 4.0 без дополнительных конфигурационных данных.
  Source=LuaInterface
  StackTrace:
       в LuaInterface.Lua..ctor()
       в FTLOverdrive.Client.Gamestate.ModdingAPI.OnActivate() в D:\FTL\ftl-overdrive\Client\Gamestate\ModdingAPI.cs:строка 20
       в FTLOverdrive.Client.Gamestate.StateController.StateInfo.Activate() в D:\FTL\ftl-overdrive\Client\Gamestate\StateController.cs:строка 18
       в FTLOverdrive.Client.Gamestate.StateController.Activate[T]() в D:\FTL\ftl-overdrive\Client\Gamestate\StateController.cs:строка 55
       в FTLOverdrive.Client.Root.Init() в D:\FTL\ftl-overdrive\Client\Root.cs:строка 173
       в FTLOverdrive.Client.Program.Main(String[] args) в D:\FTL\ftl-overdrive\Client\Program.cs:строка 12
       в System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       в System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       в Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       в System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       в System.Threading.ThreadHelper.ThreadStart()
  InnerException:
[/spoiler]
Translation: "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information."

EDIT: Fixed it by adding "useLegacyV2RuntimeActivationPolicy="true"" to app.config.

Re: [MOD][WIP] FTL: Overdrive

Posted: Wed Sep 26, 2012 10:45 pm
by SSk77
Please, register and post your mod here:

http://ftlmods.forumeiro.com/

Re: [MOD][WIP] FTL: Overdrive

Posted: Thu Sep 27, 2012 3:15 pm
by thomasfn
DiEvAl wrote:When I try to run it, I get this exception:
[spoiler]

Code: Select all

System.IO.FileLoadException was unhandled
  Message=Сборка для смешанного режима построена на основе версии "v2.0.50727" среды выполнения и не может быть загружена в среде выполнения 4.0 без дополнительных конфигурационных данных.
  Source=LuaInterface
  StackTrace:
       в LuaInterface.Lua..ctor()
       в FTLOverdrive.Client.Gamestate.ModdingAPI.OnActivate() в D:\FTL\ftl-overdrive\Client\Gamestate\ModdingAPI.cs:строка 20
       в FTLOverdrive.Client.Gamestate.StateController.StateInfo.Activate() в D:\FTL\ftl-overdrive\Client\Gamestate\StateController.cs:строка 18
       в FTLOverdrive.Client.Gamestate.StateController.Activate[T]() в D:\FTL\ftl-overdrive\Client\Gamestate\StateController.cs:строка 55
       в FTLOverdrive.Client.Root.Init() в D:\FTL\ftl-overdrive\Client\Root.cs:строка 173
       в FTLOverdrive.Client.Program.Main(String[] args) в D:\FTL\ftl-overdrive\Client\Program.cs:строка 12
       в System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       в System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       в Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       в System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       в System.Threading.ThreadHelper.ThreadStart()
  InnerException:
[/spoiler]
Translation: "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information."

EDIT: Fixed it by adding "useLegacyV2RuntimeActivationPolicy="true"" to app.config.


Hmm that's strange, I recompiled LuaInterface for .NET 4 and provided the binaries in the repo. Maybe yours defaulted to an older LuaInterface for some reason. Oh well, thanks for letting me know.