Author Topic: Created simple spawn mod, now player health/stam/food/drink bar black 1/1  (Read 472 times)

Kallvin

  • Newbie
  • *
  • Posts: 10
    • View Profile
Hello, like the title states, I've created a very basic mod that spawns a new Mob into the world. It works fine but now my player UI seems to be bugged and I can no longer see my health, stamina, food, water levels. I am sure it is because of the mod because on public servers the health bar shows up fine. But as far as I am aware, I was not touching the UI or the player character... Any thoughts?

The status indicator bars show 1/1 when hovering over them and appear black/empty.

Update:

So it seems there is an error with casting to the Animal Skeleton when using a derivative of the ProtoCharacterMob. I am trying to use a human skeleton with the child class of ProtoCharacterMob, but I need to know:

How do I configure a MobCharacter  to use the human skeleton properly, or shall I write my own custom ProtoCharacterMob and or possibly override whatever is casting to the Animal Skeleton without the need to create a custom ProtoCharacterMob?

If I have to rewrite the ProtoCharacterMob how do I revert the current server I have now that errors out due to the missing BasicNPC.mpk references? (Seems the Zone definitions being modified has done something?) I've removed the .MPK and the version listing in the server config file, but I believe there were some other references leftover.
« Last Edit: September 12, 2020, 11:18:16 am by Kallvin »

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1929
    • View Profile
Re: Created simple spawn mod, now player health/stam/food/drink bar black 1/1
« Reply #1 on: September 12, 2020, 05:55:25 pm »
Hello!

I'm afraid it's not currently possible to have a mob that would use the current human skeleton (as it's intended for player characters only).
You could ask help from a more experienced modder that could debug it and make it possible to use the current human skeleton class for mobs (I can imagine some reworking on the existing classes such as animator helper would be necessary), or wait until we investigate this on our own (but not anytime soon as we're currently busy working on A28 Update).

Quote
If I have to rewrite the ProtoCharacterMob how do I revert the current server I have now that errors out due to the missing BasicNPC.mpk references? (Seems the Zone definitions being modified has done something?) I've removed the .MPK and the version listing in the server config file, but I believe there were some other references leftover.
It will load the savegame fine as long as the prototype name is kept. E.g. if you have added new prototype "MyHumanoidMob" and removed the mod, you could add or create a new mod, just ensure there is an a prototype of the same name.
For modding we recommend using CryoFall Editor first as it provides a full set of tools that we're using ourselves while working on new content and features for the game!

Regards!

Kallvin

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Created simple spawn mod, now player health/stam/food/drink bar black 1/1
« Reply #2 on: September 12, 2020, 10:53:12 pm »
Thanks for the information! I actually had a lot of success working with a human skeleton implementing into a ProtoCharacterSkeletonAnimal derivative class. It took a bit of fussing around but I basically have a hard coded human in terms of appearance, so it is much like an animal skeleton, but a human. I was considering the possibility of using a player character like you guys did for the cut scene but it didn't seem to pan out very well with what I was doing at the time. But it would be really nice to be able to use the player character class in order to make an NPC you can outfit with custom equipment. Much like Thralls on Conan Exiles.