Skip to content
Snippets Groups Projects
Commit 7645124f authored by Hachem_Muche's avatar Hachem_Muche
Browse files

ActorInventory:initBody: inventory short_name is copied from the inventory definition

New function: Object:wornLocations(use_actor, weight_fn, filter_field, no_type_check)
	Replaces Actor:getFilteredInventories
	Returns a table if locations (inventory and slot) where an object can be worn, filtered and sorted
	The locations are sorted ("best" first), permitting Actors to automatically optimize their equipment.
	The default weight_fn is a simple formula (based on object "power" from material level and getPowerRank), but can be updated to be more sophisticated.
	no_type_check can be specified to allow different type replacement equipment for unfiltered inventories

game.state:applyRandomClass:
	data.update_body can be a list of inventory slots specifying which inventories to define/update when applying a class

game.state:createRandomBoss:
	Base actor equipment resolvers are updated to "boss" level drops.

resolvers.generateObject renamed resolvers.resolveObject:
	new filter fields supported:
	replace_unique: specifies a filter to replace a unique that could not be created (similar to randart_replace, but the replacement object is equipped rather than the existing unique)
	check_antimagic: force an antimagic check even if the object will not be worn

resolvers.auto_equip_filters(t, readonly):
	set readonly to specify an inventory filter that cannot be overwritten (to ensure specific equipment is not removed, i.e. Elandar will not replace the Staff of Absorption if he gets extra classes from higher game difficulties)

Object resolvers add the field _resolver_type to the objects they create.

dialogs.debug.RandomObject:
	fixed a bug causing resolvers.equip to preview ineligible equipment (antimagic check)

dialogs.debug.SummonCreature:
	fixed a bug causing summoned actors to try to wear equipment before being fully resolved

Added/updated auto_equip_filters for a number of NPCs
parent 61633352
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment