PDA

View Full Version : New Races Mod


radioonfire
04-20-2013, 10:00 PM
I'm working on creating some new races for the game for variety's sake. Each existing race has a line like the following:
CrestName RaceHumanRebels.tga
However, no such texture seems to exist. When I'm looking in the asset files I can't find a .ctx file with this name, and no .tga is generated from buildTgas with this name either. Is this being used in the game at this point? Strangely it doesn't even have a path associated with it unlike the normal race logo and race portrait parms.
Also, will the game automatically include my race(s) in the possible races in a sector as long as CanStart is set to 1?
PS: I'm trying to create several races at this point, so if someone has an idea they want me to include just let me know. You can tell me the name or else tell me all about it and give me art and so on. Because I'm not a modeller all ships will come from what's already in the game unless someone else provides them.

PixelLord
04-21-2013, 02:30 PM
The actual textures for the races can be found in Textures/Icons/Races

But, in this case, the textures are called by a shader which specifies the name that you found (RaceHumanRebels) in icons.sdr

Even if the .tga were dropped from the CrestName (above) so that it was RaceHumanRebels instead of RaceHumanRebels.tga, it would still work because it's a shader. The engine checks a texture's name against the shader files first and stops looking if it finds the name there. If it doesn't find the the name there, it looks elsewhere. So shader names always are first priority.

Anytime you can't locate an actual tga/ctx texture by a specific name, check the appropriate shader file that may be calling a texture or textures and performing some passes on them.

Here's the code in icons.sdr

RaceHumanRebels
{
cull none
sort transparent
useMipMaps 0

{
texture Textures/Icons/Races/Human-R.tga
blendFunc SrcAlpha OneMinusSrcAlpha
colorGen CodeGenerated
alphaGen CodeGenerated
}
}


All that just to add transparency using the alpha channel.

Tyrax Lightning
04-21-2013, 02:42 PM
PS: I'm trying to create several races at this point, so if someone has an idea they want me to include just let me know. You can tell me the name or else tell me all about it and give me art and so on. Because I'm not a modeller all ships will come from what's already in the game unless someone else provides them.
My fav Subrace outta the ones known is the Clones! (Subrace of the Drakk) I would love to be able to play as one of them, even if it'll be hellishly hard to find good Clone Crewmembers to occupy the Racial Clone Crew Slot... :D

Although the Drakk are my fav Main Race, I think the Clones do a better job of looking like Dragons then the Drakk, though the Drakk have a better Dragon Race coloring. :p (Though Blue Clones would look best of all & pwn all in this regard! :cool:)

radioonfire
04-21-2013, 03:25 PM
My fav Subrace outta the ones known is the Clones! (Subrace of the Drakk) I would love to be able to play as one of them, even if it'll be hellishly hard to find good Clone Crewmembers to occupy the Racial Clone Crew Slot... :D

Although the Drakk are my fav Main Race, I think the Clones do a better job of looking like Dragons then the Drakk, though the Drakk have a better Dragon Race coloring. :p (Though Blue Clones would look best of all & pwn all in this regard! :cool:)

I might have been a bit unclear in this. Races available for the player are considered classes, whereas races available as NPCs are covenants. In fact, crew are actually completely separate from both of these. For now I'm just creating new covenants. I think creating new classes is also a good idea, but that's not this mod. I might create crew for the new covenants if I can figure out the recruit missions.

Thanks to Pixellord for pointing me toward the shader files. I'll check it out.

Tyrax Lightning
04-21-2013, 05:17 PM
Ahh, in that case, i've pondered how interesting it would be if there was a Race that specialized in Unity & Teamwork, thus causing them to have their Racial Light Slot be a 2nd Crew Slot... :D (What their Racial Medium Slot would be to go with it, I haven't been able to decide though...)

