Ahh brilliant! I’ve suffered this exact issue and I’m so glad to see it fixed. Thank you!
Beagle
Posts
-
-
Freelancer’s anti-missile countermeasures don’t seem to work in the intuitive way their numerical stats suggest. I’m looking for help from someone who can decipher the actual technical implementation of CMs under the hood, and can tell me what’s actually going on.
More explanation below:Countermeasures have Effectiveness, Lifetime and Range stats. These are in the equipment .inis as the params diversion_pctg, lifetime and range respectively. However, the Effectiveness stat doesn’t actually seem like it’s making my CMs any more effective at getting rid of missiles. In fact, the primary difference that seems to change that is where I am positionally and distance-wise in comparison to the missile, not the Effectiveness stat itself.
Here’s what I’ve experienced about CMs over the past few years of making a mod:
- You can flare multiple missiles onto the same CM drop, or have successive CMs bait missiles that ignored previous drops, even previously successful drops that baited other missiles first. This makes me believe every missile rolls its own independent chance to be baited for each CM that’s dropped.
- There seems to be a diminishing return for CM effectiveness, because if the missile doesn’t get baited in the first 6 or so CMs, it seems very unlikely for them to ever get baited even if you drop another fifty after that.
- Positioning seems to make a large difference in CM effectiveness. If I’m 7KM away and facing head on, I’m reliably able to spoof missiles with just a few CM drops. If I’m at close range and running away in a dogfight, even ten CMs rarely gets the same missiles off my tail.
- Effectiveness % does not seem to have a significant impact on making CMs actually more effective. To test this out, I started using flares literally set to 100% Effectiveness - I still couldn’t see an improvement in how many missiles I was able to bait off!
This has led me to a pretty confused and frustrated point when it comes to trying to balance missiles and CMs. Again, I’d really appreciate the help of anyone capable of digging in to the actual code of the game and telling me the literal, exact hows and whys of what’s really going on with these interactions, because the numbers I’ve set and the stats the game is telling me don’t seem to add up to the gameplay at all.
I’m not sure if this is the result of some stuff just being broken under the hood, or in the opposite way, if perhaps there’s far more advanced missile seeker vs. countermeasure interactions going on underneath that were an attempt to simulate the depth of such interactions in the real-world - that would certainly explain why position and direction seems to be having such an impact, as that is a massive part of how to defeat air-to-air missiles in real life.In any case nobody I’ve talked to has known what’s going on with it so I imagine whatever’s happening, it’s unrealised by most of us. Thanks to anyone who can shed some light on this. I appreciate it!
-
This is a thread to index all the freely available models made for Freelancer modding! Unless specified otherwise, treat them as if offered under a Creative Commons BY-NC-SA license, meaning:
You must credit the author properly (Like “Credits: Thanks to <author> for their <ship name> model” somewhere in your mod)
Any derivatives you make from them must be similarly shared (You can’t take these, mod them further, then not share your new versions in the same way)
You can’t make money off them (No selling them or using them in commercial projects without additional discussion with the authors)I aim to collect every ready-to-use model here whose author permits their shared use. This is an ongoing effort. If you want to share your models here, please let me know!
I’ll be starting with what we’ve created for our own mod while trying to contact other authors to ask them to join this list.Ship Models Index:
Junkers Fighter Line from RealMcDyson:
https://i.imgur.com/GapeSSH.png
https://www.mediafire.com/file/wp0zbtf1x8oanod/bm_ju_fighters.7z/fileScavenged Pirate Destroyer from RealMcDyson:
https://i.imgur.com/OHqXcOA.png
https://www.mediafire.com/file/cmh5a4lbw6xgast/pirate_destroyer.7z/file -
The 18 ship crash thing is good to know, thanks Skotty.
Adoxa, thank you again for putting the pin on this; I can say now after a week this seems a totally solved issue. Your formula and understanding is bang on target in every way I can confirm, and your offset for the spawning interval heartbeat has worked perfectly.
This has completely changed our mod overnight a thousand times for the better, and we now have perfect control over what spawns when and tons of room for nuance in the future. Thank you so much! It’s the difference between night and day, and I’m super grateful to you for helping us get there.
Just going to pop in the right google search words in case someone’s trying to search engine find this in the future - this is how Freelancer NPC spawning works!
-
Huh, so you reckon repop_time isn’t related to time at all, but is only a variable in the chance to spawn? That would explain why stuff seems so random - it’s literally always been a chance every 5 seconds, not a cooldown.
Thanks Adoxa, this is terrific to learn. I’ll try following your formula you’ve uncovered and see if things start doing what I’d expect.
Looking at what I have set up now, I can see that in a certain field in my mod, I have Density 16, Repop Time 420 - so without any enemies present, that would be 16 divided by 420 for 0.038 or a 3.8% chance for anything to spawn, every 5 seconds. Thinking about it, this makes a ton of sense why sometimes I get dry runs that seem to last forever, and other times, I just seem to luck out and get constant spawns.
Excellent investigating, thank you so much for saving my sanity here. Is there any way to adjust how often that chance pops? Make it roll every minute or two instead? EDIT: I see now that I can experiment with the Spacepop value you noted, I might try setting it to BELOW_NORMAL, NORMAL, HIGHEST so on and see what happens if anything.
Being able to adjust when the chance is rolled in any way would help smooth out this randomness a lot - having the chance be rolled every minute or thirty seconds, but a lot higher chance to spawn, for instance, would be a lot more reliable to balance with. Same as being able to adjust that per zone/encounter/whatever for different spawn rates, but that’s icing on the cake.
EDIT: Also, lol at the #17 at 17:17 - I’m same timezone as you so I saw it the same 8-)
-
Yeah sure thing, posting my encounter (bmod_area_fc_x_grp_scouts_1) and the zone (Cheyenne Asteroid Field in Colorado) below
Note we made our own custom fighter classes we’re using for ship_by_class so you’ll want to set those back to whatever vanilla fighter class instead
;Permutations of 1 enemies per spawn ;Perm 0, 1 MFs [EncounterFormation] ship_by_class = 1, 1, bmod_sc_heavy_fighters pilot_job = scout_job make_class = wanderer formation_by_class = fighters behavior = wander arrival = all, -tradelane, -object_jump_gate allow_simultaneous_creation = yes zone_creation_distance = 0 times_to_create = infinite [Creation] ;1-2 Enemy Cap ;Perm 0, 1-2 MFs permutation = 0, 1
[zone] nickname = Zone_Li03_Cheyenne_field ids_name = 261217 pos = 61910, 0, -39659 rotate = 0, 30, 0 shape = ELLIPSOID size = 17000, 10000, 30000 property_flags = 64 visit = 32 spacedust = asteroiddust spacedust_maxparticles = 50 ids_info = 65930 sort = 25 toughness = 10 density = 10 repop_time = 300 max_battle_size = 10 pop_type = lootable_field relief_time = 1200 encounter = bmod_area_fc_x_grp_scouts_1, 3, 1 faction = fc_x_grp, 1 Music = zone_field_asteroid_rock
Let me know if you’d have rather I just send you the files by the way instead of the relevant snippets
-
I’ve been testing this a bit this morning, removing all overlapping fields to try and just nail down some consistency on timings out of one field with a single encounter and a single permutation within that encounter whose weight is set to 1.
Initially, and at times, things seem to very much reflect what I’d expect with the new knowledge! For instance, with these settings,
density = 10
repop_time = 300
relief_time = 1200I was expecting an initial spawn to take about 30 seconds, and then reinforcement spawns during that fight to only come in at 120 second intervals. This is exactly what happened at first! I was super excited that the issue might have been cracked completely.
However after further testing there still seems to be things I’m not grasping. After leaving the fight, nothing else spawned for 5+ minutes after, and then after quick loading my SP save I was testing on I couldn’t get anything else to spawn at all for a similar amount of time before giving up.
Further, in a subsequent test I just lowered repop_time to = 1, expecting an instant initial spawn but then for the 1200 relief time to make those reinforcement intervals still be at 120 seconds. This was not the case, and more enemies spawned constantly, seeming to only be running off the repop time here.
I then tried the opposite - repop time left to 300, but relief time turned down to 1. Results got even less like what I expected here. Initial spawn was quick again, at about 20 seconds, but it then took around three minutes and 40 seconds (if I remember right) to spawn a reinforcement enemy. Trying to see if there would be consistency, I killed the initial enemy then stayed in the fight against the reinforcement for another three minutes and 40 seconds - another enemy spawned around this time, which makes the timing seem consistent!
However at that point, another enemy then spawned with seconds afterwards, and then another right after, and another, for a total of four. They seemed to stop spawning rapid fire at this point, but I exploded about 20 to 30 seconds after so I’m not sure what would’ve happened next.
My guess is that relief_time was not in effect until that moment they started rapid-fire spawning, but why? What made that moment when relief_time was called in to spawn things?So, while initial results seemed to play by the expected rules, things ended up feeling more random again in the end. I’m not sure if it really is some random element to the game, or if it’s just there’s still more math not being understood here - perhaps things are getting divided or multiplied by other things too? If all these values interact and multiply each other in unknown ways, it would make sense why the end results seem so inscrutable and random to me.
The questions I’m left with after this to test further are:
1: Why is it so hard to get consistent timings out of these parameters? Is there a random element designated somewhere else that we don’t know about, or is it just an intended part of these parameters that they’re averages or min and max boundaries rather than exact, static times?
2: What exactly decides when repop_time is in play vs. when relief_time is? Both seem to have their own effects on when an enemy is spawned, but it’s not as straightforward as I expect. Are the seemingly random results actually because the triggers for relief time and repop time to take effect are different to what I think, and are occurring at certain times and contexts in gameplay that I don’t know about?
3: What role does toughness and max_battle_size play in these questions, if any?
4: Are these parameters tracking their values persistently in between loading saves? Is my testing method of quick loading and flying back into the same area part of why these values seem to sometimes misbehave? Does the game need to be fully shut down and restarted to have a good next testing environment?
I’ll keep on testing these things and trying to nail down a controlled and consistent result, but if you Adoxa or anyone else can help figure out the answer to these as well and the knowledge needed to gain that consistency, I’d really appreciate it. I already feel like I’ve got a bit more control now understanding the division element at play with repop time, so that’s been a huge boon already, thanks so much for that.
-
Huh, now that’s very interesting - nice testing! I am indeed overlapping multiple area and patrol path encounters, and with the highest density set at 10, it makes sense that the respawn times are getting divided down to be really fast and unexpected to me.
You say it sums all the relief times together, do you mean both repop time and relief time or specifically just relief time? I’m going to have to do some testing of this on my own now and try and go further with understanding it. Thank you very much for putting me on the right track with this.
-
adoxa wrote:
[c]longevity[/c] is read, but haven’t checked if it’s used.There’s also [c]feeling_to_local[/c], all of which are read, but seemingly ignored - it checks for [c]group_reroll_frequency[/c] instead; [c]feeling_to_formation[/c] is processed (but again, unsure if it’s actually used) and definitely causes the others to be ignored.
Intersting, do you have any idea what group_reroll_frequency does? The name sounds as though it could be useful…
For the discussion at large, just to throw another wrench in the works of these guesses and tests, repop_time seems to be relative to density. That is, if you set repop_time to 1000, and your density is 10, encounters spawn slowly. If you still have repop on 1000, but then you set your density to 1000 as well, encounters spawn much much faster.
I haven’t been able to confirm anything but one guess of mine is that repop_time means something like “Time until the area has been repopulated up to the desired density”… however I haven’t been able to figure stuff out for sure which is why I came here hoping to figure it out.
Thanks for everyone who’s helping work this stuff out, I really just want to be able to spawn enemies at reliable intervals so my players don’t get overwhelmed too fast!! I’m hoping to get down to a real understanding of these parameters at some point…
-
Hello, I’m working on an MP mod that puts a high focus on PvE and an important part of that is controlling how AI ships spawn. While so far I think I have a pretty good grasp on how encounters and npcships and all the rest work, the parameters that are driving me mad are the ones in the system file; working in the Colorado system in my case, li03.ini.
Basically, my expectations going in about the fields density, repop_time, max_battle_size, relief_time and density_restriction all don’t seem to work the way I thought.
Specifically, I thought either repop_time or relief_time would be the amount of time in between spawn waves in seconds, but in practice that just doesn’t seem to be the case. Something as simple as having a zone have a large number of possible spawns but having each one be built up to very slowly over a long period of time seems all but impossible. Instead of being able to restrict the spawns to a slower pacing, the game just seems to shotgun them out quickly to fill up to the max density size as fast as possible.
The only reliable way to keep numbers down in the short-term seems to be to hard-cap the number of potential max spawns in the area to one or two, because if there’s the possibility to spawn more, the game seems to jump at the chance, ignoring repop_time and relief_time as time-based limiters on how often new enemies should spawn.I’d really appreciate any help or insight from people who’ve tackled this problem before or who understand how to dig under the hood and see what’s going on, because right now these parameters all seem totally vague to me!
What I want is basically:
- The designated area has the potential to spawn up to ten NPCs before it stops spawning NPCs at all
- The game only tries to spawn a set of NPCs at certain timed intervals, so lets say, every sixty seconds it performs a check for a chance to spawn another permutation of enemies from the encounter file.
- The game never tries to spawn NPCs faster than that timed interval, ensuring that players aren’t overwhelmed with too many spawns in a short amount of time, but still allowing the potential for many NPCs to show up eventually if the battle takes a long time.
What is currently occurring:
- The designated area has the potential to spawn up to ten NPCs before it stops spawning NPCs at all
- The game seems to spawn these NPCs whenever it feels like, seeming to mostly ignore what I’ve tried to set as time-restrictions in repop_time and relief_time, and just overwhelming the player with spawns too fast for comfort
- The parameters seem to have some but a vague and misunderstood effect to me, and I don’t really know how to fix what’s going on under the hood
Any knowledge or experience on this would be greatly appreciated! Or even just some way of knowing exactly what the parameters are meant to be doing…
density
repop_time
max_battle_size
relief_time
density_restriction
encounter = <encounter file=“”>, <level number=“”>, <chance to=“” spawn?=“”>All of these parameters seemed intuitive when I first started working with them, but quickly it seems like I don’t know how they really work.Thanks for any help!</chance></level></encounter>
-
Implemented this and it’s been a huge help, thanks again Adoxa. It seems to be doing what’s expected and the AI’s much less annoying now.
-
Yeah, the idea is to make them as human-like and competitive as possible first, and then scale back things like their accuracy and evasive abilities as needed to make easier versions for each area or mission difficulty.
Speaking of which:
adoxa wrote:
I think it’d take a plugin to make configurable, but if you want to experiment with seeing everything: common.dll, 038590, 83EC345356->B001C20400.I’ve been testing for a while with this and it’s a huge upgrade but it’s definitely also true that them seeing everything is not ideal. It allows the AI to shoot at crazy angles players never would be able to while also flying their ships. For example, the Falcon’s weapons can fire 90 degrees straight up - a player would have to use turret mode to accomplish this, but the AI just does it all the time now.
Ideally we want to restrict the AI to a halfway between vanilla behaviour and seeing everything - give them a ‘cone of fire’ similar to how a player can only click on things within the constraints of their monitor. Probably even make it a little less than the player’s absoloute field of fire to simulate the fact that a player can’t really evade in one direction and shoot in another as both use the mouse cursor.
In other words, most of the time we want the AI to be firing in a modest field of fire centered on the direction of their nose, and be pointing their noise at their target. That seems the best way to keep fighting the AI feeling fun and not too overwhelming.
My question then is, how would I be able to go about this plugin that would make things configurable? This behaviour is a huge upgrade to vanilla, but I’d love to be able to configure to what degree the AI can see rather than the flat ‘see everything’ so that I can abstract this field of fire behaviour. However I know absoloutely nothing about plugins or programming them. Could someone help me create it?
-
Amazing, thank you - your latest offset fixed the issue. With the gun being able to see everything, the AI is firing their weapons as a player would.
I can see what you mean about the worth of a plugin to configure the degree to which the AI can do this (shooting above the ship in particular seems to be a little more generous than what a player would usually do using a crosshair and their monitor) but it doesn’t immediately seem like a big problem.
This is a huge positive step forward for me in general with the AI, thanks so much.
I can’t seem to get YouTube embedding working but here’s a preview of the fix in action - the AI has a single gun in their loadout on the side of their fuselage, and you can see as it fires it in all directions.
-
EDIT: On second thought I’m not sure which category this should’ve gone in, this is basically my first post here so my apologies for this potentially being in the wrong section.
I’m trying to develop NPCs into a much bigger threat in the mod I’m working on, and I’ve been putting a few days into how they fly. I finally have them e-killing and turning in a way that makes them turn as good as a player, and if I pass them in a joust, our noses are typically lining up around the same time as we turn on each other afterwards.
However, I always outdamage the NPCs on a pass, even with their accuracy set to absurd levels, and I didn’t understand why until I did some testing to confirm that the AI aren’t firing all their guns.
Players get given special benefits such as MUZZLE_CONE_ANGLE in Data/Constants.ini to allow them to fire their weapons in directions that would either be outside the field of view of the weapon mount, or would be blocked by their own fuselage. This is good, as otherwise half your guns wouldn’t shoot at any targe you pick; gun mounts aren’t on the tip of your nose so they’ll always be blocked from one side or another.
The problem is that the AI doesn’t seem to benefit from anything like this. By swapping which guns the AI had in their loadouts and on what hardpoints, I was able to confirm that unlike the player, they don’t seem to be able to shoot guns through their own fuselage; if you only give the AI guns on the right or left side, and then you evade to the opposite side when they’re attacking you, they won’t be able to shoot you anymore as their ship blocks their guns.
This is a huge problem for me. I’m trying to make AI into legitimate threats, and their 1v1 flight is starting to look good, but if they can’t fire all their guns, they’ll never be competitive with players.
Does anyone know of a way to fix this behaviour and have AI firing all their guns all the time, just like players do?
-
Freelancer is probably the closest I’ve ever found to the perfect kind of space game - one that isn’t bogged down in pointless and depressing realism, that doesn’t force you to grind a trade route for days before you can have fun, one that understands most people are looking for a romantic style of space combat over a highly simulated one. I agree it’s not a question of how to patch the faults and gaps in Freelancer, but why they haven’t been patched yet. Things like player cap ships, jump drives, bigger universes, better AI, to my knowledge these are all possible and in existance across a number of different mods, but each mod I’ve seen in Freelancer misses the almighty point by a noticeable margin and focuses on the wrong kind of experience. Obviously there’s an element of differing opinions to consider, but I really believe most people want what I want from this game - the fun, easy-to-learn hard-to-master gameplay of Freelancer, set in the same kind of interesting, engaging, visually beautiful universe, but enhanced and improved to its limits.
I’d love to make it, but I’m not a tech guy. I could write you pages and pages of how to design this perfect FL mod, but I have no clue how to actually tinker with the game itself. And that’s sad, because I know it’s possible, I’ve seen elements of this perfect mod all across the community of Freelancer, and I’d love nothing more than to see them all brought together and make this game something really special; all it takes is the right design focus and some co-operation, and we’d have it.
If anyone ever wants help with designing that kind of project - please, let me know, because I’d love to see it become a reality.
Shoutout to FLSharp
How do Countermeasures really work?
Models Sharing Collection
Trying to understand how NPC spawning works?
Trying to understand how NPC spawning works?
Trying to understand how NPC spawning works?
Trying to understand how NPC spawning works?
Trying to understand how NPC spawning works?
Trying to understand how NPC spawning works?
Trying to understand how NPC spawning works?
[SOLVED] Fixing broken behaviour with NPC gunfire
[SOLVED] Fixing broken behaviour with NPC gunfire
[SOLVED] Fixing broken behaviour with NPC gunfire
[SOLVED] Fixing broken behaviour with NPC gunfire
Freelancer 2 (?)