FOURTH RACE code fragments located here

Here are some code fragments that will set up a fourth race (called the Fourth here, so you can find the instances that need to be modified)  I'll try to only show code fragments and not entire files, as some of them are long and only have one small change to them. (There are only 5 files, 3 new, 2 common)...

   If I missed something, feel free to fill in the parts I missed (and if the thread exists already, point me to it :)

Copy new files from their corresponding files of the race you most like to work with (they can be gutted later):

**********************************************************

In Gameinfo:                          (replace "Fourth" with your race-name code-word)
PlayerFourth.entity   (NEW)     (copy from playerTech.Entity)

  (Top of file changes)

raceNameStringID "IDS_PLAYERRACENAME_FOURTH"  (here)
canColonize TRUE
isPsi FALSE
isSelectable TRUE  (true here is a good thing if you want to play it yourself)

  (middle of file: have fun)

(end of file changes, in all instances of "Fourth" put your code name, but be consistant to prevent problems later)

aiNameData
    nameCount 10
    name "IDSPlayerAINameFourth0"
    name "IDSPlayerAINameFourth1"
    name "IDSPlayerAINameFourth2"
    name "IDSPlayerAINameFourth3"
    name "IDSPlayerAINameFourth4"
    name "IDSPlayerAINameFourth5"
    name "IDSPlayerAINameFourth6"
    name "IDSPlayerAINameFourth7"
    name "IDSPlayerAINameFourth8"
    name "IDSPlayerAINameFourth9"