radioonfire
04-22-2013, 03:24 PM
Status effects often have a GroupName parm, like this:
GroupName Mutants
I assume this affects status effect stacking (so that for example you couldn't hit someone with an EMP then an EM Burst and have double the effects). However, these group names aren't strings, and there doesn't seem to be anywhere that they're defined as objects. Am I able to create a new group? And if so, how?

I am creating a new race, and so I'm creating a new subrace along with the group of quests to enable it. Part of the quest for subrace revolt is to have a planetary status effect related to whatever is revolting, so I'm just trying to create that status effect without having issues with the existing effects.

Thanks for the help and the excellent game!

Shadow
04-23-2013, 06:11 PM
Status effects often have a GroupName parm, like this:
GroupName Mutants
I assume this affects status effect stacking (so that for example you couldn't hit someone with an EMP then an EM Burst and have double the effects). However, these group names aren't strings, and there doesn't seem to be anywhere that they're defined as objects. Am I able to create a new group? And if so, how?

The name really is a string and can be whatever you want. You don't need to define it anywhere.

GroupName basically works with the parm EffectType to determine how many can stack or what to do when there is more than one.

EffectType can be Normal, Combine, MaxCount, OnePerInflicter, OnlyOne, OnlyOneExact, OnlyOneKeepOld, OnlyOneKeepOldResetTime, or Cancel.

radioonfire
04-23-2013, 07:03 PM
The name really is a string and can be whatever you want. You don't need to define it anywhere.

GroupName basically works with the parm EffectType to determine how many can stack or what to do when there is more than one.

EffectType can be Normal, Combine, MaxCount, OnePerInflicter, OnlyOne, OnlyOneExact, OnlyOneKeepOld, OnlyOneKeepOldResetTime, or Cancel.
That is excellent news. I have almost everything else mapped out, and the Database files are more or less complete. I have one question about quest text. The quests.trn has text for variables that don't show up in the quests.gdb file as follows:
QuestAnnounceNeededItemCyborgsFromQuestNeededItemR ebellion "Cyborgs were created to help in Rebellion on ##1##, too bad they rebelled!"
Obviously this parm is composed of QuestAnnounceNeededItemCyborgs (which is a real string that is called in quests.gdb) and QuestNeededItemRebellion which is another quest. My question is whether I am missing someplace where this string is used or whether the game is automatically concatenating that name from the quests it has access to. For example, I am creating is a new subrace quest group for a new race, so my quest is QuestNeededItemNewSubrace. This quest can also be instantiated from the quest QuestNeededItemRebellion, so if I just define QuestAnnounceNeededItemNewSubraceFromQuestNeededIt emRebellion will the game look for that string correctly?

EDIT: 2 follow-up questions. First, does RaceDescDrakkShared (and similar for other races) get referenced somewhere? Unlike, for example, RaceDescDrakk it is not used in the race definition. Second, RaceNameRaceNameColor seems to involve special encoding like the following:
RaceNameDrakkColor "^c150Drakk^c145"
This seems like some kind of in-line color declaration (the c^145 is always the same and I assume is some kind of ending or reset to the color change). I'm not familiar with this system of declaring colors; is this like a decimal form of RGB?

Shadow
04-24-2013, 11:16 AM
QuestAnnounceNeededItemCyborgsFromQuestNeededItemR ebellion "Cyborgs were created to help in Rebellion on ##1##, too bad they rebelled!"
Obviously this parm is composed of QuestAnnounceNeededItemCyborgs (which is a real string that is called in quests.gdb) and QuestNeededItemRebellion which is another quest. My question is whether I am missing someplace where this string is used or whether the game is automatically concatenating that name from the quests it has access to. For example, I am creating is a new subrace quest group for a new race, so my quest is QuestNeededItemNewSubrace. This quest can also be instantiated from the quest QuestNeededItemRebellion, so if I just define QuestAnnounceNeededItemNewSubraceFromQuestNeededIt emRebellion will the game look for that string correctly?

EDIT: 2 follow-up questions. First, does RaceDescDrakkShared (and similar for other races) get referenced somewhere? Unlike, for example, RaceDescDrakk it is not used in the race definition. Second, RaceNameRaceNameColor seems to involve special encoding like the following:
RaceNameDrakkColor "^c150Drakk^c145"
This seems like some kind of in-line color declaration (the c^145 is always the same and I assume is some kind of ending or reset to the color change). I'm not familiar with this system of declaring colors; is this like a decimal form of RGB?

Short answer, yes it should work fine. Longer answer: Normally when the game announces a quest it will just use the announce text specified in the quest entry. However if that quest was started by another quest, it will use the line in the format AnnounceName + From + StartingQuestName if it exists.

RaceDescDrakkShared is used in RaceDescDrakkShort and RaceDescDrakk.

^c150 tells the system that all text after this is to use the 150th color. These colors are in text.txt in the SDK.

^c145 is a special code that tells the system to pop the last color off the stack (basically revert to the color before the current one).

radioonfire
04-24-2013, 01:12 PM
Short answer, yes it should work fine. Longer answer: Normally when the game announces a quest it will just use the announce text specified in the quest entry. However if that quest was started by another quest, it will use the line in the format AnnounceName + From + StartingQuestName if it exists.

RaceDescDrakkShared is used in RaceDescDrakkShort and RaceDescDrakk.

^c150 tells the system that all text after this is to use the 150th color. These colors are in text.txt in the SDK.

^c145 is a special code that tells the system to pop the last color off the stack (basically revert to the color before the current one).
Shadow, thanks so much for that help. I tried running the mod, and I'm getting an error before the game even starts that reads:
Couldn't find base RaceNewRace referenced in RaceNewRaceRebels
These are both defined in the same file with RaceNewRace being the first object in the file. I checked for spelling mistakes, open braces and so on but haven't found anything so far.
Here is the current file: https://www.dropbox.com/s/oeoboq7j71v2vh8/ModNewRaces.zip

Shadow
04-24-2013, 03:19 PM
Couldn't find base RaceNewRace referenced in RaceNewRaceRebels

There is something wrong with the file encoding or something. I copied and pasted all of the data from your race file to a new file and everything started working correctly.

radioonfire
04-24-2013, 05:54 PM
There is something wrong with the file encoding or something. I copied and pasted all of the data from your race file to a new file and everything started working correctly.
Awesome. Thanks so much. Switching to ANSI encoding worked like a charm. It looks like I've got a few bugs to work out, but I know the race is integrated properly. When I was exiting the game after testing it even spawned them for the main screen. Thanks, Shadow, for creating a great game and then providing awesome support to people who want to expand it.

FYI, the file at the link above is corrected and updated. It's not final yet, but you can install it and have it behave as expected.

Tyrax Lightning
04-24-2013, 09:07 PM
What Races does this Mod currently provide? :)

radioonfire
04-24-2013, 09:50 PM
What Races does this Mod currently provide? :)
Right now it has only one race called the Chorizo. It has now been updated to add alpha transparency to the race icons and portraits.

I have plans for two more races at this point, but they aren't included here. I wanted to make sure I had one race working and then apply that knowledge to knocking out the others.

If you want to help test, here's what I haven't been able to test so far:

Rebel and subrace load correctly, but I haven't seen them in game yet
No crew seen so far, but they should spawn as loot or in response to the crew recruit mission
No derelict freighters so far