Aller au contenu

Photo

Tutorials

- - - - -

  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
skuid

skuid
  • Members
  • 371 messages

I will post some tutorials of how to modify the game when I have some time. I'm also working in a Scene Editor for creating new maps for the game, but it still needs a lot of work to be finished.

 

Tutorials:

How to add new ships to the game.

How to create new factions.

How to modify difficulty levels.

How to modify power upgrades.

How to add new consumables.


Modifié par skuid, 31 mai 2014 - 11:28 .
Added "How to modify power upgrades."


#2
skuid

skuid
  • Members
  • 371 messages

Tutorial: How to add new ships to the game

In this tutorial I will show you how to add new ships to the game.
First of all you'll have to create a new ship following the tutorials included with the game.
Once you have your new ship, you can add it to the playable ships, add it to the store or to a faction.

 

Adding a ship as playable

To add the ships to the playable ships, the ship file has to contain the power attributes (see the section 5 of the "Vehicle Editor Tutorial part 2"), otherwise the game will crash when trying to use the ship as playable.
Open the file "ships.xml" located in the "data\config" folder. This file contains the playable ships that the menu will allow you to choose. The content of this file is the following:

<config name="Ship Selection">
    <var key="alliance" value="alliance1"></var>
    <var key="cerberus" value="cerberus1"></var>
    <var key="geth" value="geth1"></var>
    <var key="turian" value="turian1"></var>
</config>

To add a new ship you'll have to add a new "<var>" element with both "key" and "value" attributes, "key" is used to reference the ship in game and "value" is the name of the ship file without the ".xml" extension.
For example if you have created a new ship and saved it as "myship.xml" the element you'll have to add is:

<var key="myshipid" value="myship"></var>

So the final file will be:

<config name="Ship Selection">
    <var key="alliance" value="alliance1"></var>
    <var key="cerberus" value="cerberus1"></var>
    <var key="geth" value="geth1"></var>
    <var key="turian" value="turian1"></var>
    <var key="myshipid" value="myship"></var>
</config>

The key "myshipid" is the text that will be shown in the ship selection menu, the game will try to locate the key in the language file and if it can't find it then it will show the id as is, so you can put the "My Ship" instead of "myshipid" and that will be the text shown in the menu.

 

Adding the ship to the store
If your ship isn't a playable ship and you want to add it to the store, then instead of changing the "ships.xml" file you'll have to open the file "store.xml" in the folder "data\savegame". This file contains the status of the store and the available ships and consumables. The file is composed of a set of "<var>" elements each with a unique "key" attribute with three parts separated by ".". This three parts are:
id.type.level
The id can has these values: ship - consumable - unlocked
If the id is ship or unlocked, type can has the values: fighter - frigate - cruiser - dreadnought - hero
If the id is consumable, type can has the values: armor - weapon - ammo
And level can has the values: common - uncommon - rare - ultrarare

So if you want to add a new rare fighter to the store you'll have to find the key="ship.fighter.rare" and add a new <value> element with the name of the ship's XML file (without the ".xml" extension) as content.
For example the default value of the <var> element with key="ship.fighter.rare" is:

<var key="ship.fighter.rare">
    <value>turian</value>
    <value>geth</value>
</var>

So to add your new ship (myship.xml) you'll have to add the element:

<value>myship</value>

And then the ship.fighter.rare list will be:

<var key="ship.fighter.rare">
    <value>turian</value>
    <value>geth</value>
    <value>myship</value>
</var>

Adding a ship to a faction

The default factions available are Reaper, Cerberus, Alliance, Turian and Geth. Each of these factions are defined in its own XML file located at "data\config" folder. The files are "reaper.xml", "cerberus.xml", "alliance.xml", "turian.xml" and "geth.xml" respectively.

For example, if you want to add your ship to the Reaper faction, you'll have to open the file "reaper.xml" which content is the following:

<config name="Reaper">
    <var key="cruiser">
        <value>smallReaper</value>
    </var>
    <var key="fighter">
        <value>occulus</value>
    </var>
    <var key="frigate">
        <value>destroyer</value>
    </var>
    <var key="dreadnought">
        <value>reaper</value>
    </var>
    <var key="hero">
        <value>marauder</value>
    </var>
</config>

This file is similar to the store file but in this file the keys are fighter - cruiser - frigate - dreadnought - hero. So if you want to add your ship as a fighter of the Reaper faction you'll have to add a new <value> element with your ship's file name (without the ".xml" extension) inside the <var> element with the key="fighter".