raceNameParsePrefix "TECH"                       (don't know what this does yet)
raceNameParsePrefixFallback "TECH"
numResearchFields 4
    field "IDS_TECH_RESEARCHFIELD_COMBAT"
    field "IDS_TECH_RESEARCHFIELD_EMPIRE"
    field "IDS_TECH_RESEARCHFIELD_ARTIFACT"
    field "IDS_TECH_RESEARCHFIELD_FLEET"
playerThemeGroupName "PlayerFourth"
playerPictureGroupName "PlayerFourth"

**********************************************************

In GameInfo:
GalaxyScenario.def     (common file)      (list of added lines below)

playerTypeCount 5   (Add one to this line, and insert the next three lines)
playerType
    designName "Fourth"
    entityDefName "PlayerFourth"

   (just below that, add this where it shows up)

    groups 4   (add one to the number, and add all the next lines (keep Tech items until later)
        group
            condition
                type "PlanetOwnerIsRace"
                param "Fourth"
            owner "PlanetOwner"
            colonizeChance 1
            items 3
                item "Tech:Module:FrigateFactory"
                item "Tech:Frigate:Constructor"
                item "Tech:Frigate:Constructor"

   (a lot further down, add in the "Fourth", and add one to the numbers (the Themes are not as important if you are using Tech information, and the fourth picture set is incomplete, and is currently used as NPC, which I moved to another location because it fits better located just past the TEC players to the right)

validPictureGroups 4
pictureGroup "PlayerPhase"
pictureGroup "PlayerPsi"
pictureGroup "PlayerTech"
pictureGroup "PlayerFourth"
validThemeGroups 5
themeGroup "PlayerPhase"
themeGroup "PlayerPsi"
themeGroup "PlayerTech"
themeGroup "PlayerFourth"
themeGroup "NPC"

  This will get you started, more may be necessary to run certain maps, but the other templates can be filled in with similiar additions)...


**********************************************************



In Window:
PlayerFourth.playerThemes    (NEW)      controls the emblem choices for each player, in case you want to use the multicolored ones the NPC's use :)  This example is the stock file form TEC, so I will not print any code here

STOCK FILE, JUST COPY FROM:    PlayerTech.playerThemes    (or your choice of the others)

Tec gets it's logos, Advent logos are crosses, Vasari logos are spikey, and NPC logos are the skull and the fist

**********************************************************
In Window:
PlayerFourth.playerPictures    (NEW)      Copy DIRECTLY from NPC.playerPictures, and change the second line from 2-6 (as you should have just as many different pics as the others, but they need to be filled in with something)
also, move NPC pictures to the first row, columns 7-8 (at least that's where I put the pirate pictures to consolidate better)

TXT
pictureCount 6                   (the 6 here was the only thing I changed, and it overrides the normal NPC location)
LargeScreenPicture
    textureName "Player_Portrait_Large.tga"
    startTopLeft [0,666]                                  (the 666 points to the fourth row down)
    width 195
    height 219
    rowItemCount 6
    horizontalStride 198
    verticalStride 222
SmallScreenPicture
    textureName "Player_Portrait_Small.tga"
    startTopLeft [5,221]                                     (same for the 221, etc...)
    width 56
    height 67
    rowItemCount 6
    horizontalStride 61
    verticalStride 72
BottomBarPicture
    textureName "Player_Portrait_Window.tga"
    startTopLeft [1,235]
    width 169
    height 77
    rowItemCount 6
    horizontalStride 170
    verticalStride 78
ButtonIcon
    textureName "Player_Portrait_Button.tga"
    startTopLeft [3,97]
    width 24
    height 29
    rowItemCount 6
    horizontalStride 27
    verticalStride 32

   I suggest the picture files look like this:

TEC TEC TEC TEC TEC TEC NPC NPC
AdV AdV AdV AdV AdV AdV
VaS VaS VaS VaS VaS VaS
FOR FOR FOR FOR FOR FOR
ETC ETC ETC ETC ETC ETC (let Danman deal with merging them ;)  do dee do...

**********************************************************


Of course, In Strings:
English.str      (most common file)       add these lines (with your own data of course):

Add 11 to numstrings (to start with, more when you make ships and stuff for them)


StringInfo
    ID "IDS_PLAYERRACENAME_FOURTH"
    Value "The Fourth"
StringInfo
    ID "IDSPlayerAINameFourth0"
    Value "Fourth Rebels"
StringInfo
    ID "IDSPlayerAINameFourth1"
    Value "Fourth Coalition"
StringInfo
    ID "IDSPlayerAINameFourth2"
    Value "Fourth Consortium"
StringInfo
    ID "IDSPlayerAINameFourth3"
    Value "Fourth Corporation"
StringInfo
    ID "IDSPlayerAINameFourth4"
    Value "Fourthians"
StringInfo
    ID "IDSPlayerAINameFourth5"
    Value "Fourth Armada"
StringInfo
    ID "IDSPlayerAINameFourth6"
    Value "Fourth Colonists"
StringInfo
    ID "IDSPlayerAINameFourth7"
    Value "Fourth Descendants"
StringInfo
    ID "IDSPlayerAINameFourth8"
    Value "Fourth Resurgence"
StringInfo
    ID "IDSPlayerAINameFourth9"
    Value "Fourth Union"

*********************************************************



Oh, and another thing, this is for version 1.04, and I have no idea if it works now for 1.05, D'oh!!!!!

   hope this helps

12,753 views 13 replies
Reply #1 Top
thanks Helioforge!
Reply #3 Top
Each set of asterisks implies a single file, the first line is the folder the file resides in, the second line refers to the filename (look for the file that has the word Tech instead of Fourth, my mistake there, it was meant to imply that you need to copy the old file and rename it with your personal race-name code-word)

after that, use notepad to look at each file (windows may not let you open it right away, but if you use "open with" the first time, it should assign notepad as the default program (DONT change the file Suffix, as Sins needs that intact (I think))

Then, Use "Find" with notepad, and locate the sections of code that look like the sections shown (sorry I didn't upload complete files, as some of them are long, and I don't have a filefront account (which might be a good idea :), then alter them to fit your race name (keep the codeword short, and use the full racename in the string file (keep that short too, as it has to fit inside a rather small button :)

Oh, and I suggest that you do all these alterations in a new mod framework, or do them to A COPY OF the mod you want to mess with. Try to leave the original game files untouched, ESPECIALLY the original game files

Use the mod path that the game provides for you (download a mod from this site and instructions will be provided on the modpath...

I hope that covers it...
Reply #7 Top
Do'h! (Homer Simpson)
Reply #8 Top
Hey Helioforge I was trying to make a light frigate for the race fourth by converting the tech frigate but it keeps dumping. Below is what I did and I was wondering if you could look it over and see If I missed anything

New Ship

(New)
Frigate_FourthLight.mesh

(New)
FrigateFourthLight.entity

TXT
entityType "Frigate"
defaultAutoAttackRange "GravityWell"
defaultAutoAttackOn TRUE
prefersToFocusFire TRUE
autoJoinFleetDefault TRUE
canBomb FALSE
frigateRoleType "Light"
statCountType "FrigateLight"
mainViewIcon "MAINVIEWICON_FRIGATE_TECHLIGHT" (optional)
picture "PICTURE_FRIGATE_TECHLIGHT" (optional)
NameStringID "IDS_FRIGATE_FOURTHLIGHT_NAME"
DescriptionStringID "IDS_FRIGATE_FOURTHLIGHT_DESCRIPTION"
counterDescriptionStringID "IDS_COUNTERDESC_FRIGATE_FOURTH"

basePrice
credits 300.000000
metal 55.000000
crystal 0.000000
slotCount 5.000000
BuildTime 24.000000
hasLevels FALSE
ExperiencePointsForDestroying 30.000000
MaxHullPoints 600.000000
MaxShieldPoints 350.000000
HullPointRestoreRate 1.000000
ShieldPointRestoreRate 1.000000
BaseArmorPoints 2.000000
maxMitigation 0.6
Prerequisites
NumResearchPrerequisites 0
numRandomDebrisLarge 0
numRandomDebrisSmall 5
numSpecificDebris 0
armorType "Medium"
hudIcon "HUDICON_FRIGATE_TECHLIGHT"
smallHudIcon "HUDICONSMALL_FRIGATE_TECHLIGHT" (optional)
infoCardIcon "INFOCARDICON_FRIGATE_TECHLIGHT" (optional)
minZoomDistanceMult 1.500000
NumWeapons 1
Weapon
WeaponType "Projectile"
damageEnums
AttackType "ANTIHEAVY"
DamageAffectType "AFFECTS_SHIELDS_AND_HULL"
DamageApplyType "BACKLOADED"
DamageType "ENERGY"
WeaponClassType "LASERTECH"
DamagePerBank:FRONT 52.250000
DamagePerBank:BACK 0.000000
DamagePerBank:LEFT 0.000000
DamagePerBank:RIGHT 0.000000
Range 3500.000000
PreBuffCooldownTime 5.500000
CanFireAtFighter FALSE
SynchronizedTargeting TRUE
PointStaggerDelay 0.300000
TravelSpeed 4000.000000
Duration 0.000000
WeaponEffects
weaponType "Projectile"
burstCount 4
burstDelay 0.250000
muzzleEffectName "Weapon_TechCapitalLaserLight_Muzzle"
muzzleSoundMinRespawnTime 0.400000
muzzleSounds
soundCount 3
sound "WEAPON_TECHCAPITALLASERLIGHT_MUZZLE"
sound "WEAPON_TECHCAPITALLASERLIGHT_MUZZLE_ALT1"
sound "WEAPON_TECHCAPITALLASERLIGHT_MUZZLE_ALT2"
hitEffectName "Weapon_TechCapitalLaserLight_Hit"
hitHullEffectSounds
soundCount 1
sound "WEAPONIMPACT_ENERGYLIGHT_HITHULL"
hitShieldsEffectSounds
soundCount 1
sound "WEAPONIMPACT_GENERICLIGHT_HITSHIELDS"
projectileTravelEffectName "Weapon_TechCapitalLaserLight_Travel"
m_weaponIndexForRange 0
hasWeaponLevels FALSE
mass 2000.000000
ShieldMeshName "Shield_FrigateTechLight"
maxAccelerationLinear 200.000000
maxAccelerationStrafe 10.000000
maxDecelerationLinear 500.000000
maxAccelerationAngular 3.300000
maxDecelerationAngular 9.999996
maxSpeedLinear 800.000000
squadTypeEntityDef:0 ""
squadAntiMatterCost:0 0.000000
squadTypeEntityDef:1 ""
squadAntiMatterCost:1 0.000000
maxNumCommandPoints 0
NumSoundsFor:ONATTACKORDERISSUED 3
SoundID "FRIGATE_TECHLIGHT_ONATTACKORDERISSUED_0"
SoundID "FRIGATE_TECHLIGHT_ONATTACKORDERISSUED_1"
SoundID "FRIGATE_TECHLIGHT_ONATTACKORDERISSUED_2"
NumSoundsFor:ONCREATION 1
SoundID "FRIGATE_TECHLIGHT_ONCREATION"
NumSoundsFor:ONGENERALORDERISSUED 3
SoundID "FRIGATE_TECHLIGHT_ONGENERALORDERISSUED_0"
SoundID "FRIGATE_TECHLIGHT_ONGENERALORDERISSUED_1"
SoundID "FRIGATE_TECHLIGHT_ONGENERALORDERISSUED_2"
NumSoundsFor:ONSELECTED 3
SoundID "FRIGATE_TECHLIGHT_ONSELECTED_0"
SoundID "FRIGATE_TECHLIGHT_ONSELECTED_1"
SoundID "FRIGATE_TECHLIGHT_ONSELECTED_2"
NumSoundsFor:ONSTARTPHASEJUMP 1
SoundID "FRIGATE_TECHLIGHT_ONSTARTPHASEJUMP_0"
MeshName "Frigate_FourthLight"
ExhaustParticleSystemName "Exhaust_FrigateFourthLight"

ExplosionName "Frigate0"
HyperspaceChargingSoundID "HYPERSPACE_CHARGEUP"
HyperspaceTravelSoundID "HYPERSPACE_TRAVEL"
EngineSoundID "ENGINE_TECHCAPITALSHIP"
ability:0 "AbilitySabotageAntiMatter"
ability:1 ""
ability:2 ""
ability:3 ""
MaxAntiMatter 200.000000
AntiMatterRestoreRate 0.500000
cargoType "Invalid"
maxCargoCapacity 0.000000
formationRank 0
minShadow 0.100000
maxShadow 0.800000


(Common)
PlayerFourth.entity

frigateInfo
Page:0
count 7 Changed
entityDefName "FrigateTechScout"
entityDefName "FrigateTechLight"
entityDefName "FrigateTechLongRange"
entityDefName "FrigateTechSiege"
entityDefName "FrigateTechAntiFighter"
entityDefName "FrigateTechColony"
entityDefName "FrigateFourthLight " Changed
Page:1
count 4
entityDefName "FrigateTechCarrier"
entityDefName "FrigateTechUtility1"
entityDefName "FrigateTechUtility0"
entityDefName "FrigateTechHeavy"
NotOnPage
count 3
entityDefName "FrigateTechModuleConstructor"
entityDefName "FrigateTechTradeShip"
entityDefName "FrigateTechRefineryShip"





(Common)
English.string

Add 1 to numstrings at top of file

StringInfo
ID "IDS_FRIGATE_FOURTHLIGHT_NAME"
Value "NeoBolt Light Frigate"

StringInfo
ID "IDS_FRIGATE_FOURTHLIGHT_DESCRIPTION"
Value "A workhorse combat frigate that can be upgraded to efficiently defeat other ships with abilities."

StringInfo
ID "IDS_COUNTERDESC_FRIGATE_FOURTH"
Value "Strong vs. antifighter frigates, siege frigates, carrier cruisers and utility cruisers."




(Common)
GalaxyScenario.Def

Add 1 to planetItemTypeCount

planetItemType
designName "Tech:Frigate:Light"
entityDefName "FrigateFourthLight"
Reply #9 Top
Just do things one at a time and check each time. Copy the file over, add it to the build menu. Check. Add the string(s), hook them up in the ship's entity file. Check. And so on.
Reply #10 Top
Where is that where you edit ships?
Reply #11 Top
Where is that where you edit ships?
End of quote


In the gameinfo folder under the ship.entite files
Reply #12 Top
DarkStar, (on above coded section) I've done roughly the same things to the same file, so it should work, unless you don't have the new Mesh name or Particle system name in the right Mod directory, or something like that.

Otherwise, you added all the right things to the right places...

(I agree with Carbon16 that things must be done slowly, and checked often, and being willing to start over (on the file) every time until it works, even if that sounds crazy)

Once I moved the RaceLogos file from the standard Sins directory, and finally had to reinstall because I couldn't find where I put it, oops :NOTSURE:
Reply #13 Top
DarkStar, (on above coded section) I've done roughly the same things to the same file, so it should work, unless you don't have the new Mesh name or Particle system name in the right Mod directory, or something like that.
End of quote


Yea i got it to work now, missed a enter on on line oops :NOTSURE: 

DarkStar