How to make encounters
-
Well, just as it is, I´ve made a system, a base, a jumpgate, a second base, a route from base 1 to 2, a sun, a lightsource etc. But the system is is still…. Quite dead. This is due to no npcs in it at all and me not knowing how to make a (random) encounter. Can anyone tell me how to do this? ???
-
What you need to use are Zones. Here’s a commented example:
[zone] nickname = Zone_Li04_North_Dallas_debris_field ;Pretty straightforward ids_name = 261222 ;If you want your zone named (usually for a nebula/asteroid field), put the IDS Name... pos = -2405, 0, -53463 :Also pretty logical shape = ELLIPSOID ;This can be SPHERE or BOX, and maybe CYLINDER, I'd have to check size = 20000, 10000, 30000 ;Size parameters: SPHERE only has radius and BOX has the same. property_flags = 129 ;This has to do with the appearance of the field on the navmap. For most zones, it should be left blank (again usually only put for nebulae/asteroid fields) ids_info = 66047 ;Related to ids_name spacedust = debrisdust ;Space dust you want in the zone, those are the little particles you see floating around. You don't have to put any. spacedust_maxparticles = 100 ;Maximum number of particles to float around in your zone. visit = 36 ;This is used for nebulae/asteroid fields. Most zones should be either 0 or 128 (128 makes the zone invisible on the navmap, while 0 makes so you need to find it before it shows up) comment = North field ;Comments: no purpose other than to comment! sort = 12 Music = zone_field_debris ;Music, if you want a special one in your zone (otherwise system defaults apply) toughness = 19 ;This probably has to do with NPC levels, but I've never seen it affect anything in the game density = 8 ;Maximum number of NPCs that can be spawned in the same area (say, around a player). Note if players do not see eachother while being in the same zone, they will each have a cap of 8, making the zone hold 16 NPCs. repop_time = 10 ;Time to repopulate the zone. Shorter is faster. max_battle_size = 6 ;Self-explaining. pop_type = lootable_field ;There are many different choices here and I believe it affects how NPCs behave. You might however have to dig through the files to find the specific pop_type that would suit you best. relief_time = 20 ;This is also related to repopulation timing, but I don't know precisely how. Usually show be close to your repop_time value. population_additive = false ;Always false. While I never tweaked it, I guess it has to do with the density being global or local (see the density comment) faction_weight = gd_bh_grp, 10 ;This is where it gets interesting. Each faction_weight line lets you define how much "weight", or influence we could say, the faction has in the field. It seems to be proportional, so it can be 1000 or 10, it's all about ratios. faction_weight = fc_j_grp, 10 faction_weight = fc_lr_grp, 10 encounter = area_assault, 10, 0.2000000 ;This is the core of the encounters system. You first put this line, which states three things: encounter type, NPC level, chance for it to happen, usually seen as percentages. Those do not have to total 100%. faction = gd_bh_grp, 1.000000 ;Relates to the preceding encounter line and specifies which faction(s) spawn with the set encounter. First parameter is faction nickname, second is percentage. Those MUST equal 100% (or 1.0). To add multiple factions to the same encounter type, put more faction lines. encounter = area_defend, 10, 0.3500000 faction = fc_j_grp, 0.34 faction = fc_lr_grp, 0.33 faction = fc_ou_grp, 0.33
Now, the little particularity is that you have to define all the encounter types BEFORE you use them in your system’s file. Here’s an example:
[EncounterParameters] nickname = area_assault filename = missions\encounters\area_assault.ini [EncounterParameters] nickname = area_defend filename = missions\encounters\area_defend.ini [EncounterParameters] nickname = area_scout filename = missions\encounters\area_scout.ini
This was taken from the same file as the previous block of code. You need to define each encounter type you use and point it to the good file. You can use anything as a nickname, but remember to refer to it properly in your zones! You usually find those at the beginning of the file, nearby the asteroid fields and nebulae definitions.
Hope this helps!