How do I mod a faction to begin a game with specific techs, similar to how the Iridium start with the "Expanded Trade" and "Trade Route Optimization" techs?
It looks like you set the research cost to 0 in their tech tree file. I haven't tried this to see if it works, however.
There is a way easier way. Within FactionDefs.xml you add a tag called StartingTechs, where you include the GenericName found within the race's tech tree. The tag must be positioned between TechTree and ShipCallsign tags, you can see the order in the Schema file. Not sure what the generic name is for the techs you mention. Kinda like:
Yeah, that was the first thing I tried , it didn't work and I got this error message:
"element 'StartingTechs' is not allowed for content model '(InternalName,DisplayName,DisplayNameShort,LeaderName,Description,LeaderDescription?,RaceType,PersonalityTraits*,RaceTraits*,RequiresHomeworld?,HomeStarSystem,HomePlanetName?,StartingShips*,TechTree,StartingTechs,HatedFaction*,ShipCallsign,LogoImage,LeaderThumbnail,LeaderImageFG?,LeaderImageBG?,NewsRobotMovie_Approach,NewsRobotMovie_Idle,StartupImage?,StartupTitle?,StartupDescription?,StartupTraitsDescription?,ConquestMovie?,MapColorDef,UIColorDef?,FactionMoviesFGDef?,FactionMoviesBGDef?,FactionMusicDef?,Material1,Material2,Surface1,Surface2,Appearance,ShipStyleSet,CreditsInit,WarEnduranceInit,DefaultResistance,ManufacturingSliderInit?,MilitarySliderInit?,ResearchSliderInit?,WealthSliderInit?,InfluenceTallyInit?,TradeRouteInit?,StartingColonyPopulation?,AICategoryWeight?)"
That usually means you placed it in the wrong order. The XML parser is very finicky about XML ordering.
Looking at the output they need to go between techtree and hatedfaction entries.
Also interesting is that there seems to be only one entry allowed, so I don't know how you should handle multiple starting techs, based on the schema you posted.
Thanks for the help, I moved it, so far everything works well. You pit multiple techs, but you have to use the internal names from the generic names for each tech.
What to do, if I want to do this with a custom faction? As these are not in FactionDef.xml.
@Ralle2, nothing you can do. As binary custom factions are meant to be balanced. No way for you to avoid editing XML files.
Sure I have to edit files. But which one?
Custom factions at present are not editable, you'd have to build a copy of your race in a modded FactionDefs_mycustomrace.xml file. Bascially copy over the data of 'terrans' or whatever and replace the relevant values with your own race's.
Here's my personal Federation faction as an example:
Thanks. I thought about doing something like this. But then I thought maybe somebody knows an easier way to do it.
There are many great features available to you once you register, including:
Sign in or Create Account