The Starport
  • Categories
  • Recent
  • Users
  • Groups
  • Starport Blog
  • Knowledge Base
  • The Forge
  • Discord
  • Register
  • Login

NPC do not tractor in stuff and freeze(not about loot_preference line)

Scheduled Pinned Locked Moved Speciality Modding
11 Posts 4 Posters 13.1k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vital
    wrote on global:last_edited_by,
    #1

    Suddenly encountered such a problem:

    I gave some volume to guns, now guns take some cargo space. In case with a player I can’t tractor in guns with huge volume flying starflier, for example battleship turrets that have volume = 500 line(just an example). And can’t tractor in smaller guns when my cargo is full. Just the way it should be.
    Npcs cant tractor in those turrets too, but they just sit still without moving trying to do it. after I destroy the gun, npc will get back to their job.

    So, an example.

    Npc ship has cargo space volume of 70.
    40 is occupied with ammo and cargo.
    Looted gun volume is 50.
    NPC tries to tractor it in(cos npc still has cargo space left I guess) but fails, and just freezes in space without moving until I destroy the looted gun.

    I guess it’s a bad idea to give a volume less or more than 1 to something in freelancer.

    Anybody knows how to fix this???

    Guess a hack is needed again:(

    1 Reply Last reply
    0
  • adoxaA Offline
    adoxaA Offline
    adoxa
    wrote on global:last_edited_by,
    #2

    This should fix it.

    1 Reply Last reply
    0
  • V Offline
    V Offline
    Vital
    wrote on global:last_edited_by,
    #3

    Damn, so far seems like it works perfectly!!!

    Amazing! Thank you so much.

    Actually I guess it’s a very useful plugin for many mods.

    1 Reply Last reply
    0
  • F Offline
    F Offline
    FriendlyFire
    wrote on global:last_edited_by,
    #4

    I’m sorry to bump this, but it doesn’t appear to be working. I’m seeing a lot of NPCs just hanging around in space doing nothing, and I’ve tried putting the plugin on the server only and on the server and client to no avail.

    Could there be something specific to MP?

    1 Reply Last reply
    0
  • adoxaA Offline
    adoxaA Offline
    adoxa
    wrote on global:last_edited_by,
    #5

    I copied Aggressor 1K from the Manhattan Docking Ring, giving the Gunslinger a volume of 100. Started Solo MP, shot it and the NPCs hung around. Added chklootvol to the client, they still hung around. Added it to the server, they moved on. Seems to be working fine, maybe it’s not volume related?

    1 Reply Last reply
    0
  • F Offline
    F Offline
    FriendlyFire
    wrote on global:last_edited_by,
    #6

    Hmm…

    One thing I noticed is that when the NPCs first spawn and notice the loot, the Volume function you made gets called very rapidly, but if I remove the breakpoint and add it back in a second later, it’s no longer tripped until new NPCs spawn.

    I also believe that they can usually tractor a part of the loot in the loot container, but not all of it. They’ll tractor in the first part, but then hang around trying to tractor the rest. If I blow up all the loot, they’ll move on. Could it be a problem with updating the cargo capacity remaining?

    1 Reply Last reply
    0
  • adoxaA Offline
    adoxaA Offline
    adoxa
    wrote on global:last_edited_by,
    #7

    Okay, this time I copied Flint, replacing the Cardamine with 200 Diamonds, each with volume 10. Again, they all moved on, except for the Repair Ship. There’s two things different about it - it has no tractor and it’s a transport (unlike the Heavy Lifter, which also has no tractor, but it’s a fighter and it moved on). Since you’ve got a debugger, try NOPping the jump at 62CEBF8 and see if that helps (I don’t think it will, since I think it just controls movement). Otherwise, try patching get_cargo_hold_remaining to return 0 and see if that has an effect. If it does, restore it and find the right call…

    1 Reply Last reply
    0
  • V Offline
    V Offline
    Vital
    wrote on global:last_edited_by,
    #8

    Never noticed any problems so far…?..

    1 Reply Last reply
    0
  • SkottyS Offline
    SkottyS Offline
    Skotty Wiki Contributor
    wrote on global:last_edited_by,
    #9

    Sorry to bump this once more:

    I noticed that your plugin does not cover the case of nano bots and shield batteries. NPCs will try to loot them, but freeze if their limit is reached.

    1 Reply Last reply
    0
  • adoxaA Offline
    adoxaA Offline
    adoxa
    wrote on global:last_edited_by,
    #10

    Confirmed, but the fix eludes me.

    1 Reply Last reply
    0
  • SkottyS Offline
    SkottyS Offline
    Skotty Wiki Contributor
    wrote on global:last_edited_by,
    #11

    Thanks anyway. Then the workaround is just to set NPCs not to loot nanobots/batteries at all.

    1 Reply Last reply
    0

  • Story Mission level requirement
    C
    CommanderArgelo
    0
    11
    52

  • Crash Offsets
    J
    josbyte
    0
    231
    251.4k

  • Capital ships shield collision detection
    C
    CommanderArgelo
    0
    3
    17

  • Dropping a phantomloot cargo from an NPC
    C
    CommanderArgelo
    0
    5
    26

  • Incorrect Shield Value on HUD
    C
    CommanderArgelo
    0
    4
    19

  • @Adoxa - Wheel Scroll plugin improvements
    AingarA
    Aingar
    0
    3
    20

  • Release: Advanced Renderer v. 1.1 beta 1
    S
    SWAT_OP-R8R
    3
    50
    428

  • German Mod Tutorials? 2024 Mod Tutorial?
    S
    SWAT_OP-R8R
    0
    18
    66
  • First post
    Last post
0
  • Categories
  • Recent
  • Users
  • Groups
  • Starport Blog
  • Knowledge Base
  • The Forge
  • Discord