<value>myship</value>

The final <var> element will be as follows:

<var key="fighter">
     <value>occulus</value>
     <value>myship</value>
</var>


#3
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages

thanks!



#4
skuid

skuid
  • Members
  • 371 messages

Tutorial: How to create a new faction

Here I will show you how to create a new faction and add it to the game.

 

Creating a new faction

The default factions available are Reaper, Cerberus, Alliance, Turian and Geth. Each of these factions are defined in its own XML file located at "data\config" folder. The files are "reaper.xml", "cerberus.xml", "alliance.xml", "turian.xml" and "geth.xml" respectively. These files contains the ships that form a faction: fighter, frigate, cruiser, dreadnought and hero. An example of a faction file:

<config name="Reaper">
    <var key="cruiser">
        <value>smallReaper</value>
    </var>
    <var key="fighter">
        <value>occulus</value>
    </var>
    <var key="frigate">
        <value>destroyer</value>
    </var>
    <var key="dreadnought">
        <value>reaper</value>
    </var>
    <var key="hero">
        <value>marauder</value>
    </var>
</config>

The file is composed of several var elements each one with a unique key attribute that represent one of the ship type (fighter, frigate, cruiser, dreadnought and hero). Inside each var element there are value elements each of them have the name of the ship's xml file without the ".xml" extension.

 

To create a new faction you should create a new xml file in "data\config" folder or copy one of the existent faction files and fill each of the ship keys. There are some consideration to keep in mind when creating a new faction:

  • You'll have to put at least one dreadnought and one fighter, otherwise the game will crash when loading the faction.
  • Other keys can be empty.
  • The dreadnought has to have spawn points.
  • You can add more than one fighter, hero, frigate or cruiser, just add a new value element in the corresponding key. The game will select one of them randomly when spawning.

Adding the faction to the selection menu

Once you have finished your faction XML file you'll have to add it to the selection menu. To do that open the file "factions.xml" located at "data\config". This file contains the information of the factions that will appear in the selection screen of the menu. The content of this file is the following:

<config name="Factions">
	<var key="alliance" value="alliance"></var>
	<var key="cerberus" value="cerberus"></var>
	<var key="geth" value="geth"></var>
	<var key="reaper" value="reaper"></var>
	<var key="turian" value="turian"></var>
</config>

The file is composed of several var elements each of them contains the information of one of the factions. Each var element has a key and a value attribute. The key attribute is used to reference the faction in the menu, the game will look for that id in the language file, but if it is not there then it will show the id as is. For example, the "alliance" key is set to "Alliance" in the English language file and "Alianza" in the Spanish language file so the game will look for the id "alliance" and show "Alliance" or "Alianza" depending on the language set, but if the id isn't defined in the language file then the id will be show as is. The value attribute contains the faction XML file without the ".xml" extension.

 

To add a new faction you'll have to add a new var element with a unique key attribute and put the name of the faction file in the value attribute (without .xml extension). For example, if you have created the faction My Faction and store it in the file myfaction.xml, then you'll have to add the following var element:

<var key="My Faction" value="myfaction"></var>

Once you have added this element you will be able to select your faction in the menu.



#5
skuid

skuid
  • Members
  • 371 messages

Tutorial: How to modify difficulty levels

There are 4 difficulty levels: bronze, silver, gold and platinum. Each is specified in its respective XML file located at "data\config\difficulty". For example the bronze difficulty is specified in the file "data\config\difficulty\bronze.xml" and this is its content:

<config name="Bronze">
	<var key="fighters" value="15"> </var>
	<var key="damage" value="0"> </var>
	<var key="spawns" value="60"> </var>
	<var key="cruisers" value="1"> </var>
	<var key="frigates" value="1"> </var>
	<var key="heat" value="0"> </var>
	<var key="defense" value="0"> </var>
</config>

The file contains several var elements each of them defines a difficulty variable:

  • spawns: total amount of fighters that the dreadnought is capable of spawn before it's destroyed. Value > 0, keep in mind that a large number will made the battle too long.
  • fighters: total number of fighters in battle at the same time. Value > 0.
  • frigates: total number of frigates spawn. Value >= 0.
  • cruisers: total number of cruisers spawn. Value >= 0.
  • damage: increment of gun damage to all ships. A real number in the range [-1, inf) . If the value is < 0 then the gun damage will be decreased (a value of -1 will produce -100% damage), otherwise the damage will be increased.
  • defense: increment of defense to all ships. A real number in the range (-inf, 0.9]. If the value is < 0 then the ship will receive more damage, otherwise will reduce the amount of damage taken.
  • heat: increment of gun heat produced. A real number in the range [-1, inf). If the value is < 0 will produce less heat (-1 will produce -100% heat, ie no heat) otherwise will produce more heat.

