Jump to content

Guide for modders - new features and variables


Solver

Recommended Posts

  • 3 months later...
  • 1 year later...
  • 8 months later...

Some new modding features as of 0.34.2.

Retaking lost continents

This is controlled through gameconfig.xml and should be mostly straightforward. Three variables affect the system.

<retakeLostContinents value="0" comment="If set to 1, lost continents may be retaken by eliminating bases in them" />
  <lostContinentBaseTicker value="-1" comment="Ticker (for size) assigned to the auto-spawning alien base on a lost continent. If set to a negative number, it uses the main alien ticker" />
  <retakenContinentTicker value="500" comment="If a continent is retaken, relations will restart at this point" />

The retakeLostContinents setting has to be set to 1 to enable the system. When the system is enabled, losing a continent will cause an alien base to spawn immediately on that continent. The size of that base is determined by the overall AI ticker if lostContinentBaseTicker is -1, or else that variable can be used to adjust base size.

The player has to eliminate the auto-spawned base, as well as any other bases that may be present on the continent. Once there are no more alien bases left, the continent returns to the game and its relations value when returned is determined by retakenContinentTicker.

Custom categories in manufacture UI

A new file called manufacture_categories.xml provides the ability to add new categories shown in the workshop screen (like the default ones Aircraft/Soldiers/etc).

Since the hardcoding of categories is removed, it's important that in manufactures.xml the FillsSlot column is only used by vehicles and aircraft.

Add a new manufacturing category like:

<ManufactureCategory>
		<ID>SomeCategoryId</ID>
	</ManufactureCategory>

Where SomeCategoryId also needs to be a string identifier entered in strings.xml.

Controlled zombification / unit spawning

A bigger change concerns the game's Zombify and SpawnReaper abilities. For Zombify (victim gets turned into a zombie upon death) and SpawnReaper (unit turns into another unit later), you can now specify the race and rank of the unit to spawn. For SpawnReaper, the duration in turns can be specified as well.

Normally, a Reaper has:

Abilities="Zombify"

To use the modding ability, you have to specify a string that looks like Zombify.Race.Rank. For example:

Abilities="Zombify.Sebillian.Guard"

This would turn victims into Sebillian Guards.

Zombies have a SpawnReaper ability, and to use modding for it you have to write SpawnReaper.Race.Rank.N where N is the number of turns after which the transformation takes place. So you could express the vanilla game of spawning a Reaper after 5 turns like:

Abilities="SpawnReaper.Reaper.Reaper.5"

Note: You have to specify a number for SpawnReaper if you're modding it, you cannot just specify race and rank.

You can of course chain units with SpawnReaper abilities to make a progression of different units. The SpawnReaper ability name is then confusing but has to be kept around for legacy purposes.

Aliens with the SpawnReaper ability will turn into another unit after that timer, but also if they are killed. You may want to avoid that in order to create aliens that can be killed by Xenonauts to prevent them from "evolving". That can be done by adding the Permadeath ability to a unit with the SpawnReaper ability. Like this:

<Abilities="SpawnReaper.Reaper.Reaper.5,Permadeath">

That would prevent a spawn in case the unit suffers a violent death (from Xenonauts, local forces or alien friendly fire) before the timer is up.

Melee aliens vs. vehicles

Aliens with melee weapons, such as Reapers, can now also attack vehicles, but only if that AI behaviour is enabled by a MeleeVehicles ability. So to make vanilla Reapers attack vehicles, you would add the ability to them:

Abilities="Zombify,MeleeVehicles"
  • Like 1
Link to comment
Share on other sites

X-Division team's last situation report:

10986413_821962897872646_1256455064_n.jpg

@Solver

Abilities="SpawnReaper.Reaper.Reaper.5

A question: If we create an AI which got this code from start, will it turn after 5 turn of mission start?

Another question: if that creature dies before 5 turn, is he turns or just dies? Can we make a zombie which able to die before it changes to anything else?

  • Like 1
Link to comment
Share on other sites

2 minutes ago, drages said:

 


Abilities="SpawnReaper.Reaper.Reaper.5

A question: If we create an AI which got this code from start, will it turn after 5 turn of mission start?

Another question: if that creature dies before 5 turn, is he turns or just dies? Can we make a zombie which able to die before it changes to anything else?

Yes, it will turn 5 turns after. Or should. You can even create "eggs" that hatch into aliens - make an "egg alien" with 0 AP and this ability so they will turn into something else.

Death behaves as with normal zombies in the default game. If they die, they turn into that other unit. I can see why you might want to have it otherwise, I had not considered the idea.

Link to comment
Share on other sites

4 minutes ago, Solver said:

Yes, it will turn 5 turns after. Or should. You can even create "eggs" that hatch into aliens - make an "egg alien" with 0 AP and this ability so they will turn into something else.

