Skip to content
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

[WiP][CR]Remove hardcoded NPC item spawn fallbacks #20616

Closed
wants to merge 3 commits into from

Conversation

Projects
None yet
2 participants
@Coolthulhu
Copy link
Contributor

commented Mar 21, 2017

Closes #20461

Unfortunately lots of boilerplate here. The alternative would be to autogenerate the item groups.

Item groups for NPC spawns are of 3 types:

Worn items

Default group: NC_CLASS_worn_male/female
Fallback: npc_worn_male/female

Items from this group are worn if possible. Otherwise they aren't spawned.

Inventory

Default group: NC_CLASS_inventory
Fallback: npc_inventory

Items from this group will get their containers and be placed in the inventory.

Weapon by skill

Default groups: NC_CLASS_SKILL
Fallback: npc_SKILL

One group per skill.
Those are checked in descending order of NPC's combat skills. If the NPC has no combat skills, it gets a stabbing skill of 0 for the purposes of weapon spawns.

The best weapon of this group (one with highest weapon value) is wielded. Others are added to inventory, as they're probably ammo or spare throwables.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Mar 22, 2017

Pinging @SunshineDistillery
Is this how is it supposed to look?

@DangerNoodle

This comment has been minimized.

Copy link
Contributor

commented May 17, 2017

Question. Will override work correctly, if more are added? I was recently made aware of an issue wherein adding additional NPC classes with overrides fail to function.

At least according to a ping by @chaosvolt earlier tonight, this hardcoded fallback appears to entirely preclude adding custom NC files for custom NPC classes.

Ping was received from this issue in their repository, some time before I returned home: chaosvolt/cdda-arcana-mod#2

@DangerNoodle

This comment has been minimized.

Copy link
Contributor

commented May 18, 2017

Further information on this, my own testing has led me to suspect that the mod author encountered a problem with adding new classes to dynamic NPCs (and the initial companion NPC), as I have found that custom classes can add overrides that will work for fixed NPCs spawned in mapgen.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Jul 17, 2017

I'll re-PR it if there is any interest after 0.D.

@Coolthulhu Coolthulhu closed this Jul 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.