How to Add a New Trait

Astra Exodus is a single player turn based Sci-fi 4X strategy game inspired by the classics, with a multiple choice narrative driven epic campaign, top down real time tactical battles and an extensive semi-randomized research grid.
Post Reply
eddieballgame
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 628
Joined: Mon Dec 17, 2012 2:53 am

How to Add a New Trait

Post by eddieballgame »

A simple guide to adding a new Trait.

Here is a simple example of adding a Trait. (I am not clear on the Creative Trait)

New Trait 'Genius' involves editing 2 files plus the language files.

In Data/Traits folder copy & paste the 'Trait_Smart.lua' file & rename to 'Trait_Genius.lua.'

Edit the new Genius Trait as follows:

Trait{
-- Base data
ID = "Trait_Genius",
Name = "Trait_Genius_Name",
Description = "Trait_Genius_Description",
Stats = "Trait_Genius_Stats",
IconPath = "Graphics/Traits/Trait_Smart_Icon",

-- Stats
PickPoints = 6,
IsPositive = true,
ExcludedTraitID = "Trait_Dumb", (Note: only 1 Excluded Trait appears to be allowed)

-- Reference
ModifierID = "Modifier_Trait_Genius",
}

NEXT:

Repeat this format in the Data/Modifiers folder, copy & paste 'Modifier_Trait_Smart.lua' & rename to'Modifier_Trait_Genius.lua'

Edit new new Genius Modifier as follows:

Modifier{
ID = "Modifier_Trait_Genius",
ResearchPercentage = 50, (Note: Smart Trait is 25)
}

Now for the hard part :) (not really)

In Data/Localization folder are the 'Language' files.

Per English I edit both of them.

Open one (Notepad ++ is great for this) & find the 'Smart Trait' Description near the very bottom.

<data name="Trait_Smart_Description" xml:space="preserve">
<value>While others would grow in strength or agility, our ancestors grew in cunning and planning, to not only survive but prosper in our homeworld. This is probably why now in the galactic age, we find ourselves contemplating ideas, which others consider complex in nature; but seem relative simple to us. In the struggle for the stars, this is obviously a great advantage to have and we will certainly make good use of it.</value>
</data>
<data name="Trait_Smart_Name" xml:space="preserve">
<value>Smart</value>
</data>

Copy & Paste this directly under this description So that it will look like this:

<data name="Trait_Genius_Description" xml:space="preserve">
<value>While others would grow in strength or agility, our ancestors grew in brilliance, cunning and planning, to not only survive but prosper in our homeworld. This is probably why now in the galactic age, we find ourselves contemplating ideas, which others consider complex in nature; but seem relative simple to us. In the struggle for the stars, this is obviously a great advantage to have and we will certainly make good use of it.</value>
</data>
<data name="Trait_Genius_Name" xml:space="preserve">
<value>Genius</value>
</data>

Note: I added the 'brilliance' word for flavor :)

Load the game & you will have a new Trait called Genius & will cost you 6 points.

Due to the fact (?) that only 1 Excluded Trait can be applied, I am not sure if the

Smart & Genius Traits would stack to 75%.
AtomicKaiser
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 304
Joined: Thu Jul 04, 2019 9:49 pm
Location: Montevideo, Uruguay
Contact:

Re: How to Add a New Trait

Post by AtomicKaiser »

eddieballgame wrote: Wed Feb 26, 2020 8:58 pm A simple guide to adding a new Trait.

Here is a simple example of adding a Trait. (I am not clear on the Creative Trait)

New Trait 'Genius' involves editing 2 files plus the language files.

In Data/Traits folder copy & paste the 'Trait_Smart.lua' file & rename to 'Trait_Genius.lua.'

Edit the new Genius Trait as follows:

Trait{
-- Base data
ID = "Trait_Genius",
Name = "Trait_Genius_Name",
Description = "Trait_Genius_Description",
Stats = "Trait_Genius_Stats",
IconPath = "Graphics/Traits/Trait_Smart_Icon",

-- Stats
PickPoints = 6,
IsPositive = true,
ExcludedTraitID = "Trait_Dumb", (Note: only 1 Excluded Trait appears to be allowed)

-- Reference
ModifierID = "Modifier_Trait_Genius",
}

NEXT:

Repeat this format in the Data/Modifiers folder, copy & paste 'Modifier_Trait_Smart.lua' & rename to'Modifier_Trait_Genius.lua'

