VS plugin mod for Basic Armour
Révision | 5659a45368acee180fff4193a7150722b28d25ed (tree) |
---|---|
l'heure | 2019-07-24 11:37:45 |
Auteur | melchior <melchior@user...> |
Commiter | melchior |
New feature; Buckler support,
Experimental workaround for rendering issue,
Initial buckler model added,
version bump
@@ -92,6 +92,10 @@ namespace ArmourMod | ||
92 | 92 | if ( rpi.CameraType == EnumCameraMode.FirstPerson ) return; |
93 | 93 | } |
94 | 94 | |
95 | + //HACK: don't render if local client has old/bad position data | |
96 | + //armouredPlayer.Pos.Dirty || | |
97 | + if ( (armouredPlayer.Pos.X == 0d && armouredPlayer.Pos.Y == 0d &&armouredPlayer.Pos.Z == 0d) ) return; | |
98 | + | |
95 | 99 | foreach(var wornItemTuple in armouredPlayer.RenderableWornArmours) { |
96 | 100 | |
97 | 101 | if ( !Armoury.ContainsKey( wornItemTuple.Value.Code ) ) { |
@@ -137,7 +141,7 @@ namespace ArmourMod | ||
137 | 141 | |
138 | 142 | rpi.CurrentActiveShader.BindTexture2D( "tex2d", armourData.Armour_TextureId, 0 ); |
139 | 143 | } else { |
140 | - | |
144 | + | |
141 | 145 | //IStandardShaderProgram PreparedStandardShader(int posX, int posY, int posZ); |
142 | 146 | prog = rpi.PreparedStandardShader( (int)armouredPlayer.Pos.X, (int)armouredPlayer.Pos.Y, (int)armouredPlayer.Pos.Z ); |
143 | 147 | prog.Tex2D = armourData.Armour_TextureId; |
@@ -181,20 +181,17 @@ namespace ArmourMod | ||
181 | 181 | |
182 | 182 | //armourmod:clothes-upperbodyover-vest-leather |
183 | 183 | //armourmod:item-clothes-upperbodyover-vest-leather |
184 | - //var armourLocations = ClientApi.Assets.GetLocations( "itemtypes/wearable", _domain ); | |
185 | 184 | var armourAssets = ClientApi.World.AssetManager.GetMany("itemtypes/wearable",_domain,true); |
186 | - //ClientApi.Assets.GetMany | |
187 | 185 | |
188 | - | |
189 | - //BRUTE FORCE SEARCH! | |
190 | - var armourItemsBrute = ClientApi.World.Items.Where( itm => itm.Code != null && itm.Code.BeginsWith( _domain, "clothes" )); | |
186 | + //Still BRUTE FORCE Search.... | |
187 | + var renderableArmourItems = ClientApi.World.Items.Where( itm => itm.Code != null && itm.Code.BeginsWith( _domain, "clothes" ) && itm.StorageFlags == EnumItemStorageFlags.Outfit ); | |
191 | 188 | #if DEBUG |
192 | 189 | ClientApi.Logger.VerboseDebug( "****************************************************** " ); |
193 | - ClientApi.Logger.VerboseDebug( "Known Armour variants: {0}", armourItemsBrute.Count() ); | |
190 | + ClientApi.Logger.VerboseDebug( "Renderable Armour count: {0}", renderableArmourItems.Count() ); | |
194 | 191 | ClientApi.Logger.VerboseDebug( "****************************************************** " ); |
195 | 192 | #endif |
196 | 193 | |
197 | - foreach(var armourItem in armourItemsBrute) | |
194 | + foreach(var armourItem in renderableArmourItems) | |
198 | 195 | { |
199 | 196 | if ( armourItem.IsMissing || armourItem.Attributes == null ) { |
200 | 197 | ClientApi.Logger.Error( "Armour item MISSING / NULL ATTRIBUTES {0} !", armourItem.Code.ToShortString( ) ); |
@@ -224,25 +221,27 @@ namespace ArmourMod | ||
224 | 221 | //Manual fetch by JSON parsing.... |
225 | 222 | |
226 | 223 | if ( armourAssets != null && armourAssets.Count > 0 ) { |
227 | - string partialName = armourItem.Code.GetName( ).Substring(0, armourItem.Code.GetName( ).LastIndexOf( "-" ) ); | |
224 | + string partialName = armourItem.Code.GetName( ).Substring(0, armourItem.Code.GetName( ).LastIndexOf("-", StringComparison.Ordinal)); | |
228 | 225 | |
229 | - var originAsset = armourAssets.Single( armA => armA.Name.StartsWith( partialName ) ); | |
226 | + var originAsset = armourAssets.Single( armA => armA.Name.StartsWith(partialName, StringComparison.Ordinal)); | |
230 | 227 | |
231 | 228 | //System.Diagnostics.Debugger.Break(); |
232 | - JObject originalJson = JObject.Parse(originAsset.ToText()); | |
229 | + JObject originalJson = JObject.Parse(originAsset.ToText()); | |
233 | 230 | |
234 | - if ( originalJson.HasValues ) { | |
231 | + if (originalJson.HasValues) { | |
235 | 232 | var tpJsonNode = originalJson[_thirdPersonKey]; |
236 | 233 | //Token.C.SelectToken( @"$.thirdPersonTransform" ); |
237 | 234 | //if ( tpJsonNode != null ) |
238 | 235 | // ClientApi.Logger.VerboseDebug("TP SPAM:"+ tpJsonNode.ToString( ) ); |
239 | 236 | |
240 | 237 | |
241 | - ModelTransform configuredTransform = new JsonObject( tpJsonNode ).AsObject<ModelTransform>( ); | |
238 | + ModelTransform configuredTransform = new JsonObject(tpJsonNode).AsObject<ModelTransform>( ); | |
242 | 239 | fudge_transform = configuredTransform; |
243 | 240 | #if DEBUG |
244 | 241 | ClientApi.Logger.VerboseDebug( "[{0}] Using JSON Transform parameters = {1}", armourItem.Code.ToShortString( ),configuredTransform.Translation.ToString() ); |
245 | 242 | #endif |
243 | + } else { | |
244 | + ClientApi.Logger.Warning("Could not load JSON Transform "); | |
246 | 245 | } |
247 | 246 | |
248 | 247 | } else { |
@@ -13,6 +13,17 @@ namespace ArmourMod | ||
13 | 13 | slashingPercent = slash; |
14 | 14 | crushingPercent = crush; |
15 | 15 | firePercent = fire; |
16 | + encumberancePercent = 0; | |
17 | + } | |
18 | + | |
19 | + public DamageFilter(float blunt, float pierce, float slash, float crush, float fire, float encP) | |
20 | + { | |
21 | + bluntPercent = blunt; | |
22 | + piercingPercent = pierce; | |
23 | + slashingPercent = slash; | |
24 | + crushingPercent = crush; | |
25 | + firePercent = fire; | |
26 | + encumberancePercent = encP; | |
16 | 27 | } |
17 | 28 | |
18 | 29 | public float bluntPercent; |
@@ -20,6 +31,7 @@ namespace ArmourMod | ||
20 | 31 | public float slashingPercent; |
21 | 32 | public float crushingPercent; |
22 | 33 | public float firePercent; |
34 | + public float encumberancePercent; | |
23 | 35 | |
24 | 36 | //TODO:Threshold values; |
25 | 37 |
@@ -31,8 +43,9 @@ namespace ArmourMod | ||
31 | 43 | var slashing = armourInSlot.Itemstack.ItemAttributes["SlashingProtection"].AsFloat( ); |
32 | 44 | var crushing = armourInSlot.Itemstack.ItemAttributes["CrushingProtection"].AsFloat( ); |
33 | 45 | var flame = armourInSlot.Itemstack.ItemAttributes["FireProtection"].AsFloat( ); |
46 | + var encumberance = armourInSlot.Itemstack.ItemAttributes["Encumberance"].AsFloat( ); | |
34 | 47 | |
35 | - return new DamageFilter(blunt, piercing, slashing, crushing, flame); | |
48 | + return new DamageFilter(blunt, piercing, slashing, crushing, flame, encumberance); | |
36 | 49 | } |
37 | 50 | } |
38 | 51 | } |
@@ -77,10 +77,9 @@ namespace ArmourMod | ||
77 | 77 | Logger.VerboseDebug( "Side:{0}, gearInv == null?{1}", CoreAPI.Side.ToString( ), this.GearInventory == null ); |
78 | 78 | #endif |
79 | 79 | |
80 | - this.GearInventory.SlotModified += ServerWatchSlotModified; | |
81 | - //this.LeftHandItemSlot.//Check also for shields | |
80 | + this.GearInventory.SlotModified += ServerGearSlotModified; | |
82 | 81 | |
83 | - //base.GearInventory.SlotNotified += WatchSlotNotified; | |
82 | + this.LeftHandItemSlot.Inventory.SlotModified += ServerOffhandSlotModified; | |
84 | 83 | |
85 | 84 | //Walk Inventory FIRST TIME ONLY |
86 | 85 | PopulateDamageFilters(); |
@@ -213,9 +212,9 @@ namespace ArmourMod | ||
213 | 212 | return base.ReceiveDamage(damageSource, damage); |
214 | 213 | } |
215 | 214 | |
216 | - public static bool CheckIfClothesIsArmour(ItemSlot possibleArmour) | |
215 | + public static bool CheckIfItemHasDamageFilter(ItemSlot possibleArmour) | |
217 | 216 | { |
218 | - if (possibleArmour.Itemstack != null && possibleArmour.Itemstack.Item.Code.BeginsWith("armourmod", "clothes")) { | |
217 | + if (possibleArmour.Itemstack != null && possibleArmour.Itemstack.Item.Code.Domain == ArmourModHookin._domain) { | |
219 | 218 | |
220 | 219 | if (possibleArmour.Itemstack.ItemAttributes.Exists |
221 | 220 | && ( |
@@ -234,12 +233,13 @@ namespace ArmourMod | ||
234 | 233 | |
235 | 234 | public static bool CheckForCustomMesh(ItemSlot possibleArmour) |
236 | 235 | { |
237 | - if (possibleArmour.Itemstack != null && possibleArmour.Itemstack.Item.Code.BeginsWith("armourmod", "clothes")) { | |
236 | + if (possibleArmour.Itemstack != null && possibleArmour.Itemstack.Item.Code.BeginsWith(ArmourModHookin._domain, "clothes")) { | |
238 | 237 | |
239 | 238 | if (possibleArmour.Itemstack.ItemAttributes.Exists) { |
240 | 239 | //shape: { base: "entity/humanoid/seraph" }, |
241 | 240 | |
242 | - if (possibleArmour.Itemstack.Item.Shape != null) { | |
241 | + if (possibleArmour.Itemstack.Item.StorageFlags == EnumItemStorageFlags.Outfit | |
242 | + && possibleArmour.Itemstack.Item.Shape != null) { | |
243 | 243 | return possibleArmour.Itemstack.Item.Shape.Base.BeginsWith("game", "seraph") == false; |
244 | 244 | } |
245 | 245 | } |
@@ -248,21 +248,22 @@ namespace ArmourMod | ||
248 | 248 | return false; |
249 | 249 | } |
250 | 250 | |
251 | - private void ServerWatchSlotModified (int slotId) | |
251 | + private void ServerGearSlotModified (int slotId) | |
252 | 252 | { |
253 | 253 | var watchedSlot = this.GearInventory[slotId]; |
254 | 254 | #if DEBUG |
255 | - Logger.VerboseDebug( "WatchSlotModified:{0}", slotId ); | |
255 | + Logger.VerboseDebug( "GearSlotModified:{0}", slotId ); | |
256 | 256 | #endif |
257 | 257 | if ( !watchedSlot.Empty ) { |
258 | 258 | |
259 | - if ( watchedSlot.StorageType == EnumItemStorageFlags.Outfit && watchedSlot.Itemstack.Class == EnumItemClass.Item ) { | |
259 | + if ( (watchedSlot.StorageType.HasFlag( EnumItemStorageFlags.Outfit) || watchedSlot.StorageType.HasFlag(EnumItemStorageFlags.Offhand) ) | |
260 | + && watchedSlot.Itemstack.Class == EnumItemClass.Item ) { | |
260 | 261 | #if DEBUG |
261 | - Logger.VerboseDebug( "Equiped a clothing item:{0}", watchedSlot.Itemstack.Item.Code.ToString() ); | |
262 | + Logger.VerboseDebug( "Equiped a AF this: {0}", watchedSlot.Itemstack.Item.Code.ToString() ); | |
262 | 263 | #endif |
263 | 264 | //replace / add damage filter when applicable armor item in slot (which ever that is?) |
264 | 265 | |
265 | - if (CheckIfClothesIsArmour(watchedSlot)) | |
266 | + if (CheckIfItemHasDamageFilter(watchedSlot)) | |
266 | 267 | { |
267 | 268 | DamageFilter dmgFilt = DamageFilter.ConstructFilter( watchedSlot ); |
268 | 269 | #if DEBUG |
@@ -275,13 +276,49 @@ namespace ArmourMod | ||
275 | 276 | } else if (watchedSlot.StorageType == EnumItemStorageFlags.Outfit){ |
276 | 277 | //Clear out filters for what was in slot# X here - if applicable |
277 | 278 | #if DEBUG |
278 | - Logger.VerboseDebug( "Removed a clothing item from SlotId:{0}",slotId ); | |
279 | + Logger.VerboseDebug( "Removed a AF item from SlotId:{0}",slotId ); | |
279 | 280 | #endif |
280 | 281 | DamageFilters.Remove((EnumCharacterDressType)slotId); |
281 | 282 | RecomputeDamageFilterPercents( ); |
282 | 283 | } |
283 | 284 | } |
284 | 285 | |
286 | + | |
287 | + private void ServerOffhandSlotModified(int slotId) | |
288 | + { | |
289 | + if (slotId == (int)EnumCharacterDressType.Arm) { | |
290 | + var handSlot = this.LeftHandItemSlot; | |
291 | + #if DEBUG | |
292 | + Logger.VerboseDebug("OffhandSlotModified:{0}", slotId); | |
293 | + #endif | |
294 | + if (!handSlot.Empty) { | |
295 | + | |
296 | + if (handSlot.StorageType.HasFlag(EnumItemStorageFlags.Offhand) && handSlot.Itemstack.Class == EnumItemClass.Item) { | |
297 | + #if DEBUG | |
298 | + Logger.VerboseDebug("Equiped this: {0}", handSlot.Itemstack.Item.Code.ToString( )); | |
299 | + #endif | |
300 | + | |
301 | + | |
302 | + if (CheckIfItemHasDamageFilter(handSlot)) { | |
303 | + DamageFilter dmgFilt = DamageFilter.ConstructFilter(handSlot); | |
304 | + #if DEBUG | |
305 | + Logger.VerboseDebug("Armour Filter Props: B{0} P{1} S{2} C{3} F{4}", dmgFilt.bluntPercent, dmgFilt.piercingPercent, dmgFilt.slashingPercent, dmgFilt.crushingPercent, dmgFilt.firePercent); | |
306 | + #endif | |
307 | + DamageFilters[EnumCharacterDressType.Arm] = dmgFilt; | |
308 | + RecomputeDamageFilterPercents( ); | |
309 | + } | |
310 | + } | |
311 | + } else { | |
312 | + //Clear out filters for what was in slot# 10 | |
313 | + #if DEBUG | |
314 | + Logger.VerboseDebug("Removed a AF from SlotId:{0}", slotId); | |
315 | + #endif | |
316 | + DamageFilters.Remove(EnumCharacterDressType.Arm); | |
317 | + RecomputeDamageFilterPercents( ); | |
318 | + } | |
319 | + } | |
320 | + } | |
321 | + | |
285 | 322 | protected void ClientWatchSlotModified (int slotId) |
286 | 323 | { |
287 | 324 | #if DEBUG |
@@ -293,7 +330,7 @@ namespace ArmourMod | ||
293 | 330 | if ( !watchedSlot.Empty ) { |
294 | 331 | |
295 | 332 | if ( watchedSlot.StorageType == EnumItemStorageFlags.Outfit && watchedSlot.Itemstack.Class == EnumItemClass.Item ) { |
296 | - if (CheckIfClothesIsArmour(watchedSlot) && CheckForCustomMesh(watchedSlot)) | |
333 | + if (CheckIfItemHasDamageFilter(watchedSlot) && CheckForCustomMesh(watchedSlot)) | |
297 | 334 | { |
298 | 335 | WearArmorModel( slotId, watchedSlot.Itemstack.Item ); |
299 | 336 | } |
@@ -362,32 +399,35 @@ namespace ArmourMod | ||
362 | 399 | } |
363 | 400 | |
364 | 401 | |
365 | - | |
402 | + /// <summary> | |
403 | + /// Populates the damage filters. | |
404 | + /// </summary> | |
405 | + /// <remarks>Server side</remarks> | |
366 | 406 | private void PopulateDamageFilters() |
367 | 407 | { |
368 | 408 | DamageFilters = new Dictionary<EnumCharacterDressType, DamageFilter>( Enum.GetNames(typeof(EnumCharacterDressType)).Length ); |
369 | 409 | |
370 | 410 | if ( this.GearInventory.Count > 0 ) { |
371 | - foreach(var itemSlot in this.GearInventory ) { | |
411 | + foreach(ItemSlot itemSlot in this.GearInventory ) { | |
372 | 412 | |
373 | - EnumCharacterDressType slotId = (EnumCharacterDressType)this.GearInventory.GetSlotId( itemSlot ); | |
413 | + int slotId = this.GearInventory.GetSlotId( itemSlot ); | |
374 | 414 | if ( !itemSlot.Empty ) { |
375 | 415 | |
376 | - if ( itemSlot.StorageType == EnumItemStorageFlags.Outfit && itemSlot.Itemstack.Class == EnumItemClass.Item ) { | |
416 | + if ( (itemSlot.StorageType.HasFlag(EnumItemStorageFlags.Outfit) || itemSlot.StorageType.HasFlag(EnumItemStorageFlags.Offhand) ) && itemSlot.Itemstack.Class == EnumItemClass.Item ) { | |
377 | 417 | |
378 | - if ( CheckIfClothesIsArmour(itemSlot) ) | |
418 | + if ( CheckIfItemHasDamageFilter(itemSlot) ) | |
379 | 419 | { |
380 | -#if DEBUG | |
381 | - CoreAPI.World.Logger.VerboseDebug( "DF: Consider clothing item:{0}", itemSlot.Itemstack.Item.Code.ToString( ) ); | |
382 | -#endif | |
420 | + #if DEBUG | |
421 | + CoreAPI.World.Logger.VerboseDebug( "DF: Consider item:{0}", itemSlot.Itemstack.Item.Code.ToString( ) ); | |
422 | + #endif | |
383 | 423 | |
384 | 424 | DamageFilter dmgFilt = DamageFilter.ConstructFilter( itemSlot); |
385 | 425 | |
386 | -#if DEBUG | |
426 | + #if DEBUG | |
387 | 427 | CoreAPI.World.Logger.VerboseDebug( "Armour Filter Props: B{0} P{1} S{2} C{3} F{4}", dmgFilt.bluntPercent, dmgFilt.piercingPercent, dmgFilt.slashingPercent, dmgFilt.crushingPercent, dmgFilt.firePercent ); |
388 | -#endif | |
428 | + #endif | |
389 | 429 | |
390 | - DamageFilters.Add(slotId,dmgFilt); | |
430 | + DamageFilters.Add((EnumCharacterDressType)slotId,dmgFilt); | |
391 | 431 | } |
392 | 432 | } |
393 | 433 | } |
@@ -426,16 +466,18 @@ namespace ArmourMod | ||
426 | 466 | } |
427 | 467 | |
428 | 468 | private void WearArmorModel(int slotId, Item wornArmour) |
429 | - { | |
430 | - if ( !RenderableWornArmours.ContainsKey( (EnumCharacterDressType)slotId ) ) { | |
431 | -#if DEBUG | |
432 | - Logger.VerboseDebug( "Wearing: {0}", wornArmour.Code.ToString( ) ); | |
433 | -#endif | |
434 | - RenderableWornArmours.Add( (EnumCharacterDressType)slotId, wornArmour ); | |
435 | - } else { | |
436 | -#if DEBUG | |
437 | - Logger.VerboseDebug( "Duplicate of SlotId {0} worn Armour: {1}",slotId ,wornArmour.Code.ToString( ) ); | |
438 | -#endif | |
469 | + { | |
470 | + if (wornArmour.StorageFlags == EnumItemStorageFlags.Outfit) { | |
471 | + if (!RenderableWornArmours.ContainsKey(( EnumCharacterDressType )slotId)) { | |
472 | + #if DEBUG | |
473 | + Logger.VerboseDebug("Marking Renderable: {0}", wornArmour.Code.ToString( )); | |
474 | + #endif | |
475 | + RenderableWornArmours.Add(( EnumCharacterDressType )slotId, wornArmour); | |
476 | + } else { | |
477 | + #if DEBUG | |
478 | + Logger.VerboseDebug("Duplicate of SlotId {0} Renderable: {1}", slotId, wornArmour.Code.ToString( )); | |
479 | + #endif | |
480 | + } | |
439 | 481 | } |
440 | 482 | } |
441 | 483 |
@@ -443,14 +485,14 @@ namespace ArmourMod | ||
443 | 485 | { |
444 | 486 | if ( RenderableWornArmours.ContainsKey( (EnumCharacterDressType)slotId ) ) { |
445 | 487 | var armourItem = RenderableWornArmours[(EnumCharacterDressType)slotId]; |
446 | -#if DEBUG | |
447 | - Logger.VerboseDebug( "UN-Wearing: {0}", armourItem.Code.ToString( ) ); | |
448 | -#endif | |
488 | + #if DEBUG | |
489 | + Logger.VerboseDebug( "UN-Marking Renderable: {0}", armourItem.Code.ToString( ) ); | |
490 | + #endif | |
449 | 491 | RenderableWornArmours.Remove( (EnumCharacterDressType)slotId ); |
450 | 492 | } else { |
451 | -#if DEBUG | |
452 | - Logger.VerboseDebug( "Non-armour removed, slotID{0}", slotId ); | |
453 | -#endif | |
493 | + #if DEBUG | |
494 | + Logger.VerboseDebug( "Non-Renderable removed, slotID{0}", slotId ); | |
495 | + #endif | |
454 | 496 | } |
455 | 497 | } |
456 | 498 |
@@ -468,7 +510,7 @@ namespace ArmourMod | ||
468 | 510 | |
469 | 511 | if ( itemSlot.StorageType == EnumItemStorageFlags.Outfit && itemSlot.Itemstack.Class == EnumItemClass.Item ) { |
470 | 512 | |
471 | - if ( CheckIfClothesIsArmour(itemSlot) ) | |
513 | + if ( CheckIfItemHasDamageFilter(itemSlot) ) | |
472 | 514 | { |
473 | 515 | #if DEBUG |
474 | 516 | Logger.VerboseDebug( "{0} is wearing armour: {1}", targetPlayer.Player.PlayerName, itemSlot.Itemstack.Item.Code.ToString( ) ); |
@@ -29,13 +29,9 @@ namespace ArmourMod | ||
29 | 29 | var slashing = stack.ItemAttributes["SlashingProtection"].AsFloat( ); |
30 | 30 | var crushing = stack.ItemAttributes["CrushingProtection"].AsFloat( ); |
31 | 31 | var flame = stack.ItemAttributes["FireProtection"].AsFloat( ); |
32 | + var encumberance = stack.ItemAttributes["Encumberance"].AsFloat( ); | |
32 | 33 | |
33 | - dsc.AppendFormat("Protection:\n Blunt {0:P1}\n Piercing {1:P1}\n Slashing {2:P1}\n Crushing {3:P1}\n Flame {4:P1}\n", | |
34 | - blunt, | |
35 | - piercing, | |
36 | - slashing, | |
37 | - crushing, | |
38 | - flame); | |
34 | + dsc.AppendFormat($"Blunt {blunt:P1}\n Piercing {piercing:P1}\n Slashing {slashing:P1}\n Crushing {crushing:P1}\n Flame {flame:P1}\n Encumberance {encumberance:P1}\n"); | |
39 | 35 | |
40 | 36 | EnumCharacterDressType dresstype; |
41 | 37 | string strdress = stack.ItemAttributes["clothescategory"].AsString( ); |
@@ -147,6 +147,12 @@ | ||
147 | 147 | <None Include="assets\armourmod\lang\en.json"> |
148 | 148 | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
149 | 149 | </None> |
150 | + <None Include="assets\armourmod\shapes\item\armour\buckler.json"> | |
151 | + <CopyToOutputDirectory>Always</CopyToOutputDirectory> | |
152 | + </None> | |
153 | + <None Include="assets\armourmod\itemtypes\wearable\item-offhand-buckler.json"> | |
154 | + <CopyToOutputDirectory>Always</CopyToOutputDirectory> | |
155 | + </None> | |
150 | 156 | </ItemGroup> |
151 | 157 | <ItemGroup> |
152 | 158 | <Folder Include="assets\armourmod\" /> |
@@ -30,7 +30,8 @@ | ||
30 | 30 | BluntProtection:0.2, |
31 | 31 | PiercingProtection:0.3, |
32 | 32 | SlashingProtection:0.3, |
33 | - CrushingProtection:0.1 | |
33 | + CrushingProtection:0.1, | |
34 | + FireProtection:0.11 | |
34 | 35 | }, |
35 | 36 | "*":{ |
36 | 37 | clothescategory: "head", |
@@ -0,0 +1,82 @@ | ||
1 | +{ | |
2 | + code: "clothes-offhand-buckler", | |
3 | + class: "ItemArmour", | |
4 | + storageFlags: 257, | |
5 | + | |
6 | + heldRightTpIdleAnimation: "holdinglanternrighthand", | |
7 | + heldLeftTpIdleAnimation: "holdinglanternlefthand", | |
8 | + | |
9 | + variantgroups: [ | |
10 | + { code: "metal", states: ["copper", "tinbronze", "bismuthbronze", "blackbronze", "iron" ] }, | |
11 | + ], | |
12 | + | |
13 | + shape: { base: "armourmod:item/armament/armour/buckler" }, | |
14 | + | |
15 | + textures: { | |
16 | + "metal": { base: "block/metal/ingot/{metal}" }, | |
17 | + "handle": { base: "item/tool/material/wood" } | |
18 | + }, | |
19 | + | |
20 | + durabilitybytype: { | |
21 | + "clothes-offhand-buckler-gold": 175, | |
22 | + "clothes-offhand-buckler-silver": 175, | |
23 | + "clothes-offhand-buckler-copper": 350, | |
24 | + "clothes-offhand-buckler-tinbronze": 500, | |
25 | + "clothes-offhand-buckler-bismuthbronze": 600, | |
26 | + "clothes-offhand-buckler-blackbronze": 700, | |
27 | + "clothes-offhand-buckler-iron": 1200, | |
28 | + "clothes-offhand-buckler-steel": 1800, | |
29 | + }, | |
30 | + | |
31 | + attributesByType: { | |
32 | + "*-copper": { | |
33 | + BluntProtection:0.1, | |
34 | + PiercingProtection:0.1, | |
35 | + SlashingProtection:0.1, | |
36 | + CrushingProtection:0.1 | |
37 | + }, | |
38 | + "*-tinbronze": { | |
39 | + BluntProtection:0.12, | |
40 | + PiercingProtection:0.12, | |
41 | + SlashingProtection:0.12, | |
42 | + CrushingProtection:0.12 | |
43 | + }, | |
44 | + "*-bismuthbronze": { | |
45 | + BluntProtection:0.13, | |
46 | + PiercingProtection:0.13, | |
47 | + SlashingProtection:0.13, | |
48 | + CrushingProtection:0.13 | |
49 | + }, | |
50 | + "*-blackbronze": { | |
51 | + BluntProtection:0.15, | |
52 | + PiercingProtection:0.15, | |
53 | + SlashingProtection:0.15, | |
54 | + CrushingProtection:0.15 | |
55 | + }, | |
56 | + "*-iron": { | |
57 | + BluntProtection:0.2, | |
58 | + PiercingProtection:0.2, | |
59 | + SlashingProtection:0.2, | |
60 | + CrushingProtection:0.2 | |
61 | + }, | |
62 | + }, | |
63 | + | |
64 | + fpHandTransform: { | |
65 | + translation: { x: 0.3, y: -0.1, z: 0 }, | |
66 | + rotation: { x: 0, y: -45, z: 0 }, | |
67 | + scale: 1.18 | |
68 | + }, | |
69 | + guiTransform: { | |
70 | + origin: { x: 0.5, y: 0.3, z: 0.5 }, | |
71 | + scale: 1.5 | |
72 | + }, | |
73 | + tpHandTransform: { | |
74 | + translation: { x: -0.59, y: -0.89, z: -0.83 }, | |
75 | + rotation: { x: 0, y: -8, z: -96 }, | |
76 | + scale: 0.55 | |
77 | + }, | |
78 | + groundTransform: { | |
79 | + origin: { x: 0.5, y: 0, z: 0.5 }, | |
80 | + scale: 2 | |
81 | + } | |
82 | +} |
@@ -55,7 +55,8 @@ | ||
55 | 55 | BluntProtection:0.3, |
56 | 56 | PiercingProtection:0.3, |
57 | 57 | SlashingProtection:0.3, |
58 | - CrushingProtection:0.3 | |
58 | + CrushingProtection:0.3, | |
59 | + FireProtection:0.14 | |
59 | 60 | }, |
60 | 61 | "*-lamellar": { |
61 | 62 | clothescategory: "upperbodyover", |
@@ -63,7 +64,8 @@ | ||
63 | 64 | BluntProtection:0.35, |
64 | 65 | PiercingProtection:0.35, |
65 | 66 | SlashingProtection:0.35, |
66 | - CrushingProtection:0.35 | |
67 | + CrushingProtection:0.35, | |
68 | + FireProtection:0.14 | |
67 | 69 | }, |
68 | 70 | "*-platechest": { |
69 | 71 | clothescategory: "upperbodyover", |
@@ -71,7 +73,8 @@ | ||
71 | 73 | BluntProtection:0.32, |
72 | 74 | PiercingProtection:0.3, |
73 | 75 | SlashingProtection:0.37, |
74 | - CrushingProtection:0.31 | |
76 | + CrushingProtection:0.31, | |
77 | + FireProtection:0.2 | |
75 | 78 | }, |
76 | 79 | "*-scale": { |
77 | 80 | clothescategory: "upperbodyover", |
@@ -79,7 +82,8 @@ | ||
79 | 82 | BluntProtection:0.27, |
80 | 83 | PiercingProtection:0.26, |
81 | 84 | SlashingProtection:0.27, |
82 | - CrushingProtection:0.25 | |
85 | + CrushingProtection:0.25, | |
86 | + FireProtection:0.1 | |
83 | 87 | }, |
84 | 88 | "*-chain": { |
85 | 89 | clothescategory: "upperbodyover", |
@@ -87,13 +91,15 @@ | ||
87 | 91 | BluntProtection:0.2, |
88 | 92 | PiercingProtection:0.25, |
89 | 93 | SlashingProtection:0.25, |
90 | - CrushingProtection:0.2 | |
94 | + CrushingProtection:0.2, | |
95 | + FireProtection:0.05 | |
91 | 96 | }, |
92 | 97 | "*-studdedleather": { |
93 | 98 | clothescategory: "upperbodyover", |
94 | 99 | inCharacterCreationDialog: false, |
95 | 100 | SlashingProtection:0.17, |
96 | - BluntProtection:0.2 | |
101 | + BluntProtection:0.2, | |
102 | + FireProtection:0.19 | |
97 | 103 | }, |
98 | 104 | "*-leather": { |
99 | 105 | clothescategory: "upperbodyover", |
@@ -0,0 +1,51 @@ | ||
1 | +{ | |
2 | + code: "buckler-wood", | |
3 | + class: "ItemArmour", | |
4 | + storageFlags: 257, | |
5 | + heldRightTpIdleAnimation: "holdinglanternrighthand", | |
6 | + heldLeftTpIdleAnimation: "holdinglanternlefthand", | |
7 | + attributes: | |
8 | + { | |
9 | + BluntProtection:0.13, | |
10 | + PiercingProtection:0.1, | |
11 | + SlashingProtection:0.1, | |
12 | + CrushingProtection:0.05, | |
13 | + FireProtection:0.01 | |
14 | + }, | |
15 | + shape: { | |
16 | + base: "item/armour/buckler" | |
17 | + }, | |
18 | + durability: 50, | |
19 | + creativeinventory: { "general": ["*"], "items": ["*"], "clothing": ["*"] }, | |
20 | + textures: { | |
21 | + aged:{ base: "game:block/wood/debarked/aged"}, | |
22 | + }, | |
23 | + | |
24 | + fpHandTransform: { | |
25 | + translation: { x: 0, y: 0, z: 0 }, | |
26 | + rotation: { x: 17, y: 38, z: -33 }, | |
27 | + scale: 1.5 | |
28 | + }, | |
29 | + guiTransform: { | |
30 | + translation: { x: 0, y: 1, z: 0 }, | |
31 | + rotation: { x: 2, y: 0, z: 0 }, | |
32 | + origin: { x: 0.45, y: 0.55, z: 0.5 }, | |
33 | + scale: 1.6 | |
34 | + }, | |
35 | + tpHandTransform: { | |
36 | + translation: { x: 0, y: -0.05, z: -0.6 }, | |
37 | + rotation: { x: -65, y: -180, z: 90 }, | |
38 | + origin: { x: 0.5, y: 0, z: 0.5 }, | |
39 | + scale: 0.8 | |
40 | + }, | |
41 | + groundTransform: { | |
42 | + rotation: { x: 0, y: -1, z: 90 }, | |
43 | + origin: { x: 0.39, y: 0.25, z: 0.5 }, | |
44 | + scale: 2.8 | |
45 | + }, | |
46 | + combustibleProps: { | |
47 | + burnTemperature: 600, | |
48 | + burnDuration: 12, | |
49 | + }, | |
50 | + materialDensity: 600 | |
51 | +} | |
\ No newline at end of file |
@@ -0,0 +1,71 @@ | ||
1 | +{ | |
2 | + "editor": { | |
3 | + "allAngles": false, | |
4 | + "singleTexture": false | |
5 | + }, | |
6 | + "textureWidth": 16, | |
7 | + "textureHeight": 16, | |
8 | + "textures": { | |
9 | + "aged": "block/wood/debarked/aged" | |
10 | + }, | |
11 | + "elements": [ | |
12 | + { | |
13 | + "name": "Handle", | |
14 | + "from": [ 8.0, 7.0, 8.0 ], | |
15 | + "to": [ 8.75, 12.0, 8.75 ], | |
16 | + "rotationOrigin": [ 8.0, 7.0, 8.0 ], | |
17 | + "faces": { | |
18 | + "north": { "texture": "#aged", "uv": [ 0.0, 0.0, 5.0, 0.5 ], "rotation": 90 }, | |
19 | + "east": { "texture": "#aged", "uv": [ 0.0, 0.0, 5.0, 0.5 ], "rotation": 90 }, | |
20 | + "south": { "texture": "#aged", "uv": [ 0.0, 0.0, 5.0, 0.5 ], "rotation": 90 }, | |
21 | + "west": { "texture": "#aged", "uv": [ 0.0, 0.0, 5.0, 0.5 ], "rotation": 90 }, | |
22 | + "up": { "texture": "#aged", "uv": [ 0.0, 0.0, 0.5, 0.5 ] }, | |
23 | + "down": { "texture": "#aged", "uv": [ 0.0, 0.0, 0.5, 0.5 ] } | |
24 | + }, | |
25 | + "children": [ | |
26 | + { | |
27 | + "name": "Handle1", | |
28 | + "from": [ 0.0, 0.0, -2.25 ], | |
29 | + "to": [ 0.75, 0.75, 0.0 ], | |
30 | + "rotationOrigin": [ 0.0, 0.0, -2.0 ], | |
31 | + "faces": { | |
32 | + "north": { "texture": "#aged", "uv": [ 0.0, 0.0, 0.5, 0.5 ] }, | |
33 | + "east": { "texture": "#aged", "uv": [ 0.0, 0.0, 2.0, 0.5 ] }, | |
34 | + "south": { "texture": "#aged", "uv": [ 0.0, 0.0, 0.5, 0.5 ] }, | |
35 | + "west": { "texture": "#aged", "uv": [ 0.0, 0.0, 2.0, 0.5 ] }, | |
36 | + "up": { "texture": "#aged", "uv": [ 0.0, 0.0, 0.5, 2.0 ] }, | |
37 | + "down": { "texture": "#aged", "uv": [ 0.0, 0.0, 0.5, 2.0 ] } | |
38 | + } | |
39 | + }, | |
40 | + { | |
41 | + "name": "Handle2", | |
42 | + "from": [ 0.0, 4.25, -2.25 ], | |
43 | + "to": [ 0.75, 5.0, 0.0 ], | |
44 | + "rotationOrigin": [ 0.0, 4.0, -2.0 ], | |
45 | + "faces": { | |
46 | + "north": { "texture": "#aged", "uv": [ 0.0, 0.0, 0.5, 0.5 ] }, | |
47 | + "east": { "texture": "#aged", "uv": [ 0.0, 0.0, 2.0, 0.5 ] }, | |
48 | + "south": { "texture": "#aged", "uv": [ 0.0, 0.0, 0.5, 0.5 ] }, | |
49 | + "west": { "texture": "#aged", "uv": [ 0.0, 0.0, 2.0, 0.5 ] }, | |
50 | + "up": { "texture": "#aged", "uv": [ 0.5, 0.0, 1.0, 2.0 ] }, | |
51 | + "down": { "texture": "#aged", "uv": [ 0.0, 0.0, 0.5, 2.0 ] } | |
52 | + } | |
53 | + }, | |
54 | + { | |
55 | + "name": "Face", | |
56 | + "from": [ -4.0, -2.0, -2.0 ], | |
57 | + "to": [ 5.0, 7.0, -1.0 ], | |
58 | + "rotationOrigin": [ 0.5, 2.5, 0.0 ], | |
59 | + "rotationZ": -45.0, | |
60 | + "faces": { | |
61 | + "north": { "texture": "#aged", "uv": [ 1.0, 0.0, 10.0, 9.0 ] }, | |
62 | + "east": { "texture": "#aged", "uv": [ 4.0, 5.5, 13.0, 6.5 ], "rotation": 90 }, | |
63 | + "south": { "texture": "#aged", "uv": [ 1.0, 0.0, 10.0, 9.0 ] }, | |
64 | + "west": { "texture": "#aged", "uv": [ 4.0, 4.0, 13.0, 5.0 ], "rotation": 90 }, | |
65 | + "up": { "texture": "#aged", "uv": [ 7.0, 14.5, 16.0, 15.5 ] }, | |
66 | + "down": { "texture": "#aged", "uv": [ 7.0, 15.0, 16.0, 16.0 ] } | |
67 | + } | |
68 | + } | |
69 | + ] | |
70 | + } | |
71 | + ]} | |
\ No newline at end of file |
@@ -3,7 +3,7 @@ | ||
3 | 3 | "name": "Basic Armour Mod", |
4 | 4 | "description" : "Leather, Plate, Scale & More", |
5 | 5 | "authors": ["Melchior", "Bunnyviking"], |
6 | - "version": "0.1.8", | |
6 | + "version": "0.1.9", | |
7 | 7 | "dependencies": { |
8 | 8 | "game": "1.9.9", |
9 | 9 | "survival": "" |