So changing these variables you can adjust the difficulty level.



#6
skuid

skuid
  • Members
  • 371 messages

Tutorial: How to modify power upgrades

Each power has its own upgrades, similar to Mass Effect 3. Each one has a maximum of 6 ranks where ranks 4, 5 and 6 have two alternative choices. This rank upgrades are stored in a file located at "data\config\powers", each power has its own file which name is the power name and .xml extension, for example the thanix cannon is stored in "thanix.xml" file:

<config name="Thanix">
	<var key="rank1.damage" value="100"> </var>
	<var key="rank1.cooldown" value="8000"> </var>
	<var key="rank2.cooldown" value="-0.25"> </var>
	<var key="rank3.damage" value="0.1"> </var>
	<var key="rank4a.damage" value="0.15"> </var>
	<var key="rank4b.dot" value="1"> </var>
	<var key="rank4b.dotAmount" value="0.20"> </var>
	<var key="rank5a.double" value="1"> </var>
	<var key="rank5a.damage" value="-0.30"> </var>
	<var key="rank5b.damage" value="0.50"> </var>
	<var key="rank6a.armor" value="0.75"> </var>
	<var key="rank6b.shield" value="0.75"> </var>
</config>

Each rank property is in a var element, the key is composed of two parts separated by a dot. The left part is the rank the property belong which can be one of these:

  • rank1
  • rank2
  • rank3
  • rank4a
  • rank4b
  • rank5a
  • rank5b
  • rank6a
  • rank6b

And the right part is the property, so the key "rank1.damage" indicates the value of the property "damage" at "rank 1". The value of the property is in the "value" attribute.

Rank 1 properties are in absolute value, that means the rank1.damage with a value of 100 indicates that the thanix shot will produce a total amount of 100 at rank 1. On the contrary, ranks greater than 1 are increments of the rank 1 value. That means the rank 3 damage of 0.1 is an 10% increment of the rank 1 base value. This value can also be negative, in that case it will be a decrement.

You can modify, add or delete these var elements to adjust the different properties in each rank.

 

Properties

There are common properties to most than one power and others are unique. These are the properties available for each power:

 

Thanix

  • damage: this is the damage caused by the power.
  • cooldown: the time in milliseconds until the power con be used again.
  • dot: it indicates if the power causes a damage over time during 3 seconds. A value of 1 activates the dot.
  • dotAmount: the amount of damage over time. This is a percentage of the base damage.
  • double: it indicates if there are two shots (value of 1) or just one (default 0).
  • armor: increment of damage to armor.
  • shield: increment of damage to shields.

Overload

  • damage: base damage.
  • cooldown: cooldown in milliseconds.
  • hits: number of additional targets hit.
  • secondDamage: percentage of damage to additional targets.
  • shield: increment of damage to shields.

Shockwave

  • damage: base damage.
  • range: radius of the shockwave.
  • shieldConsumed: amount of shields consumed. The default value is 100%.
  • armor: increment of damage to armor.
  • shield: increment of damage to shields.

Sabotage

  • cooldown: cooldown in milliseconds.
  • duration: duration of the effect in milliseconds.
  • heat: gun heat increment to hacked unit.
  • explode: indicates if the hacked unit will explode when is destroyed causing damage.
  • explosionDamage: damage of the explosion.
  • range: radius of the explosion.
  • damage: increment of gun damage deal by the hacked unit.
  • defense: defense increment of the hacked unit.

Focus

  • cooldown: cooldown in milliseconds.
  • duration: duration of the effect in milliseconds.
  • gunDamage: increment of gun damage.
  • powerDamage: increment of power damage.
  • defense: increment of defense.
  • heat: increment of heat produced by guns.

Cloak

  • cooldown: cooldown in milliseconds.
  • duration: duration of the cloak in milliseconds.
  • damage: increment of damage during cloak.

Fleet Commander

  • fighters: number of extra fighters.
  • damage: increment of gun damage.
  • spawns: total number of spawns.
  • cruisers: total number of cruisers.
  • frigates: total number of frigates.
  • heat: increment of heat produced by guns.
  • defense: increment of defense.