Edit new new Genius Modifier as follows:

Modifier{
ID = "Modifier_Trait_Genius",
ResearchPercentage = 50, (Note: Smart Trait is 25)
}

Now for the hard part :) (not really)

In Data/Localization folder are the 'Language' files.

Per English I edit both of them.

Open one (Notepad ++ is great for this) & find the 'Smart Trait' Description near the very bottom.

<data name="Trait_Smart_Description" xml:space="preserve">
<value>While others would grow in strength or agility, our ancestors grew in cunning and planning, to not only survive but prosper in our homeworld. This is probably why now in the galactic age, we find ourselves contemplating ideas, which others consider complex in nature; but seem relative simple to us. In the struggle for the stars, this is obviously a great advantage to have and we will certainly make good use of it.</value>
</data>
<data name="Trait_Smart_Name" xml:space="preserve">
<value>Smart</value>
</data>

Copy & Paste this directly under this description So that it will look like this:

<data name="Trait_Genius_Description" xml:space="preserve">
<value>While others would grow in strength or agility, our ancestors grew in brilliance, cunning and planning, to not only survive but prosper in our homeworld. This is probably why now in the galactic age, we find ourselves contemplating ideas, which others consider complex in nature; but seem relative simple to us. In the struggle for the stars, this is obviously a great advantage to have and we will certainly make good use of it.</value>
</data>
<data name="Trait_Genius_Name" xml:space="preserve">
<value>Genius</value>
</data>

Note: I added the 'brilliance' word for flavor :)

Load the game & you will have a new Trait called Genius & will cost you 6 points.

Due to the fact (?) that only 1 Excluded Trait can be applied, I am not sure if the

Smart & Genius Traits would stack to 75%.
Awesome guide Eddie! I might "borrow" it for a future Advanced Modding dev diary ;)
Image
eddieballgame
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 628
Joined: Mon Dec 17, 2012 2:53 am

Re: How to Add a New Trait

Post by eddieballgame »

From where I sit...it is your property. :)
JosEPhII
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 20
Joined: Fri May 29, 2015 1:16 pm

Re: How to Add a New Trait

Post by JosEPhII »

AtomicKaiser wrote: Mon Mar 02, 2020 11:34 pm
eddieballgame wrote: Wed Feb 26, 2020 8:58 pm A simple guide to adding a new Trait.

Here is a simple example of adding a Trait. (I am not clear on the Creative Trait)

New Trait 'Genius' involves editing 2 files plus the language files.

In Data/Traits folder copy & paste the 'Trait_Smart.lua' file & rename to 'Trait_Genius.lua.'

Edit the new Genius Trait as follows:

Trait{
-- Base data
ID = "Trait_Genius",
Name = "Trait_Genius_Name",
Description = "Trait_Genius_Description",
Stats = "Trait_Genius_Stats",
IconPath = "Graphics/Traits/Trait_Smart_Icon",

-- Stats
PickPoints = 6,
IsPositive = true,
ExcludedTraitID = "Trait_Dumb", (Note: only 1 Excluded Trait appears to be allowed)

-- Reference
ModifierID = "Modifier_Trait_Genius",
}

NEXT:

Repeat this format in the Data/Modifiers folder, copy & paste 'Modifier_Trait_Smart.lua' & rename to'Modifier_Trait_Genius.lua'

Edit new new Genius Modifier as follows:

Modifier{
ID = "Modifier_Trait_Genius",
ResearchPercentage = 50, (Note: Smart Trait is 25)
}

Now for the hard part :) (not really)

In Data/Localization folder are the 'Language' files.

Per English I edit both of them.

Open one (Notepad ++ is great for this) & find the 'Smart Trait' Description near the very bottom.

<data name="Trait_Smart_Description" xml:space="preserve">
<value>While others would grow in strength or agility, our ancestors grew in cunning and planning, to not only survive but prosper in our homeworld. This is probably why now in the galactic age, we find ourselves contemplating ideas, which others consider complex in nature; but seem relative simple to us. In the struggle for the stars, this is obviously a great advantage to have and we will certainly make good use of it.</value>
</data>
<data name="Trait_Smart_Name" xml:space="preserve">
<value>Smart</value>
</data>

Copy & Paste this directly under this description So that it will look like this:

