The modding API
Hi there. :)
A dev has shown the modding API in a
video and now I have some questions about it:
- I know you can create objects etc. But can you also change existing objects (like animals) in their behavior?
- If you create flora/fauna objects, will the graphs and possibility to decide laws automaticly added or should the modder do this.
- What's about influences of objects and 'integration'? If you create a machine and it emit toxic gases, will it automaticly has impacts to the ecosystem?
Sorry for my bad english, I'm not an english mothertongue :-S
Will the client download the mods every time, or once and checking for Upgrades?
Will I be able to manipulate the EcoSystem-Simulation?
(Add new species, change the influens of existing ones on the Simulation, ...)
Will ther be patterns for GUI elements? (That everything looks the same)
1 - Yes. Behavior is currently controlled entirely server side, though you do have some control client side to do things like play different animations.
2 - Yes, this is currently automatic. Right now the agents are somewhat simplistic but you can have a basic food web such that animal A eats animal B which eats plants C/D
3 - Its a voxel world, so any systems you can think of which are modeled using that you could build in. Cellular automatons, for example.
4 - Planning for mods being cached locally, so only updates would need to be redownloaded.
5 - Adding new species is possible now without changing any code.
6 - GUI is still in an incredibly early state but would like to have them work within the modkit system. Being similar to WOW's UI customization system is a goal.
Oo good answers, thanks!
Also, that would be great following a similar system with the WoW UI customizations i always loved how they did it. It was simple to use, and worked well.
I have 3 idea of mod that i would like to make one day for ECO, and i am curious to know if you think they will be interesting and/or realisable(mostly according on how mod will interact with game mechanic).
first one, a magic mod! yeah, i know, this game is not suppose to be about magic, but let me explain what i have in mind! :-B I am thinking of some sort of leyline or vein of invisible energy, which at first will be "in phase" with the environement, but if overused by let's say a shaman, may be disturbed and impact on environement. i am open to improvement to this idea.
second one, an ancient civilization ruin mod, which could bring some technologie to player, before they were ready or completely new line of tech bringing other opportunities to players. We may even think of alien technologie! The main purpose of this mod, is to give enough rope to players to hang themself if they are not carefull. >:)
last one, this one is my favorite, a zombie mod! or at least a pandemic mod (which maybe only good players may survive...) which would bring with the appropriate tech (or event) possibility of viral propagation to deal with. :-&
I've got a few questions about the modding API too if you don't mind.
- There's been some talk of a scripting language. Will that be the only way to mod or I can we do "raw" C# too?
- What kind of sandboxing can we expect for mods?
- What features of Unity can we use in a mod directly? In the blog video about modding, it looked like it was serializing a game object. Does that mean we could, for example, have some Unity 5 GUI directly compiled into the mod/object? What about MonoBehaviours?
- The server is highly parallelized, is there a fixed scheme for this (as in, "every species has its own thread")? How will objects/mods communicate with each other (across these threads) and the game world?
we are still experimenting with various methods here, but this would be used for mods that need to do some sort of logic client side - animate a light, make some particles, whatever. Since we want to avoid the need for clients to search out mods, the server would be sending these scripts to the client when they connect.
Most of the your coding should be done on the server, where you can pretty much do whatever you want in C#. A portion of the modkit right now is runtime compiled, so adding new items and whatnot is fairly easy and straightforward.
again still work in progress right now
Content in mods is delivered via asset bundles from unity, which does not allow for custom monobehaviours unfortunately. Having a scripting system or modding API will help alleviate this problem and we are still experimenting with what the best method might be.
Server is designed such that there are a bunch of different "plugins" running on the server, each generally on its own thread. The plugins themselves then handle what the interface into them is and the extent of thread safety it needs to employ.
Awesome, thanks for the swift reply!
Regarding the first point, the language for those client sided scripts could still be C#. If I'm not mistaken, Cities: Skyline is using Unity too and its mods can either be compiled or raw .cs. In case it's a .cs, the game compiles them on the fly. I have little experience on what Mono can do there, however, or what Unity's Mono can do.
These mods all sound awesome :) Looking forward to seeing what you can do. Will have to look into what cities skyline is doing.
Yes its possible to compile some scripts client side runtime on the fly, the problem is that its not supported on all platforms (Web + some mobile platforms).
Hey, just wondering if there was ever a announcement if Lua or Python would be used for modding, or if we would have to use C# or something else.
1.) In terms of behavior, do you mean it is controlled by the server we run when creating a world? Or the server we login to before connecting to a server? If it's our own servers, couldn't we just implement behavior mods as a server mod?
2.) In regards to behavior, how do the animal objects work? Are they objects which inherit behavior from the species with their own independent action? Or is their behavior controlled by some larger system?
3.) Is there a way to give an object the ability to see (camera object, at it's simplest a security camera object) and interact with other objects according to what it sees? (say, a beaver, that cuts trees and dams rivers to flood areas) and if so could we, say, use something like the Open Worm project to create an animal that is driven entirely by a simulated nervous system?
@SnowHalo probably c#, we've tried integrating both python and lua, but both solutions right now are incredibly slow through unity. The problem with c# though is sandboxing any downloaded scripts.
- basically everything is on the server; the client is just a display of that information. You can implement new animals as a mod.
- they have simplistic behaviours about what things they eat, how often they reproduce, etc
- you could do all of this on the server, sure.