Capship Encounters - level 19 only?
-
Adding capship encounters can be considered an old and familiar subject, yet it’s still giving me some puzzles…
I managed to do this some years ago, in my previous modding life, but I can remember that back then, I had to make all the capships level 19!
And level 19 they also are in this tutorial.
Of course I don’t just want level 19 capships - I want them on every level! So, I worked from the tutorial but made a bunch of NPC-ships stretching from 1-19 (and of course made all the accompanying stuff: loadouts etc.), like:
npc_ship = Liberty_Cruiser_d1-3 npc_ship = Liberty_Cruiser_d4-6 npc_ship = Liberty_Cruiser_d7-9 npc_ship = Liberty_Cruiser_d10-12 npc_ship = Liberty_Cruiser_d13-15 npc_ship = Liberty_Cruiser_d16-18 npc_ship = Liberty_Cruiser_d19 npc_ship = Liberty_Battleship_d1-3 npc_ship = Liberty_Battleship_d4-6 npc_ship = Liberty_Battleship_d7-9 npc_ship = Liberty_Battleship_d10-12 npc_ship = Liberty_Battleship_d13-15 npc_ship = Liberty_Battleship_d16-18 npc_ship = Liberty_Battleship_d19
I’m not getting errors - but they just won’t spawn.
[zone] nickname = Zone_Li07_pop_Bismarck pos = -63000, 100, -90000 shape = SPHERE size = 8000 property_flags = 131072 visit = 128 sort = 8 toughness = 3 density = 20 repop_time = 20 max_battle_size = 4 pop_type = extend_law relief_time = 30 faction_weight = li_n_grp, 25 encounter = area_scout, 3, 0.025000 faction = li_n_grp, 1.000000 encounter = area_defend, 3, 0.025000 faction = li_n_grp, 1.000000 encounter = capitalships_Liberty, 3, 1.000000 faction = li_n_grp, 1.000000 encounter = capitalships_Escorts, 3, 1.000000 faction = li_n_grp, 1.000000 ```The only encounters I'm having is with the scouts and/or defenders :( Is there a reason why capships should only be level 19? Or am I just overseeing something here?
-
encounter = area_scout, 3, 0.025000 <–----------------here
faction = li_n_grp, 1.000000
encounter = area_defend, 3, 0.025000
faction = li_n_grp, 1.000000
encounter = capitalships_Liberty, 3, 1.000000
faction = li_n_grp, 1.000000
encounter = capitalships_Escorts, 3, 1.000000
faction = li_n_grp, 1.000000The value I’ve marked “here” from what i recall must not add up to more than 1.0 for all encounters in a zone. Yours add up to 2.05 which is no good.
Change it to this and see what happens.
encounter = area_scout, 3, 0.250000
faction = li_n_grp, 1.000000
encounter = area_defend, 3, 0.250000
faction = li_n_grp, 1.000000
encounter = capitalships_Liberty, 3, 0.250000
faction = li_n_grp, 1.000000
encounter = capitalships_Escorts, 3, 0.250000
faction = li_n_grp, 1.000000Obviously need to ballance them out depending on which encounter you want to spawn more than others.
-
@ Timmy51m: thanx for the feedback! It didn’t help though
I used to take good care of this number, but I can remember I read something here on the forum (a post by Adoxa or some other sage who can look into the game engine) that it doesn’t really matter if the total exceeds 1, as the occurance of a given encounter is calculated from the totail. So, you can have 0.5, 0.5, 0.5 and 0.75, and the last one will occur 1.5 times more than the other ones. At least, this is what was suggested, and it kinda ‘desensitized’ me to this parameter.
Anyway, it didn’t help, but it’s good to stick to safe parameters when debugging, so thanx nonetheless!
What I haven’t done, but should have before opening this thread, is try to ‘summon’ the lvl 19 encounter from the files as I modified them. If the capships show up, then there must indeed be some lvl-19-only mechanism at work, but if they don’t, I simply screwed up something.
-
The level 19 version does actually work! So, I guess my file setup is correct.
Would this mean there’s indeed some in-game mechanism preventing lower-than-level-19 capships from spawning??
EDIT: no, lower levels work too.
I guess Timmy51m’s feedback might have been conclusive anyway - I just might have forgotten to close down and restart FLMM (all my files are XML, and FLMM seems to read them all on startup, so just deactivating a mod, then editing the file, then activating the mod again will not make the edit visible - as the new version of the file is not in FLMM’s memory. Otherwise, I’m at a loss)
-
I think he’s good, just didn’t restart FLMM after making the changes. Caught me out once or twice way back when too.
-
Level 19 isn’t the magic number here, you can certainly have encounters with higher numbers, seen them up to L25 in some mods.
Important thing to amend is not just in npcships.ini but in NpcRankToDiff.ini. You need to add in extra lines for the ranks from 20 to 25. This will then enable ranks and difficulty up to 25 for example
Something like this,
NpcRank = 20, 3.840020, 10.168800, 22.090799, 31.811001, 38.571301, 59.610199, 85.207497
NpcRank = 21, 5.256610, 10.168800, 22.090799, 38.571301, 59.610199, 85.207497
NpcRank = 22, 7.195770, 10.168800, 22.090799, 38.571301, 59.610199, 85.207497
NpcRank = 23, 9.850290, 10.168800, 22.090799, 38.571301, 59.610199, 85.207497
NpcRank = 24, 13.484000, 10.168800, 22.090799, 38.571301, 59.610199, 85.207497
NpcRank = 25, 18.458300, 10.168800, 22.090799, 38.571301, 59.610199, 85.207497, 99.235000 -
@ Chips & Timmy51m: Issue solved, thx!
@ Goulash: good stuff!! Not for right now, but Im sure I will find this on my way.