NPC Race (support for other mods)

In my tradition of doing things to support other mods rather than working on my own (I have a strange form of laziness it seems), I’m creating this thread for setting up a generic NPC race mod. This race will allow the use of “hidden” special ships for scenarios that require them. Modules can already be hidden via an attribute in their textfile.

There are potentially a couple of problems with this:

  • All hidden ships will need to use the same shield texture.
  • All hidden ships will need to use the same crew names in messages.

I’m assuming that the music won’t be used if only a single ship of this race is present in a scenario (probably best not to make it the first ship listed, just in case).

Below is an example of how the race file could look.

[code][config]
name = “npc”
guiname = “NPC (Hidden ships)”
logo = “npc.jpg”
debrisstartuv = 64
debrisenduv = 96
escapepodid = 1
shield = “alliance_shield.dds”
description = “These are special ships intended for use as enemies in scenarios and such. Nothing to see here, move along.”
repairbotid = 0
contrailid = 0
music = alliance_battle.ogg
shieldcollapseuv = 0
defaultnames = gratuitous
guiid = 2
lockable = 1
unlockcost = 999999999
unlock_texture = “Alliance Alligator Cruiser.dds”

[turrets]
turret_auto_v1 = alliance_turret_auto.dds,turrets_alliance.dds,0
turret_auto_v2 = alliance_turret_auto.dds,turrets_alliance.dds,0
turret_auto_v3 = alliance_turret_auto.dds,turrets_alliance.dds,0
turret_auto_v4 = alliance_turret_auto.dds,turrets_alliance.dds,0
turret_auto_v5 = alliance_turret_auto.dds,turrets_alliance.dds,0
turret_auto_v6 = alliance_turret_auto.dds,turrets_alliance.dds,0
turret_bull_v1 = alliance_turret_gun.dds,turrets_alliance.dds,8
turret_bull_v2 = alliance_turret_gun.dds,turrets_alliance.dds,8
turret_bull_v3 = alliance_turret_gun.dds,turrets_alliance.dds,8
turret_bull_v4 = alliance_turret_gun.dds,turrets_alliance.dds,8
turret_las_v1 = alliance_turret_energy1.dds,turrets_alliance.dds,1
turret_las_v2 = alliance_turret_energy2.dds,turrets_alliance.dds,2
turret_las_v3 = alliance_turret_energy3.dds,turrets_alliance.dds,3
turret_las_v4 = alliance_turret_energy4.dds,turrets_alliance.dds,4
turret_las_v5 = alliance_turret_energy5.dds,turrets_alliance.dds,5
turret_miss_v1 = alliance_turret_missile.dds,turrets_alliance.dds,9
turret_miss_v2 = alliance_turret_missile.dds,turrets_alliance.dds,9
turret_miss_v3 = alliance_turret_missile.dds,turrets_alliance.dds,9
turret_miss_v4 = alliance_turret_missile.dds,turrets_alliance.dds,9
turret_miss_v5 = alliance_turret_missile.dds,turrets_alliance.dds,9
turret_pd_v1 = alliance_turret_pd1.dds,turrets_alliance.dds,10
turret_pd_v2 = alliance_turret_pd1.dds,turrets_alliance.dds,10
tractor_turret_v1 = tractor_turret_v1.dds,turrets_alliance.dds,27
tractor_turret_v2 = tractor_turret_v2.dds,turrets_alliance.dds,29
turret_plasma_v1 = plasma_turret_v1.dds,turrets_alliance.dds,24
turret_plasma_v2 = plasma_turret_v2.dds,turrets_alliance.dds,25
turret_plasma_v3 = plasma_turret_v3.dds,turrets_alliance.dds,26
turret_plasma_v4 = plasma_turret_v4.dds,turrets_alliance.dds,28
turret_ecm_v1 = alliance_turret_ecm_v1.dds,turrets_alliance.dds,31

[victory_messages]
0 = “How did you see this message? Stop cheating!”

[defeat_messages]
1 = “How did you see this message? Stop cheating!”

[crew]
0 = “Kemp”
[/code]

Yep, then in my opinion every one that wants his own npc, just download the lastest race.txt, edit it and INMEDIATELY upload the updated race.txt to this post as reply, do all of that so fast as you can, so we can avoid any problem.
The objetive of this is avoid the repetition of unusable NPC races.
I suggest to vote what shield and what music should we use for the NPC race, how? well, “immediate music” can be a good source of musics for the race, same with “DragonstarDT” in youtube.

actually, as far as i know, you can put any sield texture etc. you want. if you make a scenario and put the enemy race to federation it will use federation shields. nomather what ship. or atleast i think so…

The shields are linked to the race, so every ship that belongs to the “npc” race will have the same shields.

Any idea on how to make the race not to be selectable on the selection race screen?? maybe touching the “quiid” value or something?

To be honest, it’d probably be better to post what changes you need and I’ll update the race file and give it a new version number (based on date probably as “versions” wouldn’t mean too much here really). In this way we avoid the possibility of people trying to make conflicting changes. To be honest, there shouldn’t be many changes needed, as (to my knowledge) the turrets list is useless given the new style of handling turrets in the module files and there isn’t much else that should be specific to a mod.

