SandyBeaches
New member
This is going to be a bit of a disorganised mess but I felt I should share my results anyway.
Legend:
<xmltag tagproperty="tagname" />
standard xml entry
property = X
property has a default value of X
property Buff
the value of property should be a Buff. Write in xml as <property name="property" value="Buff" />
property Buff [param1 Buff2]
The above can optionally include a param1, which should be a buff
property 1,2,3
property takes exactly 3 values as a comma separated list. Like <property name="property" value="1,2,3" />
property 1[,2,3...]
property can take one or more values. If more than one, use a comma separated list.
property {referencedtype}
property takes a value with a strict inclusion list. E.g hardcoded enum or derived list from xmls.
property A|B
property can only be A or B
property A(explanation)
property has value A, which is probably a float, the usage of which is (explanation). Do not include (..) in xml
While trying to understand how to more effectively use xml modding, I frequently search through the Assembly-CSharp.dll with dnSpy. This helps in understanding WHAT is read from the xmls, WHERE it is used, and HOW it should be set out.
ENUMS
EnumAttackType: Melee,Projectile,Missile
EnumCrosshairType: None,Plus,Crosshair,CrosshairOnAiming,Damage,Upgrade,Repair,Powersource,Heal,PowerItem
CLASSES
ItemActions:
Refered to in xml as <property class="Action0">, <property class="Action1">
Refered to in tags as primary, secondary
Must contain subtag <property class="{ItemAction or subclass of ItemAction eg ItemActionAttack}">
Valid Subtags for ItemActions and all Subclasses
Delay =0
Sound_start int
Sound_harvesting param1 {soundharvestingcategory}
Particle_harvesting param1 {particleharvestingcategory}
ActionExp = 2
ActionExpBonusMultiplier = 10
Buffs buff1,buff2,buff3...
Range
SphereRadius
ItemActions Subclasses:
ItemActionsAttack
ToolCategory.{some category} value(harvest multiplier) param1(damage multiplier)
treated internally as an attack action bonus.
DamageEntity = 0
DamageBlock = 0
Range = 0
Sphere = 0
internally called SphereRadius
Block_range = range
Magazine_size
internally called BulletsPerMagazine
Magazine_items item1,item2...
internally called MagazineItemNames
Magazine_item_ray_counts & Magazine_item_ray_spreads float1,float2,... (number of floats must be =< Magazine_items)
Single_magazine_usage = false
internally called AmmoIsPerMagazine
Bullet_use_per_shot = 1
Rays_per_shot
Rays_spread
Reload_time
Sound_repeat = ""
Sound_end = ""
Sound_empty = ""
Sound_reload = ""
Particles_muzzle_fire
Particles_muzzle_smoke
Infinite_ammo
Damage_type = "Bashing" (must be from EnumDamageTypes)
DamageMultiplier
is its own class or stuct. look at later
Hitmask_override "Melee"|"Arrow"
SUBCLASSES
ItemActionRanged
bullet_material = bullet
SupportHarvesting = true
UseMeleeCrosshair = false
DYNAMICPROPERTIES: a class that keeps track of model effects
Transformations: muzzle, Laser, ScopeTransform, SideTransform, BarrelTransform
Bools: hasBarrelMod, hasScopeMod, hasSideMod, IsFlashSuppressed
SUBCLASSES
ItemActionTextureBlock:
RemoveTexure bool
DefaultTextureID
ItemActionLauncher:
No extra xml properties, just changes to internal methods
SUBCLASSES
ItemActionCatapult:
Bows and such. Ammo used can definitely use passive_effects ProjectileStickChance.
Not read directly from the itemaction xml, but passive_effects can change Max_strain_time
Sound_draw
Sound_cancel
ItemActionVomit:
If the holding item doesn't have a listed muzzle, the entities right hand is used
Sound_warning
ItemActionBailLiquid:
No extra xml tags
ItemActionThrowAway:
grenades and such
Throw_strength_default = 1.1
Throw_strenght_max = 5
Max_strain_time = 2
Roll_if_crouch = false
Sound_start
ItemActionConnectPower:
WireOffset
ItemActionDisconnectPower
No extra xml tags
ItemActionEat
Used for almost all 'consumable' items e.g. food, pills, drink, bandages..
FUN ALERT! set Consume = "false", Create_item = {a valid item} and Create_item_count > 0 for a hotbar item that can be used continuously (perhaps add a buff to simulate cooldown?) to create an infinite amount of items for you!
Delay
Use_time = "..." (I don't know why either)
Sound_start
Gain_food
Gain_water
Gain_wellness
Gain_health
Buff
Consume = true
Create_item
Create_item_count
Gain_sickness
Gain_stamina
Gain_gas (not used anymore I think)
ItemActionExchangeBlock:
this item action is coded but unused in the current xml. Experiment time!
Probably a precursor to upgrade block. Use in mods to exchange locked containers with open ones? Perhaps allow the player to 'claim' doors by replacing a prefab locked door with the same?
Sourceblock {valid block, can't be air}
Targetblock
ItemActionExchangeItem:
So many possibilities with this one. Currently used for waterjars.
Change_item_to
Change_block_to
Do_block_action
Focused_blockname_1 .. Focused_blockname_X
ItemActionGainSkill:
Skills_to_gain skill1,skill2,skill3
for multiple levels, include the same skill multiple times
Title = "the title is impossible to read"
Description = "the description is impossible to read"
ItemActionLearnRecipe:
Recipes_to_learn r1,r2,r3
for multiple levels, include the same recipe multiple times
Title = "the title is impossible to read"
Description = "the description is impossible to read"
ItemActionQuest:
QuestGiven {a valid quest id}
Title = "the title is impossible to read"
Description = "the description is impossible to read"
ItemActionSpawnVehicle:
FUN ALERT! Code doesn't seem to check that the entity is a vehicle, just that it exists! Spawns using Static Spawner.
Perhaps this can be used to spawn npc? Needs Testing!
Vehicle {a valid entity}
Referred to in code as entitytoSpawn
VehicleSize = 1,1.9,2
ItemActionZoom:
class includes code to search attachments for a Scope to override this action
Zoom_overlay
Zoom_max_out
Zoom_max_in
ScopeCameraOffset = 0,0,0
ItemActionDyname a.k.a The way forward from A17?
Expects most things to be set via effects
"ToolCategory.{valid tool category. Unsure if can be custom}" value= 0(harvestbonus) param1= 0(damagebonus)
DamageType|Damage_type = Bashing(EnumDamageTypes)
code literally looks for either of these names. Backwards compat?
UsePowerAttackAnimation bool
SUBCLASSES
ItemActionDynamicMelee:
No extra xml properties.
StaminaUsage is set by effect_groups
ClassUMA
Everything wearable must be of class = "UMA"
Overlay, OverlayTint and Mask can be included multiple times and must be suffixed by their order of inclusion e.g. Mask0, Mask1...
Mesh {valid UMA model}
Overlay#
Overlay#Tint
Mask#
UISlot = None{EnumEquiptmentSlots?}
None can't be worn
AhowAltHair = false
more to come.
Legend:
<xmltag tagproperty="tagname" />
standard xml entry
property = X
property has a default value of X
property Buff
the value of property should be a Buff. Write in xml as <property name="property" value="Buff" />
property Buff [param1 Buff2]
The above can optionally include a param1, which should be a buff
property 1,2,3
property takes exactly 3 values as a comma separated list. Like <property name="property" value="1,2,3" />
property 1[,2,3...]
property can take one or more values. If more than one, use a comma separated list.
property {referencedtype}
property takes a value with a strict inclusion list. E.g hardcoded enum or derived list from xmls.
property A|B
property can only be A or B
property A(explanation)
property has value A, which is probably a float, the usage of which is (explanation). Do not include (..) in xml
While trying to understand how to more effectively use xml modding, I frequently search through the Assembly-CSharp.dll with dnSpy. This helps in understanding WHAT is read from the xmls, WHERE it is used, and HOW it should be set out.
ENUMS
EnumAttackType: Melee,Projectile,Missile
EnumCrosshairType: None,Plus,Crosshair,CrosshairOnAiming,Damage,Upgrade,Repair,Powersource,Heal,PowerItem
CLASSES
ItemActions:
Refered to in xml as <property class="Action0">, <property class="Action1">
Refered to in tags as primary, secondary
Must contain subtag <property class="{ItemAction or subclass of ItemAction eg ItemActionAttack}">
Valid Subtags for ItemActions and all Subclasses
Delay =0
Sound_start int
Sound_harvesting param1 {soundharvestingcategory}
Particle_harvesting param1 {particleharvestingcategory}
ActionExp = 2
ActionExpBonusMultiplier = 10
Buffs buff1,buff2,buff3...
Range
SphereRadius
ItemActions Subclasses:
ItemActionsAttack
ToolCategory.{some category} value(harvest multiplier) param1(damage multiplier)
treated internally as an attack action bonus.
DamageEntity = 0
DamageBlock = 0
Range = 0
Sphere = 0
internally called SphereRadius
Block_range = range
Magazine_size
internally called BulletsPerMagazine
Magazine_items item1,item2...
internally called MagazineItemNames
Magazine_item_ray_counts & Magazine_item_ray_spreads float1,float2,... (number of floats must be =< Magazine_items)
Single_magazine_usage = false
internally called AmmoIsPerMagazine
Bullet_use_per_shot = 1
Rays_per_shot
Rays_spread
Reload_time
Sound_repeat = ""
Sound_end = ""
Sound_empty = ""
Sound_reload = ""
Particles_muzzle_fire
Particles_muzzle_smoke
Infinite_ammo
Damage_type = "Bashing" (must be from EnumDamageTypes)
DamageMultiplier
is its own class or stuct. look at later
Hitmask_override "Melee"|"Arrow"
SUBCLASSES
ItemActionRanged
bullet_material = bullet
SupportHarvesting = true
UseMeleeCrosshair = false
DYNAMICPROPERTIES: a class that keeps track of model effects
Transformations: muzzle, Laser, ScopeTransform, SideTransform, BarrelTransform
Bools: hasBarrelMod, hasScopeMod, hasSideMod, IsFlashSuppressed
SUBCLASSES
ItemActionTextureBlock:
RemoveTexure bool
DefaultTextureID
ItemActionLauncher:
No extra xml properties, just changes to internal methods
SUBCLASSES
ItemActionCatapult:
Bows and such. Ammo used can definitely use passive_effects ProjectileStickChance.
Not read directly from the itemaction xml, but passive_effects can change Max_strain_time
Sound_draw
Sound_cancel
ItemActionVomit:
If the holding item doesn't have a listed muzzle, the entities right hand is used
Sound_warning
ItemActionBailLiquid:
No extra xml tags
ItemActionThrowAway:
grenades and such
Throw_strength_default = 1.1
Throw_strenght_max = 5
Max_strain_time = 2
Roll_if_crouch = false
Sound_start
ItemActionConnectPower:
WireOffset
ItemActionDisconnectPower
No extra xml tags
ItemActionEat
Used for almost all 'consumable' items e.g. food, pills, drink, bandages..
FUN ALERT! set Consume = "false", Create_item = {a valid item} and Create_item_count > 0 for a hotbar item that can be used continuously (perhaps add a buff to simulate cooldown?) to create an infinite amount of items for you!
Delay
Use_time = "..." (I don't know why either)
Sound_start
Gain_food
Gain_water
Gain_wellness
Gain_health
Buff
Consume = true
Create_item
Create_item_count
Gain_sickness
Gain_stamina
Gain_gas (not used anymore I think)
ItemActionExchangeBlock:
this item action is coded but unused in the current xml. Experiment time!
Probably a precursor to upgrade block. Use in mods to exchange locked containers with open ones? Perhaps allow the player to 'claim' doors by replacing a prefab locked door with the same?
Sourceblock {valid block, can't be air}
Targetblock
ItemActionExchangeItem:
So many possibilities with this one. Currently used for waterjars.
Change_item_to
Change_block_to
Do_block_action
Focused_blockname_1 .. Focused_blockname_X
ItemActionGainSkill:
Skills_to_gain skill1,skill2,skill3
for multiple levels, include the same skill multiple times
Title = "the title is impossible to read"
Description = "the description is impossible to read"
ItemActionLearnRecipe:
Recipes_to_learn r1,r2,r3
for multiple levels, include the same recipe multiple times
Title = "the title is impossible to read"
Description = "the description is impossible to read"
ItemActionQuest:
QuestGiven {a valid quest id}
Title = "the title is impossible to read"
Description = "the description is impossible to read"
ItemActionSpawnVehicle:
FUN ALERT! Code doesn't seem to check that the entity is a vehicle, just that it exists! Spawns using Static Spawner.
Perhaps this can be used to spawn npc? Needs Testing!
Vehicle {a valid entity}
Referred to in code as entitytoSpawn
VehicleSize = 1,1.9,2
ItemActionZoom:
class includes code to search attachments for a Scope to override this action
Zoom_overlay
Zoom_max_out
Zoom_max_in
ScopeCameraOffset = 0,0,0
ItemActionDyname a.k.a The way forward from A17?
Expects most things to be set via effects
"ToolCategory.{valid tool category. Unsure if can be custom}" value= 0(harvestbonus) param1= 0(damagebonus)
DamageType|Damage_type = Bashing(EnumDamageTypes)
code literally looks for either of these names. Backwards compat?
UsePowerAttackAnimation bool
SUBCLASSES
ItemActionDynamicMelee:
No extra xml properties.
StaminaUsage is set by effect_groups
ClassUMA
Everything wearable must be of class = "UMA"
Overlay, OverlayTint and Mask can be included multiple times and must be suffixed by their order of inclusion e.g. Mask0, Mask1...
Mesh {valid UMA model}
Overlay#
Overlay#Tint
Mask#
UISlot = None{EnumEquiptmentSlots?}
None can't be worn
AhowAltHair = false
more to come.
Last edited by a moderator: