Jump to content

Insight on Mod Development Expectations


REDACT3D

Recommended Posts

1 hour ago, Gotmachine said:

They fully compile the whole application on startup, with the downside being a vastly increased start delay.

Please attach a debugger to the actual native compiler in CLR, Mono, or any other bytecode interpreter with JIT capability. Not a single one of these will compile the entire bytecode at initialization, unless your program is literally the Hello World. The simplest of these will compile functions on first call. Modern implementations don't even always do that, and absolutely all of them have some capability to interpret bytecode directly, at a minimum, to discover entry points to functions that need to be compiled. That's literally the concept of JIT, and if you ever debugged a language runtime, you should know that.

Link to comment
Share on other sites

5 hours ago, Zozaf Kerman said:

… :huh:

  Hide contents

Rename this thread to “Come Argue About Possible Mod Languages!” :sticktongue:

 

No, you right. We shouldn't be arguing about it. Once the mod tools are available, we can just make a plugin that exports all of the mod API bindings to Common Lisp and then everyone will be happy.

Link to comment
Share on other sites

36 minutes ago, K^2 said:

Once the mod tools are available, we can just make a plugin that exports all of the mod API bindings to Common Lisp and then everyone will be happy.

Oh, come on, Common Lisp is ancient and boring (as I should know, having learned it at university at a time when Common Lisp wasn't even teenaged). Nobody wants to mod by writing ASTs.

Let's stay properly kerbal here, and build a modding API in Kerboscript.

Edited by RKunze
Link to comment
Share on other sites

2 hours ago, K^2 said:

No, you right. We shouldn't be arguing about it. Once the mod tools are available, we can just make a plugin that exports all of the mod API bindings to Common Lisp and then everyone will be happy.

I think it'll be APL.

Link to comment
Share on other sites

Any COBOL or FORTRAN enthusiasts in here?

Back on topic, the inclusion of Lua will likely mean that a mod like ModuleManager won't be needed, because such functionality will be available from the base game.

Link to comment
Share on other sites

3 hours ago, SciMan said:

Any COBOL or FORTRAN enthusiasts in here?

I had to do Fortran in university, because a lot of the theoretical physics is done by people who never studied comp-sci and learned everything about code from their advisors, who learned to code in the 70s.

What would you say is the exact opposite of the enthusiast?

4 hours ago, SciMan said:

Back on topic, the inclusion of Lua will likely mean that a mod like ModuleManager won't be needed, because such functionality will be available from the base game.

We still likely to need plugins for some mods, and these would still have the same limitations in terms of security as they do now, meaning we'll probably end up needing a 3rd party mod manager for them.

But if Lua scripting for parts is included, and we can have a lot of mods running just through that, yeah, it's entirely possible that you'd be able to auto-download mods when joining the server, and if you want to add mods for your own local game, you can get them from Steam Workshop, for example.

Link to comment
Share on other sites

7 hours ago, SciMan said:

Any COBOL or FORTRAN enthusiasts in here?

I learned FORTRAN IV back in the deep dark dank days past.  I once helped someone with their COBOL code without knowing the language meself.  I did program a lot in PL/I, which has structures like those in COBOL.  I don't remember much of this now.  It was a long time ago.

Though I could pick up either language with a little effort (as could anyone good who's learned a few languages and coded enough), I would never call meself an enthusiast of either.

 

3 hours ago, K^2 said:

I had to do Fortran in university, because a lot of the theoretical physics is done by people who never studied comp-sci and learned everything about code from their advisors, who learned to code in the 70s.

In many cases, there may be 3 or 4 generations now.  There's also a lot of code and existing libraries for a lot of purposes.  More likely to be able to use the libraries linked with other language code than to rewrite them.

Link to comment
Share on other sites

54 minutes ago, Caerfinon said:

Ooo memories. Stacks of punch cards. 

I have a deck of punch cards somewhere from a few decades ago.  Has the code printed on the top of each card.  I want to copy out that program when I find it.  I still remember what it does. :)

Link to comment
Share on other sites

4 hours ago, Jacke said:

In many cases, there may be 3 or 4 generations now.  There's also a lot of code and existing libraries for a lot of purposes.  More likely to be able to use the libraries linked with other language code than to rewrite them.

Yeah, they were trying to make me into the 3rd generation. But fortunately I was already quite capable with C++ and quickly found that GNU F77 compiler is binary-compatible with the GCC, so I was able to pull the Fortran numerical libraries into my C++ code as if I was importing C libraries. I also re-wrote a few simpler routines for Gauss quadrature, etc.

And this is a big part of why I would never want to deal with something like Fortran for a mod even for a joke. There are funnier languages that don't hurt my soul half as much.

Link to comment
Share on other sites

Huh, I hadn't really considered the implications of modding + multiplayer much. Seems like there could be some potential for asymmetry (though that is mitigated by KSP as a game concept doesn't really lend itself to explicitly competitive game types); I wonder if there will be explicit limitations for mods, or if it will just be determined by the host.

K^2 explained how using LUA limits/eliminates the malicious abuse potential, so that would solve that, but there still is the performance question: stuff like people with lower end systems that are trying to limit how many mods they are using, mods (such as ones that add lots of parts) that take up a non trivial amount of space, as well as the ones that heavily alter an aspect of gameplay (stuff like planet packs, or MKS type stuff). I guess that, to some degree, the answer could just be "don't join those games", but I imagine the situation arising for someone, somewhere, of friends wanting a multiplayer game, but also enjoying really wanting different mod setups 

I guess, logically, everyone would have to be running the same mods (except maybe ones that don't affect gameplay and can just be ignored by the multiplayer code (ie, visual stuff like scatterer, etc.)), which also eliminates the asymmetry questions; I'm definitely not an expert, but I would imagine that the game having to handle things differently for multiple players at the same time has to be problematic (if not impossible, in some situations).  So I guess it comes back around to not joining games using mods you can't/don't want to use, or reaching a consensus with the other players about it beforehand.

So I guess I sort of answered my own questions...maybe.

On a completely unrelated note, all my saves have different mod setups, so I end up having a number of different, sorted copies of the GameData folder saved somewhere, to swap out if I want to play a different save. I know mods load at startup, so that's just how it is, but I do wish KSP2 would have a better, built in way to track what mods each save has and load them accordingly.

PS: if mods load at startup, wouldn't that create some issues if you have to incorporate new mods from the host when you join a game?

Link to comment
Share on other sites

1 hour ago, GigFiz said:

I'm definitely not an expert, but I would imagine that the game having to handle things differently for multiple players at the same time has to be problematic

What usually happens is that the server has a mod list and the computers that connect to it have their own mod list. The server handles all of the effects so even if a client has a gameplay mod that isn’t on the server, it will usually only result in problems on the client side, when the computer asks the server to load a craft with parts that don’t exist or something. If lightweight Lua mods are a thing, then the server can just send over its mods as the client connects and ignore any extra mods that the client has. 

1 hour ago, GigFiz said:

I do wish KSP2 would have a better, built in way to track what mods each save has and load them accordingly.

PS: if mods load at startup, wouldn't that create some issues if you have to incorporate new mods from the host when you join a game?

I think one of the benefits of this approach with Lua is that the mods don’t have to load at startup. They are on a different layer anyways, they don’t interact with the game similarly to C# mods, the game instead encompasses Lua mods and runs them inside itself, which means that you should be able to start and stop them without causing the game itself to fail. I’m also not an expert on this, so if anyone knows better, correct me. As a result of being able to load Lua mods after the game starts, you could have (probably smaller) differences in mods between your save files, and when you join a server there could be a separate mod list that gets downloaded and activated on your computer as you join. 

Link to comment
Share on other sites

2 hours ago, t_v said:

I think one of the benefits of this approach with Lua is that the mods don’t have to load at startup. They are on a different layer anyways, they don’t interact with the game similarly to C# mods, the game instead encompasses Lua mods and runs them inside itself, which means that you should be able to start and stop them without causing the game itself to fail. I’m also not an expert on this, so if anyone knows better, correct me. As a result of being able to load Lua mods after the game starts, you could have (probably smaller) differences in mods between your save files, and when you join a server there could be a separate mod list that gets downloaded and activated on your computer as you join.

Or, "How to finally enable/disable mods from within the game".

Link to comment
Share on other sites

Multiplayer and modding are a complex topic. The short of it is that it will be largely on mod developers to write mods with multiplayer in mind, and on whoever creates a server to make sure the mod list only includes mods that work well this way and also make sure that there aren't any performance issues. Joining a random server hosted by some random fellow KSP enjoyer might not always work out.

There are also some aspects of it that Intercept need to get right, but it mostly involves exposing whatever they end up needing for networking the various game parts to the mod API.

Link to comment
Share on other sites

On 12/5/2022 at 4:45 PM, Nazalassa said:

Or, "How to finally enable/disable mods from within the game".

This is something that PC Factorio is FANTASTIC at, using it's built in mod manager.
KSP 2 could be equally as good, with the right kind of built-in mod manager.

EDIT: Oh yeah and Factorio is a game that uses LOTS of Lua, literally every mod uses Lua code in it to do everything, there is no such thing as a custom compiled DLL for a factorio mod.
And Factorio will run on literally a potato computer, and run well at that. And it's got a lot of things going on.

Edited by SciMan
Link to comment
Share on other sites

Well, what I'm hoping for is some dual interface API with the current "native" C# approach as the deault but with access to (the presumably) Lua scripting engine inside the game. If you're creating a mod like Parralax you need all the performance you can get. But if you simply want some code to accompany your craft then lua should just be fine.

Link to comment
Share on other sites

11 minutes ago, [email protected] said:

Meh, I just wonder how long it’s going to take someone to mod the big Radio antenna into a swimming pool.

You talking about the antenna that is actually a nuclear engine that can be used as an antenna? The one that uses lasers to detonate fusion pellets? That antenna? Because that would make a big pool indeed. 

Link to comment
Share on other sites

×
×
  • Create New...