I remember almost a year ago I tried to add a custom species to the game, but it would never show up in the game. I ended up just modifying the Human entry to make what I wanted. It's a bit OP, but here it is:
You have also to provide the appropriate colony building at /freeorion/default/scripting/buildings/colonies - either by creating one or by editing col_bld_gen.py and running it.
All contributions are released under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidelines.
One problem I see is that [[BAD_PLANETARY_DEFENSE]] does not appear to exist. The only two options are [[AVERAGE_PLANETARY_DEFENSE]] and [[NATIVE_PLANETARY_DEFENSE]].
The code provided is also missing #include statements at the end.
matt474 wrote:One problem I see is that [[BAD_PLANETARY_DEFENSE]] does not appear to exist.
If nonexistent macro substitutions are attempted, I would expect some error messages in the client or server log noting the parser failure. Have a look for those.
Cpeosphoros wrote:You have also to provide the appropriate colony building at /freeorion/default/scripting/buildings/colonies - either by creating one or by editing col_bld_gen.py and running it.
Okay, I've run that python file and now have this:
BuildingType
name = "BLD_COL_INGA"
description = "BLD_COL_INGA_DESC"
buildcost = 50 * [[COLONY_UPKEEP_MULTIPLICATOR]]
buildtime = 1.0 * max(5.0, 1.0 +
(min value = ShortestPath object = Target.SystemID object = LocalCandidate.SystemID
condition = And [
Planet
OwnedBy empire = Source.Owner
Species name = "SP_INGA"
Population low = [[MIN_RECOLONIZING_SIZE]]
Happiness low = 5
ResourceSupplyConnected empire = Source.Owner condition = Target
]
) / (60
+ 20 * (If condition = Or [
OwnerHasTech name = "SHP_MIL_ROBO_CONT"
OwnerHasTech name = "SHP_ORG_HULL"
OwnerHasTech name = "SHP_QUANT_ENRG_MAG"
])
+ 20 * (If condition = Or [
OwnerHasTech name = "SHP_ORG_HULL"
OwnerHasTech name = "SHP_QUANT_ENRG_MAG"
])
+ 20 * (If condition = OwnerHasTech name = "SHP_QUANT_ENRG_MAG")
+ 10 * (If condition = OwnerHasTech name = "SHP_IMPROVED_ENGINE_COUPLINGS")
+ 10 * (If condition = OwnerHasTech name = "SHP_N_DIMENSIONAL_ENGINE_MATRIX")
+ 10 * (If condition = OwnerHasTech name = "SHP_SINGULARITY_ENGINE_CORE")
+ 10 * (If condition = OwnerHasTech name = "SHP_TRANSSPACE_DRIVE")
+ 10 * (If condition = OwnerHasTech name = "SHP_INTSTEL_LOG")
)
)
location = And [
Planet
OwnedBy empire = Source.Owner
Population high = 0
Not Planet environment = Uninhabitable species = "SP_INGA"
Not Contains Building name = "BLD_COL_INGA"
ResourceSupplyConnected empire = Source.Owner condition = And [
Planet
OwnedBy empire = Source.Owner
Species name = "SP_INGA"
Population low = [[MIN_RECOLONIZING_SIZE]]
Happiness low = 5
]
]
EnqueueLocation = And [
Planet
OwnedBy empire = Source.Owner
Population high = 0
Not Planet environment = Uninhabitable species = "SP_INGA"
Not Contains Building name = "BLD_COL_INGA"
Not Enqueued type = Building name = "BLD_COL_INGA"
ResourceSupplyConnected empire = Source.Owner condition = And [
Planet
OwnedBy empire = Source.Owner
Species name = "SP_INGA"
Population low = [[MIN_RECOLONIZING_SIZE]]
Happiness low = 5
]
]
effectsgroups = [
EffectsGroup
scope = And [
Object id = Source.PlanetID
Planet
]
activation = And [
Not OwnerHasTech name = "GRO_LIFECYCLE_MAN"
Turn low = Source.CreationTurn + 1 high = Source.CreationTurn + 1
]
effects = [
SetSpecies name = "SP_INGA"
SetPopulation value = 1
]
EffectsGroup
scope = And [
Object id = Source.PlanetID
Planet
]
activation = And [
OwnerHasTech name = "GRO_LIFECYCLE_MAN"
Turn low = Source.CreationTurn + 1 high = Source.CreationTurn + 1
]
effects = [
SetSpecies name = "SP_INGA"
SetPopulation value = [[MIN_RECOLONIZING_SIZE]]
]
EffectsGroup
scope = And [
Object id = Source.PlanetID
Planet
]
activation = Turn low = Source.CreationTurn + 1 high = Source.CreationTurn + 1
effects = [
GenerateSitRepMessage
message = "SITREP_NEW_COLONY_ESTABLISHED"
icon = "icons/species/chato-matou-gormoshk.png"
parameters = [
tag = "species" data = "SP_INGA"
tag = "planet" data = Target.ID
]
empire = Source.Owner
]
EffectsGroup
scope = Source
activation = Turn low = Source.CreationTurn + 2
effects = Destroy
]
icon = "icons/species/chato-matou-gormoshk.png"
in the col_buildings file in the main "default" folder. I can't find any scripting path within the games installation folder. It still isn't working however. When I try to start a new game, only the normal races are there. Is it possible that BLD_COLONY_INGA_DESC doesn't exist in the stringtable or something?
Again, instead of guessing, have a look at the sever and client logs after starting up a game. They probably have error messages about parser failures for the new species script.
Also, is your game definitely pointing to and getting info from the default folder you're working in? It's possible to change it and sometimes people forget to point things in the right direction.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Geoff the Medio wrote:Again, instead of guessing, have a look at the sever and client logs after starting up a game. They probably have error messages about parser failures for the new species script.
dbenage-cx wrote:You might also check the freeoriond.log file (the server log file).
Also, click "single player" to get into the galaxy setup screen before quitting, or it may not attempt to load and parse the scripts and thus wouldn't have anything in the logs (plural) about failing to do so.