Adding in new species

Creation, discussion, and balancing of game content such as techs, buildings, ship parts.

Moderators: Oberlus, Committer

Message
Author
User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Adding in new species

#1 Post by eleazar »

I thought i'd give adding a handful of our existing species to the game a try. Even if they act the same having different names and icons in the galaxy would be more fun.

:arrow: Is there anything else i need to alter besides "species.txt"?

So the first thing i did was diff the trinth and glysache parts of "species.txt" to see what i need to understand and what i can just mindlessly copy.

Fortunately most of the text looks similar.

Some questions:
Trith reads:

Code: Select all

Focus
            name = "FOCUS_FARMING"
            description = "FOCUS_FARMING_DESC"
            location = [b]Planet environment = [Good Adequate Poor Hostile][/b]
            graphic = "icons/focus/farming.png"
While the Glysache part reads
Focus
name = "FOCUS_FARMING"
description = "FOCUS_FARMING_DESC"
location = Planet
graphic = "icons/focus/farming.png"
Does this difference matter? What does it do? Or is it an omission?

The Trith section also have these lines which don't appear in the glysache section:

Code: Select all

EffectsGroup
            scope = Source
            activation = Not Turn low = 1 high = 99999
            effects = SetPlanetType Radiated

        EffectsGroup
            scope = Source
            activation = And [
                Planet environment = Hostile
                Not Turn low = 1 high = 99999
            ]
            effects = [
                SetTargetPopulation Value + 15
                SetTargetHealth Value + 25
What does this part do? Should i care?


Is there a particular reason the Glysache are set to prefer the "terran" type planets? IIRC they were originally conceived as living on a non-earthly planet (which probably doesn't correspond to any existing EP). I'd like to to give "terran" to humans, and distribute the other aliens more or less evenly around the EP ring.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Adding in new species

#2 Post by Geoff the Medio »

eleazar wrote: :arrow: Is there anything else i need to alter besides "species.txt"?
eng_stringtable.txt will need text for the names and descriptions noted in species.txt.
Trith reads:

Code: Select all

Focus
            name = "FOCUS_FARMING"
            description = "FOCUS_FARMING_DESC"
            location = [b]Planet environment = [Good Adequate Poor Hostile][/b]
            graphic = "icons/focus/farming.png"
While the Glysache part reads
Focus
name = "FOCUS_FARMING"
description = "FOCUS_FARMING_DESC"
location = Planet
graphic = "icons/focus/farming.png"
Does this difference matter? What does it do? Or is it an omission?
I think Bigjoe5 wrote most of the current content files, so he might need to comment on motivation, but it appears that Trith apparently can't use farming focus on "uninhabitable" planets. Effects can, I think, give bonuses to target population even on uninhabitable planets, so this isn't useless. I don't think it's practically of much relevance, though, and for simplicity, you probably should stick to allowing Farming focus regardless of environment rating unless there's a particular reason to be more specific.
The Trith section also have these lines which don't appear in the glysache section:

Code: Select all

EffectsGroup
            scope = Source
            activation = Not Turn low = 1 high = 99999
            effects = SetPlanetType Radiated

        EffectsGroup
            scope = Source
            activation = And [
                Planet environment = Hostile
                Not Turn low = 1 high = 99999
            ]
            effects = [
                SetTargetPopulation Value + 15
                SetTargetHealth Value + 25
What does this part do? Should i care?
The first appears to be setting the Trith homeworld to "Radiated". There's currently no other way to ensure a species will end up on a planet of type that it likes, so this is a reasonable thing to do only on turn 0 for planet on which the species is present.

The second is giving moderate bonuses to target health and population on the first turn on planets with hostile environment rating... I'm not sure why this is, but it might be so that the population doesn't starve before the planet type changing effect has a chance to work. I don't know whether this is necessary, but it could make sense...
Is there a particular reason the Glysache are set to prefer the "terran" type planets? IIRC they were originally conceived as living on a non-earthly planet (which probably doesn't correspond to any existing EP). I'd like to to give "terran" to humans, and distribute the other aliens more or less evenly around the EP ring.
Terran for humans is fine. I'd guess that this was changed since there aren't any Humans, and neither Trith nor Gyisache are supposed to like Terran planets, but the universe generation assumes that Terran are preferred and Terran being good is intuitive for the default race...

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Adding in new species

#3 Post by eleazar »

OK, i added the species in, and set the EPs properly, and checked for several types of typos....but it won't run for me.

Code: Select all

7/9/11 6:33:38 PM	[0x0-0x6c66c6].org.freeorion.FreeOrion[40784]	error at or after the indicated point on line 1:
7/9/11 6:33:38 PM	[0x0-0x6c66c6].org.freeorion.FreeOrion[40784]	Species
7/9/11 6:33:38 PM	[0x0-0x6c66c6].org.freeorion.FreeOrion[40784]	^
Hopefully my binary (0.3.15) is simply too far out of date.

The text files are attached if somebody else wants to try it on a newer compile.
Attachments
more-species.zip
(67.17 KiB) Downloaded 116 times

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Adding in new species

#4 Post by Geoff the Medio »

Your file is also broken for me on the latest SVN.

Most obvious first problem is that you've only got the "Species" declaration at the top of the file. It needs to be the first thing in each species definition, before the name = line.

You've also omitted the quotes "" around stringtable entry names, like "SP_HUMAN" edit: and the graphic filename.

edit more: the attached version works.
Attachments
species.txt
tweaked species.txt
(161.04 KiB) Downloaded 108 times

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Adding in new species

#5 Post by eleazar »

I think i got it fixed and committed before i saw your attachment. I found a couple additional non-fatal typos as well.

For the curious, this how species/EPs break down.

Code: Select all

Terran	Human
Ocean	Scylior
Swamp	Gyisache
Inferno	Egassem
Toxic		Chato
Radiated	Trith
Barren	Cray
Tundra	Hhhoh
Desert 	Eaxaw

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Adding in new species

#6 Post by Geoff the Medio »

eleazar wrote:I think i got it fixed and committed before i saw your attachment.
Spiffy. I think it would be possible to make the error messages more useful than "something after the first line of the file", though I don't want to spend time on it at the moment.

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Adding in new species

#7 Post by Bigjoe5 »

Geoff the Medio wrote:I think Bigjoe5 wrote most of the current content files, so he might need to comment on motivation, but it appears that Trith apparently can't use farming focus on "uninhabitable" planets. Effects can, I think, give bonuses to target population even on uninhabitable planets, so this isn't useless. I don't think it's practically of much relevance, though, and for simplicity, you probably should stick to allowing Farming focus regardless of environment rating unless there's a particular reason to be more specific.
Yeah, that was probably just an oversight.
The first appears to be setting the Trith homeworld to "Radiated". There's currently no other way to ensure a species will end up on a planet of type that it likes, so this is a reasonable thing to do only on turn 0 for planet on which the species is present.

The second is giving moderate bonuses to target health and population on the first turn on planets with hostile environment rating... I'm not sure why this is, but it might be so that the population doesn't starve before the planet type changing effect has a chance to work. I don't know whether this is necessary, but it could make sense...
This is correct - the species will die before the game starts if this segment isn't included.
Is there a particular reason the Glysache are set to prefer the "terran" type planets? IIRC they were originally conceived as living on a non-earthly planet (which probably doesn't correspond to any existing EP). I'd like to to give "terran" to humans, and distribute the other aliens more or less evenly around the EP ring.
I don't know why, but I always thought Gyisache were Terran-dwellers.... Anyhow, I'd eventually like to have two species for each EP, if possible. Not that this makes any difference for the time being, though...
Warning: Antarans in dimensional portal are closer than they appear.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Adding in new species

#8 Post by eleazar »

Bigjoe5 wrote:I don't know why, but I always thought Gyisache were Terran-dwellers.... Anyhow, I'd eventually like to have two species for each EP, if possible. Not that this makes any difference for the time being, though...
Heh, well I'd like to eventually have 3 major species for each EP plus many more minor species (ideally randomly generated).

Some of the EP / species pairings are a bit arbitrary. I have no illusions that this is the final word. Things will no doubt shift around when we get to the place to be able to balance species against each other. For now, with EP being the only real distinction, 9 seems like a good number.

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Adding in new species

#9 Post by Bigjoe5 »

eleazar wrote:For now, with EP being the only real distinction, 9 seems like a good number.
On that note, if you're feeling brave, you could always give some specific bonuses to each species.
Warning: Antarans in dimensional portal are closer than they appear.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Adding in new species

#10 Post by eleazar »

Bigjoe5 wrote:On that note, if you're feeling brave, you could always give some specific bonuses to each species.
I don't understand the syntax well enough to do that.

Geoff, would it be easy enough to get the icon used for the population meter to be defined by species.txt? I.E. the graphic /art/icons/meter/pop.png Using the species icon instead would visually work great.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Adding in new species

#11 Post by Geoff the Medio »

eleazar wrote:Geoff, would it be easy enough to get the icon used for the population meter to be defined by species.txt? I.E. the graphic /art/icons/meter/pop.png Using the species icon instead would visually work great.
On individual planets, the population icon for the resident species is already used.

If you mean for the empire total population, I don't really see what you're trying to do... Particularly since an empire for which the population total is calculated might have multiple species. It might make sense to have a different "general" population total icon (/art/icons/meter/pop.png) than the human icon, though you don't need to edit or put anything in species.txt for that.
Attachments
Planet Panel in latest SVN showing species-specific population icon.
Planet Panel in latest SVN showing species-specific population icon.
PlanetPanel_SVN4034.png (17 KiB) Viewed 2208 times

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Adding in new species

#12 Post by eleazar »

Geoff the Medio wrote:
eleazar wrote:Geoff, would it be easy enough to get the icon used for the population meter to be defined by species.txt? I.E. the graphic /art/icons/meter/pop.png Using the species icon instead would visually work great.
On individual planets, the population icon for the resident species is already used.
My mistake, you're ahead of me. That's exactly what i meant.
Geoff the Medio wrote:If you mean for the empire total population, I don't really see what you're trying to do... Particularly since an empire for which the population total is calculated might have multiple species. It might make sense to have a different "general" population total icon (/art/icons/meter/pop.png) than the human icon, though you don't need to edit or put anything in species.txt for that.
An empire's total population isn't displayed anywhere currently is it?
I agree that the human icon is not a great fit, but making a species-neutral population icon is conceptually pretty tricky, especially since our species aren't all humanoid. In other words, i've thought about it before, and have no clue how to do it.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Adding in new species

#13 Post by Geoff the Medio »

eleazar wrote:An empire's total population isn't displayed anywhere currently is it?
It shown in the rightmost of the icons on the bar at the top of the screen. The others are empire resource totals.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Adding in new species

#14 Post by Geoff the Medio »

Bigjoe5 wrote:
The first appears to be setting the Trith homeworld to "Radiated". There's currently no other way to ensure a species will end up on a planet of type that it likes, so this is a reasonable thing to do only on turn 0 for planet on which the species is present.

The second is giving moderate bonuses to target health and population on the first turn on planets with hostile environment rating... I'm not sure why this is, but it might be so that the population doesn't starve before the planet type changing effect has a chance to work. I don't know whether this is necessary, but it could make sense...
This is correct - the species will die before the game starts if this segment isn't included.
I've added some code to universe generation to set the starting planet of an empire to (one of) the species' most-preferred planet type(s). Checking if the planet was Hostile on the first turn had problems for species for which Terran planets were Poor or Adequate.

User avatar
OllyG
Space Kraken
Posts: 151
Joined: Wed Jul 20, 2011 12:03 pm

Re: Adding in new species

#15 Post by OllyG »

This may seem backwards to some, but shouldn't the galaxy be generated and then the starting positions chosen from all the prefered planets? Rather than changing a planet, why not choose to start on an appropriate planet? I think it could be interesting to start in the same system with someone else. The game is being designed so planets can defend themselves in the early game.

If we want equal starting positions we should place an entire star system for each player.

Having 2 or 3 species for each EP means there would be more than 20 species. I think it would be batter to just have a few to start out with - so they can be well balanced and have lots of art and background. I'm not sure it makes sense to have every kind of planet covered in EP - I think it is better if some kinds of worlds are more popular to create something (else) to fight over.

The grand campaign mentioned in the vision statement seems (to me) to imply pregenerated galaxies, so reajusting starting planets environments would not be needed.

Post Reply