• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

VS plugin mod for Basic Armour


Commit MetaInfo

修订版5659a45368acee180fff4193a7150722b28d25ed (tree)
时间2019-07-24 11:37:45
作者melchior <melchior@user...>
Commitermelchior

Log Message

New feature; Buckler support,
Experimental workaround for rendering issue,
Initial buckler model added,
version bump

更改概述

差异

--- a/ArmourMod/Armour/AmourMeshRenderer.cs
+++ b/ArmourMod/Armour/AmourMeshRenderer.cs
@@ -92,6 +92,10 @@ namespace ArmourMod
9292 if ( rpi.CameraType == EnumCameraMode.FirstPerson ) return;
9393 }
9494
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+
9599 foreach(var wornItemTuple in armouredPlayer.RenderableWornArmours) {
96100
97101 if ( !Armoury.ContainsKey( wornItemTuple.Value.Code ) ) {
@@ -137,7 +141,7 @@ namespace ArmourMod
137141
138142 rpi.CurrentActiveShader.BindTexture2D( "tex2d", armourData.Armour_TextureId, 0 );
139143 } else {
140-
144+
141145 //IStandardShaderProgram PreparedStandardShader(int posX, int posY, int posZ);
142146 prog = rpi.PreparedStandardShader( (int)armouredPlayer.Pos.X, (int)armouredPlayer.Pos.Y, (int)armouredPlayer.Pos.Z );
143147 prog.Tex2D = armourData.Armour_TextureId;
--- a/ArmourMod/Armour/ArmourModHookin.cs
+++ b/ArmourMod/Armour/ArmourModHookin.cs
@@ -181,20 +181,17 @@ namespace ArmourMod
181181
182182 //armourmod:clothes-upperbodyover-vest-leather
183183 //armourmod:item-clothes-upperbodyover-vest-leather
184- //var armourLocations = ClientApi.Assets.GetLocations( "itemtypes/wearable", _domain );
185184 var armourAssets = ClientApi.World.AssetManager.GetMany("itemtypes/wearable",_domain,true);
186- //ClientApi.Assets.GetMany
187185
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 );
191188 #if DEBUG
192189 ClientApi.Logger.VerboseDebug( "****************************************************** " );
193- ClientApi.Logger.VerboseDebug( "Known Armour variants: {0}", armourItemsBrute.Count() );
190+ ClientApi.Logger.VerboseDebug( "Renderable Armour count: {0}", renderableArmourItems.Count() );
194191 ClientApi.Logger.VerboseDebug( "****************************************************** " );
195192 #endif
196193
197- foreach(var armourItem in armourItemsBrute)
194+ foreach(var armourItem in renderableArmourItems)
198195 {
199196 if ( armourItem.IsMissing || armourItem.Attributes == null ) {
200197 ClientApi.Logger.Error( "Armour item MISSING / NULL ATTRIBUTES {0} !", armourItem.Code.ToShortString( ) );
@@ -224,25 +221,27 @@ namespace ArmourMod
224221 //Manual fetch by JSON parsing....
225222
226223 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));
228225
229- var originAsset = armourAssets.Single( armA => armA.Name.StartsWith( partialName ) );
226+ var originAsset = armourAssets.Single( armA => armA.Name.StartsWith(partialName, StringComparison.Ordinal));
230227
231228 //System.Diagnostics.Debugger.Break();
232- JObject originalJson = JObject.Parse(originAsset.ToText());
229+ JObject originalJson = JObject.Parse(originAsset.ToText());
233230
234- if ( originalJson.HasValues ) {
231+ if (originalJson.HasValues) {
235232 var tpJsonNode = originalJson[_thirdPersonKey];
236233 //Token.C.SelectToken( @"$.thirdPersonTransform" );
237234 //if ( tpJsonNode != null )
238235 // ClientApi.Logger.VerboseDebug("TP SPAM:"+ tpJsonNode.ToString( ) );
239236
240237
241- ModelTransform configuredTransform = new JsonObject( tpJsonNode ).AsObject<ModelTransform>( );
238+ ModelTransform configuredTransform = new JsonObject(tpJsonNode).AsObject<ModelTransform>( );
242239 fudge_transform = configuredTransform;
243240 #if DEBUG
244241 ClientApi.Logger.VerboseDebug( "[{0}] Using JSON Transform parameters = {1}", armourItem.Code.ToShortString( ),configuredTransform.Translation.ToString() );
245242 #endif
243+ } else {
244+ ClientApi.Logger.Warning("Could not load JSON Transform ");
246245 }
247246
248247 } else {
--- a/ArmourMod/Armour/DamageFilter.cs
+++ b/ArmourMod/Armour/DamageFilter.cs
@@ -13,6 +13,17 @@ namespace ArmourMod
1313 slashingPercent = slash;
1414 crushingPercent = crush;
1515 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;
1627 }
1728
1829 public float bluntPercent;
@@ -20,6 +31,7 @@ namespace ArmourMod
2031 public float slashingPercent;
2132 public float crushingPercent;
2233 public float firePercent;
34+ public float encumberancePercent;
2335
2436 //TODO:Threshold values;
2537
@@ -31,8 +43,9 @@ namespace ArmourMod
3143 var slashing = armourInSlot.Itemstack.ItemAttributes["SlashingProtection"].AsFloat( );
3244 var crushing = armourInSlot.Itemstack.ItemAttributes["CrushingProtection"].AsFloat( );
3345 var flame = armourInSlot.Itemstack.ItemAttributes["FireProtection"].AsFloat( );
46+ var encumberance = armourInSlot.Itemstack.ItemAttributes["Encumberance"].AsFloat( );
3447
35- return new DamageFilter(blunt, piercing, slashing, crushing, flame);
48+ return new DamageFilter(blunt, piercing, slashing, crushing, flame, encumberance);
3649 }
3750 }
3851 }
--- a/ArmourMod/Armour/EntityArmourPlayer.cs
+++ b/ArmourMod/Armour/EntityArmourPlayer.cs
@@ -77,10 +77,9 @@ namespace ArmourMod
7777 Logger.VerboseDebug( "Side:{0}, gearInv == null?{1}", CoreAPI.Side.ToString( ), this.GearInventory == null );
7878 #endif
7979
80- this.GearInventory.SlotModified += ServerWatchSlotModified;
81- //this.LeftHandItemSlot.//Check also for shields
80+ this.GearInventory.SlotModified += ServerGearSlotModified;
8281
83- //base.GearInventory.SlotNotified += WatchSlotNotified;
82+ this.LeftHandItemSlot.Inventory.SlotModified += ServerOffhandSlotModified;
8483
8584 //Walk Inventory FIRST TIME ONLY
8685 PopulateDamageFilters();
@@ -213,9 +212,9 @@ namespace ArmourMod
213212 return base.ReceiveDamage(damageSource, damage);
214213 }
215214
216- public static bool CheckIfClothesIsArmour(ItemSlot possibleArmour)
215+ public static bool CheckIfItemHasDamageFilter(ItemSlot possibleArmour)
217216 {
218- if (possibleArmour.Itemstack != null && possibleArmour.Itemstack.Item.Code.BeginsWith("armourmod", "clothes")) {
217+ if (possibleArmour.Itemstack != null && possibleArmour.Itemstack.Item.Code.Domain == ArmourModHookin._domain) {
219218
220219 if (possibleArmour.Itemstack.ItemAttributes.Exists
221220 && (
@@ -234,12 +233,13 @@ namespace ArmourMod
234233
235234 public static bool CheckForCustomMesh(ItemSlot possibleArmour)
236235 {
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")) {
238237
239238 if (possibleArmour.Itemstack.ItemAttributes.Exists) {
240239 //shape: { base: "entity/humanoid/seraph" },
241240
242- if (possibleArmour.Itemstack.Item.Shape != null) {
241+ if (possibleArmour.Itemstack.Item.StorageFlags == EnumItemStorageFlags.Outfit
242+ && possibleArmour.Itemstack.Item.Shape != null) {
243243 return possibleArmour.Itemstack.Item.Shape.Base.BeginsWith("game", "seraph") == false;
244244 }
245245 }
@@ -248,21 +248,22 @@ namespace ArmourMod
248248 return false;
249249 }
250250
251- private void ServerWatchSlotModified (int slotId)
251+ private void ServerGearSlotModified (int slotId)
252252 {
253253 var watchedSlot = this.GearInventory[slotId];
254254 #if DEBUG
255- Logger.VerboseDebug( "WatchSlotModified:{0}", slotId );
255+ Logger.VerboseDebug( "GearSlotModified:{0}", slotId );
256256 #endif
257257 if ( !watchedSlot.Empty ) {
258258
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 ) {
260261 #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() );
262263 #endif
263264 //replace / add damage filter when applicable armor item in slot (which ever that is?)
264265
265- if (CheckIfClothesIsArmour(watchedSlot))
266+ if (CheckIfItemHasDamageFilter(watchedSlot))
266267 {
267268 DamageFilter dmgFilt = DamageFilter.ConstructFilter( watchedSlot );
268269 #if DEBUG
@@ -275,13 +276,49 @@ namespace ArmourMod
275276 } else if (watchedSlot.StorageType == EnumItemStorageFlags.Outfit){
276277 //Clear out filters for what was in slot# X here - if applicable
277278 #if DEBUG
278- Logger.VerboseDebug( "Removed a clothing item from SlotId:{0}",slotId );
279+ Logger.VerboseDebug( "Removed a AF item from SlotId:{0}",slotId );
279280 #endif
280281 DamageFilters.Remove((EnumCharacterDressType)slotId);
281282 RecomputeDamageFilterPercents( );
282283 }
283284 }
284285
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+
285322 protected void ClientWatchSlotModified (int slotId)
286323 {
287324 #if DEBUG
@@ -293,7 +330,7 @@ namespace ArmourMod
293330 if ( !watchedSlot.Empty ) {
294331
295332 if ( watchedSlot.StorageType == EnumItemStorageFlags.Outfit && watchedSlot.Itemstack.Class == EnumItemClass.Item ) {
296- if (CheckIfClothesIsArmour(watchedSlot) && CheckForCustomMesh(watchedSlot))
333+ if (CheckIfItemHasDamageFilter(watchedSlot) && CheckForCustomMesh(watchedSlot))
297334 {
298335 WearArmorModel( slotId, watchedSlot.Itemstack.Item );
299336 }
@@ -362,32 +399,35 @@ namespace ArmourMod
362399 }
363400
364401
365-
402+ /// <summary>
403+ /// Populates the damage filters.
404+ /// </summary>
405+ /// <remarks>Server side</remarks>
366406 private void PopulateDamageFilters()
367407 {
368408 DamageFilters = new Dictionary<EnumCharacterDressType, DamageFilter>( Enum.GetNames(typeof(EnumCharacterDressType)).Length );
369409
370410 if ( this.GearInventory.Count > 0 ) {
371- foreach(var itemSlot in this.GearInventory ) {
411+ foreach(ItemSlot itemSlot in this.GearInventory ) {
372412
373- EnumCharacterDressType slotId = (EnumCharacterDressType)this.GearInventory.GetSlotId( itemSlot );
413+ int slotId = this.GearInventory.GetSlotId( itemSlot );
374414 if ( !itemSlot.Empty ) {
375415
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 ) {
377417
378- if ( CheckIfClothesIsArmour(itemSlot) )
418+ if ( CheckIfItemHasDamageFilter(itemSlot) )
379419 {
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
383423
384424 DamageFilter dmgFilt = DamageFilter.ConstructFilter( itemSlot);
385425
386-#if DEBUG
426+ #if DEBUG
387427 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
389429
390- DamageFilters.Add(slotId,dmgFilt);
430+ DamageFilters.Add((EnumCharacterDressType)slotId,dmgFilt);
391431 }
392432 }
393433 }
@@ -426,16 +466,18 @@ namespace ArmourMod
426466 }
427467
428468 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+ }
439481 }
440482 }
441483
@@ -443,14 +485,14 @@ namespace ArmourMod
443485 {
444486 if ( RenderableWornArmours.ContainsKey( (EnumCharacterDressType)slotId ) ) {
445487 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
449491 RenderableWornArmours.Remove( (EnumCharacterDressType)slotId );
450492 } 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
454496 }
455497 }
456498
@@ -468,7 +510,7 @@ namespace ArmourMod
468510
469511 if ( itemSlot.StorageType == EnumItemStorageFlags.Outfit && itemSlot.Itemstack.Class == EnumItemClass.Item ) {
470512
471- if ( CheckIfClothesIsArmour(itemSlot) )
513+ if ( CheckIfItemHasDamageFilter(itemSlot) )
472514 {
473515 #if DEBUG
474516 Logger.VerboseDebug( "{0} is wearing armour: {1}", targetPlayer.Player.PlayerName, itemSlot.Itemstack.Item.Code.ToString( ) );
--- a/ArmourMod/Armour/ItemArmour.cs
+++ b/ArmourMod/Armour/ItemArmour.cs
@@ -29,13 +29,9 @@ namespace ArmourMod
2929 var slashing = stack.ItemAttributes["SlashingProtection"].AsFloat( );
3030 var crushing = stack.ItemAttributes["CrushingProtection"].AsFloat( );
3131 var flame = stack.ItemAttributes["FireProtection"].AsFloat( );
32+ var encumberance = stack.ItemAttributes["Encumberance"].AsFloat( );
3233
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");
3935
4036 EnumCharacterDressType dresstype;
4137 string strdress = stack.ItemAttributes["clothescategory"].AsString( );
--- a/ArmourMod/ArmourMod.csproj
+++ b/ArmourMod/ArmourMod.csproj
@@ -147,6 +147,12 @@
147147 <None Include="assets\armourmod\lang\en.json">
148148 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
149149 </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>
150156 </ItemGroup>
151157 <ItemGroup>
152158 <Folder Include="assets\armourmod\" />
--- a/ArmourMod/assets/armourmod/itemtypes/wearable/clothes-head-potmetal.json
+++ b/ArmourMod/assets/armourmod/itemtypes/wearable/clothes-head-potmetal.json
@@ -30,7 +30,8 @@
3030 BluntProtection:0.2,
3131 PiercingProtection:0.3,
3232 SlashingProtection:0.3,
33- CrushingProtection:0.1
33+ CrushingProtection:0.1,
34+ FireProtection:0.11
3435 },
3536 "*":{
3637 clothescategory: "head",
--- /dev/null
+++ b/ArmourMod/assets/armourmod/itemtypes/wearable/clothes-offhand-shields.json
@@ -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+}
--- a/ArmourMod/assets/armourmod/itemtypes/wearable/clothes-upperbodyover-vest.json
+++ b/ArmourMod/assets/armourmod/itemtypes/wearable/clothes-upperbodyover-vest.json
@@ -55,7 +55,8 @@
5555 BluntProtection:0.3,
5656 PiercingProtection:0.3,
5757 SlashingProtection:0.3,
58- CrushingProtection:0.3
58+ CrushingProtection:0.3,
59+ FireProtection:0.14
5960 },
6061 "*-lamellar": {
6162 clothescategory: "upperbodyover",
@@ -63,7 +64,8 @@
6364 BluntProtection:0.35,
6465 PiercingProtection:0.35,
6566 SlashingProtection:0.35,
66- CrushingProtection:0.35
67+ CrushingProtection:0.35,
68+ FireProtection:0.14
6769 },
6870 "*-platechest": {
6971 clothescategory: "upperbodyover",
@@ -71,7 +73,8 @@
7173 BluntProtection:0.32,
7274 PiercingProtection:0.3,
7375 SlashingProtection:0.37,
74- CrushingProtection:0.31
76+ CrushingProtection:0.31,
77+ FireProtection:0.2
7578 },
7679 "*-scale": {
7780 clothescategory: "upperbodyover",
@@ -79,7 +82,8 @@
7982 BluntProtection:0.27,
8083 PiercingProtection:0.26,
8184 SlashingProtection:0.27,
82- CrushingProtection:0.25
85+ CrushingProtection:0.25,
86+ FireProtection:0.1
8387 },
8488 "*-chain": {
8589 clothescategory: "upperbodyover",
@@ -87,13 +91,15 @@
8791 BluntProtection:0.2,
8892 PiercingProtection:0.25,
8993 SlashingProtection:0.25,
90- CrushingProtection:0.2
94+ CrushingProtection:0.2,
95+ FireProtection:0.05
9196 },
9297 "*-studdedleather": {
9398 clothescategory: "upperbodyover",
9499 inCharacterCreationDialog: false,
95100 SlashingProtection:0.17,
96- BluntProtection:0.2
101+ BluntProtection:0.2,
102+ FireProtection:0.19
97103 },
98104 "*-leather": {
99105 clothescategory: "upperbodyover",
--- /dev/null
+++ b/ArmourMod/assets/armourmod/itemtypes/wearable/item-offhand-buckler.json
@@ -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
--- /dev/null
+++ b/ArmourMod/assets/armourmod/shapes/item/armour/buckler.json
@@ -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
--- a/ArmourMod/modinfo.json
+++ b/ArmourMod/modinfo.json
@@ -3,7 +3,7 @@
33 "name": "Basic Armour Mod",
44 "description" : "Leather, Plate, Scale & More",
55 "authors": ["Melchior", "Bunnyviking"],
6- "version": "0.1.8",
6+ "version": "0.1.9",
77 "dependencies": {
88 "game": "1.9.9",
99 "survival": ""