Jump to content

Modding UFOs


SoulFilcher

Recommended Posts

I'd like to discuss changes to existing UFOs and adding new ones to the game. Sorry if I have to make some newbie questions (for the sake of clarity) but we can go from there.

1- Can we add new UFO types? If we can, what exactly can or can't be done? I think drages told me we can't give them GC missions or something like that.

2- Can we give ground missions for existing UFOs that don't have them? I tried that mod with the Destroyer and Dreadnought and I see they only create missions like base attack and terror that don't have the UFO in it (They are actually invincible unless you use a Fury). Is that a real limitation or those were avoided because we don't have the GC images for them?

Ilunak suggested hull damage variations and terrain damage (and I will give those a try), but I think new UFO missions is a more exciting idea. I'd like to get something going, I have this bad boy here nearly finished, but if we can't get it into the game I can work on other UFOs, like the Interceptor.

TinyScout.jpg

So far I checked it in game by replacing the Light Scout images and it fits the interior layout almost perfectly. I also grabbed these from Rmory Studios' website. Has anyone converted them to use in game? If not I can do that, and try to create the damaged versions too.

UFOprops.jpg

TinyScout.jpg

UFOprops.jpg

TinyScout.jpg.d81f952baf1051b96b32224670

UFOprops.thumb.jpg.dd8ad1a98c827c6734e46

Link to comment
Share on other sites

Soul, your arts are amazing me.

Adding new ufos and editing new stats can be totally modable. BUT you cant assign a GC mission to new ufos, the game just don't accept it so just only some months ago when we try to add dreadnaught to the game with GC, kabill saw that he couldn't add it even he done everything a ufo needs for GC.. I mean you cant assign a GC system to the new ufos (like mapping). So kabill became mad and then became a CE coder.. so your new ufo cant create a crash or landing zone for xenonauts attack. For that reason, new ufos should explode in air and only assigned for base-terror missions which doesnt need a ufo-special map spawn.

As everyone, real life hits modders and coders here. I dont know how much work should be done at code for making adding ufos with GC, but it's essential for this games modding. To be honest, nobody tried to add new ufos before, because we were lacking as outer ufo art like u did here. If you can check realy old threads about ufo mapping you will see that there is new art sets for creating moduler ufos with standart walls like original X-Com ufos rather then Xenonauts one piece ufo designs. But i think nobody think that its a good idea to mix this 2 different style. So after years, we attempted to try one and see that its already hardcoded.

I tried to explain the situation we are in with my bad english.

Adding new ufos with GD could add this game very much things.. I hope some ppl see this art want to make this softcoded..

Link to comment
Share on other sites

Have you seen this thread about Modular Ufos ?

And this sticky about some blender templates ?

As far as I remember about the Modular Ufo thread, you can create new Ufos.

You can give them the same name like the existing ones and put their submap, spectre and what-not in the same folder like the others. When a GC is loaded the game will then randomly load one of the existing Ufos of, for instance, lightscouts. This way all existing maps will have a change to use your Ufo-design too. Although that means to check (all) maps for proper placement, i.e. entrance of the Ufo available and not blocked by the edge of the map.

The other way was, to create your own Ufos with new names, but then you will have to add the submap placeholder onto all maps it should be able to appear, so that this Ufo can be placed there. And this is hell of lot of work.

Not all maps have all Ufo types by the way.

I guess kabill can tell you much more about that.;)

And your art is truely cool, so in phase with the original. *thumbs up*

Link to comment
Share on other sites

I tried to explain the situation we are in with my bad english.

Adding new ufos with GD could add this game very much things.. I hope some ppl see this art want to make this softcoded..

Your English is good enough, thank you for the explanation. I too hope the CE team can find a solution for that.

Have you seen this thread about Modular Ufos ?

And this sticky about some blender templates ?

As far as I remember about the Modular Ufo thread, you can create new Ufos.

You can give them the same name like the existing ones and put their submap, spectre and what-not in the same folder like the others. When a GC is loaded the game will then randomly load one of the existing Ufos of, for instance, lightscouts.

Thank you for linking the modular thread. I will read that carefully. Your idea to make it a light scout variation is one I had in mind as a workaround, so I'll make a list of ideas (I don't know wwhich ones are possible right now) to use it in game:

1- Variation within a type of UFO. This small UFO could be a type of light scout, but that doesn't sound appealing to me, because for all game effects you just captured one more light scout.

2- Special missions. Maybe in special missions it could appear in the terrain, inside an alien base's hangars, or "Area 51" type of mission where you discover the army had captured alien ships before. I don't know if these are possible but they would be frequent anyway.

3- "Terrain Ufo". What if we forget about the special UFO submap and treat it as a generic terrain thing? Would it help?

4- Drop Pods. What if this small UFO is used by Dreadnoughts in terror missions to actually deliver troops to the combat zone? Or even as escape pods when a Dreadnought is destroyed, but instead of having an "official UFO" in the map, we have a few of these small ones scattered (this idea needs the terrain UFO idea to work).

Link to comment
Share on other sites

2-3-4's are hard because this games mission system is one of the hardcoded thing.

About 4, you can add this yes, just like a building at game, but seeing something like this at terror mission is... strange..

My bet is still softcoding GC generating ufo addition.

Link to comment
Share on other sites

Ok, I just finished reading through the enormous thread about the modular UFOs. Its a shame the idea got abandoned after so much effort in creating UFO layouts, but I can understand that after all that it was hard to go back and try the other approach, the one I'm trying here. As I just arrived I didn't know where the community was sitting and now I can tell the ones that did so much for modding no longer have the time to keep some of these ideas going.

Anyway, I hope there's still a chance to get things done. I guess for now it will be better to focus on artwork I know can be added to the game.

Link to comment
Share on other sites

3 & 4:

If you build your own maps, or use other maps (but better ask if you can use community maps) and alter them with a submap of an already grounded 2nd Ufo that is untouched by the regular Ufo placement of the mission, and place additional alien spawn points inside nand around...maybe this could work.

I guess someone like kabill, Max_Caine or Skitso could answer that much better than me.

I am no coder or modder, just one lingering jerk around here...

And thinking further with your No. 4, maybe use a larger submap of an Ufo, Corvette or one of the heavies, that actually has two or three smaller landed/crashed Ufos, instead of the one larger brother. Multiple ships to enter and clear.

Will then work on any map for that larger Ufo.

Hmm just realized I repeated all of your description with my own words...already too late for me.

Link to comment
Share on other sites

Regarding 3: That doesn't help because the game still needs to select a map type based of the UFO type and can only select maps based on the vanilla UFO types.

Regarding 4: I really like that idea. Just having a couple on terror maps would be cool. Also, it would open up the opportunity for mods to add in a little extra reward from terror missions (as has been requested in the past) by including some recoverable components in the drop-pods.

Link to comment
Share on other sites

Thank you guys! So it seems I could go with number 4. So a Dreadnought terror mission could provide unique rewards, that is very interesting! It also saves me from making the damaged hull version, and adds the possibility of a variation facing SW.

Datacores for them is just one possibility, and I'm just we will think of others.

Edited by SoulFilcher
Link to comment
Share on other sites

Don't think any of my mods add in new types of alien unit but Dynamic UFOs makes changes to the UFO crew files so might be worth taking a look. If you have access to Excel or another program that can load .xml spreadsheets it's really easy and should be obvious what you need to do when you load up the files.

Link to comment
Share on other sites

What I mean by unit types is the rank from aiprops (just found it in X-Division), and by crew the ufocontent files. So I managed to edit ufocontent files with some success, but I need to know: Is there a value for the maximum crew size? Where do I set up things like limiting the number of a certain role? Like having 3 or 4 possible commanders but only allow 1 at a time.

Now about aiprops. I see we have two "races" in there called Human and Mind-Controlled Human. Can I use those? Can I create new ones? I saw a thread where drages made questions about adding new races. Is it possible? Where is the files that controls it?

Can I set a UFO to never have escorts?

Edited by SoulFilcher
Link to comment
Share on other sites

1) I might be misreading you but there is no way to set the overall crew limit. Basically, for each UFO you set a variety of different alien types and ranks with different AI dispositions. You can set a minimum and a maximum for each race/rank/AI combo and the game will randomly spawn a number of that type within the range specified. However, there's no way to make these selections contingent on whether another type is selected. For example, you cannot set things up so that the game will pick one Leader rank alien from a variety of different races; all you can do is set the minimum and maximum for each and the game will randomly roll the number. I think that answers the question; sorry if it doesn't.

2) I don't know about those specific race categories. I don't think their format has been updated in a long while so I don't think you could use them as is. However it might work as a racial category. In any case, if you look in the ufocontents folder (I think) you will see an .xml file called 'races'. You can add extra entries in there which adds in new races which can then be specified in aiprops.

