-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: NPC::Load() ---> ship->FinishLoading() too early? #2420
Comments
If a ship has any outfits at all, you'll need to define it as a "ship" object and reference it in the mission, rather than defining it inline in the mission. Really, inline ship definitions are only intended to be used in saved game files for reading back in the exact state of an NPC that has already been "instantiated." But, the same function is used for loading NPCs from a game data file or from a saved game, which is why it doesn't complain if a game data file defines a ship inline. |
Because it is used in |
[warning: just woke up] |
@Bladewood : I know, that the Kestrel file has that Unknown Ship Type definition. But since the terraforming asteroid is defined "inline", I never thought that inline definitions were not supposed to be used in mission definitions. But it's absolutely okay for me if this issue get's a |
I have a mission definition with a NPC inside which uses a customized ship definition.
That ship has an outfit which is defined in a different file (damage_outfits.txt).
Both are in the same data/ folder of the same plugin.
damage_outfits.txt
testing_mission_hull_breach.txt
If the outfit is not defined in the mission file but in the external outfit file, I get a soft error.
The error does not show up, if the outfit in question is defined in the mission file. That's the reason for the outfit definition with some XX in the name - for quick testing.
After the mission had been offered to the player and became part of the savegame, I tested it again.
There was no error for the npc ship (inside a mission) in the savegame. Only for the ship in the mission definition file. I renamed the ship in the savegame to "Almost Broken Hull" for verification...
If I changed the outfit in the savegame to something unknown, I received (not surprisingly)
So it seems that the ship->FinishLoading() is called too early for ships inside mission definitions (i.e. during NPC::Load)
The text was updated successfully, but these errors were encountered: