Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Is there a NPC attack range cap?

The general place to discuss MOD''ing Freelancer!

Post Sun Aug 27, 2006 5:48 am

Is there a NPC attack range cap?

Hi,

I'm trying to make a station attack players across a whole system, however there seems to be a limit beyond which players aren't attacked anymore. Althou I've set the projectiles lifetime and velocity well beyond the 10k range, as well as the AIs attack radius to exactly 10k, I won't be shot at unless I'm within a 5k radius of that station.
Any clues?

Post Sun Aug 27, 2006 7:19 am

I am unsure, but strangly enough it might have somet to do with the lod ranges.

Rank 7
Superiour! You must play freelancer nearly all the time. Can you play on the 24/7 Roleplay Server? My name is nomad hunter xd.
How much do you know about Freelancer?

Post Sun Aug 27, 2006 8:04 am

Make a Station Scanner with the range of your station weapons that might help. What they don't see they can't shoot at.

Try that if it works let me know.

Post Sun Aug 27, 2006 9:46 am

Ungh! Of course! Scanner! Thanks for pointing this out. Jesus, how could I miss that?

Post Sun Aug 27, 2006 10:41 am

OK, so it was the scanner. Thanks again

I am now being hit up to a distance of 10k from the station. Beyond those 10k I'm safe. Either a cap, or I missed one more thing. Can't be the missile launch range of the AI, because I've set it to 100k.

Dev

Post Sun Aug 27, 2006 7:32 pm

There is a hardcoded NPC attack range limit that you can modify; check out my limit breaking thread in the tutorials forum for help on how to change this. However, to be honest I only tested that constant with moving NPCs, not stations. It could be that stations have their own constant somewhere, since they will attack up to 10k rather than the 5k of regular NPCs. Or perhaps the 5k constant is just multiplied by 2 for stations. Give the tutorial a shot, at least, and if that doesn't work it shouldn't be too difficult to track down the offending constant.

Post Mon Aug 28, 2006 6:41 am

Just tried that, but the attack range of that small weapon platform stays at 10k. Can you please try to find the limiter for this one? I don't have much of a clue about what to look for.

Post Mon Aug 28, 2006 11:22 am

did you apply the visbeam hack?

also, look at this:

10000f in common.dll, 0x13F45C = max docking initiation distance
^ perhaps this controls more station behavior

Edited by - Cold_Void on 8/28/2006 12:28:22 PM

Post Mon Aug 28, 2006 9:00 pm

Already tried the max dock initiation distance hack, to no avail.
Visbeam hack didn't help either.

Edited by - Preacher0815 on 8/28/2006 10:12:45 PM

Post Wed Aug 30, 2006 9:08 pm

Anyone?

Post Thu Aug 31, 2006 5:26 am

Sorry that I can't be of anymore help Preacher. When it comes to the common.dll and the Exe. That is out of my expertise.

So your trying to have stations engage you beyond 10k? Man that’s reaching out and touching someone. How much more do you what? Or are you just seeing how far the game will allow?

"It doesn’t matter what universe you’re from. That’s got to hurt!"

Post Thu Aug 31, 2006 7:33 am

What I need this for? Well, I have to reach out a bit...

My Advanced Player Loot Mod has one final issue I just can't seem to fix, until recently. Problem is that when a player is killed in PVP, sometimes the ammo he had onboard is dropped while at the same time being kept onboard that players ship; in other words: ammo is doubled. I do want players to keep their ammo, however doubling the ammo is something I do not want.

I had posted about this a bit earlier, where a suggestion was made to beam up that unwanted cargo by NPC ships. Problem with that is that after an intense fight, there might not be any NPCs around to scoop up stuff. Another problem is that in space between planets / stations, there might just not be any NPCs at all. A perfect situation for bugusing players to become rich quickly. Load up the ship with 25 cannonballs, get killed, launch, tractor in the dropped cannonballs which are added to the remaining 25 cannonballs (now 50 in cargohold), sell 25, repeat and get rich quickly.

To fix this, I found a possible solution which I'm trying to explore now. This solution is to have a player constantly being attacked by a station. This station is loaded with one missile launcher, which rotates very very quickly and can aim in any direction. The missiles in turn have a lifetime of almost zero, to make sure as little CPU power as possible is needed. They don't have to reach their target to fulfill their purpose. After their destruction, the missiles create a very very low damaging effect (damage = 0.000001), which has a radius of 80k (another cap, but I'm ok with that). This would ensure several things:
- only works on unwanted loot which health has been decreased to 0.000001
- always works on unwanted loot
- not having a noticeable health degrading effect on everything else, including ships with lowered shields
- I would need just 9 (3x3) or 16 (4x4) of those stations to cover a whole system
- players aren't distracted by unneccessary "incoming missile" alerts
- NPC ships don't notice
- won't have a noticeable effect on the cargo containers of depots

Having normal player loot enabled isn't lots of fun, because players always drop ther bats & bots and ammo, too, in addition to unmounted equipment and cargo. That's why it isn't used by most of the servers. With the Advanced Player Loot Mod, players will keep their bats, bots and ammo, while everything else is dropped for others (or themselves, if they're quick enough) to pick up.

This allows for a new level of player <-> player interaction. Cargo / banking ships (where players and clans store their guns for later distribution) can now be destroyed not only for the loss of their owner, but for the gain of the attacker as well. New event types are possible, too. We had a couple of extremely fun to play FL Rugby sessions, too, where the goal was to get a modified nomad energy cell (indestructible) to the opponent's base.

For all this to work, you don't even need a clientside mod, since it's all serverside.


PS:
@ w0dk4
If you're reading this, do you think it's possible to have FLHook automatically announce which player picked up a certain item? Maybe with manually adjustable delay between FLHook "seeing" the item being picked up and the actual announce?

Edited by - Preacher0815 on 8/31/2006 8:47:29 AM

Return to Freelancer General Editing Forum