<data name="Trait_Genius_Description" xml:space="preserve">
<value>While others would grow in strength or agility, our ancestors grew in brilliance, cunning and planning, to not only survive but prosper in our homeworld. This is probably why now in the galactic age, we find ourselves contemplating ideas, which others consider complex in nature; but seem relative simple to us. In the struggle for the stars, this is obviously a great advantage to have and we will certainly make good use of it.</value>
</data>
<data name="Trait_Genius_Name" xml:space="preserve">
<value>Genius</value>
</data>

Note: I added the 'brilliance' word for flavor :)

Load the game & you will have a new Trait called Genius & will cost you 6 points.

Due to the fact (?) that only 1 Excluded Trait can be applied, I am not sure if the

Smart & Genius Traits would stack to 75%.
Awesome guide Eddie! I might "borrow" it for a future Advanced Modding dev diary ;)
@AtomicKaiser,
Do you have a thread on Modding up yet?
AtomicKaiser
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 304
Joined: Thu Jul 04, 2019 9:49 pm
Location: Montevideo, Uruguay
Contact:

Re: How to Add a New Trait

Post by AtomicKaiser »

JosEPhII wrote: Mon Mar 30, 2020 7:35 pm
AtomicKaiser wrote: Mon Mar 02, 2020 11:34 pm
eddieballgame wrote: Wed Feb 26, 2020 8:58 pm A simple guide to adding a new Trait.

Here is a simple example of adding a Trait. (I am not clear on the Creative Trait)

New Trait 'Genius' involves editing 2 files plus the language files.

In Data/Traits folder copy & paste the 'Trait_Smart.lua' file & rename to 'Trait_Genius.lua.'

Edit the new Genius Trait as follows:

Trait{
-- Base data
ID = "Trait_Genius",
Name = "Trait_Genius_Name",
Description = "Trait_Genius_Description",
Stats = "Trait_Genius_Stats",
IconPath = "Graphics/Traits/Trait_Smart_Icon",

-- Stats
PickPoints = 6,
IsPositive = true,
ExcludedTraitID = "Trait_Dumb", (Note: only 1 Excluded Trait appears to be allowed)

-- Reference
ModifierID = "Modifier_Trait_Genius",
}

NEXT:

Repeat this format in the Data/Modifiers folder, copy & paste 'Modifier_Trait_Smart.lua' & rename to'Modifier_Trait_Genius.lua'

Edit new new Genius Modifier as follows:

Modifier{
ID = "Modifier_Trait_Genius",
ResearchPercentage = 50, (Note: Smart Trait is 25)
}

Now for the hard part :) (not really)

In Data/Localization folder are the 'Language' files.

Per English I edit both of them.

Open one (Notepad ++ is great for this) & find the 'Smart Trait' Description near the very bottom.

<data name="Trait_Smart_Description" xml:space="preserve">
<value>While others would grow in strength or agility, our ancestors grew in cunning and planning, to not only survive but prosper in our homeworld. This is probably why now in the galactic age, we find ourselves contemplating ideas, which others consider complex in nature; but seem relative simple to us. In the struggle for the stars, this is obviously a great advantage to have and we will certainly make good use of it.</value>
</data>
<data name="Trait_Smart_Name" xml:space="preserve">
<value>Smart</value>
</data>

Copy & Paste this directly under this description So that it will look like this:

<data name="Trait_Genius_Description" xml:space="preserve">
<value>While others would grow in strength or agility, our ancestors grew in brilliance, cunning and planning, to not only survive but prosper in our homeworld. This is probably why now in the galactic age, we find ourselves contemplating ideas, which others consider complex in nature; but seem relative simple to us. In the struggle for the stars, this is obviously a great advantage to have and we will certainly make good use of it.</value>
</data>
<data name="Trait_Genius_Name" xml:space="preserve">
<value>Genius</value>
</data>

Note: I added the 'brilliance' word for flavor :)

Load the game & you will have a new Trait called Genius & will cost you 6 points.

Due to the fact (?) that only 1 Excluded Trait can be applied, I am not sure if the

Smart & Genius Traits would stack to 75%.
Awesome guide Eddie! I might "borrow" it for a future Advanced Modding dev diary ;)
@AtomicKaiser,
Do you have a thread on Modding up yet?
No thread, but a guide is coming up in the form of a new dev diary, next week.
We'll probably do a sticky or something like that with links to modding resources here.
Image
Post Reply

Return to “Astra Exodus”