Jump to content

Cargo Ship

Pending 1.3.3

Eisenherrz
Eisenherrz

Posted

Hello,

The NPCs don't work for me on Cargo.

The following errors appear in the console

 

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4583257]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3855866]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4887120]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[5141167]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[5141169]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4583256]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3855865]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4061270]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4061267]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4887118]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[5141170]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4322500]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4061269]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4583259]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4061268]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4887117]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3855863]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4322502]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4322501]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3637256]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3855864]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3637255]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3637254]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4887119]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3637257]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4583258]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4322499]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[5141168]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3358950]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3358949]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3358948]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3358947]

aimacak

Posted

5 hours ago, Eisenherrz said:

Hello,

The NPCs don't work for me on Cargo.

The following errors appear in the console

 

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4583257]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3855866]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4887120]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[5141167]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[5141169]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4583256]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3855865]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4061270]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4061267]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4887118]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[5141170]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4322500]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4061269]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4583259]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4061268]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4887117]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3855863]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4322502]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4322501]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3637256]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3855864]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3637255]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3637254]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4887119]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3637257]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4583258]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[4322499]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[5141168]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3358950]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3358949]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3358948]

Entity is NULL but is still in saveList - not destroyed properly? door.hinged.cargo_ship_side[3358947]

Hello, are you using a procedural or a custom map? can you send your data files? (oxide/data/BetterNpc) Do you have any plugins on Cargoship?

Mathew Richards

Posted (edited)

are you using ENDLESS CARGO. 

 

Edited by Mathew Richards
aimacak

Posted (edited)

On 3/16/2026 at 2:22 PM, Mathew Richards said:

are you using ENDLESS CARGO. 

 

Hello, I have done some tests, there are several points, one of them is that the plugin has not been updated for 6 years, which is quite a long time, but at first glance everything is fine with it, except for some points, as I said.
open EndlessCargo.cs and change:

this:

        private void OnServerInitialized()
        {
            NextTick(() =>
            {
                _activeCargoShips = UnityEngine.Object.FindObjectsOfType<CargoShip>().ToList();
                CheckCargoShip();
            });

            timer.Every(_config.UpdateRate, CheckCargoShip);

            //ConsoleSystem.Run(ConsoleSystem.Option.Server.Quiet(), "cargoship.event_enabled false");
            //Setting cargoship.event_enabled to false does not disable the event. For now just kill the new ship
            server.Command($"cargoship.egress_duration_minutes {_config.EgressMin}");
            server.Command($"ai.npc_spawn_on_cargo_ship {_config.NpcSpawn}");
            server.Command($"cargoship.event_duration_minutes {_config.DurationMin}");
            server.Command($"cargoship.loot_round_spacing_minutes {_config.LootSpacing}");
            server.Command($"cargoship.loot_rounds {_config.LootRounds}");
        }


to this:

		private void OnServerInitialized()
		{
			/* NextTick(() =>
			{
			_activeCargoShips = UnityEngine.Object.FindObjectsOfType<CargoShip>().ToList();
			CheckCargoShip();
			}); */

			timer.Once(_config.UpdateRate, () =>
			{
				server.Command($"cargoship.egress_duration_minutes {_config.EgressMin}");
				server.Command($"ai.npc_spawn_on_cargo_ship {_config.NpcSpawn}");
				server.Command($"cargoship.event_duration_minutes {_config.DurationMin}");
				server.Command($"cargoship.loot_round_spacing_minutes {_config.LootSpacing}");
				server.Command($"cargoship.loot_rounds {_config.LootRounds}");

				_activeCargoShips = UnityEngine.Object.FindObjectsOfType<CargoShip>().ToList();
				CheckCargoShip();
			});

			timer.Every(_config.UpdateRate, CheckCargoShip);

			//ConsoleSystem.Run(ConsoleSystem.Option.Server.Quiet(), "cargoship.event_enabled false");
			//Setting cargoship.event_enabled to false does not disable the event. For now just kill the new ship
			/* server.Command($"cargoship.egress_duration_minutes {_config.EgressMin}");
			server.Command($"ai.npc_spawn_on_cargo_ship {_config.NpcSpawn}");
			server.Command($"cargoship.event_duration_minutes {_config.DurationMin}");
			server.Command($"cargoship.loot_round_spacing_minutes {_config.LootSpacing}");
			server.Command($"cargoship.loot_rounds {_config.LootRounds}"); */
		}


and this:

        private void OnEntitySpawned(CargoShip ship)
        {  
            if (_activeCargoShips.Count >= MaxShips) 
            {   // This should never execute if the default event is turned off but it does.
                ship.Kill();
                 Logger("NormalGameCall") ;
                return;
            }
            NextTick(() =>
            {
                 _activeCargoShips.Add(ship);
                CheckCargoShip();
            });
        }


to this:
 

        private void OnEntitySpawned(CargoShip ship)
        {  
            if (_activeCargoShips.Count >= MaxShips) 
            {   // This should never execute if the default event is turned off but it does.
                //ship.Kill();
				timer.In(1f, () => ship.Kill());
                 Logger("NormalGameCall") ;
                return;
            }
            NextTick(() =>
            {
                 _activeCargoShips.Add(ship);
                CheckCargoShip();
            });
        }


Also you must change this in main config of EndlessCargo:

"Update Rate (Seconds)": 120.0,
"NPC spawn on ship (Default true)": false,


The first *.cs change is necessary so that when the server starts, there is a delay before CargoShip appears, because for the NPC from BetterNpc to appear on it, BetterNpc must already be uploaded to the server in this moment. The delay is taken from the configuration (120 seconds), I would leave it that way just in case, I don't think it will be critical for you.

The second *.cs change adds a delay to deleting a CargoShip, when you already have one on the map and another one appears, by default the plugin instantly deletes it, with this change it will do so in 1 second. This is necessary so that you do not have the spam that you indicated in your first message, and there are no errors from BetterNpc at this moment.

If you still don't have a NPC after that, let me know, and if everything starts working for you, please tell me about it too. Thank you.
You can also add me to discord for faster communication if you want. @shrpndfcsd

Edited by aimacak
2.3m

Downloads

Total number of downloads.

10.7k

Customers

Total customers served.

154.4k

Files Sold

Total number of files sold.

3.3m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.