Jump to content
Chris

Xenonauts-2: Modding

Recommended Posts

The first Xenonauts game was a weird combination of being extremely moddable and not being very moddable at all. I'm very pleased with the way that we got the community involved to produce Xenonauts: Community Edition, which proved far more successful than I ever hoped it would ... and I'm also very impressed with some of the mods and maps that were made by the community (Skitso's map pack and the X-Division mod are two of the most popular, but there's been a lot of impressive content generated over the years).

The goal for Xenonauts-2 is to make the game as moddable as possible. The move to Unity means there are some aspects of the game that are going to be harder to mod than before, but there are other parts that will be easier to mod. These are the areas we will be discussing in this post:

 

Xenonauts-2: Community Edition: (stretch goal)

If you are unfamiliar with what the "Community Edition" of the first Xenonauts was, here's a quick primer - after the game was released, we offered a number of professional programmers in the community (the best known were Solver and llunak) access to the full source code of the game in order to continue unofficial development on the game. This was done under an NDA and strictly on a non-commercial basis, but the final product was given its own sub-forum and Steam branch so is freely available to anyone who purchased Xenonauts (details here).

This was an enormous success. The Community Coders did an excellent job of fixing up a few unresolved bugs / issues that were left in the release version of the game, and implemented a number of new features that the community were after - e.g. a soldier memorial screen. They also added a whole bunch of extra support for modders, which is why so many of the major mods for Xenonauts run on Community Edition rather than vanilla Xenonauts. It's amazing what skilled modders can achieve, but it's even more impressive what modders can do (and enable in the wider community) if they are professional coders with access to the source code.

We would very much like to make Xenonauts-2: Community Edition a reality ... and, realistically, we'll probably find a way to do it whatever happens. But taking the time to prepare the code and set up the infrastructure around the project is a lot more time consuming than you might imagine, and therefore we're going to incorporate it into our stretch goals for the Kickstarter. Everything will work much more smoothly if we can take the time to set up the X2:CE program properly, rather than just letting the Community Coders loose on a huge codebase with no guidance or advice!

We'll do our best to provide good modding tools for the community at the release of Xenonauts-2, but X2:CE will ensure the community can develop and expand the game well beyond that point!

 

Methods of Modding:

The main method of modding Xenonauts 1 was editing text files in a text editor such as Notepad, which is still viable in X2 - you can already edit many of the items and unit properties using the same method. However we spend most of our time working on the game files within Unity itself because it much easier to display the information in readable manner within the game engine.