Has anyone actually tested this with the following setup:

  • Scenario for race X.
  • Ships from race X.
  • A single ship from race Y.

I’d be interested to hear about the results with regard to music/shields/etc. Try it a couple of times in case the music is randomly selected from the available ones.

Tested with negative values and non-numeric values, both still give it a position in the list. It may be that the best we can do is to make sure it’s at the end of the list away from the others.

What a coincidence… a couple of weeks ago I had the idea of adding modified NPC ships as objetives for my scenario pack but I ditched the idea temporaly because that pack was designed with the idea to add mod free scenarios.

Tested it adding a rogue Rebel ship in a Federation only map of mine.

Shields used depend to whatever race each ship belongs. The rebel used his own shield color while feds were all blue.

Music depends on the [size=120]first[/size] ship written in the deployment code. That means you can get a different music for each difficulty level.

The tests for music went this way, 5-6 tries each time to assure it wasn’t random (1 Rebel ship vs 12 Fed ships in that deployment):
I placed the Rebel in first place in the deployment file, Rebel music.
Put a Federation ship above it, Fed music.
Put the Rebel at the end, Fed music again.

Still alive

I am a little confused, so ¿its possible in any way to have multiple music files for 1 race?? as far as i know the music file is attached to the race indicated in the scenario file, i am wrong??

You can only have one music file per race but the music picked when playing a scenario doesn’t depend in what race you have typed in the scenario files, it entirely depends on which race is the first ship the enemy deploys. At least that seems to be the case in my tests.

OMG :open_mouth:
[size=50]You are not a clever zombie right? xD[/size]

I’m encouraged that the concept of a semi-hidden NPC race for threat forces is being taken seriously.

Yay, pretty happy here ^^

This would be quite helpful I think for my zombies :smiley:

the music… feature could be used to make a race for each scenario who’s battle music has a bit of information about the battle in a computer voice at the start. Then put a ship belonging to that race (it could be an experimental ship or a normal one or a ship that needs different shields or something). In fact, this made me think about the possibility of something for a mod (Uni-T comes to mind) that w=has a message at the beginning of the music (“You are trash. You must be cleaned.” Or something similar to it for Uni-T).

The problem of that is that the music is reproduced as infinite loop, then you will hear that several times… I had that idea some months ago, but didn’t tried anything for that problem. But you can add some Sintetized-like voice with a suspense/terror style sometimes in the music adding more fear feeling to the battles, therefore more exciting battles.

Thats exactly wat i wanted to do in my Borg mod, (u know the CLASSIC “greetings” message that the borg always say to their victims -.-) but unfortunately it cant be done… instead, i just picked a relative long song and i “added” the borg advise at the beginning, but as praetors says, u will hear the initial message everytime the song ends. Thats the reason to pick the longer song possible.

And thats another sugesstion i did 1 year ago in the sugesstion thread… xD.

What you need to do, Make the message you want put it first, then copy paste the song in till you have at lest an hour. Must be done inside a audio editing program but it may also have a HUGE file once finished.

A short audio detour away from the thread topic…

Fixed that for you.

Remember: Cliffki’s got this whole game structured to run on very lean-and-mean code.

An hour-long .ogg file is going to be very big when compared to the average file sizes of the game’s existing music – make no mistake about that!

There are limits to even what Ogg Vorbis compression can do to shrink audiofiles’ size downwards. Too big of a file may cause problems with your game. It may run afoul of error traps which could be set to discard audio input above a certain filesize as being (from the game’s point of view) “invalid data”. After all, I doubt that Cliffski’s program is expecting to have to deal with, for example, 50MB (or larger!) audio files; the biggest of them are less than one-tenth that size. It might be able to make them work, but it might not be able to make them work reliably.

Of course, we definitely want them to be handled reliably. Bad music or other audio in a game is pure fail that breaks the experience.

At the other extreme, even if you do use an aggresively strong level of compression the resulting audio quality will now suffer from clipping as well as other artifacts, making it sound somewhere between “mediocre” at best and “quite bad” at worst.

I’m not saying that you shouldn’t experiment. Just have a care what sort of risks you’re taking.

I now return you to the NPC Race discussion (already in progress!). :slight_smile:

you said that the music is based on the first ship in the scenario txt? thats good if i just want to have an uber ship of for instance the deserter mod. i could just put another ship first, that is normal, and the uber dread second. that way i could keep the deserter music, while having a npc ship in the scenario.

i dont think ill use this mod as npc ships for the deserters though… ill just put a really high unlock cost for the ships i want to keep away from the player. that way it could work sort of like cheats. expensive cheats that almost no one will use…

LOL, no i dont want 1 hour of music, i just want about 6-8 minutes of song, and then to hear again the greetings message. And yes, i already did that on the borg mod (i wasnt talking about wat i wanted, i already did xD).

Anyways 1 hour its impossible. The resources u will need to manage 1 hour sound file will be epic.

another thing this npc race could be used for is “under construction ships” for scenarios where you are attacking an enemy shipyard.