Death behaves as with normal zombies in the default game. If they die, they turn into that other unit. I can see why you might want to have it otherwise, I had not considered the idea.

that would actually be neat if that could be changed to permadeath, as killing an alien early would have absolutely no meaning, except if you want to speed up the process.

Link to comment
Share on other sites

7 minutes ago, Charon said:

that would actually be neat if that could be changed to permadeath, as killing an alien early would have absolutely no meaning, except if you want to speed up the process.

Yes, we need to by pass it too to stop the evolution or chain.. or killing the alien will just bringing the doom faster :).

There is 3 purpose of zombify:

One is normal default one.

Another is as you said a possible egg. But the thing is, we need to crack the egg before it hatches.. or if we kill it, it will hatch and not so logical..

Last one: Alien chain, which you need to stop as soon as possible, when it's weak.

Edited by drages
Explanation
Link to comment
Share on other sites

Are you still open for crazy ideas Solver ?

 

As i was reading throught the notes i noticed that if we could add levels to the alien base sizes it would totally enrich the game and would even come close to custom missions.

 

For example the retaken Countries: We could define a level 4 base at 2000 ATP ( which normally should never be reached in a game ), set the ATP for the spawned base if a country is lost to 2000, make a custom level 4 map for each race and VOÌLA, you got a custom retaking country maps missions. As long as we add the tilesets to the base tilesets folder we could literally make ANY mission possible, outdoor or indoor.

But this doesnt end there. As i see that you can easily set the ATP value for a spawned base we can make custom missions possible with scripts like the one you used for retaking countries. The different missions are nothing but alien bases with different defined ATP values, with gaps like, level 4: 2000 ATP, level 5: 4000, level 6: 6000 ATP, etc ... . Those values will never be something a base can grow into.

You could add this to your UFO mission content for XCE .35. The construction paramter could have an additonal value of "SetATPforBase=2000". As far as i looked over your notes about the custom UFO mission code this should totally be possible and would go well hand in hand with the custom UFO design you proposed as a lot more is possible with your additions. Even stealth is possible as far as i saw that.

Apart from that adding more base levels means more possibilities and thread levels for longer and more enriched gameplay for every modder to choose and set for.

Edited by Charon
Link to comment
Share on other sites

I'd need to look at how insistent the game is on only having 3 possible base sizes. But your point is very interesting, it could be a powerful, if clumsy, way of opening up more levels.

Also, with discussion like that, let's please handle that in other threads, I would prefer to keep this one focused on description of existing modding functionality and questions about it.

Link to comment
Share on other sites

16 hours ago, Charon said:

it could be another column after the race,rank,turns,permadeath (0 or 1 )

Those columns are actually annoying, I'm adding a "Permadeath" ability, will update the original post when it works. So:

<Abilities="SpawnReaper.Reaper.Reaper.5,Permadeath">

Will spawn a Reaper in 5 turns unless the alien dies a violent death before that. A violent death means it gets killed by Xenonauts, local forces or friendly fire from other aliens.

  • Like 1
Link to comment
Share on other sites

4 minutes ago, Solver said:

Those columns are actually annoying, I'm adding a "Permadeath" ability, will update the original post when it works. So:


<Abilities="SpawnReaper.Reaper.Reaper.5,Permadeath">

Will spawn a Reaper in 5 turns unless the alien dies a violent death before that. A violent death means it gets killed by Xenonauts, local forces or friendly fire from other aliens.

You are the BEST Solver :) !

Link to comment
Share on other sites

43 minutes ago, Solver said:

Those columns are actually annoying, I'm adding a "Permadeath" ability, will update the original post when it works. So:

I think you can add a possibility to spawn another alien, like <Abilities="SpawnReaper.Reaper.Reaper.5,Permadeath,%50,Sebillian.Guard,Permanotdeath,%50">

Nıhhaha just joking.. you are the one solver, don't trust to oracle :p

Link to comment
Share on other sites

  • 2 weeks later...

X:CE 0.34.2 offers the ability to create some special maps by modding "extra" alien base sizes. There are 8 sizes defined beyond Large, which will not be reached normally.

gameconfig.xml has a new block that looks like this:

<!-- EXTRA ALIEN BASE SIZES (FOR CUSTOM MISSIONS) -->
  <alienBaseMaxTicker value="1000" comment="Alien base ticker will not exceed this value. Increase to use the extra sizes!" />
  <extra1AlienBaseTickerLimit value="2000" comment="Extra Size 1" />
  <extra2AlienBaseTickerLimit value="3000" comment="Extra Size 2" />
  <extra3AlienBaseTickerLimit value="4000" comment="Extra Size 3" />
  <extra4AlienBaseTickerLimit value="5000" comment="Extra Size 4" />
  <extra5AlienBaseTickerLimit value="6000" comment="Extra Size 5" />
  <extra6AlienBaseTickerLimit value="7000" comment="Extra Size 6" />
  <extra7AlienBaseTickerLimit value="8000" comment="Extra Size 7" />
  <extra8AlienBaseTickerLimit value="9000" comment="Extra Size 8" />