We are most likely going to create a Game Editor as a plugin for Unity when we release the game. As mentioned above, this will display the information in a manner that is easier to understand than editing the text files directly, but more importantly it will also automatically perform the mod-merging formatting that allows multiple mods to work together ... but also makes modding X1 quite a difficult process. I expect this tool to have a bit of a learning curve (especially if you don't know Unity), but it should be a valuable piece of kit for any serious modder.

The Map Editor is also going to have to exist as a plugin for Unity. Unfortunately there's not really any way to seperate the level creation process from Unity itself, and there's also some potential legal issues in that we use several commercial plugins for the game that we are licensed to use but not to redistribute. It may actually be that the map editor needs to rolled into the Community Edition program where mappers become semi-affiliated with Goldhawk and the map editor is not publicly distributed. This is definitely not the ideal situation ... but sadly it's fairly difficult to make a game this complicated in Unity whilst keeping the map generation systems separate from the game engine.

On the other hand, the Game Editor could theoretically exist entirely independently of Unity. Once development has finished and the data structures are fixed, it should be possible to write a program that displays the information from the various text files and allows you to edit them using a graphical interface, and also handles all the automatic mod merging. This is conceivably something we could look at post-release if the game sells well, but it's something that the Community Coders would need to be involved in (as they will need to maintain and update it once they start changing the code).

Anyway, the summary is this - you can edit the game using the text files like you could in Xenonauts-2, and likely we'll have a Unity plugin for serious modders who are willing to spend a bit of time learning how it works (and there is a possibility a standalone Game Editor that combines the best of both worlds may eventually arrive). However, map creation is going to be harder than in the first Xenonauts because it's not possible for the map editor to exist outside Unity!

 

Translation Editor:

One neglected area of modding was translation - although this was certainly not because the community did not try hard enough (I remember Gam somehow translating the whole game into Italian despite all the difficulties). Basically the problem was that a translation was a mod that affected every single text string in the game, which was very hard to do in the first place and was also totally incompatible with X:CE / any other mod, and would immediately break as soon as we updated almost any file in the game. Not a good setup!

We're hoping to do much better this time around. We're planning to build a specific Translation Editor that allows you to read all the text in the game in a single place and then type the equivalent text strings in a new language into a corresponding box and then save it out as a special "translation mod" that is treated differently to normal mods in order to avoid all the translation problems from the first game.

Having a dedicated program that lets you easily create or edit a translation should make the game a million times easier to translate, so I expect to see a number of community-created translations so people can enjoy the game in a variety of languages (having something like this would also make it much cheaper to get a professional localization done for the game if we decided to go down that route too).

As mentioned earlier, all of this modding / translation work is dependent on the funding we raise from Kickstarter and Early Access - although things would have to go very badly indeed for us to cut out support for modding / translation / X:CE given what we've seen the community do with the first game! :)

Share this post


Link to post
Share on other sites

Having to mod only in Unity would work for me since that is the engine I currently work in. It'd actually make it easier for me to do some modding now. Would also be really interested in helping do some level editing. Ever since I was last on the forum I have gotten a job to professionally make levels for video games so I think I could do decent work with it.

  • Like 1

Share this post


Link to post
Share on other sites
On 4/29/2018 at 6:28 PM, Betuor said:

Having to mod only in Unity would work for me since that is the engine I currently work in. It'd actually make it easier for me to do some modding now. Would also be really interested in helping do some level editing. Ever since I was last on the forum I have gotten a job to professionally make levels for video games so I think I could do decent work with it.

Sounds good - we'd be happy to include you in map editor testing phase!

Share this post


Link to post
Share on other sites
Posted (edited)

For translations, it'd be really nice if translators or the translation modders can adjust font size, insert line breaks into text, and bundle fonts to be used.  Unless you actively avoid them, images would need to be edited too.

Also mod translation need to be considered.

Edited by Sheepy

Share this post


Link to post
Share on other sites
On 4/24/2018 at 10:54 PM, Chris said:

The Map Editor is also going to have to exist as a plugin for Unity. Unfortunately there's not really any way to seperate the level creation process from Unity itself, and there's also some potential legal issues in that we use several commercial plugins for the game that we are licensed to use but not to redistribute. It may actually be that the map editor needs to rolled into the Community Edition program where mappers become semi-affiliated with Goldhawk and the map editor is not publicly distributed. This is definitely not the ideal situation ... but sadly it's fairly difficult to make a game this complicated in Unity whilst keeping the map generation systems separate from the game engine.

I strongly recommend finding a solution to make the map maker publicly available, as making maps is the fundamental part of every modding aspect ( like LEGO for kids ). Giving only Community Coders access is rather contraproductiv as 1. Community coders won´t have any time to make maps, as they spend their time improving the code and 2. the best map makers are usually freelancers who make maps out of passion and then move on, no time or motivation to sign a legally binding contract with unforeseen consequences.

I understand the implications but i think it is worth it.

  • Like 2

Share this post


Link to post
Share on other sites

Hey Chris!

I know that you will give your full support for modding and CE. I start modding with X-1 and when i looked other games including OpenXcom, i find X-1 modding pretty easy even at very complex times. So with CE, i think i can create another great mod for this game.

The idea is, i want to able to mod everything and more. Rather then many modders who mods mostly player side of the game (human weapons, armors, stats, arts..), i always aim the "enemy" side first, because without a proper and advanced enemy, adding stuff to player side makes the balance out.. At every xcom like games, the enemy side got very limited things compared player arsenal as items and variety. So the games goes always much easier at mid to late phases. 

For that reason, i would like to have Unity based mod making addons to add "enemies". This means, creating enemy units with just texture changes (recolor or more complex) to add totally new 3D ones. I am an animator and even i don't know unity, if an addon help me enough to guide me to create an enemy with all the needed animations, i can create them easily. It's like just buying a model from unity store, add it to game with needed animations. I mostly talk about melee or ranged creatures (like xenomorphs, drone to queen like i did at x-division) and bigger units (even you don't add 2-4 tiled creature system to the game, you can add much bigger units with 2 legs (big creatures, dinos, aliens or robots/mechs/suits) to "1" tile with some fitting..

There is many modders out there dedicated for inventory items, weapons and map making or balancing/fixing but it's very rare to find people who goes far to add new animated enemies or even soldiers with different armors to a 3D game.. 

This is an alien invasion and you can make some famous TV/Game enemies to fit into it. At X-Division, xenomorphs fitted so well as they are created as bio-weapon at final alien movies.. it would nice to see some robotic melee units for androns and pet dinos for sebs.. 

I hope you consider this type of modding.

Share this post


Link to post
Share on other sites
18 hours ago, drages said:

Hey Chris!

I know that you will give your full support for modding and CE. I start modding with X-1 and when i looked other games including OpenXcom, i find X-1 modding pretty easy even at very complex times. So with CE, i think i can create another great mod for this game.

The idea is, i want to able to mod everything and more. Rather then many modders who mods mostly player side of the game (human weapons, armors, stats, arts..), i always aim the "enemy" side first, because without a proper and advanced enemy, adding stuff to player side makes the balance out.. At every xcom like games, the enemy side got very limited things compared player arsenal as items and variety. So the games goes always much easier at mid to late phases. 

For that reason, i would like to have Unity based mod making addons to add "enemies". This means, creating enemy units with just texture changes (recolor or more complex) to add totally new 3D ones. I am an animator and even i don't know unity, if an addon help me enough to guide me to create an enemy with all the needed animations, i can create them easily. It's like just buying a model from unity store, add it to game with needed animations. I mostly talk about melee or ranged creatures (like xenomorphs, drone to queen like i did at x-division) and bigger units (even you don't add 2-4 tiled creature system to the game, you can add much bigger units with 2 legs (big creatures, dinos, aliens or robots/mechs/suits) to "1" tile with some fitting..

There is many modders out there dedicated for inventory items, weapons and map making or balancing/fixing but it's very rare to find people who goes far to add new animated enemies or even soldiers with different armors to a 3D game.. 

This is an alien invasion and you can make some famous TV/Game enemies to fit into it. At X-Division, xenomorphs fitted so well as they are created as bio-weapon at final alien movies.. it would nice to see some robotic melee units for androns and pet dinos for sebs.. 

I hope you consider this type of modding.

Yeah, I did notice there were quite a few new enemies in X-Division and tbh I was impressed you'd managed to get them in. Adding extra models into Unity is possible but it's also likely to be quite complex even if we do write a tool or open up the method we use to add stuff to the game ourselves - you need a whole bunch of stuff to support the weapons being loaded onto the unit in the right place, etc. The animations are also quite complex for anyone that isn't an 3d animator themselves, but if you do have experience doing that then I doubt you will find it that difficult if we write a bit of documentation.

So yeah, speak to me again later on in development when we've started to release the mod tools and we'll do what we can to open that side of the game up to you. I can't promise we'll be able to support it but from what I know of the system it *should* be possible.

EDIT - my post was talking about adding whole new enemies that needed rigging and animating from scratch, btw - if you want to retexture an existing alien / human then that shouldn't be too hard once we've got the appropriate mod tools set up. Most of the difficult stuff comes in getting the model set up in the first place rather than editing its appearance after that!

Share this post


Link to post
Share on other sites
22 hours ago, Chris said:

Yeah, I did notice there were quite a few new enemies in X-Division and tbh I was impressed you'd managed to get them in. Adding extra models into Unity is possible but it's also likely to be quite complex even if we do write a tool or open up the method we use to add stuff to the game ourselves - you need a whole bunch of stuff to support the weapons being loaded onto the unit in the right place, etc. The animations are also quite complex for anyone that isn't an 3d animator themselves, but if you do have experience doing that then I doubt you will find it that difficult if we write a bit of documentation.

So yeah, speak to me again later on in development when we've started to release the mod tools and we'll do what we can to open that side of the game up to you. I can't promise we'll be able to support it but from what I know of the system it *should* be possible.

EDIT - my post was talking about adding whole new enemies that needed rigging and animating from scratch, btw - if you want to retexture an existing alien / human then that shouldn't be too hard once we've got the appropriate mod tools set up. Most of the difficult stuff comes in getting the model set up in the first place rather than editing its appearance after that!

At X-Division, making new enemies was easy for me but putting them into game with right frame setup was problem and handle by another x-division member.  But it was very lovely to see my own units in the game. 

Positioning a weapon to a new model for the game could be complex for sure, but as i said i am thinking about enemies which does not need to handle any weapons, so melee (reaper style) or ranged creatures (splitting acid..) or bigger things with own weapons which you don't need to change. For that kind of units, i don't think there will be big problems if you can guide me a bit. And it's mostly enough to learn at first time and goes smooth with others.. Even a "making a reaper" video could cover most of my questions. X-2 will have more then enough enemies as humanoid with guns anyway. I even created a race for xdivision but the mod got already so many things, we can't find a place to put a new race..

The best part about this, any other modders can choose any of this new added enemies or units for their mods as they want.. i never had problems with sharing what i create at my mods.. 

Thx for support..i will be here to speak!

Share this post


Link to post
Share on other sites

I am by absolutely no means an expert at 3d modeling (which I believe was the point of switching to Unity, right?), but adding new weapons to units should, I would imagine, be slightly easier.  Once the animations are complete, the unit is rigged to the right skeleton, it's just a matter of putting the weapon in hand and telling the unit which animations to use, correct?  Much, much simpler than drawing up all the sprites for X1 or X-COM for sure.  I'd imagine there are snapping points on the rig where the weapon just pops into place, at least for the most part.  I've known a few games that did that.

I'm definitely curious to see a map maker released to the public.  XCOM and XCOM 2 had a few dedicated map makers in the modding community, and I'd love to see what people can do for X2.

Share this post


Link to post
Share on other sites
Posted (edited)

In a recent discussion I am educated that game interfaces can be done with HTML, CSS, and JavaScript in Unity, with some third-party help.

There are two solutions, one is more sophisticated and works on various platforms (such as playstations):

https://coherent-labs.com/coherent-gt/

While the other is Mac and Windows only:

https://assetstore.unity.com/packages/tools/gui/embedded-browser-55459

Both are based on WebKit, and performance seems to be excellent.
In both case the UI JavaScript can call and be called from Unity code.

If X2 can use this approach, this should make modding the User Interface a lot easier, even easier than X1.
I can't say development will really be faster, since it's a different skill set from designing Unity Interface, but it should be easier to maintain in the long term.

Edited by Sheepy

Share this post


Link to post
Share on other sites

I just wanted to say that I am pleased to hear that modding support will be provided. Xenonaut modders have created plenty of awesome mods and the community edition brought Xenonauts to a whole new level.

I was tinkering with Xenonauts too and modded some easy items myself. (Started by changing the skins of planes and weapons and continued by adding new weapons and modifying the stats of old ones, realistic clipsizes for weapons such as machine guns and larger and more inaccurate bursts 5 10 and 15 shot bursts.

Added for example an obsolete PPSH-41, which had poor penetration, but was ok early game against caesans and unarmored aliens, and great for suppression with a 70 round magazine and 10 bullet bursts.

Looking forward to the possibilities of Xenonauts 2 and mod support.

PS: I applaud you for increasing the number of shots per burst, and many other features seen in the demo.

Share this post


Link to post
Share on other sites

If there is such an active modding community here, I wonder would it be possible to make some mods before the release and add them to the game at launch?

Mods are great for customizing the game to individual preferences - and it's especially useful if there are people who don't like some features badly and it becomes very important for them to change those features. For exemple, don't like the power management system? Cut it out and replace it with something else, like funds paid to power providers every month. Don't like current planes ammo system? Choose the right mod to change it. Game pace, too few weapon types for research, enemies too weak/strong or whatever else? Change it all.

And now, if you could make such changes to some of the most controversial features, they wouldn't bother anyone. It would only require to choose those features based on the community feedback and finish them first, so they can be modded soon enough.


Also, during the development process, modders may be able to add features the team had no time to implement. Or just enrich the game in anyway possible. What do you think about it?

Share this post


Link to post
Share on other sites

Speaking as someone who did quite a bit of modding in X1, I can say the answer is "Eh.. sort of?". Modding a game which is in development is like buying clothes for a toddler. You can spend days and a sizable fortune picking out the perfect ensemble for your little one, only to watch her grow out of it within a month. Doing little mods and learning how different aspects of the game work is a useful exercise, but hoping to make sweeping changes in a mod to a game which is under development is asking to build a house on a foundation of sand. 

  • Like 1

Share this post


Link to post
Share on other sites

I agree with Max - there are a lot of problems with significant mods being made during development. At the same time there's definitely value in a few smaller mods that can be made in the Early Access phase and serve as examples for later mods.

Share this post


Link to post
Share on other sites

Sure. That is why a system needs to be finished for modders to start working on it. Although I can't say if that's realistic.

Share this post


Link to post
Share on other sites

Some things are a pain in the ass to support. Developers may want to change the format of game files quite a lot, and that's easier if you don't have to support mods just yet. Post-release you have to support everything and that adds extra complications. In X:CE for instance, I have made efforts to maintain support for any earlier mods and all previous savegame formats. While a game is in development, it's easier if the devs don't have to take that effort.

Share this post


Link to post
Share on other sites

So... when will the development be at the stage where we can start with the translations?

Share this post


Link to post
Share on other sites
1 hour ago, Gam said:

So... when will the development be at the stage where we can start with the translations?

I do not think there will be a problem about translations.. biggest problem is mods would be broken with dev. patches to the game and you need to recode or fix your mod again and again.. 

Share this post


Link to post
Share on other sites
8 minutes ago, drages said:

I do not think there will be a problem about translations.. biggest problem is mods would be broken with dev. patches to the game and you need to recode or fix your mod again and again.. 

Ok, but if like in the fist game we want to have translations ready at launch we need to start working on them earlier.

Share this post


Link to post
Share on other sites

@Gam, how long is a piece of string? You'd have the same answer when the content is ready for translation. 

Share this post


Link to post
Share on other sites
On 7/27/2018 at 2:18 PM, Gam said:

So... when will the development be at the stage where we can start with the translations?

So we're hoping to have the tools ready for you to start doing the translations late in the closed beta - but this is more so that translators can test the tools and make sure everything that needs to be changed (e.g. all the UI text strings) are working.

We'll be changing the research text right up to the end of the Early Access, so I guess the final translation work probably shouldn't start until closer to a month before release unless you're willing to keep tweaking them every time I update the wording of the research report descriptions etc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×