3) Kind of, yes. If you look in gameconfig you will find a variable which toggles static UFO escort chances (can't remember the exact name; see the changelog for XCE 0.33 for information). Setting that to '1' will override the game's typical calculation for escort spawns (which are all done internally otherwise) and instead use the escort value in the various AM_* alien mission files as a % chance of spawning an escort. That way, you could set the escort chance to 0 for a particular mission type. Note however that this only works on a mission-type basis; there is no way to stop a particular kind of UFO from having escorts without excluding it from all mission types which spawn escorts.

Hopefully some of that is clear!

Link to comment
Share on other sites

Thanks Kabill, that was really helpful. So my evil plan can run its course.

HostileCharlie.jpg

I already have humans in the crew, they are shown in the list when the "UFO" is detected, but they don't spawn in the terror mission. What could be causing that? I have their rank added to aiprops and all that.

EDIT: I see only the 3 main races are included in the Races file. How do the others work? Is that file only needed for these main races? I mean, I want to make humans work like Wraiths or Harridans.

HostileCharlie.jpg

HostileCharlie.jpg.73a88c6483a095b7841ca

Edited by SoulFilcher
Link to comment
Share on other sites

So did you do that with races?

I mean they are 3 main race in the game even there are more race coded at aiprop.. So only the main races got their ufocontent files as you see..

So did you add "human" to main races? and made special ufocontent files for human race?

Do they spam at normal crash or landing missions? At terror missions they are special columns for terror mission too.. Terror mission and terror ufo crews are different.

Link to comment
Share on other sites

No, I didn't add them to the Races file. I just added humans to the ufocontent files for my hostile charlie ship and left a few of the original races to spawn with them for testing. I need to know how to define their sprites too, humans don't use the same folder organization as the alien races, maybe I should add a new, separate race for them?

Here is an example:

CharlieCrew.jpg

If I allow it to start a terror mission I will fight 4 androns.

CharlieCrew.jpg

CharlieCrew.jpg.1691cc3108526eddb9564ab7

Edited by SoulFilcher
Link to comment
Share on other sites

EDIT: I see only the 3 main races are included in the Races file. How do the others work? Is that file only needed for these main races? I mean, I want to make humans work like Wraiths or Harridans.

I'm not sure actually. I thought all the alien races were specified. Although perhaps that file was meant only for allowing new crew rosters (i.e. is related to something else) and not adding new races to GC. Honestly I don't remember now.

In terms of why the units aren't spawning in GC, I would guess it's either a modmerge issue or because you're using the existing entries which may well not work due to their entries being obsolete. I'd recommend adding a new type of human unit copying the structure from another alien type and seeing if that works.

Link to comment
Share on other sites

Adding a new enemy is very easy.

As sprites, it's always same. For example, do you want a new enemy as human? Let's make something under caesans.

1. Go to Xenonauts\assets\units\friendlyaitroops\arctic\weapon.shotgun and take the soldier_spectre file.

2. Open mods\yourmod\units\alien\caesan and make a folder "caesanhuman" and then make another weapon.alienplasmapistol (i am not sure about exact name) and paste specte file in this.

3. Go to aiprop file and create a new enemy named "caesanhuman" and give him plasma pistol at his inventory.

4. Put this into the ufocontent..

5. carefull at modmerging when you add this new enemy.

You can take the example from XDivision, i got tons of new enemies there..

And the terror example you gave is not the terror mission crew list.. its the ufo's crew.. as i said the alien terror team and terror ufo crew are different if you dont make it same at ufocontent file.

I got a human enemy race project. I try to make a lore to add humans into ufos. We cant add any new ufos with GC so i need to put the humans to regular ufos. I got some ideas but first i need to finish core things..

Link to comment
Share on other sites

I'm not sure actually. I thought all the alien races were specified. Although perhaps that file was meant only for allowing new crew rosters (i.e. is related to something else) and not adding new races to GC. Honestly I don't remember now.

I tried to add a new race in aiprops, and it shows up in the UFO's crew with the name I gave it in aiprops, still no unit in the mission.

In terms of why the units aren't spawning in GC, I would guess it's either a modmerge issue or because you're using the existing entries which may well not work due to their entries being obsolete. I'd recommend adding a new type of human unit copying the structure from another alien type and seeing if that works.

My aiprops file basically just adds the new race with a single new rank type. I added the path for the sprite based on this new name. I believe there must be something else in order to make this new race work. Here is the aiprops, is everything ok with it?

<?xml version="1.0" ?> <AIProps MODMERGE="update"><!-- This file controls the Ground Combat stats for non-Xenonaut units --><!--                    --><!--  	  Terrorists    --><!--                    --> <AI MODMERGEATTRIBUTE="race" MODMERGE="insert" race="People"><Behaviour>	<Pathing 			Environment = "-5"			Sight="1.5" 			Sound="1"			Cover="-1"			EnemyInfluence="2.0"			AlliedInfluence="0.5"			EnemyLOS="1"			AlliedLOS="0.5"			NearestEnemy="1"			Goal="-1" />		</Behaviour>   <Sounds death="CivilianDeath" injury="CivilianInjury" />   <Props sightRange="16" /><GibbedSpectre name="particles/gibbed_human/gibbed_human" /><Rank MODMERGEATTRIBUTE="type" MODMERGE="insert" type="Farmer">	<Behaviour>	<Pathing				Sight="2.0" 				Environment = "-7"				Cover="-5"				Ambush="-16"				ShotPotential="-18"				EnemyInfluence="-2"				EnemyLOS="2.0"				NearestEnemy="-4"				AlliedLOS="-2"/>	</Behaviour>	<Props APs="65" Resilience="50" Strength="50" Accuracy="55" Reflexes="50" Bravery="50" />	<Decision MinimumAccuracy = "0.20"	EngagementRange = "12.0" />	<Armour kinetic="0" energy="0" chemical="0" incendiary="0"/>	<Items killed="Items.HumanNonCombatantCorpse" stunned="Items.HumanNonCombatant"/>	<Equipments>	<Equipment>	<PrimaryWeapon name="weapon.farmershotgun"/>		<belt>		<Item name="ammo.ballistic.shotgun" />		</belt>	</Equipment>	</Equipments></Rank> </AI></AIProps>
Adding a new enemy is very easy.

As sprites, it's always same. For example, do you want a new enemy as human? Let's make something under caesans.

1. Go to Xenonauts\assets\units\friendlyaitroops\arctic\weapon.shotgun and take the soldier_spectre file.

2. Open mods\yourmod\units\alien\caesan and make a folder "caesanhuman" and then make another weapon.alienplasmapistol (i am not sure about exact name) and paste specte file in this.

3. Go to aiprop file and create a new enemy named "caesanhuman" and give him plasma pistol at his inventory.

4. Put this into the ufocontent..

5. carefull at modmerging when you add this new enemy.

But then they will be shown as Caesans, won't they?

And the terror example you gave is not the terror mission crew list.. its the ufo's crew.. as i said the alien terror team and terror ufo crew are different if you dont make it same at ufocontent file.

I got a human enemy race project. I try to make a lore to add humans into ufos. We cant add any new ufos with GC so i need to put the humans to regular ufos. I got some ideas but first i need to finish core things..

I gave the same crew for both, the standard races work perfectly. I don't want to add them to other UFOs, my plan for now is to use them only in this hostile charlie. I think I'll try to make them a caesan rank for now to see if everything works.

EDIT: Adding them as caesans worked perfectly, so the files are ok. I will make more tests as I really want to have them as a separate race.

Edited by SoulFilcher
Link to comment
Share on other sites

EDIT: Adding them as caesans worked perfectly, so the files are ok. I will make more tests as I really want to have them as a separate race.

If that's the case then I suspect it isn't possible. My only recommendation would be to try adding a "People" entry to the races.xml file and see if that helps. It probably won't but is worth trying just in case.

Link to comment
Share on other sites

So what were you doing wrong before?

You added your race to aiprop, then create ufocontent files just terrorists and gave them a chopper..

Just do not forget something about ufo content files. They are not overwriting the default ones (CE ones), so for example you made an ufocontent for scout without noncombatant enemy but the default one got it; there will be a non combatant at your mod. You need to put this noncombatant into your mod ufocontent file and make it blank to erase it from total. I created mega ufocontent files for 0.99 xdivision to be sure about this..

Link to comment
Share on other sites

I don't know what was wrong before, but I suspect using Human or the mind controlled human races won't work for some reason. It's not important though unless you want to have the "human" name in the crew list when the UFO is detected. I'm fine with it right now.

I'm not overwriting any ufocontent files, my Charlie is a new entry only used for terror missions, but I will add base attack missions too. The idea is to have it as an early and easy version of these missions with basically no equipment rewards, but capturing live terrorists will unlock a few research options. Later in the game it will carry a crew much like your own, with highly trained and specialized soldiers.

Link to comment
Share on other sites

I don't know what was wrong before, but I suspect using Human or the mind controlled human races won't work for some reason. It's not important though unless you want to have the "human" name in the crew list when the UFO is detected. I'm fine with it right now.

I'm not overwriting any ufocontent files, my Charlie is a new entry only used for terror missions, but I will add base attack missions too. The idea is to have it as an early and easy version of these missions with basically no equipment rewards, but capturing live terrorists will unlock a few research options. Later in the game it will carry a crew much like your own, with highly trained and specialized soldiers.

At least we saw that its possible. But you would need a lore for just terrorists. At that cold war years there was not much terrorism worldwide.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...