The first parameter, alienBaseMaxTicker, is an absolute limit on the ticker value of alien bases. The other values are ticker thresholds for extra sizes 1-8. You have to increase alienBaseMaxTicker to use those extra sizes.

aircrafts.xml now defines alienbase.extra1 and so on, and these have to be present for the modding to work. In strings.xml, there are placeholder strings that should be overriden.

To make an extra-sized alien base fully work, the modders have to add a new map to the alienbase tileset, and to implement the ufocontents files with the correct size, adding files such as alienbase.extra2.caesan.xml. These are up to modders and not included in X:CE out of the box!

Link to comment
Share on other sites

16 minutes ago, Solver said:

X:CE 0.34.2 offers the ability to create some special maps by modding "extra" alien base sizes. There are 8 sizes defined beyond Large, which will not be reached normally.

gameconfig.xml has a new block that looks like this:


<!-- EXTRA ALIEN BASE SIZES (FOR CUSTOM MISSIONS) -->
  <alienBaseMaxTicker value="1000" comment="Alien base ticker will not exceed this value. Increase to use the extra sizes!" />
  <extra1AlienBaseTickerLimit value="2000" comment="Extra Size 1" />
  <extra2AlienBaseTickerLimit value="3000" comment="Extra Size 2" />
  <extra3AlienBaseTickerLimit value="4000" comment="Extra Size 3" />
  <extra4AlienBaseTickerLimit value="5000" comment="Extra Size 4" />
  <extra5AlienBaseTickerLimit value="6000" comment="Extra Size 5" />
  <extra6AlienBaseTickerLimit value="7000" comment="Extra Size 6" />
  <extra7AlienBaseTickerLimit value="8000" comment="Extra Size 7" />
  <extra8AlienBaseTickerLimit value="9000" comment="Extra Size 8" />

The first parameter, alienBaseMaxTicker, is an absolute limit on the ticker value of alien bases. The other values are ticker thresholds for extra sizes 1-8. You have to increase alienBaseMaxTicker to use those extra sizes.

aircrafts.xml now defines alienbase.extra1 and so on, and these have to be present for the modding to work. In strings.xml, there are placeholder strings that should be overriden.

To make an extra-sized alien base fully work, the modders have to add a new map to the alienbase tileset, and to implement the ufocontents files with the correct size, adding files such as alienbase.extra2.caesan.xml. These are up to modders and not included in X:CE out of the box!

:) OMGOMOMOMGMOMGOMGOMGOMGOMG

We can do so much with that. With that we can have 1 base for each of the 4 phases, plus one superbase, 2 different sized retaken country missions, and still have room for 4 special missions, even if you cant make custom missions available ( would look cool though, with all the different icons and missions ).

To be clear, the maps folder will have to be named like alienbase.extra1.sebillian ?

Thank you so much, I love you Solver, although drages already married you, so i wont stand between you :).

THIS IS SO AWESOME !

Link to comment
Share on other sites

6 minutes ago, Charon said:

To be clear, the maps folder will have to be named like alienbase.extra1.sebillian ?

Yeah. Basically everything is like with normal alien bases, except "small", "medium" and "large" get replaced everywhere by the "extra1", "extra2", etc.

Link to comment
Share on other sites

Starting with 0.34.2, gases can be allowed to do damage multiple times per turn. In such a case they will work like fire does, dealing damage for every tile a Xenonaut/alien passes that has the gas. To enable this, edit the relevant gas in gas_gc.xml and in its Props, set:

multiplePerTurn="1"

 

Link to comment
Share on other sites

1 minute ago, Solver said:

Starting with 0.34.2, gases can be allowed to do damage multiple times per turn. In such a case they will work like fire does, dealing damage for every tile a Xenonaut/alien passes that has the gas. To enable this, edit the relevant gas in gas_gc.xml and in its Props, set:


multiplePerTurn="1"

 

OMGOMGOMGOMGOMGOMGOMGGOMGOGMGOGM you did it. And so fast. All KUDOS of the world to you :). At least the ones i can give :).

Link to comment
Share on other sites

10 minutes ago, Solver said:

Starting with 0.34.2, gases can be allowed to do damage multiple times per turn. In such a case they will work like fire does, dealing damage for every tile a Xenonaut/alien passes that has the gas. To enable this, edit the relevant gas in gas_gc.xml and in its Props, set:


multiplePerTurn="1"

 

Hollallaaa... Charon's reaction +1.

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...