diff --git a/assets/creatures/arche/MatArcheBleue.material b/assets/creatures/arche/MatArcheBleue.material new file mode 100644 index 0000000..6565e41 Binary files /dev/null and b/assets/creatures/arche/MatArcheBleue.material differ diff --git a/assets/creatures/arche/MatArcheCyan.material b/assets/creatures/arche/MatArcheCyan.material new file mode 100644 index 0000000..d8c171d Binary files /dev/null and b/assets/creatures/arche/MatArcheCyan.material differ diff --git a/assets/creatures/arche/MatArcheJaune.material b/assets/creatures/arche/MatArcheJaune.material new file mode 100644 index 0000000..3e2b54b Binary files /dev/null and b/assets/creatures/arche/MatArcheJaune.material differ diff --git a/assets/creatures/arche/MatArcheRose.material b/assets/creatures/arche/MatArcheRose.material new file mode 100644 index 0000000..ee7a238 Binary files /dev/null and b/assets/creatures/arche/MatArcheRose.material differ diff --git a/assets/creatures/arche/MatArcheRouge.material b/assets/creatures/arche/MatArcheRouge.material new file mode 100644 index 0000000..65d2745 Binary files /dev/null and b/assets/creatures/arche/MatArcheRouge.material differ diff --git a/assets/creatures/arche/MatArcheVert.material b/assets/creatures/arche/MatArcheVert.material new file mode 100644 index 0000000..67108d8 Binary files /dev/null and b/assets/creatures/arche/MatArcheVert.material differ diff --git a/assets/creatures/arche/arche.glb b/assets/creatures/arche/arche.glb new file mode 100644 index 0000000..a728cc5 Binary files /dev/null and b/assets/creatures/arche/arche.glb differ diff --git a/assets/creatures/arche/arche.gltf b/assets/creatures/arche/arche.gltf new file mode 100644 index 0000000..c2ce4d2 --- /dev/null +++ b/assets/creatures/arche/arche.gltf @@ -0,0 +1,1933 @@ +{ + "asset" : { + "generator" : "Khronos glTF Blender I/O v1.6.16", + "version" : "2.0" + }, + "scene" : 0, + "scenes" : [ + { + "name" : "Scene", + "nodes" : [ + 13 + ] + } + ], + "nodes" : [ + { + "mesh" : 0, + "name" : "ArcheBleue", + "rotation" : [ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "translation" : [ + -1.1920928955078125e-07, + 0.30000001192092896, + -2.0529736133312326e-08 + ] + }, + { + "children" : [ + 0 + ], + "name" : "BoneArcheBleue", + "rotation" : [ + -0.653281569480896, + -0.27059808373451233, + -0.27059802412986755, + 0.6532814502716064 + ], + "scale" : [ + 0.9999999403953552, + 1, + 1 + ], + "translation" : [ + 0.6999999284744263, + 0.4000000059604645, + -1.7484556025237907e-08 + ] + }, + { + "mesh" : 1, + "name" : "ArcheRose", + "rotation" : [ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "translation" : [ + -7.450580596923828e-09, + 0.30000001192092896, + -1.2007875582753513e-08 + ] + }, + { + "children" : [ + 2 + ], + "name" : "BoneArcheRose", + "rotation" : [ + -0.1978076547384262, + 0.6788756251335144, + 0.6788756847381592, + 0.1978076696395874 + ], + "translation" : [ + -0.09762568026781082, + 0.8990569710731506, + 0.02166159823536873 + ] + }, + { + "mesh" : 2, + "name" : "ArcheRouge", + "rotation" : [ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "translation" : [ + -1.4901161193847656e-08, + 0.3, + -1.0321843291194455e-07 + ] + }, + { + "children" : [ + 4 + ], + "name" : "BoneArcheRouge", + "rotation" : [ + -0.6903178691864014, + 0.15317073464393616, + 0.15317071974277496, + 0.6903178095817566 + ], + "scale" : [ + 0.9999999403953552, + 0.9999999403953552, + 1 + ], + "translation" : [ + 0.03416798263788223, + 1.264934778213501, + -0.09398169070482254 + ] + }, + { + "mesh" : 3, + "name" : "ArcheJaune", + "rotation" : [ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "translation" : [ + 0, + 0.2999999701976776, + -5.170989414438054e-09 + ] + }, + { + "children" : [ + 6 + ], + "name" : "BoneArcheJaune", + "rotation" : [ + -0.4663723409175873, + -0.5315043330192566, + -0.5315043330192566, + 0.4663723111152649 + ], + "translation" : [ + 0.060919225215911865, + 1.3999946117401123, + 0.07930219918489456 + ] + }, + { + "mesh" : 4, + "name" : "ArcheVert", + "rotation" : [ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "translation" : [ + 0, + 0.2999999225139618, + -3.824358429938002e-08 + ] + }, + { + "children" : [ + 8 + ], + "name" : "BoneArcheVert", + "rotation" : [ + -0.06787494570016861, + -0.7038415670394897, + -0.7038416266441345, + 0.06787494570016861 + ], + "translation" : [ + -0.39126691222190857, + 1.268194317817688, + 0.5804396271705627 + ] + }, + { + "mesh" : 5, + "name" : "ArcheCyan", + "rotation" : [ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "translation" : [ + 8.940696716308594e-08, + 0.3000000238418707, + -2.739755800007515e-08 + ] + }, + { + "children" : [ + 10 + ], + "name" : "BoneArcheCyan", + "rotation" : [ + -0.5791545510292053, + 0.4056846499443054, + 0.40568456053733826, + 0.5791545510292053 + ], + "scale" : [ + 1.0000003576278687, + 1.0000003576278687, + 1 + ], + "translation" : [ + -0.2960624694824219, + 0.9047061800956726, + -0.6343083381652832 + ] + }, + { + "children" : [ + 1, + 3, + 5, + 7, + 9, + 11 + ], + "name" : "Bone" + }, + { + "children" : [ + 12 + ], + "name" : "Arche" + } + ], + "animations" : [ + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 12, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 12, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 12, + "path" : "scale" + } + }, + { + "sampler" : 3, + "target" : { + "node" : 1, + "path" : "translation" + } + }, + { + "sampler" : 4, + "target" : { + "node" : 1, + "path" : "rotation" + } + }, + { + "sampler" : 5, + "target" : { + "node" : 1, + "path" : "scale" + } + }, + { + "sampler" : 6, + "target" : { + "node" : 3, + "path" : "translation" + } + }, + { + "sampler" : 7, + "target" : { + "node" : 3, + "path" : "rotation" + } + }, + { + "sampler" : 8, + "target" : { + "node" : 3, + "path" : "scale" + } + }, + { + "sampler" : 9, + "target" : { + "node" : 5, + "path" : "translation" + } + }, + { + "sampler" : 10, + "target" : { + "node" : 5, + "path" : "rotation" + } + }, + { + "sampler" : 11, + "target" : { + "node" : 5, + "path" : "scale" + } + }, + { + "sampler" : 12, + "target" : { + "node" : 7, + "path" : "translation" + } + }, + { + "sampler" : 13, + "target" : { + "node" : 7, + "path" : "rotation" + } + }, + { + "sampler" : 14, + "target" : { + "node" : 7, + "path" : "scale" + } + }, + { + "sampler" : 15, + "target" : { + "node" : 9, + "path" : "translation" + } + }, + { + "sampler" : 16, + "target" : { + "node" : 9, + "path" : "rotation" + } + }, + { + "sampler" : 17, + "target" : { + "node" : 9, + "path" : "scale" + } + }, + { + "sampler" : 18, + "target" : { + "node" : 11, + "path" : "translation" + } + }, + { + "sampler" : 19, + "target" : { + "node" : 11, + "path" : "rotation" + } + }, + { + "sampler" : 20, + "target" : { + "node" : 11, + "path" : "scale" + } + } + ], + "name" : "idle", + "samplers" : [ + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 56 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 57 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 58 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 59 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 60 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 61 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 62 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 63 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 64 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 65 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 66 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 67 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 68 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 69 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 70 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 71 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 72 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 73 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 74 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 75 + }, + { + "input" : 55, + "interpolation" : "LINEAR", + "output" : 76 + } + ] + } + ], + "materials" : [ + { + "doubleSided" : true, + "name" : "MatArcheBleue", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0, + 0, + 1, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.4000000059604645 + } + }, + { + "doubleSided" : true, + "name" : "MatArcheRose", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 1, + 0, + 1, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.4000000059604645 + } + }, + { + "doubleSided" : true, + "name" : "MatArcheRouge", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 1, + 0, + 0, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.4000000059604645 + } + }, + { + "doubleSided" : true, + "name" : "MatArcheJaune", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 1, + 1, + 0, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.4000000059604645 + } + }, + { + "doubleSided" : true, + "name" : "MatArcheVert", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0, + 1, + 0, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.4000000059604645 + } + }, + { + "doubleSided" : true, + "name" : "MatArcheCyan", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0, + 1, + 1, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.4000000059604645 + } + } + ], + "meshes" : [ + { + "extras" : { + "targetNames" : [ + "Blue/Alpha", + "Blue/Beta", + "Size" + ] + }, + "name" : "Icosphere.030", + "primitives" : [ + { + "attributes" : { + "POSITION" : 0, + "NORMAL" : 1, + "TEXCOORD_0" : 2 + }, + "indices" : 3, + "material" : 0, + "targets" : [ + { + "POSITION" : 4, + "NORMAL" : 5 + }, + { + "POSITION" : 6, + "NORMAL" : 7 + }, + { + "POSITION" : 8, + "NORMAL" : 9 + } + ] + } + ], + "weights" : [ + 0, + 0, + 0 + ] + }, + { + "extras" : { + "targetNames" : [ + "Pink/Alpha", + "Pink/Beta", + "Size" + ] + }, + "name" : "Icosphere.031", + "primitives" : [ + { + "attributes" : { + "POSITION" : 10, + "NORMAL" : 11, + "TEXCOORD_0" : 12 + }, + "indices" : 3, + "material" : 1, + "targets" : [ + { + "POSITION" : 13, + "NORMAL" : 14 + }, + { + "POSITION" : 15, + "NORMAL" : 16 + }, + { + "POSITION" : 17, + "NORMAL" : 18 + } + ] + } + ], + "weights" : [ + 0, + 0, + 0 + ] + }, + { + "extras" : { + "targetNames" : [ + "Red/Alpha", + "Red/Beta", + "Size" + ] + }, + "name" : "Icosphere.032", + "primitives" : [ + { + "attributes" : { + "POSITION" : 19, + "NORMAL" : 20, + "TEXCOORD_0" : 21 + }, + "indices" : 3, + "material" : 2, + "targets" : [ + { + "POSITION" : 22, + "NORMAL" : 23 + }, + { + "POSITION" : 24, + "NORMAL" : 25 + }, + { + "POSITION" : 26, + "NORMAL" : 27 + } + ] + } + ], + "weights" : [ + 0, + 0, + 0 + ] + }, + { + "extras" : { + "targetNames" : [ + "Yellow/Alpha", + "Yellow/Beta", + "Size" + ] + }, + "name" : "Icosphere.033", + "primitives" : [ + { + "attributes" : { + "POSITION" : 28, + "NORMAL" : 29, + "TEXCOORD_0" : 30 + }, + "indices" : 3, + "material" : 3, + "targets" : [ + { + "POSITION" : 31, + "NORMAL" : 32 + }, + { + "POSITION" : 33, + "NORMAL" : 34 + }, + { + "POSITION" : 35, + "NORMAL" : 36 + } + ] + } + ], + "weights" : [ + 0, + 0, + 0 + ] + }, + { + "extras" : { + "targetNames" : [ + "Green/Alpha", + "Green/Beta", + "Size" + ] + }, + "name" : "Icosphere.034", + "primitives" : [ + { + "attributes" : { + "POSITION" : 37, + "NORMAL" : 38, + "TEXCOORD_0" : 39 + }, + "indices" : 3, + "material" : 4, + "targets" : [ + { + "POSITION" : 40, + "NORMAL" : 41 + }, + { + "POSITION" : 42, + "NORMAL" : 43 + }, + { + "POSITION" : 44, + "NORMAL" : 45 + } + ] + } + ], + "weights" : [ + 0, + 0, + 0 + ] + }, + { + "extras" : { + "targetNames" : [ + "Cyan/Alpha", + "Cyan/Beta", + "Size" + ] + }, + "name" : "Icosphere.035", + "primitives" : [ + { + "attributes" : { + "POSITION" : 46, + "NORMAL" : 47, + "TEXCOORD_0" : 48 + }, + "indices" : 3, + "material" : 5, + "targets" : [ + { + "POSITION" : 49, + "NORMAL" : 50 + }, + { + "POSITION" : 51, + "NORMAL" : 52 + }, + { + "POSITION" : 53, + "NORMAL" : 54 + } + ] + } + ], + "weights" : [ + 0, + 0, + 0 + ] + } + ], + "accessors" : [ + { + "bufferView" : 0, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.17888499796390533, + 0.20000000298023224, + 0.1701280176639557 + ], + "min" : [ + -0.17888499796390533, + -0.20000000298023224, + -0.1701280176639557 + ], + "type" : "VEC3" + }, + { + "bufferView" : 1, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 2, + "componentType" : 5126, + "count" : 60, + "type" : "VEC2" + }, + { + "bufferView" : 3, + "componentType" : 5123, + "count" : 60, + "type" : "SCALAR" + }, + { + "bufferView" : 4, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.0009467191994190216, + 0, + 0.1452498733997345 + ], + "min" : [ + -0.0009467191994190216, + 0, + -0.14524981379508972 + ], + "type" : "VEC3" + }, + { + "bufferView" : 5, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 6, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.1387292593717575, + 0, + 0.0009042230085469782 + ], + "min" : [ + -0.1387292593717575, + 0, + -0.0009042230085469782 + ], + "type" : "VEC3" + }, + { + "bufferView" : 7, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 8, + "componentType" : 5126, + "count" : 60, + "max" : [ + 3.108279605923414e-11, + 0.10910065472126007, + 4.768839545477022e-09 + ], + "min" : [ + -3.108278912034024e-11, + -0.10910062491893768, + -4.768837769120182e-09 + ], + "type" : "VEC3" + }, + { + "bufferView" : 9, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 10, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.17888499796390533, + 0.20000000298023224, + 0.1701280176639557 + ], + "min" : [ + -0.17888499796390533, + -0.20000000298023224, + -0.1701280176639557 + ], + "type" : "VEC3" + }, + { + "bufferView" : 11, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 12, + "componentType" : 5126, + "count" : 60, + "type" : "VEC2" + }, + { + "bufferView" : 13, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.002617470920085907, + 7.450580596923828e-09, + 0.13384470343589783 + ], + "min" : [ + -0.002617470920085907, + -7.450580596923828e-09, + -0.13384461402893066 + ], + "type" : "VEC3" + }, + { + "bufferView" : 14, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 15, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.15491043031215668, + 0, + 0.0030294344760477543 + ], + "min" : [ + -0.15491048991680145, + 0, + -0.0030294349417090416 + ], + "type" : "VEC3" + }, + { + "bufferView" : 16, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 17, + "componentType" : 5126, + "count" : 60, + "max" : [ + 1.6294077198608647e-10, + 0.19064976274967194, + 8.331973333497444e-09 + ], + "min" : [ + -1.4901161193847656e-08, + -0.19064997136592865, + -8.33198399163848e-09 + ], + "type" : "VEC3" + }, + { + "bufferView" : 18, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 19, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.17888499796390533, + 0.20000000298023224, + 0.1701280176639557 + ], + "min" : [ + -0.17888499796390533, + -0.20000000298023224, + -0.1701280176639557 + ], + "type" : "VEC3" + }, + { + "bufferView" : 20, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 21, + "componentType" : 5126, + "count" : 60, + "type" : "VEC2" + }, + { + "bufferView" : 22, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.004510108381509781, + 7.450580596923828e-09, + 0.13834413886070251 + ], + "min" : [ + -0.004510108381509781, + -7.450580596923828e-09, + -0.13834410905838013 + ], + "type" : "VEC3" + }, + { + "bufferView" : 23, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 24, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.19909720122814178, + 0, + 0.006490699015557766 + ], + "min" : [ + -0.19909726083278656, + 0, + -0.006490698084235191 + ], + "type" : "VEC3" + }, + { + "bufferView" : 25, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 26, + "componentType" : 5126, + "count" : 60, + "max" : [ + 2.7244917433222327e-10, + 0.19129149615764618, + 8.357176284334855e-09 + ], + "min" : [ + -1.4901161193847656e-08, + -0.19129173457622528, + -8.357186942475892e-09 + ], + "type" : "VEC3" + }, + { + "bufferView" : 27, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 28, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.17888499796390533, + 0.20000000298023224, + 0.1701280176639557 + ], + "min" : [ + -0.17888499796390533, + -0.20000000298023224, + -0.1701280176639557 + ], + "type" : "VEC3" + }, + { + "bufferView" : 29, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 30, + "componentType" : 5126, + "count" : 60, + "type" : "VEC2" + }, + { + "bufferView" : 31, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.0008370541036128998, + 7.450580596923828e-09, + 0.12842467427253723 + ], + "min" : [ + -0.0008370541036128998, + -7.450580596923828e-09, + -0.12842461466789246 + ], + "type" : "VEC3" + }, + { + "bufferView" : 32, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 33, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.13875077664852142, + 0, + 0.000904363114386797 + ], + "min" : [ + -0.13875077664852142, + 0, + -0.000904363114386797 + ], + "type" : "VEC3" + }, + { + "bufferView" : 34, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 35, + "componentType" : 5126, + "count" : 60, + "max" : [ + 4.184521132377661e-11, + 0.14687670767307281, + 6.420048492827846e-09 + ], + "min" : [ + -4.1845200915435754e-11, + -0.14687667787075043, + -6.420046716471006e-09 + ], + "type" : "VEC3" + }, + { + "bufferView" : 36, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 37, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.17888499796390533, + 0.20000000298023224, + 0.1701280176639557 + ], + "min" : [ + -0.17888499796390533, + -0.20000000298023224, + -0.1701280176639557 + ], + "type" : "VEC3" + }, + { + "bufferView" : 38, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 39, + "componentType" : 5126, + "count" : 60, + "type" : "VEC2" + }, + { + "bufferView" : 40, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.0038765370845794678, + 7.450580596923828e-09, + 0.19822728633880615 + ], + "min" : [ + -0.0038765408098697662, + -7.450580596923828e-09, + -0.1982271373271942 + ], + "type" : "VEC3" + }, + { + "bufferView" : 41, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 42, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.150435671210289, + 0, + 0.0029419257771223783 + ], + "min" : [ + -0.1504357010126114, + 0, + -0.0029419262427836657 + ], + "type" : "VEC3" + }, + { + "bufferView" : 43, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 44, + "componentType" : 5126, + "count" : 60, + "max" : [ + 1.521001102844366e-10, + 0.17796586453914642, + 7.77765052362156e-09 + ], + "min" : [ + -1.4901161193847656e-08, + -0.17796607315540314, + -7.777657629048917e-09 + ], + "type" : "VEC3" + }, + { + "bufferView" : 45, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 46, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.17888499796390533, + 0.20000000298023224, + 0.1701280176639557 + ], + "min" : [ + -0.17888499796390533, + -0.20000000298023224, + -0.1701280176639557 + ], + "type" : "VEC3" + }, + { + "bufferView" : 47, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 48, + "componentType" : 5126, + "count" : 60, + "type" : "VEC2" + }, + { + "bufferView" : 49, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.0009285882115364075, + 7.450580596923828e-09, + 0.14246737957000732 + ], + "min" : [ + -0.0009285882115364075, + -7.450580596923828e-09, + -0.14246731996536255 + ], + "type" : "VEC3" + }, + { + "bufferView" : 50, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 51, + "componentType" : 5126, + "count" : 60, + "max" : [ + 0.1231757253408432, + 0, + 0.0008028466254472733 + ], + "min" : [ + -0.1231757253408432, + 0, + -0.0008028466254472733 + ], + "type" : "VEC3" + }, + { + "bufferView" : 52, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 53, + "componentType" : 5126, + "count" : 60, + "max" : [ + 3.00657450325037e-11, + 0.10553078353404999, + 4.612797255276746e-09 + ], + "min" : [ + -3.006573462416284e-11, + -0.1055307537317276, + -4.612797255276746e-09 + ], + "type" : "VEC3" + }, + { + "bufferView" : 54, + "componentType" : 5126, + "count" : 60, + "type" : "VEC3" + }, + { + "bufferView" : 55, + "componentType" : 5126, + "count" : 482, + "max" : [ + 20.041666666666668 + ], + "min" : [ + 0 + ], + "type" : "SCALAR" + }, + { + "bufferView" : 56, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 57, + "componentType" : 5126, + "count" : 482, + "type" : "VEC4" + }, + { + "bufferView" : 58, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 59, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 60, + "componentType" : 5126, + "count" : 482, + "type" : "VEC4" + }, + { + "bufferView" : 61, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 62, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 63, + "componentType" : 5126, + "count" : 482, + "type" : "VEC4" + }, + { + "bufferView" : 64, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 65, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 66, + "componentType" : 5126, + "count" : 482, + "type" : "VEC4" + }, + { + "bufferView" : 67, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 68, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 69, + "componentType" : 5126, + "count" : 482, + "type" : "VEC4" + }, + { + "bufferView" : 70, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 71, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 72, + "componentType" : 5126, + "count" : 482, + "type" : "VEC4" + }, + { + "bufferView" : 73, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 74, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + }, + { + "bufferView" : 75, + "componentType" : 5126, + "count" : 482, + "type" : "VEC4" + }, + { + "bufferView" : 76, + "componentType" : 5126, + "count" : 482, + "type" : "VEC3" + } + ], + "bufferViews" : [ + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 0 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 720 + }, + { + "buffer" : 0, + "byteLength" : 480, + "byteOffset" : 1440 + }, + { + "buffer" : 0, + "byteLength" : 120, + "byteOffset" : 1920 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 2040 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 2760 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 3480 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 4200 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 4920 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 5640 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 6360 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 7080 + }, + { + "buffer" : 0, + "byteLength" : 480, + "byteOffset" : 7800 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 8280 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 9000 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 9720 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 10440 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 11160 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 11880 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 12600 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 13320 + }, + { + "buffer" : 0, + "byteLength" : 480, + "byteOffset" : 14040 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 14520 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 15240 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 15960 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 16680 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 17400 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 18120 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 18840 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 19560 + }, + { + "buffer" : 0, + "byteLength" : 480, + "byteOffset" : 20280 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 20760 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 21480 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 22200 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 22920 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 23640 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 24360 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 25080 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 25800 + }, + { + "buffer" : 0, + "byteLength" : 480, + "byteOffset" : 26520 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 27000 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 27720 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 28440 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 29160 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 29880 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 30600 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 31320 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 32040 + }, + { + "buffer" : 0, + "byteLength" : 480, + "byteOffset" : 32760 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 33240 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 33960 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 34680 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 35400 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 36120 + }, + { + "buffer" : 0, + "byteLength" : 720, + "byteOffset" : 36840 + }, + { + "buffer" : 0, + "byteLength" : 1928, + "byteOffset" : 37560 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 39488 + }, + { + "buffer" : 0, + "byteLength" : 7712, + "byteOffset" : 45272 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 52984 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 58768 + }, + { + "buffer" : 0, + "byteLength" : 7712, + "byteOffset" : 64552 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 72264 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 78048 + }, + { + "buffer" : 0, + "byteLength" : 7712, + "byteOffset" : 83832 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 91544 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 97328 + }, + { + "buffer" : 0, + "byteLength" : 7712, + "byteOffset" : 103112 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 110824 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 116608 + }, + { + "buffer" : 0, + "byteLength" : 7712, + "byteOffset" : 122392 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 130104 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 135888 + }, + { + "buffer" : 0, + "byteLength" : 7712, + "byteOffset" : 141672 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 149384 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 155168 + }, + { + "buffer" : 0, + "byteLength" : 7712, + "byteOffset" : 160952 + }, + { + "buffer" : 0, + "byteLength" : 5784, + "byteOffset" : 168664 + } + ], + "buffers" : [ + { + "byteLength" : 174448, + "uri" : "arche.bin" + } + ] +} diff --git a/assets/creatures/arche/arche.tscn b/assets/creatures/arche/arche.tscn new file mode 100644 index 0000000..5cdf4ce --- /dev/null +++ b/assets/creatures/arche/arche.tscn @@ -0,0 +1,5 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://assets/creatures/arche/arche.gltf" type="PackedScene" id=1] + +[node name="arche" instance=ExtResource( 1 )] diff --git a/assets/creatures/isidor/IsidorMatCorps.material b/assets/creatures/isidor/IsidorMatCorps.material new file mode 100644 index 0000000..003c0d4 Binary files /dev/null and b/assets/creatures/isidor/IsidorMatCorps.material differ diff --git a/assets/creatures/isidor/IsidorMatHalo.material b/assets/creatures/isidor/IsidorMatHalo.material new file mode 100644 index 0000000..c8ee916 Binary files /dev/null and b/assets/creatures/isidor/IsidorMatHalo.material differ diff --git a/assets/creatures/isidor/IsidorMatPropulsion.material b/assets/creatures/isidor/IsidorMatPropulsion.material new file mode 100644 index 0000000..4527519 Binary files /dev/null and b/assets/creatures/isidor/IsidorMatPropulsion.material differ diff --git a/assets/creatures/isidor/IsidorMatRoue.material b/assets/creatures/isidor/IsidorMatRoue.material new file mode 100644 index 0000000..40e133c Binary files /dev/null and b/assets/creatures/isidor/IsidorMatRoue.material differ diff --git a/assets/creatures/isidor/isidor.gltf b/assets/creatures/isidor/isidor.gltf new file mode 100644 index 0000000..b78db2b --- /dev/null +++ b/assets/creatures/isidor/isidor.gltf @@ -0,0 +1,1159 @@ +{ + "asset" : { + "generator" : "Khronos glTF Blender I/O v1.6.16", + "version" : "2.0" + }, + "scene" : 0, + "scenes" : [ + { + "name" : "Scene", + "nodes" : [ + 11 + ] + } + ], + "nodes" : [ + { + "mesh" : 0, + "name" : "Propulsion", + "rotation" : [ + 0, + 0, + 0, + 1 + ], + "translation" : [ + -7.338247343113835e-09, + 0.07872715294361182, + 5.0981508792347086e-08 + ] + }, + { + "children" : [ + 0 + ], + "name" : "BonePropulsion", + "scale" : [ + 0.20000000298023224, + 0.20000000298023224, + 0.20000000298023224 + ], + "translation" : [ + 0, + 0.4542638659477234, + 0 + ] + }, + { + "mesh" : 1, + "name" : "Halo", + "rotation" : [ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "translation" : [ + 0, + 0.25110864639282227, + 0 + ] + }, + { + "children" : [ + 2 + ], + "name" : "BoneHalo", + "translation" : [ + 0, + 1.3281776905059814, + 0 + ] + }, + { + "mesh" : 2, + "name" : "RoueDroite", + "rotation" : [ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "translation" : [ + 0, + 0.25, + 0 + ] + }, + { + "children" : [ + 4 + ], + "name" : "BoneRoueDroite", + "rotation" : [ + 3.090862321641907e-08, + 0.7071068286895752, + 0.7071068286895752, + 3.090862321641907e-08 + ], + "translation" : [ + 0, + 0.15000000596046448, + 0 + ] + }, + { + "mesh" : 3, + "name" : "RoueGauche", + "rotation" : [ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "translation" : [ + 0, + 0.25, + 0 + ] + }, + { + "children" : [ + 6 + ], + "name" : "BoneRoueGauche", + "rotation" : [ + -0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "translation" : [ + 0, + 0.15000000596046448, + 0 + ] + }, + { + "name" : "BoneCorps" + }, + { + "mesh" : 4, + "name" : "Corps", + "rotation" : [ + -2.1855694143368964e-08, + 0, + 0, + 1 + ], + "scale" : [ + 0.8999999761581421, + 1, + 1 + ], + "translation" : [ + 0, + 1.1500000953674316, + 0 + ] + }, + { + "children" : [ + 1, + 3, + 5, + 7, + 8, + 9 + ], + "name" : "BoneBase" + }, + { + "children" : [ + 10 + ], + "name" : "Isidor" + } + ], + "animations" : [ + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 10, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 10, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 10, + "path" : "scale" + } + }, + { + "sampler" : 3, + "target" : { + "node" : 1, + "path" : "translation" + } + }, + { + "sampler" : 4, + "target" : { + "node" : 1, + "path" : "rotation" + } + }, + { + "sampler" : 5, + "target" : { + "node" : 1, + "path" : "scale" + } + }, + { + "sampler" : 6, + "target" : { + "node" : 3, + "path" : "translation" + } + }, + { + "sampler" : 7, + "target" : { + "node" : 3, + "path" : "rotation" + } + }, + { + "sampler" : 8, + "target" : { + "node" : 3, + "path" : "scale" + } + }, + { + "sampler" : 9, + "target" : { + "node" : 5, + "path" : "translation" + } + }, + { + "sampler" : 10, + "target" : { + "node" : 5, + "path" : "rotation" + } + }, + { + "sampler" : 11, + "target" : { + "node" : 5, + "path" : "scale" + } + }, + { + "sampler" : 12, + "target" : { + "node" : 7, + "path" : "translation" + } + }, + { + "sampler" : 13, + "target" : { + "node" : 7, + "path" : "rotation" + } + }, + { + "sampler" : 14, + "target" : { + "node" : 7, + "path" : "scale" + } + }, + { + "sampler" : 15, + "target" : { + "node" : 8, + "path" : "translation" + } + }, + { + "sampler" : 16, + "target" : { + "node" : 8, + "path" : "rotation" + } + }, + { + "sampler" : 17, + "target" : { + "node" : 8, + "path" : "scale" + } + } + ], + "name" : "idle", + "samplers" : [ + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 29 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 30 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 31 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 32 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 33 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 34 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 35 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 36 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 37 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 38 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 39 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 40 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 41 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 42 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 43 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 44 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 45 + }, + { + "input" : 28, + "interpolation" : "LINEAR", + "output" : 46 + } + ] + } + ], + "materials" : [ + { + "doubleSided" : true, + "name" : "IsidorMatPropulsion", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.8000000715255737, + 0.46084585785865784, + 0.023182937875390053, + 1 + ], + "metallicFactor" : 0.6636363863945007, + "roughnessFactor" : 0.5 + } + }, + { + "doubleSided" : true, + "emissiveFactor" : [ + 0.7931585311889648, + 0.07634866610169411, + 0.07301906682550907 + ], + "name" : "IsidorMatHalo", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.8709695935249329, + 0.02718237228691578, + 0.01849031262099743, + 0.20000000298023224 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.5 + } + }, + { + "doubleSided" : true, + "name" : "IsidorMatRoue", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.009151540696620941, + 0.009151540696620941, + 0.009151540696620941, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.5 + } + }, + { + "doubleSided" : true, + "name" : "IsidorMatCorps", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.05392919480800629, + 0.8000000715255737, + 0.5631960034370422, + 1 + ], + "metallicFactor" : 0.29411765933036804, + "roughnessFactor" : 0.5 + } + } + ], + "meshes" : [ + { + "name" : "Cone", + "primitives" : [ + { + "attributes" : { + "POSITION" : 0, + "NORMAL" : 1, + "TEXCOORD_0" : 2 + }, + "indices" : 3, + "material" : 0 + } + ] + }, + { + "name" : "Halo.002", + "primitives" : [ + { + "attributes" : { + "POSITION" : 4, + "NORMAL" : 5, + "TEXCOORD_0" : 6 + }, + "indices" : 7, + "material" : 1 + }, + { + "attributes" : { + "POSITION" : 8, + "NORMAL" : 9, + "TEXCOORD_0" : 10 + }, + "indices" : 11, + "material" : 1 + }, + { + "attributes" : { + "POSITION" : 12, + "NORMAL" : 13, + "TEXCOORD_0" : 14 + }, + "indices" : 15, + "material" : 1 + } + ] + }, + { + "name" : "Cylinder", + "primitives" : [ + { + "attributes" : { + "POSITION" : 16, + "NORMAL" : 17, + "TEXCOORD_0" : 18 + }, + "indices" : 19, + "material" : 2 + } + ] + }, + { + "name" : "Cylinder.001", + "primitives" : [ + { + "attributes" : { + "POSITION" : 20, + "NORMAL" : 21, + "TEXCOORD_0" : 22 + }, + "indices" : 23, + "material" : 2 + } + ] + }, + { + "name" : "Sphere.002", + "primitives" : [ + { + "attributes" : { + "POSITION" : 24, + "NORMAL" : 25, + "TEXCOORD_0" : 26 + }, + "indices" : 27, + "material" : 3 + } + ] + } + ], + "accessors" : [ + { + "bufferView" : 0, + "componentType" : 5126, + "count" : 128, + "max" : [ + 0.14999999105930328, + 0.1949094533920288, + 0.15000000596046448 + ], + "min" : [ + -0.15000002086162567, + -0.05509054660797119, + -0.15000000596046448 + ], + "type" : "VEC3" + }, + { + "bufferView" : 1, + "componentType" : 5126, + "count" : 128, + "type" : "VEC3" + }, + { + "bufferView" : 2, + "componentType" : 5126, + "count" : 128, + "type" : "VEC2" + }, + { + "bufferView" : 3, + "componentType" : 5123, + "count" : 186, + "type" : "SCALAR" + }, + { + "bufferView" : 4, + "componentType" : 5126, + "count" : 24, + "max" : [ + -0.031795598566532135, + -0.09047015756368637, + 0.09085875749588013 + ], + "min" : [ + -0.22444958984851837, + -0.31716904044151306, + -0.0006877705454826355 + ], + "type" : "VEC3" + }, + { + "bufferView" : 5, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 6, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 7, + "componentType" : 5123, + "count" : 36, + "type" : "SCALAR" + }, + { + "bufferView" : 8, + "componentType" : 5126, + "count" : 24, + "max" : [ + 0.32499998807907104, + 0.07142149657011032, + 0.09085901826620102 + ], + "min" : [ + 0.12499992549419403, + -0.07153327763080597, + -0.0006876438856124878 + ], + "type" : "VEC3" + }, + { + "bufferView" : 9, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 10, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 11, + "componentType" : 5123, + "count" : 36, + "type" : "SCALAR" + }, + { + "bufferView" : 12, + "componentType" : 5126, + "count" : 24, + "max" : [ + -0.03169868886470795, + 0.3172248601913452, + 0.09085902571678162 + ], + "min" : [ + -0.22435280680656433, + 0.09052591025829315, + -0.0006876252591609955 + ], + "type" : "VEC3" + }, + { + "bufferView" : 13, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 14, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 15, + "componentType" : 5123, + "count" : 36, + "type" : "SCALAR" + }, + { + "bufferView" : 16, + "componentType" : 5126, + "count" : 388, + "max" : [ + 0.14999999105930328, + 0.15000000596046448, + 0.125 + ], + "min" : [ + -0.15000002086162567, + -0.15000000596046448, + -0.05000000819563866 + ], + "type" : "VEC3" + }, + { + "bufferView" : 17, + "componentType" : 5126, + "count" : 388, + "type" : "VEC3" + }, + { + "bufferView" : 18, + "componentType" : 5126, + "count" : 388, + "type" : "VEC2" + }, + { + "bufferView" : 19, + "componentType" : 5123, + "count" : 756, + "type" : "SCALAR" + }, + { + "bufferView" : 20, + "componentType" : 5126, + "count" : 388, + "max" : [ + 0.15000000596046448, + 0.15000000596046448, + 0.125 + ], + "min" : [ + -0.15000000596046448, + -0.15000000596046448, + -0.05000000819563866 + ], + "type" : "VEC3" + }, + { + "bufferView" : 21, + "componentType" : 5126, + "count" : 388, + "type" : "VEC3" + }, + { + "bufferView" : 22, + "componentType" : 5126, + "count" : 388, + "type" : "VEC2" + }, + { + "bufferView" : 23, + "componentType" : 5123, + "count" : 756, + "type" : "SCALAR" + }, + { + "bufferView" : 24, + "componentType" : 5126, + "count" : 574, + "max" : [ + 0.4903929531574249, + 0.43376266956329346, + 0.6650943160057068 + ], + "min" : [ + -0.4903928339481354, + -1.0804827213287354, + -0.6650943160057068 + ], + "type" : "VEC3" + }, + { + "bufferView" : 25, + "componentType" : 5126, + "count" : 574, + "type" : "VEC3" + }, + { + "bufferView" : 26, + "componentType" : 5126, + "count" : 574, + "type" : "VEC2" + }, + { + "bufferView" : 27, + "componentType" : 5123, + "count" : 888, + "type" : "SCALAR" + }, + { + "bufferView" : 28, + "componentType" : 5126, + "count" : 250, + "max" : [ + 10.416666666666666 + ], + "min" : [ + 0.041666666666666664 + ], + "type" : "SCALAR" + }, + { + "bufferView" : 29, + "componentType" : 5126, + "count" : 250, + "type" : "VEC3" + }, + { + "bufferView" : 30, + "componentType" : 5126, + "count" : 250, + "type" : "VEC4" + }, + { + "bufferView" : 31, + "componentType" : 5126, + "count" : 250, + "type" : "VEC3" + }, + { + "bufferView" : 32, + "componentType" : 5126, + "count" : 250, + "type" : "VEC3" + }, + { + "bufferView" : 33, + "componentType" : 5126, + "count" : 250, + "type" : "VEC4" + }, + { + "bufferView" : 34, + "componentType" : 5126, + "count" : 250, + "type" : "VEC3" + }, + { + "bufferView" : 35, + "componentType" : 5126, + "count" : 250, + "type" : "VEC3" + }, + { + "bufferView" : 36, + "componentType" : 5126, + "count" : 250, + "type" : "VEC4" + }, + { + "bufferView" : 37, + "componentType" : 5126, + "count" : 250, + "type" : "VEC3" + }, + { + "bufferView" : 38, + "componentType" : 5126, + "count" : 250, + "type" : "VEC3" + }, + { + "bufferView" : 39, + "componentType" : 5126, + "count" : 250, + "type" : "VEC4" + }, + { + "bufferView" : 40, + "componentType" : 5126, + "count" : 250, + "type" : "VEC3" + }, + { + "bufferView" : 41, + "componentType" : 5126, + "count" : 250, + "type" : "VEC3" + }, + { + "bufferView" : 42, + "componentType" : 5126, + "count" : 250, + "type" : "VEC4" + }, + { + "bufferView" : 43, + "componentType" : 5126, + "count" : 250, + "type" : "VEC3" + }, + { + "bufferView" : 44, + "componentType" : 5126, + "count" : 250, + "type" : "VEC3" + }, + { + "bufferView" : 45, + "componentType" : 5126, + "count" : 250, + "type" : "VEC4" + }, + { + "bufferView" : 46, + "componentType" : 5126, + "count" : 250, + "type" : "VEC3" + } + ], + "bufferViews" : [ + { + "buffer" : 0, + "byteLength" : 1536, + "byteOffset" : 0 + }, + { + "buffer" : 0, + "byteLength" : 1536, + "byteOffset" : 1536 + }, + { + "buffer" : 0, + "byteLength" : 1024, + "byteOffset" : 3072 + }, + { + "buffer" : 0, + "byteLength" : 372, + "byteOffset" : 4096 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 4468 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 4756 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 5044 + }, + { + "buffer" : 0, + "byteLength" : 72, + "byteOffset" : 5236 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 5308 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 5596 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 5884 + }, + { + "buffer" : 0, + "byteLength" : 72, + "byteOffset" : 6076 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 6148 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 6436 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 6724 + }, + { + "buffer" : 0, + "byteLength" : 72, + "byteOffset" : 6916 + }, + { + "buffer" : 0, + "byteLength" : 4656, + "byteOffset" : 6988 + }, + { + "buffer" : 0, + "byteLength" : 4656, + "byteOffset" : 11644 + }, + { + "buffer" : 0, + "byteLength" : 3104, + "byteOffset" : 16300 + }, + { + "buffer" : 0, + "byteLength" : 1512, + "byteOffset" : 19404 + }, + { + "buffer" : 0, + "byteLength" : 4656, + "byteOffset" : 20916 + }, + { + "buffer" : 0, + "byteLength" : 4656, + "byteOffset" : 25572 + }, + { + "buffer" : 0, + "byteLength" : 3104, + "byteOffset" : 30228 + }, + { + "buffer" : 0, + "byteLength" : 1512, + "byteOffset" : 33332 + }, + { + "buffer" : 0, + "byteLength" : 6888, + "byteOffset" : 34844 + }, + { + "buffer" : 0, + "byteLength" : 6888, + "byteOffset" : 41732 + }, + { + "buffer" : 0, + "byteLength" : 4592, + "byteOffset" : 48620 + }, + { + "buffer" : 0, + "byteLength" : 1776, + "byteOffset" : 53212 + }, + { + "buffer" : 0, + "byteLength" : 1000, + "byteOffset" : 54988 + }, + { + "buffer" : 0, + "byteLength" : 3000, + "byteOffset" : 55988 + }, + { + "buffer" : 0, + "byteLength" : 4000, + "byteOffset" : 58988 + }, + { + "buffer" : 0, + "byteLength" : 3000, + "byteOffset" : 62988 + }, + { + "buffer" : 0, + "byteLength" : 3000, + "byteOffset" : 65988 + }, + { + "buffer" : 0, + "byteLength" : 4000, + "byteOffset" : 68988 + }, + { + "buffer" : 0, + "byteLength" : 3000, + "byteOffset" : 72988 + }, + { + "buffer" : 0, + "byteLength" : 3000, + "byteOffset" : 75988 + }, + { + "buffer" : 0, + "byteLength" : 4000, + "byteOffset" : 78988 + }, + { + "buffer" : 0, + "byteLength" : 3000, + "byteOffset" : 82988 + }, + { + "buffer" : 0, + "byteLength" : 3000, + "byteOffset" : 85988 + }, + { + "buffer" : 0, + "byteLength" : 4000, + "byteOffset" : 88988 + }, + { + "buffer" : 0, + "byteLength" : 3000, + "byteOffset" : 92988 + }, + { + "buffer" : 0, + "byteLength" : 3000, + "byteOffset" : 95988 + }, + { + "buffer" : 0, + "byteLength" : 4000, + "byteOffset" : 98988 + }, + { + "buffer" : 0, + "byteLength" : 3000, + "byteOffset" : 102988 + }, + { + "buffer" : 0, + "byteLength" : 3000, + "byteOffset" : 105988 + }, + { + "buffer" : 0, + "byteLength" : 4000, + "byteOffset" : 108988 + }, + { + "buffer" : 0, + "byteLength" : 3000, + "byteOffset" : 112988 + } + ], + "buffers" : [ + { + "byteLength" : 115988, + "uri" : "isidor.bin" + } + ] +} diff --git a/assets/creatures/isidor/isidor.tscn b/assets/creatures/isidor/isidor.tscn new file mode 100644 index 0000000..8c02f71 --- /dev/null +++ b/assets/creatures/isidor/isidor.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://assets/creatures/isidor/isidor.gltf" type="PackedScene" id=1] + +[node name="isidor" instance=ExtResource( 1 )] + +[node name="BoneHalo" parent="Isidor/BoneBase" index="1"] +transform = Transform( 0.547755, 0, 0.836639, 0, 1, 0, -0.836639, 0, 0.547755, 0, 1.32818, 0 ) diff --git a/assets/interfaces/Login-Khanat-sound-button-empty.png b/assets/interfaces/Login-Khanat-sound-button-empty.png new file mode 100644 index 0000000..a8b5e95 Binary files /dev/null and b/assets/interfaces/Login-Khanat-sound-button-empty.png differ diff --git a/assets/interfaces/creature_creation.png b/assets/interfaces/creature_creation.png new file mode 100644 index 0000000..5ea22b4 Binary files /dev/null and b/assets/interfaces/creature_creation.png differ diff --git a/assets/interfaces/creatures_creation/Material.material b/assets/interfaces/creatures_creation/Material.material new file mode 100644 index 0000000..48372e3 Binary files /dev/null and b/assets/interfaces/creatures_creation/Material.material differ diff --git a/assets/interfaces/creatures_creation/creature_creation.png b/assets/interfaces/creatures_creation/creature_creation.png new file mode 100644 index 0000000..35ae3d2 Binary files /dev/null and b/assets/interfaces/creatures_creation/creature_creation.png differ diff --git a/assets/interfaces/creatures_creation/root.gltf b/assets/interfaces/creatures_creation/root.gltf new file mode 100644 index 0000000..96b499a --- /dev/null +++ b/assets/interfaces/creatures_creation/root.gltf @@ -0,0 +1,147 @@ +{ + "asset" : { + "generator" : "Khronos glTF Blender I/O v1.6.16", + "version" : "2.0" + }, + "scene" : 0, + "scenes" : [ + { + "name" : "Scene", + "nodes" : [ + 0, + 1, + 2 + ] + } + ], + "nodes" : [ + { + "mesh" : 0, + "name" : "Cube" + }, + { + "name" : "Light", + "rotation" : [ + 0.16907575726509094, + 0.7558803558349609, + -0.27217137813568115, + 0.570947527885437 + ], + "translation" : [ + 4.076245307922363, + 5.903861999511719, + -1.0054539442062378 + ] + }, + { + "name" : "Camera", + "rotation" : [ + 0.483536034822464, + 0.33687159419059753, + -0.20870360732078552, + 0.7804827094078064 + ], + "translation" : [ + 7.358891487121582, + 4.958309173583984, + 6.925790786743164 + ] + } + ], + "materials" : [ + { + "doubleSided" : true, + "name" : "Material", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.800000011920929, + 0.800000011920929, + 0.800000011920929, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.4000000059604645 + } + } + ], + "meshes" : [ + { + "name" : "Cube", + "primitives" : [ + { + "attributes" : { + "POSITION" : 0, + "NORMAL" : 1, + "TEXCOORD_0" : 2 + }, + "indices" : 3, + "material" : 0 + } + ] + } + ], + "accessors" : [ + { + "bufferView" : 0, + "componentType" : 5126, + "count" : 24, + "max" : [ + 4, + 0, + 4 + ], + "min" : [ + -4, + -1, + -4 + ], + "type" : "VEC3" + }, + { + "bufferView" : 1, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 2, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 3, + "componentType" : 5123, + "count" : 36, + "type" : "SCALAR" + } + ], + "bufferViews" : [ + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 0 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 288 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 576 + }, + { + "buffer" : 0, + "byteLength" : 72, + "byteOffset" : 768 + } + ], + "buffers" : [ + { + "byteLength" : 840, + "uri" : "data:application/octet-stream;base64,AACAQAAAAAAAAIDAAACAQAAAAAAAAIDAAACAQAAAAAAAAIDAAACAQAAAgL8AAIDAAACAQAAAgL8AAIDAAACAQAAAgL8AAIDAAACAQAAAAAAAAIBAAACAQAAAAAAAAIBAAACAQAAAAAAAAIBAAACAQAAAgL8AAIBAAACAQAAAgL8AAIBAAACAQAAAgL8AAIBAAACAwAAAAAAAAIDAAACAwAAAAAAAAIDAAACAwAAAAAAAAIDAAACAwAAAgL8AAIDAAACAwAAAgL8AAIDAAACAwAAAgL8AAIDAAACAwAAAAAAAAIBAAACAwAAAAAAAAIBAAACAwAAAAAAAAIBAAACAwAAAgL8AAIBAAACAwAAAgL8AAIBAAACAwAAAgL8AAIBAAAAAAAAAAAAAAIC/AAAAAAAAgD8AAACAAACAPwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIC/AACAPwAAAAAAAACAAAAAAAAAAAAAAIA/AAAAAAAAgD8AAACAAACAPwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIA/AACAPwAAAAAAAACAAACAvwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAAAAgD8AAACAAACAvwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIC/AACAvwAAAAAAAACAAAAAAAAAAAAAAIA/AAAAAAAAgD8AAACAAACAvwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIA/AAAgPwAAAD8AACA/AAAAPwAAID8AAAA/AADAPgAAAD8AAMA+AAAAPwAAwD4AAAA/AAAgPwAAgD4AACA/AACAPgAAID8AAIA+AADAPgAAgD4AAMA+AACAPgAAwD4AAIA+AAAgPwAAQD8AACA/AABAPwAAYD8AAAA/AADAPgAAQD8AAAA+AAAAPwAAwD4AAEA/AAAgPwAAgD8AACA/AAAAAAAAYD8AAIA+AADAPgAAgD8AAAA+AACAPgAAwD4AAAAAAQAOABQAAQAUAAcACgAGABMACgATABcAFQASAAwAFQAMAA8AEAADAAkAEAAJABYABQACAAgABQAIAAsAEQANAAAAEQAAAAQA" + } + ] +} diff --git a/assets/interfaces/next.png b/assets/interfaces/next.png new file mode 100644 index 0000000..fb9c06d Binary files /dev/null and b/assets/interfaces/next.png differ diff --git a/assets/interfaces/previous.png b/assets/interfaces/previous.png new file mode 100644 index 0000000..bb026b6 Binary files /dev/null and b/assets/interfaces/previous.png differ diff --git a/assets/interfaces/rollback.png b/assets/interfaces/rollback.png new file mode 100644 index 0000000..e9d9ea5 Binary files /dev/null and b/assets/interfaces/rollback.png differ diff --git a/assets/interfaces/themes/khanat_create_creature.theme b/assets/interfaces/themes/khanat_create_creature.theme new file mode 100644 index 0000000..eb03026 Binary files /dev/null and b/assets/interfaces/themes/khanat_create_creature.theme differ diff --git a/locale/en.po b/locale/en.po index 6d531f9..ab24af3 100644 --- a/locale/en.po +++ b/locale/en.po @@ -154,3 +154,21 @@ msgstr "Settings" msgid "JUKEBOX_ADD" msgstr "Add music(s)" + +msgid "CREATURE_CREATION_CHOICE_RACE" +msgstr "Choice your race" + +msgid "CREATURE_CREATION_FIRST_NAME" +msgstr "First name" + +msgid "CREATURE_CREATION_LAST_NAME" +msgstr "Last name" + +msgid "FIRST_NAME" +msgstr "First name" + +msgid "LAST_NAME" +msgstr "Last name" + +msgid "CREATURE_CREATION_PROPERTIES" +msgstr "Define your properties" diff --git a/locale/fr.po b/locale/fr.po index b00703c..b6e85a5 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -154,3 +154,21 @@ msgstr "Configuration" msgid "JUKEBOX_ADD" msgstr "Ajouter une(des) musique(s)" + +msgid "CREATURE_CREATION_CHOICE_RACE" +msgstr "Sélectionner votre race" + +msgid "CREATURE_CREATION_FIRST_NAME" +msgstr "Prénom" + +msgid "CREATURE_CREATION_LAST_NAME" +msgstr "Nom" + +msgid "FIRST_NAME" +msgstr "Prénom" + +msgid "LAST_NAME" +msgstr "Nom" + +msgid "CREATURE_CREATION_PROPERTIES" +msgstr "Éditer vos attributs" diff --git a/locale/messages.mo b/locale/messages.mo index eb17e2f..4108bf8 100644 Binary files a/locale/messages.mo and b/locale/messages.mo differ diff --git a/locale/messages.pot b/locale/messages.pot index 5e266bf..7688d9a 100644 --- a/locale/messages.pot +++ b/locale/messages.pot @@ -146,4 +146,20 @@ msgstr "" msgid "JUKEBOX_ADD" msgstr "" +msgid "CREATURE_CREATION_CHOICE_RACE" +msgstr "" +msgid "CREATURE_CREATION_FIRST_NAME" +msgstr "" + +msgid "CREATURE_CREATION_LAST_NAME" +msgstr "" + +msgid "FIRST_NAME" +msgstr "" + +msgid "LAST_NAME" +msgstr "" + +msgid "CREATURE_CREATION_PROPERTIES" +msgstr "" diff --git a/project.godot b/project.godot index 4d21734..9a9f765 100644 --- a/project.godot +++ b/project.godot @@ -9,21 +9,56 @@ config_version=4 _global_script_classes=[ { +"base": "Equipment", +"class": "Cloth", +"language": "GDScript", +"path": "res://ressources/scripts/datas/cloth.gd" +}, { +"base": "Data", +"class": "Creature", +"language": "GDScript", +"path": "res://ressources/scripts/datas/creature.gd" +}, { +"base": "Reference", +"class": "CreatureOld", +"language": "GDScript", +"path": "res://ressources/scripts/creatures/creature.gd" +}, { "base": "Node", "class": "Creature_old", "language": "GDScript", "path": "res://ressources/scripts/creatures/creature_old.gd" }, { +"base": "Object", +"class": "Data", +"language": "GDScript", +"path": "res://ressources/scripts/datas/data.gd" +}, { +"base": "Item", +"class": "Equipment", +"language": "GDScript", +"path": "res://ressources/scripts/datas/equipment.gd" +}, { "base": "Node", "class": "Equippable", "language": "GDScript", "path": "res://ressources/scripts/items/equippable.gd" }, { +"base": "Creature", +"class": "Human", +"language": "GDScript", +"path": "res://ressources/scripts/datas/human.gd" +}, { "base": "Node", "class": "Inventory", "language": "GDScript", "path": "res://ressources/scripts/items/inventory.gd" }, { +"base": "Data", +"class": "Item", +"language": "GDScript", +"path": "res://ressources/scripts/datas/item.gd" +}, { "base": "Node", "class": "Item_old", "language": "GDScript", @@ -39,7 +74,17 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://scenes/creatures/ra/ra_model.gd" }, { -"base": "Node", +"base": "ProxyData", +"class": "PickupItem", +"language": "GDScript", +"path": "res://ressources/scripts/datas/pickup_item.gd" +}, { +"base": "Data", +"class": "ProxyData", +"language": "GDScript", +"path": "res://ressources/scripts/datas/proxy_data.gd" +}, { +"base": "Reference", "class": "Ra", "language": "GDScript", "path": "res://ressources/scripts/creatures/ra.gd" @@ -50,12 +95,21 @@ _global_script_classes=[ { "path": "res://scenes/interfaces/focus_reticle.gd" } ] _global_script_class_icons={ +"Cloth": "", +"Creature": "", +"CreatureOld": "", "Creature_old": "", +"Data": "", +"Equipment": "", "Equippable": "", +"Human": "", "Inventory": "", +"Item": "", "Item_old": "", "JSONBeautifier": "", "Mannequiny": "", +"PickupItem": "", +"ProxyData": "", "Ra": "", "focus_reticle": "" } @@ -75,12 +129,12 @@ enable_audio_input=true [autoload] Config="*res://ressources/scripts/config/config.gd" -Creatures="*res://ressources/scripts/creatures_old.gd" +Creatures="res://ressources/scripts/creatures_old.gd" MusicManager="*res://scenes/interfaces/music_manager/music_manager.tscn" Connection="*res://scenes/connection/connection.tscn" Globals="*res://ressources/scripts/global.gd" Datas="*res://ressources/scripts/datas/data.gd" -GeneratorMap="*res://scenes/game/generate_map.gd" +GeneratorMap="res://scenes/game/generate_map.gd" [debug] diff --git a/ressources/scripts/config/config.gd b/ressources/scripts/config/config.gd index 9ac46ac..b8da913 100644 --- a/ressources/scripts/config/config.gd +++ b/ressources/scripts/config/config.gd @@ -4,7 +4,8 @@ extends Node # $HOME/.local/share/godot/app_userdata/Khanat var font_size = 14 var SettingsFile = "user://settings.cfg" -var screen_number = 0 +var screen_number_default = OS.current_screen +var screen_number = OS.current_screen var screen_orientation = 0 var window_maximized:bool = false var video_default:bool = true @@ -161,7 +162,7 @@ func enable_window_default(): num = 6 OS.set_screen_orientation(num) OS.set_window_maximized(window_maximized) - OS.current_screen = screen_number + OS.current_screen = screen_number_default # display/window/size/always_on_top if ProjectSettings.has_setting( "display/window/size/always_on_top" ): OS.set_window_always_on_top( ProjectSettings.get_setting( "display/window/size/always_on_top" ) ) diff --git a/ressources/scripts/creatures/creature.gd b/ressources/scripts/creatures/creature.gd new file mode 100644 index 0000000..0fb4af2 --- /dev/null +++ b/ressources/scripts/creatures/creature.gd @@ -0,0 +1,28 @@ +class_name CreatureOld +# Main creature class + +#05. signals +#06. enums +#07. constants +#08. exported variables +#09. public variables +#10. private variables +var type: String +var pseudonym: String +var inventory = null + +#11. onready variables +#12. optional built-in virtual _init method +#13. built-in virtual _ready method +#14. remaining built-in virtual methods +#15. public methods +func _init( p_pseudonym = "Creature", p_type = "creature" ): + self.type = p_type + self.pseudonym = p_pseudonym + self.inventory = null + +func from_dict( _datas ): + pass + +#16. private methods + diff --git a/ressources/scripts/creatures/creature_old.gd b/ressources/scripts/creatures/creature_old.gd index dbc46eb..ce27e9f 100644 --- a/ressources/scripts/creatures/creature_old.gd +++ b/ressources/scripts/creatures/creature_old.gd @@ -5,5 +5,5 @@ class_name Creature_old func from_dict( datas ): - pass - + pass + diff --git a/ressources/scripts/creatures/ra.gd b/ressources/scripts/creatures/ra.gd index 69e6aa2..942f231 100644 --- a/ressources/scripts/creatures/ra.gd +++ b/ressources/scripts/creatures/ra.gd @@ -1,12 +1,13 @@ -extends "res://ressources/scripts/creatures/creature_old.gd" class_name Ra +extends "res://ressources/scripts/creatures/creature.gd" +# Class for creature Ra with all param only use for Ra -var inventory = null - - +func _init( p_pseudonym = "Creature" ): + ._init( p_pseudonym, "Ra" ) + pass func from_dict( datas ): - .from_dict( datas ) - var new_inventory = Inventory.new() - new_inventory.from_dict( datas.get( "inventory", [] ) ) - self.inventory = new_inventory + .from_dict( datas ) + var new_inventory = Inventory.new() + new_inventory.from_dict( datas.get( "inventory", [] ) ) + self.inventory = new_inventory diff --git a/ressources/scripts/datas/cloth.gd b/ressources/scripts/datas/cloth.gd new file mode 100644 index 0000000..6a7e375 --- /dev/null +++ b/ressources/scripts/datas/cloth.gd @@ -0,0 +1,34 @@ +tool +class_name Cloth +extends Equipment +# + +#05. signals +#06. enums +enum LIMB { + head, + torso, + left_upper_arm, + right_upper_arm, + left_lower_arm, + right_lower_arm, + left_hand, + right_hand, + left_upper_leg, + right_upper_leg, + left_lower_leg, + right_lower_leg, + left_feet, + right_feet +} + +#07. constants +#08. exported variables +#09. public variables +#10. private variables +#11. onready variables +#12. optional built-in virtual _init method +#13. built-in virtual _ready method +#14. remaining built-in virtual methods +#15. public methods +#16. private methods diff --git a/ressources/scripts/datas/creature.gd b/ressources/scripts/datas/creature.gd new file mode 100644 index 0000000..a2788fe --- /dev/null +++ b/ressources/scripts/datas/creature.gd @@ -0,0 +1,41 @@ +class_name Creature +extends Data +# + +#05. signals +#06. enums +#07. constants +#08. exported variables +#09. public variables +#10. private variables +#11. onready variables +#12. optional built-in virtual _init method +#13. built-in virtual _ready method +#14. remaining built-in virtual methods +#15. public methods +func _init( p_name = null ).( p_name ): + self.set_data( "race", null ) + self.set_data( "pseudonym", null ) + # Caracteristiques. + self.set_data( "strength", 5 ) + self.set_data( "perception", 5 ) + self.set_data( "endurance", 5 ) + self.set_data( "constitution", 5 ) + self.set_data( "agility", 5 ) + self.set_data( "current_life", self.get_max_life() ) + self.set_data( "current_stamina", self.get_max_stamina() ) + # inventaire. + self.set_data( "inventory", [] ) + +func get_filename(): + if not self.get_data( "name", null ): + return "unknow.creature" + return self.get_data( "name" )+".creature" + +func get_max_life(): + return self.get_data( "constitution", 5 ) * 1000 + +func get_max_stamina(): + return self.get_data( "endurance", 5 ) * 1000 + +#16. private methods diff --git a/ressources/scripts/datas/data.gd b/ressources/scripts/datas/data.gd index d0031f9..0d6a849 100644 --- a/ressources/scripts/datas/data.gd +++ b/ressources/scripts/datas/data.gd @@ -1,307 +1,46 @@ tool -extends Node +class_name Data +extends Object +# Main creature class -var JSONBeautifier = preload( "res://ressources/scripts/json_beautifier/json_beautifier.gd" ) +#05. signals +#06. enums +#07. constants +#08. exported variables +#09. public variables +var datas = {} -class Data: - var datas = {} - - func _init( p_name = null ): - self.set_data( "name", p_name ) - - func get_data( p_key, p_default_value = null ): - return self.datas.get( p_key, p_default_value ) - - func set_data( p_key, p_value ): - self.datas[ p_key ] = p_value - - func get_filename(): - if not self.get_data( "name", null ): - return "unknow.data" - if self.get_data( "name" ).get_extension(): - return self.get_data( "name" ) - return self.get_data( "name" ) + ".data" - - func save( p_emplacement = "res"): - var filename = self.get_filename() - var ext = filename.get_extension() - var file = File.new() - - if p_emplacement == "res": - if file.open("res://ressources/files/"+ext+"s/"+filename, File.WRITE) == OK: - file.store_line( JSONBeautifier.beautify_json( to_json(self.datas), 4 ) ) - file.close() - elif p_emplacement == "user": - var dir = Directory.new() - if not dir.dir_exists( "user://saves/save_temp/ressources/files/"+ext+"s/" ): - dir .make_dir_recursive( "user://saves/save_temp/ressources/files/"+ext+"s/" ) - - if file.open("user://saves/save_temp/ressources/files/"+ext+"s/"+filename, File.WRITE) == OK: - file.store_line( JSONBeautifier.beautify_json( to_json(self.datas), 4 ) ) - file.close() - elif p_emplacement == "pc": - var dir = Directory.new() - if not dir.dir_exists( "user://saves/save_temp/ressources/files/"+ext+"s/pc/" ): - dir .make_dir_recursive( "user://saves/save_temp/ressources/files/"+ext+"s/pc/" ) - - if file.open("user://saves/save_temp/ressources/files/"+ext+"s/pc/"+filename, File.WRITE) == OK: - file.store_line( JSONBeautifier.beautify_json( to_json(self.datas), 4 ) ) - file.close() - - - func load( p_path = null, p_emplacement = null ): - - var dict = null - - if not p_path: - var filename = self.get_filename() - var ext = filename.get_extension() - var file = File.new() - if not p_emplacement: - if file.open("user://saves/save_temp/ressources/files/"+ext+"s/"+filename, File.READ) == OK or file.open("res://ressources/files/"+ext+"s/"+filename, File.READ) == OK: - dict = JSON.parse(file.get_as_text()).get_result() - else: - var path = "res://ressources/files/"+ext+"s/"+filename - if p_emplacement == "usr": - path = "user://saves/save_temp/ressources/files/"+ext+"s/"+filename - elif p_emplacement == "pc": - path = "user://saves/save_temp/ressources/files/"+ext+"s/pc/"+filename - - if file.open(path, File.READ) == OK: - dict = JSON.parse(file.get_as_text()).get_result() - file.close() - - else: - var file = File.new() - if file.open(p_path, File.READ) == OK: - dict = JSON.parse(file.get_as_text()).get_result() - file.close() - - if dict: - for key in dict.keys(): - self.set_data( key, dict[key] ) - -class ProxyData extends Data: - - var data = null - - func _init( p_data_filename, p_data = null ): - .set_data( "item_filename", p_data_filename ) - .set_data( "modified_values", {} ) +#10. private variables +#11. onready variables +#12. optional built-in virtual _init method +#13. built-in virtual _ready method +#14. remaining built-in virtual methods +#15. public methods - var ref_data = Data.new() - ref_data.set_data( "name", .get_data( "item_filename" ) ) - ref_data.load() - if ref_data and ref_data is Data: - self.data = ref_data - var modified_values = {} - for data_name in self.data.datas.keys(): - if self.data and p_data and not self.data.get_data( data_name ) == p_data.get_data( data_name ): - modified_values[ data_name ] = p_data.get_data( data_name ) - .set_data( "modified_values", modified_values ) +func _init( p_name = null ): + set_data( "name", p_name ) +func get_data( p_key, p_default_value = null ): + return datas.get( p_key, p_default_value ) - func set_data( p_data_name, p_value ): - if not .get_data( "modified_values" ): - .set_data( "modified_values", {} ) - - var new_modified_value = .get_data( "modified_values" ) - new_modified_value[ p_data_name ] = p_value - .set_data( "modified_values", new_modified_value ) +func set_data( p_key, p_value ): + datas[ p_key ] = p_value - func get_data( p_key, p_default_value = null ): - if .get_data( "modified_values" ) and p_key in .get_data( "modified_values" ): - return .get_data( "modified_values" )[ p_key ] - elif self.data: - return self.data.get_data( p_key, p_default_value ) - return p_default_value +func save( filename ): + var file = File.new() + if file.file_exists( filename ): + file.open( filename, File.READ ) + datas = JSON.parse(file.get_as_text()).get_result() + file.close() - func save( p_emplacement = "usr"): - .save( p_emplacement ) +func load( filename ): + var file = File.new() + if file.file_exists( filename ): + file.open( filename, File.READ ) + datas = JSON.parse(file.get_as_text()).get_result() + file.close() - func load( p_path = null, p_emplacement = "usr" ): - .load( p_path, p_emplacement ) - -class Creature extends Data: - func _init( p_name = null ).( p_name ): - self.set_data( "race", null ) - # Caracteristiques. - self.set_data( "strength", 5 ) - self.set_data( "perception", 5 ) - self.set_data( "endurance", 5 ) - self.set_data( "constitution", 5 ) - self.set_data( "agility", 5 ) - self.set_data( "current_life", self.get_max_life() ) - self.set_data( "current_stamina", self.get_max_stamina() ) - # inventaire. - self.set_data( "inventory", [] ) - - func get_filename(): - if not self.get_data( "name", null ): - return "unknow.creature" - return self.get_data( "name" )+".creature" - - func get_max_life(): - return self.get_data( "constitution", 5 ) * 1000 - func get_max_stamina(): - return self.get_data( "endurance", 5 ) * 1000 - -class Human extends Creature: - func _init( p_name = null ).( p_name ): - self.set_data( "first_name", null ) - self.set_data( "last_name", null ) - # Aspect. - self.set_data( "caucasian", 0.0 ) - self.set_data( "african", 0.0 ) - self.set_data( "asian", 0.0 ) - self.set_data( "size", 1.0 ) - self.set_data( "fat", 0.0 ) - self.set_data( "muscles", 0.0 ) - self.set_data( "proportion", 0.0 ) - self.set_data( "breast", 0.0 ) - self.set_data( "pregnancy", 0.0 ) - self.set_data( "skin_tone", 0.0 ) - self.set_data( "hair", 0 ) - self.set_data( "hair_color", Color.white ) - self.set_data( "cleft_chin", 0.0 ) - self.set_data( "chin_angle", 0.0 ) - self.set_data( "mouth_horiz", 0.0 ) - self.set_data( "mouth_vert", 0.0 ) - self.set_data( "nose_galbe", 0.0 ) - self.set_data( "nose_grec", 0.0 ) - self.set_data( "nose_horiz", 0.0 ) - self.set_data( "nose_depth", 0.0 ) - self.set_data( "eyes_vert", 0.0 ) - self.set_data( "eyes_gap", 0.0 ) - self.set_data( "earlobes", 0.0 ) - self.set_data( "ears_wing", 0.0 ) - self.set_data( "lips_up_shape", 0.0 ) - self.set_data( "lips_up_shape_2", 0.0 ) +func from_dictionary( dictionary ): + datas = dictionary - - func get_filename(): - if not self.get_data( "first_name" ) and not self.get_data( "last_name" ): - return "unknow.creature" - elif not self.get_data( "last_name" ): - return self.get_data( "first_name" ) + ".creature" - elif not self.get_data( "first_name" ): - return self.get_data( "last_name" ) + ".creature" - return self.get_data( "first_name" ) + "_" + self.get_data( "last_name" ) + ".creature" - - - -class Item extends Data: - func _init( p_name = null ).( p_name ): - self.set_data( "model", null ) - self.set_data( "label", "" ) - self.set_data( "description", "" ) - self.set_data( "icon", null ) - self.set_data( "stack", 1 ) - self.set_data( "default_num_given", 1 ) - self.set_data( "pickable", true ) - self.set_data( "dropable", true ) - self.set_data( "hit_points", -1 ) - - func get_filename(): - if not self.get_data( "name", null ): - return "unknow.item" - return self.get_data( "name" )+".item" - -class Equipment extends Item: - - enum SLOT { - cloth_hand, - cloth_face, - cloth_head, - cloth_torso, - cloth_legs, - cloth_feet, - cloth_back, - weapon_hand_right, - weapon_hand_left, - weapon_hands, - weapon_hip_right, - weapon_hip_left, - weapon_back_right, - weapon_back_left, - weapon_holster_right, - weapon_holster_left - } - - func _init( p_name = null ).( p_name ): - self.set_data( "slots", [SLOT.weapon_hand_right] ) - self.set_data( "default_slot", SLOT.weapon_hand_right ) - self.set_data( "model_equiped", null ) - self.set_data( "attachment", "attachment_hand_R" ) - self.set_data( "attachment_equiped", "attachment_hand_R" ) - - func get_filename(): - if not self.get_data( "name", null ): - return "unknow.equipment" - return self.get_data( "name" )+".equipment" - -class Cloth extends Equipment: - - enum LIMB { - head, - torso, - left_upper_arm, - right_upper_arm, - left_lower_arm, - right_lower_arm, - left_hand, - right_hand, - left_upper_leg, - right_upper_leg, - left_lower_leg, - right_lower_leg, - left_feet, - right_feet - } - - func _init( p_name = null ).( p_name ): - self.set_data( "protection", 0 ) - self.set_data( "protected_limbs", [] ) - self.set_data( "texture", null ) - - func get_filename(): - if not self.get_data( "name", null ): - return "unknow.cloth" - return self.get_data( "name" )+".cloth" - -class Weapon extends Equipment: - - enum TYPE { - melee, - ranged, - throwed - } - - func _init( p_name = null ).( p_name ): - self.set_data( "damage", 0.0 ) - self.set_data( "reload_needed", 0 ) - self.set_data( "range", 1.0 ) - self.set_data( "type", TYPE.melee ) - self.set_data( "attack_delay", 1.0 ) - - func get_filename(): - if not self.get_data( "name", null ): - return "unknow.weapon" - return self.get_data( "name" )+".weapon" - - -class InventoryItem extends ProxyData: - - func _init( p_item_filename, p_number = 1, p_item = null ).( p_item_filename, p_item ): - self.set_data( "number", p_number ) - -class PickupItem extends ProxyData: - - func _init( p_item_filename, p_global_transform, p_item = null ).( p_item_filename, p_item ): - self.set_data( "global_transform", p_global_transform ) - -# -#class Character extends ProxyData: -# func _init( p_item_filename, p_item = null ).( p_item_filename, p_item ): -# self.set_data( "current_life", self.get_data( "constitution", 5 )*1000 ) -# self.set_data( "current_stamina", self.get_data( "endurance", 5 )*1000 ) +#16. private methods diff --git a/ressources/scripts/datas/equipment.gd b/ressources/scripts/datas/equipment.gd new file mode 100644 index 0000000..30b8d9f --- /dev/null +++ b/ressources/scripts/datas/equipment.gd @@ -0,0 +1,36 @@ +tool +class_name Equipment +extends Item +# + +#05. signals +#06. enums +enum SLOT { + cloth_hand, + cloth_face, + cloth_head, + cloth_torso, + cloth_legs, + cloth_feet, + cloth_back, + weapon_hand_right, + weapon_hand_left, + weapon_hands, + weapon_hip_right, + weapon_hip_left, + weapon_back_right, + weapon_back_left, + weapon_holster_right, + weapon_holster_left +} + +#07. constants +#08. exported variables +#09. public variables +#10. private variables +#11. onready variables +#12. optional built-in virtual _init method +#13. built-in virtual _ready method +#14. remaining built-in virtual methods +#15. public methods +#16. private methods diff --git a/ressources/scripts/datas/human.gd b/ressources/scripts/datas/human.gd new file mode 100644 index 0000000..c996e2e --- /dev/null +++ b/ressources/scripts/datas/human.gd @@ -0,0 +1,58 @@ +class_name Human +extends Creature +# + +#05. signals +#06. enums +#07. constants +#08. exported variables +#09. public variables +#10. private variables +#11. onready variables +#12. optional built-in virtual _init method +#13. built-in virtual _ready method +#14. remaining built-in virtual methods +#15. public methods + +func _init( p_name = null ).( p_name ): + self.set_data( "first_name", null ) + self.set_data( "last_name", null ) + # Aspect. + self.set_data( "caucasian", 0.0 ) + self.set_data( "african", 0.0 ) + self.set_data( "asian", 0.0 ) + self.set_data( "size", 1.0 ) + self.set_data( "fat", 0.0 ) + self.set_data( "muscles", 0.0 ) + self.set_data( "proportion", 0.0 ) + self.set_data( "breast", 0.0 ) + self.set_data( "pregnancy", 0.0 ) + self.set_data( "skin_tone", 0.0 ) + self.set_data( "hair", 0 ) + self.set_data( "hair_color", Color.white ) + self.set_data( "cleft_chin", 0.0 ) + self.set_data( "chin_angle", 0.0 ) + self.set_data( "mouth_horiz", 0.0 ) + self.set_data( "mouth_vert", 0.0 ) + self.set_data( "nose_galbe", 0.0 ) + self.set_data( "nose_grec", 0.0 ) + self.set_data( "nose_horiz", 0.0 ) + self.set_data( "nose_depth", 0.0 ) + self.set_data( "eyes_vert", 0.0 ) + self.set_data( "eyes_gap", 0.0 ) + self.set_data( "earlobes", 0.0 ) + self.set_data( "ears_wing", 0.0 ) + self.set_data( "lips_up_shape", 0.0 ) + self.set_data( "lips_up_shape_2", 0.0 ) + + +func get_filename(): + if not self.get_data( "first_name" ) and not self.get_data( "last_name" ): + return "unknow.creature" + elif not self.get_data( "last_name" ): + return self.get_data( "first_name" ) + ".creature" + elif not self.get_data( "first_name" ): + return self.get_data( "last_name" ) + ".creature" + return self.get_data( "first_name" ) + "_" + self.get_data( "last_name" ) + ".creature" + +#16. private methods diff --git a/ressources/scripts/datas/item.gd b/ressources/scripts/datas/item.gd new file mode 100644 index 0000000..2659cdb --- /dev/null +++ b/ressources/scripts/datas/item.gd @@ -0,0 +1,33 @@ +tool +class_name Item +extends Data +# + +#05. signals +#06. enums +#07. constants +#08. exported variables +#09. public variables +#10. private variables +#11. onready variables +#12. optional built-in virtual _init method +#13. built-in virtual _ready method +#14. remaining built-in virtual methods +#15. public methods +func _init( p_name = null ).( p_name ): + self.set_data( "model", null ) + self.set_data( "label", "" ) + self.set_data( "description", "" ) + self.set_data( "icon", null ) + self.set_data( "stack", 1 ) + self.set_data( "default_num_given", 1 ) + self.set_data( "pickable", true ) + self.set_data( "dropable", true ) + self.set_data( "hit_points", -1 ) + +func get_filename(): + if not self.get_data( "name", null ): + return "unknow.item" + return self.get_data( "name" )+".item" + +#16. private methods diff --git a/ressources/scripts/datas/pickup_item.gd b/ressources/scripts/datas/pickup_item.gd new file mode 100644 index 0000000..4f3bfde --- /dev/null +++ b/ressources/scripts/datas/pickup_item.gd @@ -0,0 +1,19 @@ +class_name PickupItem +extends ProxyData +# + +#05. signals +#06. enums +#07. constants +#08. exported variables +#09. public variables +#10. private variables +#11. onready variables +#12. optional built-in virtual _init method +#13. built-in virtual _ready method +#14. remaining built-in virtual methods +#15. public methods +func _init( p_item_filename, p_global_transform, p_item = null ).( p_item_filename, p_item ): + self.set_data( "global_transform", p_global_transform ) + +#16. private methods diff --git a/ressources/scripts/datas/proxy_data.gd b/ressources/scripts/datas/proxy_data.gd new file mode 100644 index 0000000..b48c753 --- /dev/null +++ b/ressources/scripts/datas/proxy_data.gd @@ -0,0 +1,52 @@ +class_name ProxyData +extends Data +# + +#05. signals +#06. enums +#07. constants +#08. exported variables +#09. public variables +#10. private variables +#11. onready variables +#12. optional built-in virtual _init method +#13. built-in virtual _ready method +#14. remaining built-in virtual methods +#15. public methods + +func _init( p_data_filename, p_data = null ): + .set_data( "item_filename", p_data_filename ) + .set_data( "modified_values", {} ) + + var ref_data = Data.new() + ref_data.set_data( "name", .get_data( "item_filename" ) ) + ref_data.load() + if ref_data and ref_data is Data: + self.data = ref_data + var modified_values = {} + for data_name in self.data.datas.keys(): + if self.data and p_data and not self.data.get_data( data_name ) == p_data.get_data( data_name ): + modified_values[ data_name ] = p_data.get_data( data_name ) + .set_data( "modified_values", modified_values ) + +func set_data( p_data_name, p_value ): + if not .get_data( "modified_values" ): + .set_data( "modified_values", {} ) + var new_modified_value = .get_data( "modified_values" ) + new_modified_value[ p_data_name ] = p_value + .set_data( "modified_values", new_modified_value ) + +func get_data( p_key, p_default_value = null ): + if .get_data( "modified_values" ) and p_key in .get_data( "modified_values" ): + return .get_data( "modified_values" )[ p_key ] + elif self.data: + return self.data.get_data( p_key, p_default_value ) + return p_default_value + +#func save( p_emplacement = "usr"): +# .save( p_emplacement ) +# +#func load( p_path = null, p_emplacement = "usr" ): +# .load( p_path, p_emplacement ) + +#16. private methods diff --git a/ressources/scripts/global.gd b/ressources/scripts/global.gd index 42c038a..1a8cb78 100644 --- a/ressources/scripts/global.gd +++ b/ressources/scripts/global.gd @@ -7,17 +7,20 @@ var player_name = null var ressource_queue = preload("res://ressources/scripts/resource_queue.gd").new() enum RACE { + arche, human } -var race_label = [ "Humain" ] +var race_label = [ "Arche", "Humain" ] func get_race_id( p_label ): return race_label.find( p_label ) enum SEX { female, - male + male, + hermaphroditism, + asexual } -var sex_label = [ "Femme", "Homme" ] +var sex_label = [ "Female", "Male", "Hermaphroditism", "Asexual" ] func get_sex_id( p_label ): return race_label.find( p_label ) diff --git a/ressources/scripts/json_beautifier/json_beautifier.gd b/ressources/scripts/json_beautifier/json_beautifier.gd index 76b72af..003d2a4 100644 --- a/ressources/scripts/json_beautifier/json_beautifier.gd +++ b/ressources/scripts/json_beautifier/json_beautifier.gd @@ -14,116 +14,116 @@ class_name JSONBeautifier # 'validade_json()' method) and a number of spaces for indentation (default is # '0', in which it will use tabs instead), returning properly formatted JSON. static func beautify_json(json: String, spaces := 0) -> String: - var error_message: String = validate_json(json) - if not error_message.empty(): - return error_message + var error_message: String = validate_json(json) + if not error_message.empty(): + return error_message - var indentation := "" - if spaces > 0: - for i in spaces: - indentation += " " - else: - indentation = "\t" + var indentation := "" + if spaces > 0: + for i in spaces: + indentation += " " + else: + indentation = "\t" - var quotation_start := -1 - var char_position := 0 - for i in json: - # Avoid formating inside strings. - if i == "\"": - if quotation_start == -1: - quotation_start = char_position - elif json[char_position - 1] != "\\": - quotation_start = -1 + var quotation_start := -1 + var char_position := 0 + for i in json: + # Avoid formating inside strings. + if i == "\"": + if quotation_start == -1: + quotation_start = char_position + elif json[char_position - 1] != "\\": + quotation_start = -1 - char_position += 1 + char_position += 1 - continue - elif quotation_start != -1: - char_position += 1 + continue + elif quotation_start != -1: + char_position += 1 - continue + continue - match i: - # Remove pre-existing formatting. - " ", "\n", "\t": - json[char_position] = "" - char_position -= 1 + match i: + # Remove pre-existing formatting. + " ", "\n", "\t": + json[char_position] = "" + char_position -= 1 - "{", "[", ",": - if json[char_position + 1] != "}" and\ - json[char_position + 1] != "]": - json = json.insert(char_position + 1, "\n") - char_position += 1 - "}", "]": - if json[char_position - 1] != "{" and\ - json[char_position - 1] != "[": - json = json.insert(char_position, "\n") - char_position += 1 - ":": - json = json.insert(char_position + 1, " ") - char_position += 1 - - char_position += 1 + "{", "[", ",": + if json[char_position + 1] != "}" and\ + json[char_position + 1] != "]": + json = json.insert(char_position + 1, "\n") + char_position += 1 + "}", "]": + if json[char_position - 1] != "{" and\ + json[char_position - 1] != "[": + json = json.insert(char_position, "\n") + char_position += 1 + ":": + json = json.insert(char_position + 1, " ") + char_position += 1 + + char_position += 1 - for i in [["{", "}"], ["[", "]"]]: - var bracket_start: int = json.find(i[0]) - while bracket_start != -1: - var bracket_end: int = json.find("\n", bracket_start) - var bracket_count := 0 - while bracket_end != - 1: - if json[bracket_end - 1] == i[0]: - bracket_count += 1 - elif json[bracket_end + 1] == i[1]: - bracket_count -= 1 + for i in [["{", "}"], ["[", "]"]]: + var bracket_start: int = json.find(i[0]) + while bracket_start != -1: + var bracket_end: int = json.find("\n", bracket_start) + var bracket_count := 0 + while bracket_end != - 1: + if json[bracket_end - 1] == i[0]: + bracket_count += 1 + elif json[bracket_end + 1] == i[1]: + bracket_count -= 1 - # Move through the indentation to see if there is a match. - while json[bracket_end + 1] == indentation: - bracket_end += 1 + # Move through the indentation to see if there is a match. + while json[bracket_end + 1] == indentation: + bracket_end += 1 - if json[bracket_end + 1] == i[1]: - bracket_count -= 1 + if json[bracket_end + 1] == i[1]: + bracket_count -= 1 - if bracket_count <= 0: - break + if bracket_count <= 0: + break - bracket_end = json.find("\n", bracket_end + 1) + bracket_end = json.find("\n", bracket_end + 1) - # Skip one newline so the end bracket doesn't get indented. - bracket_end = json.rfind("\n", json.rfind("\n", bracket_end) - 1) - while bracket_end > bracket_start: - json = json.insert(bracket_end + 1, indentation) - bracket_end = json.rfind("\n", bracket_end - 1) + # Skip one newline so the end bracket doesn't get indented. + bracket_end = json.rfind("\n", json.rfind("\n", bracket_end) - 1) + while bracket_end > bracket_start: + json = json.insert(bracket_end + 1, indentation) + bracket_end = json.rfind("\n", bracket_end - 1) - bracket_start = json.find(i[0], bracket_start + 1) + bracket_start = json.find(i[0], bracket_start + 1) - return json + return json # Takes valid JSON (if invalid, it will return a error according with Godot's # 'validade_json()' method), returning JSON in a single line. static func uglify_json(json: String) -> String: - var quotation_start := -1 - var char_position := 0 - for i in json: - # Avoid formating inside strings. - if i == "\"": - if quotation_start == -1: - quotation_start = char_position - elif json[char_position - 1] != "\\": - quotation_start = -1 + var quotation_start := -1 + var char_position := 0 + for i in json: + # Avoid formating inside strings. + if i == "\"": + if quotation_start == -1: + quotation_start = char_position + elif json[char_position - 1] != "\\": + quotation_start = -1 - char_position += 1 + char_position += 1 - continue - elif quotation_start != -1: - char_position += 1 + continue + elif quotation_start != -1: + char_position += 1 - continue + continue - if i == " " or i == "\n" or i == "\t": - json[char_position] = "" - char_position -= 1 + if i == " " or i == "\n" or i == "\t": + json[char_position] = "" + char_position -= 1 - char_position += 1 + char_position += 1 - return json + return json diff --git a/ressources/themes/creature_creation.tres b/ressources/themes/creature_creation.tres new file mode 100644 index 0000000..1907c44 --- /dev/null +++ b/ressources/themes/creature_creation.tres @@ -0,0 +1,520 @@ +[gd_resource type="Theme" load_steps=17 format=2] + +[ext_resource path="res://assets/interfaces/creatures_creation/creature_creation.png" type="Texture" id=1] + +[sub_resource type="StyleBoxFlat" id=1] +bg_color = Color( 0.0823529, 0.0666667, 0.258824, 1 ) + +[sub_resource type="StyleBoxFlat" id=2] +bg_color = Color( 0.27451, 0.239216, 0.862745, 1 ) +border_width_left = 5 +border_width_top = 5 +border_width_right = 5 +border_width_bottom = 5 +border_color = Color( 0.0235294, 0.054902, 0.313726, 1 ) +border_blend = true +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 + +[sub_resource type="StyleBoxFlat" id=3] +bg_color = Color( 0.164706, 0.121569, 0.87451, 1 ) +border_width_left = 5 +border_width_top = 5 +border_width_right = 5 +border_width_bottom = 5 +border_color = Color( 0.141176, 0.109804, 0.513726, 1 ) +border_blend = true +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 + +[sub_resource type="StyleBoxFlat" id=4] +bg_color = Color( 0.129412, 0.0980392, 0.690196, 1 ) +border_width_left = 5 +border_width_top = 5 +border_width_right = 5 +border_width_bottom = 5 +border_color = Color( 0.0509804, 0.0352941, 0.266667, 1 ) +border_blend = true +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 +shadow_color = Color( 0.101961, 0.0862745, 0.411765, 0.717647 ) +shadow_size = 2 + +[sub_resource type="StyleBoxFlat" id=5] +bg_color = Color( 0.0823529, 0.0392157, 0.784314, 1 ) +corner_detail = 1 + +[sub_resource type="StyleBoxFlat" id=6] +bg_color = Color( 0.109804, 0.0784314, 0.619608, 1 ) + +[sub_resource type="StyleBoxFlat" id=7] +bg_color = Color( 0.0941176, 0.0666667, 0.501961, 1 ) + +[sub_resource type="StyleBoxTexture" id=8] +texture = ExtResource( 1 ) +region_rect = Rect2( 0, 0, 451, 450 ) +margin_left = 41.9886 +margin_right = 42.0 +margin_top = 42.0 +margin_bottom = 42.0 + +[sub_resource type="StyleBoxFlat" id=9] +bg_color = Color( 0.0823529, 0.0392157, 0.784314, 1 ) +border_width_top = 1 +border_color = Color( 0.0431373, 0.0588235, 0.266667, 1 ) +border_blend = true +corner_radius_top_left = 1 +corner_radius_top_right = 1 + +[sub_resource type="StyleBoxFlat" id=10] +bg_color = Color( 0.109804, 0.0784314, 0.619608, 1 ) + +[sub_resource type="StyleBoxFlat" id=11] +bg_color = Color( 0.0941176, 0.0666667, 0.501961, 1 ) + +[sub_resource type="StyleBoxFlat" id=12] +bg_color = Color( 0.164706, 0.121569, 0.87451, 1 ) + +[sub_resource type="StyleBoxFlat" id=13] +bg_color = Color( 0.0823529, 0.0392157, 0.784314, 1 ) + +[sub_resource type="StyleBoxTexture" id=14] +texture = ExtResource( 1 ) +region_rect = Rect2( 0, 0, 451, 450 ) + +[sub_resource type="StyleBoxFlat" id=15] +bg_color = Color( 0.0941176, 0.0666667, 0.501961, 1 ) + +[resource] +Button/colors/font_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Button/colors/font_color_disabled = Color( 0.384314, 0.231373, 0.0392157, 1 ) +Button/colors/font_color_hover = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Button/colors/font_color_pressed = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Button/constants/hseparation = 2 +Button/fonts/font = null +Button/styles/disabled = SubResource( 1 ) +Button/styles/focus = null +Button/styles/hover = SubResource( 2 ) +Button/styles/normal = SubResource( 3 ) +Button/styles/pressed = SubResource( 4 ) +CheckBox/colors/font_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +CheckBox/colors/font_color_disabled = Color( 0.384314, 0.231373, 0.0392157, 1 ) +CheckBox/colors/font_color_hover = Color( 0.878431, 0.529412, 0.0784314, 1 ) +CheckBox/colors/font_color_hover_pressed = Color( 0.878431, 0.529412, 0.0784314, 1 ) +CheckBox/colors/font_color_pressed = Color( 0.878431, 0.529412, 0.0784314, 1 ) +CheckBox/constants/check_vadjust = 0 +CheckBox/constants/hseparation = 4 +CheckBox/fonts/font = null +CheckBox/icons/checked = null +CheckBox/icons/radio_checked = null +CheckBox/icons/radio_unchecked = null +CheckBox/icons/unchecked = null +CheckBox/styles/disabled = null +CheckBox/styles/focus = null +CheckBox/styles/hover = null +CheckBox/styles/hover_pressed = null +CheckBox/styles/normal = null +CheckBox/styles/pressed = null +CheckButton/colors/font_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +CheckButton/colors/font_color_disabled = Color( 0.384314, 0.231373, 0.0392157, 1 ) +CheckButton/colors/font_color_hover = Color( 0.878431, 0.529412, 0.0784314, 1 ) +CheckButton/colors/font_color_hover_pressed = Color( 0.878431, 0.529412, 0.0784314, 1 ) +CheckButton/colors/font_color_pressed = Color( 0.878431, 0.529412, 0.0784314, 1 ) +CheckButton/constants/check_vadjust = 0 +CheckButton/constants/hseparation = 4 +CheckButton/fonts/font = null +CheckButton/icons/off = null +CheckButton/icons/off_disabled = null +CheckButton/icons/on = null +CheckButton/icons/on_disabled = null +CheckButton/styles/disabled = null +CheckButton/styles/focus = null +CheckButton/styles/hover = null +CheckButton/styles/hover_pressed = null +CheckButton/styles/normal = null +CheckButton/styles/pressed = null +ColorPicker/constants/h_width = 30 +ColorPicker/constants/label_width = 10 +ColorPicker/constants/margin = 4 +ColorPicker/constants/sv_height = 256 +ColorPicker/constants/sv_width = 256 +ColorPicker/icons/add_preset = null +ColorPicker/icons/color_hue = null +ColorPicker/icons/color_sample = null +ColorPicker/icons/overbright_indicator = null +ColorPicker/icons/preset_bg = null +ColorPicker/icons/screen_picker = null +ColorPickerButton/colors/font_color = Color( 0, 0, 0, 1 ) +ColorPickerButton/colors/font_color_disabled = Color( 0, 0, 0, 1 ) +ColorPickerButton/colors/font_color_hover = Color( 0, 0, 0, 1 ) +ColorPickerButton/colors/font_color_pressed = Color( 0, 0, 0, 1 ) +ColorPickerButton/constants/hseparation = 2 +ColorPickerButton/fonts/font = null +ColorPickerButton/icons/bg = null +ColorPickerButton/styles/disabled = null +ColorPickerButton/styles/focus = null +ColorPickerButton/styles/hover = null +ColorPickerButton/styles/normal = null +ColorPickerButton/styles/pressed = null +Dialogs/constants/button_margin = 32 +Dialogs/constants/margin = 8 +FileDialog/colors/file_icon_modulate = Color( 0, 0, 0, 1 ) +FileDialog/colors/files_disabled = Color( 0, 0, 0, 1 ) +FileDialog/colors/folder_icon_modulate = Color( 0, 0, 0, 1 ) +FileDialog/icons/file = null +FileDialog/icons/folder = null +FileDialog/icons/parent_folder = null +FileDialog/icons/reload = null +FileDialog/icons/toggle_hidden = null +Fonts/fonts/large = null +Fonts/fonts/normal = null +GraphEdit/colors/activity = Color( 0, 0, 0, 1 ) +GraphEdit/colors/grid_major = Color( 0, 0, 0, 1 ) +GraphEdit/colors/grid_minor = Color( 0, 0, 0, 1 ) +GraphEdit/colors/selection_fill = Color( 0, 0, 0, 1 ) +GraphEdit/colors/selection_stroke = Color( 0, 0, 0, 1 ) +GraphEdit/constants/bezier_len_neg = 160 +GraphEdit/constants/bezier_len_pos = 80 +GraphEdit/constants/port_grab_distance_horizontal = 48 +GraphEdit/constants/port_grab_distance_vertical = 6 +GraphEdit/icons/minimap = null +GraphEdit/icons/minus = null +GraphEdit/icons/more = null +GraphEdit/icons/reset = null +GraphEdit/icons/snap = null +GraphEdit/styles/bg = null +GraphEditMinimap/colors/resizer_color = Color( 0, 0, 0, 1 ) +GraphEditMinimap/icons/resizer = null +GraphEditMinimap/styles/bg = null +GraphEditMinimap/styles/camera = null +GraphEditMinimap/styles/node = null +GraphNode/colors/close_color = Color( 0, 0, 0, 1 ) +GraphNode/colors/resizer_color = Color( 0, 0, 0, 1 ) +GraphNode/colors/title_color = Color( 0, 0, 0, 1 ) +GraphNode/constants/close_offset = 18 +GraphNode/constants/port_offset = 3 +GraphNode/constants/separation = 1 +GraphNode/constants/title_offset = 20 +GraphNode/fonts/title_font = null +GraphNode/icons/close = null +GraphNode/icons/port = null +GraphNode/icons/resizer = null +GraphNode/styles/breakpoint = null +GraphNode/styles/comment = null +GraphNode/styles/commentfocus = null +GraphNode/styles/defaultfocus = null +GraphNode/styles/defaultframe = null +GraphNode/styles/frame = null +GraphNode/styles/position = null +GraphNode/styles/selectedframe = null +GridContainer/constants/hseparation = 4 +GridContainer/constants/vseparation = 4 +HBoxContainer/constants/separation = 4 +HScrollBar/icons/decrement = null +HScrollBar/icons/decrement_highlight = null +HScrollBar/icons/increment = null +HScrollBar/icons/increment_highlight = null +HScrollBar/styles/grabber = null +HScrollBar/styles/grabber_highlight = null +HScrollBar/styles/grabber_pressed = null +HScrollBar/styles/scroll = null +HScrollBar/styles/scroll_focus = null +HSeparator/constants/separation = 4 +HSeparator/styles/separator = null +HSlider/icons/grabber = null +HSlider/icons/grabber_disabled = null +HSlider/icons/grabber_highlight = null +HSlider/icons/tick = null +HSlider/styles/grabber_area = null +HSlider/styles/grabber_area_highlight = null +HSlider/styles/slider = null +HSplitContainer/constants/autohide = 1 +HSplitContainer/constants/separation = 12 +HSplitContainer/icons/grabber = null +HSplitContainer/styles/bg = null +Icons/icons/close = null +ItemList/colors/font_color = Color( 0, 0, 0, 1 ) +ItemList/colors/font_color_selected = Color( 0, 0, 0, 1 ) +ItemList/colors/guide_color = Color( 0, 0, 0, 1 ) +ItemList/constants/hseparation = 4 +ItemList/constants/icon_margin = 4 +ItemList/constants/line_separation = 2 +ItemList/constants/vseparation = 2 +ItemList/fonts/font = null +ItemList/styles/bg = null +ItemList/styles/bg_focus = null +ItemList/styles/cursor = null +ItemList/styles/cursor_unfocused = null +ItemList/styles/selected = null +ItemList/styles/selected_focus = null +Label/colors/font_color = Color( 0.87451, 0.611765, 0.219608, 1 ) +Label/colors/font_color_shadow = Color( 0.305882, 0.215686, 0.105882, 1 ) +Label/colors/font_outline_modulate = Color( 0, 0, 0, 1 ) +Label/constants/line_spacing = 3 +Label/constants/shadow_as_outline = 0 +Label/constants/shadow_offset_x = 1 +Label/constants/shadow_offset_y = 1 +Label/fonts/font = null +Label/styles/normal = null +LineEdit/colors/clear_button_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +LineEdit/colors/clear_button_color_pressed = Color( 0.878431, 0.529412, 0.0784314, 1 ) +LineEdit/colors/cursor_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +LineEdit/colors/font_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +LineEdit/colors/font_color_selected = Color( 0.878431, 0.529412, 0.0784314, 1 ) +LineEdit/colors/font_color_uneditable = Color( 0.878431, 0.529412, 0.0784314, 1 ) +LineEdit/colors/selection_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +LineEdit/constants/minimum_spaces = 12 +LineEdit/fonts/font = null +LineEdit/icons/clear = null +LineEdit/styles/focus = SubResource( 5 ) +LineEdit/styles/normal = SubResource( 6 ) +LineEdit/styles/read_only = SubResource( 7 ) +LinkButton/colors/font_color = Color( 0, 0, 0, 1 ) +LinkButton/colors/font_color_hover = Color( 0, 0, 0, 1 ) +LinkButton/colors/font_color_pressed = Color( 0, 0, 0, 1 ) +LinkButton/constants/underline_spacing = 2 +LinkButton/fonts/font = null +LinkButton/styles/focus = null +MarginContainer/constants/margin_bottom = 0 +MarginContainer/constants/margin_left = 0 +MarginContainer/constants/margin_right = 0 +MarginContainer/constants/margin_top = 0 +MenuButton/colors/font_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +MenuButton/colors/font_color_disabled = Color( 0.384314, 0.231373, 0.0392157, 1 ) +MenuButton/colors/font_color_hover = Color( 0.878431, 0.529412, 0.0784314, 1 ) +MenuButton/colors/font_color_pressed = Color( 0.878431, 0.529412, 0.0784314, 1 ) +MenuButton/constants/hseparation = 3 +MenuButton/fonts/font = null +MenuButton/styles/disabled = null +MenuButton/styles/focus = null +MenuButton/styles/hover = null +MenuButton/styles/normal = null +MenuButton/styles/pressed = null +OptionButton/colors/font_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +OptionButton/colors/font_color_disabled = Color( 0.384314, 0.231373, 0.0392157, 1 ) +OptionButton/colors/font_color_hover = Color( 0.878431, 0.529412, 0.0784314, 1 ) +OptionButton/colors/font_color_pressed = Color( 0.878431, 0.529412, 0.0784314, 1 ) +OptionButton/constants/arrow_margin = 2 +OptionButton/constants/hseparation = 2 +OptionButton/fonts/font = null +OptionButton/icons/arrow = null +OptionButton/styles/disabled = null +OptionButton/styles/focus = null +OptionButton/styles/hover = null +OptionButton/styles/normal = null +OptionButton/styles/pressed = null +Panel/styles/panel = SubResource( 8 ) +PanelContainer/styles/panel = null +PopupDialog/styles/panel = null +PopupMenu/colors/font_color = Color( 0, 0, 0, 1 ) +PopupMenu/colors/font_color_accel = Color( 0, 0, 0, 1 ) +PopupMenu/colors/font_color_disabled = Color( 0, 0, 0, 1 ) +PopupMenu/colors/font_color_hover = Color( 0, 0, 0, 1 ) +PopupMenu/colors/font_color_separator = Color( 0, 0, 0, 1 ) +PopupMenu/constants/hseparation = 4 +PopupMenu/constants/vseparation = 4 +PopupMenu/fonts/font = null +PopupMenu/icons/checked = null +PopupMenu/icons/radio_checked = null +PopupMenu/icons/radio_unchecked = null +PopupMenu/icons/submenu = null +PopupMenu/icons/unchecked = null +PopupMenu/styles/hover = null +PopupMenu/styles/labeled_separator_left = null +PopupMenu/styles/labeled_separator_right = null +PopupMenu/styles/panel = null +PopupMenu/styles/panel_disabled = null +PopupMenu/styles/separator = null +PopupPanel/styles/panel = null +ProgressBar/colors/font_color = Color( 0, 0, 0, 1 ) +ProgressBar/colors/font_color_shadow = Color( 0, 0, 0, 1 ) +ProgressBar/fonts/font = null +ProgressBar/styles/bg = null +ProgressBar/styles/fg = null +RichTextLabel/colors/default_color = Color( 0, 0, 0, 1 ) +RichTextLabel/colors/font_color_selected = Color( 0, 0, 0, 1 ) +RichTextLabel/colors/font_color_shadow = Color( 0, 0, 0, 1 ) +RichTextLabel/colors/selection_color = Color( 0, 0, 0, 1 ) +RichTextLabel/constants/line_separation = 1 +RichTextLabel/constants/shadow_as_outline = 0 +RichTextLabel/constants/shadow_offset_x = 1 +RichTextLabel/constants/shadow_offset_y = 1 +RichTextLabel/constants/table_hseparation = 3 +RichTextLabel/constants/table_vseparation = 3 +RichTextLabel/fonts/bold_font = null +RichTextLabel/fonts/bold_italics_font = null +RichTextLabel/fonts/italics_font = null +RichTextLabel/fonts/mono_font = null +RichTextLabel/fonts/normal_font = null +RichTextLabel/styles/focus = null +RichTextLabel/styles/normal = null +ScrollContainer/styles/bg = null +SpinBox/icons/updown = null +TabContainer/colors/font_color_bg = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TabContainer/colors/font_color_disabled = Color( 0.384314, 0.231373, 0.0392157, 1 ) +TabContainer/colors/font_color_fg = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TabContainer/constants/hseparation = 4 +TabContainer/constants/label_valign_bg = 2 +TabContainer/constants/label_valign_fg = 0 +TabContainer/constants/side_margin = 8 +TabContainer/constants/top_margin = 24 +TabContainer/fonts/font = null +TabContainer/icons/decrement = null +TabContainer/icons/decrement_highlight = null +TabContainer/icons/increment = null +TabContainer/icons/increment_highlight = null +TabContainer/icons/menu = null +TabContainer/icons/menu_highlight = null +TabContainer/styles/panel = SubResource( 9 ) +TabContainer/styles/tab_bg = SubResource( 10 ) +TabContainer/styles/tab_disabled = SubResource( 11 ) +TabContainer/styles/tab_fg = SubResource( 12 ) +Tabs/colors/font_color_bg = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Tabs/colors/font_color_disabled = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Tabs/colors/font_color_fg = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Tabs/constants/hseparation = 4 +Tabs/constants/label_valign_bg = 2 +Tabs/constants/label_valign_fg = 0 +Tabs/constants/top_margin = 24 +Tabs/fonts/font = null +Tabs/icons/close = null +Tabs/icons/decrement = null +Tabs/icons/decrement_highlight = null +Tabs/icons/increment = null +Tabs/icons/increment_highlight = null +Tabs/styles/button = null +Tabs/styles/button_pressed = null +Tabs/styles/panel = null +Tabs/styles/tab_bg = null +Tabs/styles/tab_disabled = null +Tabs/styles/tab_fg = null +TextEdit/colors/background_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/bookmark_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/brace_mismatch_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/breakpoint_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/caret_background_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/caret_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/code_folding_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/completion_background_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/completion_existing_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/completion_font_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/completion_scroll_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/completion_selected_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/current_line_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/executing_line_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/font_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/font_color_readonly = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/font_color_selected = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/function_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/line_number_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/mark_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/member_variable_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/number_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/safe_line_number_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/selection_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/symbol_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/colors/word_highlighted_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +TextEdit/constants/completion_lines = 7 +TextEdit/constants/completion_max_width = 50 +TextEdit/constants/completion_scroll_width = 3 +TextEdit/constants/line_spacing = 4 +TextEdit/fonts/font = null +TextEdit/icons/fold = null +TextEdit/icons/folded = null +TextEdit/icons/space = null +TextEdit/icons/tab = null +TextEdit/styles/completion = null +TextEdit/styles/focus = null +TextEdit/styles/normal = SubResource( 13 ) +TextEdit/styles/read_only = null +ToolButton/colors/font_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +ToolButton/colors/font_color_disabled = Color( 0.384314, 0.231373, 0.0392157, 1 ) +ToolButton/colors/font_color_hover = Color( 0.878431, 0.529412, 0.0784314, 1 ) +ToolButton/colors/font_color_pressed = Color( 0.878431, 0.529412, 0.0784314, 1 ) +ToolButton/constants/hseparation = 3 +ToolButton/fonts/font = null +ToolButton/styles/disabled = null +ToolButton/styles/focus = null +ToolButton/styles/hover = null +ToolButton/styles/normal = null +ToolButton/styles/pressed = null +TooltipLabel/colors/font_color = Color( 0, 0, 0, 1 ) +TooltipLabel/colors/font_color_shadow = Color( 0, 0, 0, 1 ) +TooltipLabel/constants/shadow_offset_x = 1 +TooltipLabel/constants/shadow_offset_y = 1 +TooltipLabel/fonts/font = null +TooltipPanel/styles/panel = SubResource( 14 ) +Tree/colors/custom_button_font_highlight = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Tree/colors/drop_position_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Tree/colors/font_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Tree/colors/font_color_selected = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Tree/colors/guide_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Tree/colors/relationship_line_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Tree/colors/title_button_color = Color( 0.878431, 0.529412, 0.0784314, 1 ) +Tree/constants/button_margin = 4 +Tree/constants/draw_guides = 1 +Tree/constants/draw_relationship_lines = 0 +Tree/constants/hseparation = 4 +Tree/constants/item_margin = 12 +Tree/constants/scroll_border = 4 +Tree/constants/scroll_speed = 12 +Tree/constants/vseparation = 4 +Tree/fonts/font = null +Tree/fonts/title_button_font = null +Tree/icons/arrow = null +Tree/icons/arrow_collapsed = null +Tree/icons/checked = null +Tree/icons/select_arrow = null +Tree/icons/unchecked = null +Tree/icons/updown = null +Tree/styles/bg = SubResource( 15 ) +Tree/styles/bg_focus = null +Tree/styles/button_pressed = null +Tree/styles/cursor = null +Tree/styles/cursor_unfocused = null +Tree/styles/custom_button = null +Tree/styles/custom_button_hover = null +Tree/styles/custom_button_pressed = null +Tree/styles/selected = null +Tree/styles/selected_focus = null +Tree/styles/title_button_hover = null +Tree/styles/title_button_normal = null +Tree/styles/title_button_pressed = null +VBoxContainer/constants/separation = 4 +VScrollBar/icons/decrement = null +VScrollBar/icons/decrement_highlight = null +VScrollBar/icons/increment = null +VScrollBar/icons/increment_highlight = null +VScrollBar/styles/grabber = null +VScrollBar/styles/grabber_highlight = null +VScrollBar/styles/grabber_pressed = null +VScrollBar/styles/scroll = null +VScrollBar/styles/scroll_focus = null +VSeparator/constants/separation = 4 +VSeparator/styles/separator = null +VSlider/icons/grabber = null +VSlider/icons/grabber_disabled = null +VSlider/icons/grabber_highlight = null +VSlider/icons/tick = null +VSlider/styles/grabber_area = null +VSlider/styles/grabber_area_highlight = null +VSlider/styles/slider = null +VSplitContainer/constants/autohide = 1 +VSplitContainer/constants/separation = 12 +VSplitContainer/icons/grabber = null +VSplitContainer/styles/bg = null +WindowDialog/colors/title_color = Color( 0, 0, 0, 1 ) +WindowDialog/constants/close_h_ofs = 18 +WindowDialog/constants/close_v_ofs = 18 +WindowDialog/constants/scaleborder_size = 4 +WindowDialog/constants/title_height = 20 +WindowDialog/fonts/title_font = null +WindowDialog/icons/close = null +WindowDialog/icons/close_highlight = null +WindowDialog/styles/panel = null diff --git a/ressources/themes/khanat_theme.theme b/ressources/themes/khanat_theme.theme deleted file mode 100644 index 44c16ca..0000000 Binary files a/ressources/themes/khanat_theme.theme and /dev/null differ diff --git a/scenes/creature_creation/arche.tscn b/scenes/creature_creation/arche.tscn new file mode 100644 index 0000000..dbf62da --- /dev/null +++ b/scenes/creature_creation/arche.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://assets/creatures/arche/arche.tscn" type="PackedScene" id=1] + +[node name="spatial" type="Spatial"] + +[node name="creature" parent="." instance=ExtResource( 1 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) diff --git a/scenes/creature_creation/creature.gd b/scenes/creature_creation/creature.gd new file mode 100644 index 0000000..35a0c53 --- /dev/null +++ b/scenes/creature_creation/creature.gd @@ -0,0 +1,35 @@ +extends Spatial + +var direction = Vector3.ZERO +var rotation_speed_factor = 0.01 +var orientation = 0.0 + + +func _process2( delta ): + #var forwards: Vector3 = $look_at.global_transform.basis.z * direction.z + #var right: Vector3 = $look_at.global_transform.basis.x * direction.x + #if forwards: + # right = Vector3.ZERO +# var move_direction: = forwards + right +# if move_direction.length() > 1.0: +# move_direction = move_direction.normalized() +# move_direction.y = 0 + + #Config.msg_debug("delta:" + str(delta)) + # Rotation. +# if (self.has_node( "creature" ) and $creature.can_turn()) or self.is_readying_weapon or self.is_weapon_ready: +# self.rotate_y( rotation_speed_factor * orientation ) + + # Animation. + #if self.has_node( "creature" ): +# Config.msg_debug("delta:" + str(delta)) + for i in self.get_children(): +# print("> " + i.get_name()) + for ii in i.get_children(): +# print(">> " + ii.get_name()) + if ii.get_name() == "AnimationPlayer": + ii.play( "idle" ) +# for iii in ii.get_children(): +# print(">>> " + iii.get_name()) + #$creature.AnimationPlayer.play( "idle" ) + #$creature.play( "idle" ) diff --git a/scenes/creature_creation/creature.tscn b/scenes/creature_creation/creature.tscn new file mode 100644 index 0000000..25e781f --- /dev/null +++ b/scenes/creature_creation/creature.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://assets/creatures/arche/arche.tscn" type="PackedScene" id=1] + +[node name="spatial" type="Spatial"] + +[node name="arche" parent="." instance=ExtResource( 1 )] diff --git a/scenes/creature_creation/creature_creation.gd b/scenes/creature_creation/creature_creation.gd new file mode 100644 index 0000000..72a4398 --- /dev/null +++ b/scenes/creature_creation/creature_creation.gd @@ -0,0 +1,125 @@ +extends Spatial + + +var animation_object = null +var orientation = 0.0 +var blend_shapes = {} + + +func search_animation( obj ) -> bool: + var ret:bool = false + for i in obj.get_children(): + if i.get_name() == "AnimationPlayer": + animation_object = i + return true + else: + ret = search_animation(i) + if ret == true: + return ret + return false + + +func list_child( obj, father = "" ): + for i in obj.get_children(): + var root = father + "." + str(i.name) + Config.msg_debug(root) + if i is MeshInstance: + Config.msg_debug(root + " -> MeshInstance") + for key in i.get_property_list(): + Config.msg_debug( "property:" + str(key)) + list_child( i, root) + + + +func list_blend_shapes( obj, father = "" ) -> Array: + var ret:Array + for i in obj.get_children(): + var root = father + "." + str(i.name) + if i is MeshInstance: + for key in i.get_property_list(): + if key.name.substr(0, 13) == "blend_shapes/": + # Config.msg_debug( father + "." + i.name + " - " + key.name.substr(13) ) + ret.append(key.name.substr(13)) + list_blend_shapes( i, root) + return ret + +func update_blend_shapes_step( obj, father = "" ): + for i in obj.get_children(): + var root = father + str(i.name) + "." + if i is MeshInstance: + for key in i.get_property_list(): + if key.name.substr(0, 13) == "blend_shapes/": + var blend = key.name.substr(13) + # Config.msg_debug( father + i.name + " - " + key.name.substr(13) ) + if not blend_shapes.has(blend): + blend_shapes[blend] = [] + blend_shapes[blend].append(i) + update_blend_shapes_step( i, root) + + +func update_blend_shapes( obj ): + blend_shapes = {} + update_blend_shapes_step(obj, "") +# for key in blend_shapes: +# Config.msg_debug("key:" + key + " = " + str(blend_shapes[key])) + $control.update_property(blend_shapes) + + +func _ready(): + $control.connect("update_blend" , self, "_on_update_property") + $control.connect( "select_race", self, "_on_select_race" ) + self.change_creature( "res://scenes/creature_creation/arche.tscn" ) + search_animation(self) + update_blend_shapes($creature) + + +func _process( delta ): + animation_object.play( "idle" ) + + +func _input( event ): + # Config.msg_debug(str(event)) + if event is InputEventMouseMotion and Input.is_mouse_button_pressed( 2 ): + if $creature: + $creature.rotate_y( event.relative.x *0.01 ) + + +func change_creature( new_model_path ): + if $creature: + var old_model = $creature + self.remove_child( old_model ) + old_model.queue_free() + var new_model = load( new_model_path ) + if new_model: + new_model = new_model.instance() + new_model.name = "creature" + self.add_child( new_model ) + #new_model.connect( "animation_finished", self, "_on_creature_animation_finished" ) + #new_model.duplicate_meshes() + + +func _on_select_race( race ): + Config.msg_debug(race) + match race: + "arche": + self.change_creature( "res://scenes/creature_creation/arche.tscn" ) + "isidor": + self.change_creature( "res://scenes/creature_creation/isidor.tscn" ) + _: + self.change_creature( "res://scenes/creature_creation/arche.tscn" ) + search_animation(self) + update_blend_shapes($creature) +# for child in $creature.get_children(): +# Config.msg_debug("Child / name:" + child.name) +# list_child($creature) +# var skeleton = child.get_node( "skeleton" ) +# for node in skeleton.get_children(): +# if node is MeshInstance: +# Config.msg_debug("Node / name:" + node.name) +# #node.set( "blend_shapes/"+p_blend_shape_name, p_value ) + + +func _on_update_property(name_property, value): + Config.msg_debug( name_property + ": " + str(value) ) + for i in blend_shapes[name_property]: + i.set( "blend_shapes/"+name_property, value ) diff --git a/scenes/creature_creation/creature_creation.tscn b/scenes/creature_creation/creature_creation.tscn new file mode 100644 index 0000000..a9d27ce --- /dev/null +++ b/scenes/creature_creation/creature_creation.tscn @@ -0,0 +1,26 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://scenes/creature_creation/creature_creation_menu.tscn" type="PackedScene" id=1] +[ext_resource path="res://scenes/creature_creation/creature.tscn" type="PackedScene" id=2] +[ext_resource path="res://scenes/creature_creation/creature.gd" type="Script" id=3] +[ext_resource path="res://scenes/creature_creation/creature_creation.gd" type="Script" id=4] + +[node name="creature_creation" type="Spatial"] +script = ExtResource( 4 ) + +[node name="control" parent="." instance=ExtResource( 1 )] +size_flags_horizontal = 1 +size_flags_vertical = 1 + +[node name="camera" type="Camera" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.57491, 1.49725, 3 ) +projection = 1 +current = true +size = 4.0 + +[node name="directional_light" type="DirectionalLight" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.20866, 2.21448 ) +light_energy = 2.0 + +[node name="creature" parent="." instance=ExtResource( 2 )] +script = ExtResource( 3 ) diff --git a/scenes/creature_creation/creature_creation_menu.gd b/scenes/creature_creation/creature_creation_menu.gd new file mode 100644 index 0000000..14850d7 --- /dev/null +++ b/scenes/creature_creation/creature_creation_menu.gd @@ -0,0 +1,166 @@ +extends Control + + +signal select_race(race) +signal update_blend(name_property, value) + +var rng = RandomNumberGenerator.new() +var current_race = "arche" + +const syllabe = ["ba", "be", "bi", "bo", "bu", "bou", + "ca", "ce", "ci", "co", "cu", "cou", + "da", "de", "di", "do", "du", "dou", + "fa", "fe", "fi", "fo", "fu", "fou", + "ga", "ge", "gi", "go", "gu", "gou", + "ha", "he", "hi", "ho", "hu", "hou", + "ja", "je", "ji", "jo", "ju", "jou", + "ka", "ke", "ki", "ko", "ku", "kou", + "la", "le", "li", "lo", "lu", "lou", + "ma", "me", "mi", "mo", "mu", "mou", + "na", "ne", "ni", "no", "nu", "nou", + "ma", "me", "mi", "mo", "mu", "mou", + "pa", "pe", "pi", "po", "pu", "pou", + "ra", "re", "ri", "ro", "ru", "rou", + "sa", "se", "si", "so", "su", "sou", + "ta", "te", "ti", "to", "tu", "tou", + "va", "ve", "vi", "vo", "vu", "vou" + ] + +func _ready(): + rng.randomize() + $create/diplay/panel_left/margin/property.hide() + $create/diplay/panel_left/margin/name.hide() + $create/diplay/panel_left/margin/race.show() + + +func _on_arche_pressed(): + current_race = "arche" + emit_signal("select_race", current_race) + + +func _on_isidor_pressed(): + current_race = "isidor" + emit_signal("select_race", current_race) + + +func _on_quit_pressed(): + Config.msg_debug("Quit") + # emit_signal( "quit_pressed" ) + Globals.goto_scene( "res://scenes/interfaces/creatures_menu/creatures_menu_ui.tscn" ) + + +func _on_race_next_pressed(): + $create/diplay/panel_left/margin/race.hide() + $create/diplay/panel_left/margin/property.hide() + $create/diplay/panel_left/margin/name.show() + + +func _on_name_previous_pressed(): + $create/diplay/panel_left/margin/property.hide() + $create/diplay/panel_left/margin/name.hide() + $create/diplay/panel_left/margin/race.show() + + +func _on_name_next_pressed(): + $create/diplay/panel_left/margin/race.hide() + $create/diplay/panel_left/margin/name.hide() + $create/diplay/panel_left/margin/property.show() + + +func _on_property_previous_pressed(): + $create/diplay/panel_left/margin/property.hide() + $create/diplay/panel_left/margin/race.hide() + $create/diplay/panel_left/margin/name.show() + + +func _on_property_next_pressed(): + Config.msg_debug("First name: " + $create/diplay/panel_left/margin/name/v_box_container/FirstName/line_edit.text) + Config.msg_debug("Last name: " + $create/diplay/panel_left/margin/name/v_box_container/LastName/line_edit.text) + for key in $create/diplay/panel_left/margin/property/panel/blend_shape/list.get_children(): + for pop in key.get_children(): + if pop is HBoxContainer: + Config.msg_debug( str(pop.name_property) + ": " + str(pop.get_node("property").value) ) + + +func generate_name_key(minsyllabe:int, maxsyllabe:int, start:Array = [], end:Array = []) -> String: + var nbsyllabe = rng.randi_range(minsyllabe, maxsyllabe) + var last = rng.randi_range(0, end.size()-1) + var ret = "" + for _i in range(0, nbsyllabe): + var x = rng.randi_range(0, syllabe.size()-1) + ret += syllabe[x] + if end.size() > 0: + ret += end[last] + return ret + + +func generate_name(): + var first_name: String = "" + var last_name: String = "" + match current_race: + "arche": + first_name = generate_name_key(1, 3, [], ["par", "tar", "lar", "nar", "var", "xar", "rar", "sar"]) + last_name = generate_name_key(2, 5) + "isidor": + first_name = generate_name_key(1, 3, [], ["por", "tor", "lor", "nor"]) + last_name = generate_name_key(2, 5) + _: + first_name = "paf" + last_name = "pouf" + $create/diplay/panel_left/margin/name/v_box_container/FirstName/line_edit.text = first_name + $create/diplay/panel_left/margin/name/v_box_container/LastName/line_edit.text = last_name + +func update_property( blend_shapes ): + #Config.msg_debug("") + for child in $create/diplay/panel_left/margin/property/panel/blend_shape/list.get_children(): + $create/diplay/panel_left/margin/property/panel/blend_shape/list.remove_child(child) + # var list_group:Array = [] + var list:Dictionary = {} + var tab:PoolStringArray + var global_box = preload( "res://scenes/creature_creation/property_label.tscn" ).instance() + global_box.get_node("label" ).text = "General" + $create/diplay/panel_left/margin/property/panel/blend_shape/list.add_child(global_box) + list["General"] = global_box + for key in blend_shapes: + tab = key.split("/", true, 1) + #Config.msg_debug(key + " : " + str(tab.size()) ) + if tab.size() == 2: + if not list.has(tab[0]): + var property_label_box = preload( "res://scenes/creature_creation/property_label.tscn" ).instance() + property_label_box.get_node("label" ).text = tab[0] + $create/diplay/panel_left/margin/property/panel/blend_shape/list.add_child(property_label_box) + list[tab[0]] = property_label_box + for key in blend_shapes: + var blend_shapes_box = preload( "res://scenes/creature_creation/property_box.tscn" ).instance() + var name_prop = key + tab = key.split("/", true, 1) + if tab.size() == 2: + name_prop = tab[1] + blend_shapes_box.name_property = key + blend_shapes_box.get_node( "label" ).text = name_prop + blend_shapes_box.get_node( "property" ).min_value = 0.0 + blend_shapes_box.get_node( "property" ).max_value = 1.0 + blend_shapes_box.get_node( "property" ).step = 0.01 + blend_shapes_box.get_node( "property" ).value = 0.0 + blend_shapes_box.connect( "changed", self, "_on_creature_update_property" ) + tab = key.split("/", true, 1) + if tab.size() == 2: + list[tab[0]].add_child(blend_shapes_box) + else: + list["General"].add_child(blend_shapes_box) + for key in list: + for i in list[key].get_children(): + if i.has_node("property"): + var vf = rng.randf_range(0.0, 100.0) / 100.0 + Config.msg_debug("de:" + str(vf)) + i.get_node( "property" ).value = vf + generate_name() + + +func _on_creature_update_property(key, name_property): + Config.msg_debug( name_property + ": " + str(key)) + emit_signal( "update_blend", name_property, key ) + + +func _on_generate_name_pressed(): + generate_name() diff --git a/scenes/creature_creation/creature_creation_menu.tscn b/scenes/creature_creation/creature_creation_menu.tscn new file mode 100644 index 0000000..e7b54af --- /dev/null +++ b/scenes/creature_creation/creature_creation_menu.tscn @@ -0,0 +1,286 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://scenes/creature_creation/creature_creation_menu.gd" type="Script" id=1] +[ext_resource path="res://ressources/themes/creature_creation.tres" type="Theme" id=2] +[ext_resource path="res://assets/interfaces/next.png" type="Texture" id=3] +[ext_resource path="res://assets/interfaces/rollback.png" type="Texture" id=4] +[ext_resource path="res://assets/interfaces/previous.png" type="Texture" id=5] + +[node name="control" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme = ExtResource( 2 ) +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="create" type="MarginContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +custom_constants/margin_right = 50 +custom_constants/margin_top = 50 +custom_constants/margin_left = 50 +custom_constants/margin_bottom = 50 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="diplay" type="HBoxContainer" parent="create"] +margin_left = 50.0 +margin_top = 50.0 +margin_right = 1230.0 +margin_bottom = 670.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="panel_left" type="Panel" parent="create/diplay"] +margin_right = 588.0 +margin_bottom = 620.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="margin" type="MarginContainer" parent="create/diplay/panel_left"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = 1.49829 +margin_bottom = 1.49829 +size_flags_horizontal = 3 +size_flags_vertical = 3 +custom_constants/margin_right = 50 +custom_constants/margin_top = 50 +custom_constants/margin_left = 50 +custom_constants/margin_bottom = 50 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="race" type="VBoxContainer" parent="create/diplay/panel_left/margin"] +visible = false +margin_left = 50.0 +margin_top = 50.0 +margin_right = 538.0 +margin_bottom = 570.0 + +[node name="creature_creation" type="VBoxContainer" parent="create/diplay/panel_left/margin/race"] +margin_right = 488.0 +margin_bottom = 106.0 + +[node name="label" type="Label" parent="create/diplay/panel_left/margin/race/creature_creation"] +margin_right = 488.0 +margin_bottom = 14.0 +size_flags_horizontal = 5 +text = "CREATURE_CREATION_CHOICE_RACE" +align = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="label_2" type="Label" parent="create/diplay/panel_left/margin/race/creature_creation"] +margin_top = 18.0 +margin_right = 488.0 +margin_bottom = 32.0 +text = " " +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="arche" type="Button" parent="create/diplay/panel_left/margin/race/creature_creation"] +margin_top = 36.0 +margin_right = 488.0 +margin_bottom = 60.0 +text = "Arche" + +[node name="label_3" type="Label" parent="create/diplay/panel_left/margin/race/creature_creation"] +margin_top = 64.0 +margin_right = 488.0 +margin_bottom = 78.0 + +[node name="isidor" type="Button" parent="create/diplay/panel_left/margin/race/creature_creation"] +margin_top = 82.0 +margin_right = 488.0 +margin_bottom = 106.0 +text = "Isidor" + +[node name="h_box_container" type="HBoxContainer" parent="create/diplay/panel_left/margin/race"] +margin_top = 488.0 +margin_right = 488.0 +margin_bottom = 520.0 +size_flags_horizontal = 3 +size_flags_vertical = 10 + +[node name="quit" type="TextureButton" parent="create/diplay/panel_left/margin/race/h_box_container"] +margin_right = 32.0 +margin_bottom = 32.0 +texture_normal = ExtResource( 4 ) + +[node name="next" type="TextureButton" parent="create/diplay/panel_left/margin/race/h_box_container"] +margin_left = 456.0 +margin_right = 488.0 +margin_bottom = 32.0 +size_flags_horizontal = 10 +texture_normal = ExtResource( 3 ) + +[node name="name" type="VBoxContainer" parent="create/diplay/panel_left/margin"] +margin_left = 50.0 +margin_top = 50.0 +margin_right = 538.0 +margin_bottom = 570.0 + +[node name="v_box_container" type="VBoxContainer" parent="create/diplay/panel_left/margin/name"] +margin_top = 203.0 +margin_right = 488.0 +margin_bottom = 281.0 +size_flags_horizontal = 3 +size_flags_vertical = 6 + +[node name="generate_name" type="Button" parent="create/diplay/panel_left/margin/name/v_box_container"] +margin_left = 114.0 +margin_right = 374.0 +margin_bottom = 24.0 +size_flags_horizontal = 4 +text = "CREATURE_CREATION_GENERATE_NAME" + +[node name="label" type="Label" parent="create/diplay/panel_left/margin/name/v_box_container"] +margin_top = 28.0 +margin_right = 488.0 +margin_bottom = 42.0 + +[node name="FirstName" type="HBoxContainer" parent="create/diplay/panel_left/margin/name/v_box_container"] +margin_top = 46.0 +margin_right = 488.0 +margin_bottom = 60.0 + +[node name="label" type="Label" parent="create/diplay/panel_left/margin/name/v_box_container/FirstName"] +margin_left = 23.0 +margin_right = 242.0 +margin_bottom = 14.0 +size_flags_horizontal = 10 +text = "CREATURE_CREATION_FIRST_NAME" + +[node name="line_edit" type="LineEdit" parent="create/diplay/panel_left/margin/name/v_box_container/FirstName"] +margin_left = 246.0 +margin_right = 488.0 +margin_bottom = 14.0 +size_flags_horizontal = 3 +placeholder_text = "FIRST_NAME" + +[node name="LastName" type="HBoxContainer" parent="create/diplay/panel_left/margin/name/v_box_container"] +margin_top = 64.0 +margin_right = 488.0 +margin_bottom = 78.0 + +[node name="label" type="Label" parent="create/diplay/panel_left/margin/name/v_box_container/LastName"] +margin_left = 27.0 +margin_right = 242.0 +margin_bottom = 14.0 +size_flags_horizontal = 10 +text = "CREATURE_CREATION_LAST_NAME" + +[node name="line_edit" type="LineEdit" parent="create/diplay/panel_left/margin/name/v_box_container/LastName"] +margin_left = 246.0 +margin_right = 488.0 +margin_bottom = 14.0 +size_flags_horizontal = 3 +placeholder_text = "LAST_NAME" + +[node name="h_box_container" type="HBoxContainer" parent="create/diplay/panel_left/margin/name"] +margin_top = 488.0 +margin_right = 488.0 +margin_bottom = 520.0 +size_flags_horizontal = 3 + +[node name="previous" type="TextureButton" parent="create/diplay/panel_left/margin/name/h_box_container"] +margin_right = 32.0 +margin_bottom = 32.0 +texture_normal = ExtResource( 5 ) + +[node name="next" type="TextureButton" parent="create/diplay/panel_left/margin/name/h_box_container"] +margin_left = 456.0 +margin_right = 488.0 +margin_bottom = 32.0 +size_flags_horizontal = 10 +texture_normal = ExtResource( 3 ) + +[node name="property" type="VBoxContainer" parent="create/diplay/panel_left/margin"] +margin_left = 50.0 +margin_top = 50.0 +margin_right = 538.0 +margin_bottom = 570.0 + +[node name="panel" type="VBoxContainer" parent="create/diplay/panel_left/margin/property"] +margin_right = 488.0 +margin_bottom = 484.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label" type="Label" parent="create/diplay/panel_left/margin/property/panel"] +margin_left = 135.0 +margin_right = 352.0 +margin_bottom = 14.0 +size_flags_horizontal = 6 +text = "CREATURE_CREATION_PROPERTIES" + +[node name="blend_shape" type="ScrollContainer" parent="create/diplay/panel_left/margin/property/panel"] +margin_top = 18.0 +margin_right = 488.0 +margin_bottom = 484.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="list" type="VBoxContainer" parent="create/diplay/panel_left/margin/property/panel/blend_shape"] +margin_right = 488.0 +margin_bottom = 466.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="h_box_container" type="HBoxContainer" parent="create/diplay/panel_left/margin/property"] +margin_top = 488.0 +margin_right = 488.0 +margin_bottom = 520.0 +size_flags_vertical = 8 + +[node name="previous" type="TextureButton" parent="create/diplay/panel_left/margin/property/h_box_container"] +margin_right = 32.0 +margin_bottom = 32.0 +texture_normal = ExtResource( 5 ) + +[node name="next" type="TextureButton" parent="create/diplay/panel_left/margin/property/h_box_container"] +margin_left = 456.0 +margin_right = 488.0 +margin_bottom = 32.0 +size_flags_horizontal = 10 +texture_normal = ExtResource( 3 ) + +[node name="panel_right" type="HBoxContainer" parent="create/diplay"] +margin_left = 592.0 +margin_right = 1180.0 +margin_bottom = 620.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="displayo" type="VBoxContainer" parent="create"] +visible = false +margin_left = 50.0 +margin_top = 50.0 +margin_right = 1230.0 +margin_bottom = 670.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[connection signal="pressed" from="create/diplay/panel_left/margin/race/creature_creation/arche" to="." method="_on_arche_pressed"] +[connection signal="pressed" from="create/diplay/panel_left/margin/race/creature_creation/isidor" to="." method="_on_isidor_pressed"] +[connection signal="pressed" from="create/diplay/panel_left/margin/race/h_box_container/quit" to="." method="_on_quit_pressed"] +[connection signal="pressed" from="create/diplay/panel_left/margin/race/h_box_container/next" to="." method="_on_race_next_pressed"] +[connection signal="pressed" from="create/diplay/panel_left/margin/name/v_box_container/generate_name" to="." method="_on_generate_name_pressed"] +[connection signal="pressed" from="create/diplay/panel_left/margin/name/h_box_container/previous" to="." method="_on_name_previous_pressed"] +[connection signal="pressed" from="create/diplay/panel_left/margin/name/h_box_container/next" to="." method="_on_name_next_pressed"] +[connection signal="pressed" from="create/diplay/panel_left/margin/property/h_box_container/previous" to="." method="_on_property_previous_pressed"] +[connection signal="pressed" from="create/diplay/panel_left/margin/property/h_box_container/next" to="." method="_on_property_next_pressed"] diff --git a/scenes/creature_creation/isidor.tscn b/scenes/creature_creation/isidor.tscn new file mode 100644 index 0000000..966bb20 --- /dev/null +++ b/scenes/creature_creation/isidor.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://assets/creatures/isidor/isidor.tscn" type="PackedScene" id=1] + +[node name="spatial" type="Spatial"] + +[node name="isidor" parent="." instance=ExtResource( 1 )] +transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 0, 0 ) diff --git a/scenes/creature_creation/property_box.gd b/scenes/creature_creation/property_box.gd new file mode 100644 index 0000000..aae9ef6 --- /dev/null +++ b/scenes/creature_creation/property_box.gd @@ -0,0 +1,9 @@ +extends HBoxContainer + +signal changed(value, name) + +var name_property: String = "" + +func _on_property_value_changed(value): + Config.msg_debug("") + emit_signal( "changed" , value, name_property) diff --git a/scenes/creature_creation/property_box.tscn b/scenes/creature_creation/property_box.tscn new file mode 100644 index 0000000..633d4b3 --- /dev/null +++ b/scenes/creature_creation/property_box.tscn @@ -0,0 +1,31 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://scenes/creature_creation/property_box.gd" type="Script" id=1] +[ext_resource path="res://ressources/themes/creature_creation.tres" type="Theme" id=2] + +[node name="control" type="HBoxContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +theme = ExtResource( 2 ) +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="label" type="Label" parent="."] +margin_right = 54.0 +margin_bottom = 14.0 +size_flags_horizontal = 9 +size_flags_vertical = 0 +text = "Property" + +[node name="property" type="HSlider" parent="."] +margin_left = 58.0 +margin_right = 1280.0 +margin_bottom = 16.0 +size_flags_horizontal = 3 + +[connection signal="changed" from="property" to="." method="_on_property_changed"] +[connection signal="value_changed" from="property" to="." method="_on_property_value_changed"] diff --git a/scenes/creature_creation/property_label.tscn b/scenes/creature_creation/property_label.tscn new file mode 100644 index 0000000..f5b4f51 --- /dev/null +++ b/scenes/creature_creation/property_label.tscn @@ -0,0 +1,22 @@ +[gd_scene format=2] + +[node name="property" type="VBoxContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 7 +size_flags_vertical = 3 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="empty" type="Label" parent="."] +margin_right = 1280.0 +margin_bottom = 14.0 + +[node name="label" type="Label" parent="."] +margin_top = 18.0 +margin_right = 1280.0 +margin_bottom = 32.0 +size_flags_horizontal = 7 +text = "Label" +align = 1 diff --git a/scenes/creatures/creature.gd b/scenes/creatures/creature.gd index 500b53b..cfe291c 100644 --- a/scenes/creatures/creature.gd +++ b/scenes/creatures/creature.gd @@ -5,7 +5,12 @@ signal equip( p_slot, p_item ) signal unequip( p_slot ) signal is_dead -var creature = Datas.Human.new() +var Human = load("res://ressources/scripts/datas/human.gd") +var Equipment = load("res://ressources/scripts/datas/equipment.gd") +var PickupItem = load("res://ressources/scripts/datas/pickup_item.gd") +var Cloth = load("res://ressources/scripts/datas/cloth.gd") + +var creature = Human.new() var eye_color_list = [ "blue_eye", "bluegreen_eye","brown_eye","deepblue_eye","green_eye","grey_eye","ice_eye","lightblue_eye" ] @@ -16,22 +21,22 @@ class Slot: func _init( p_attachment = null ): self.attachment = p_attachment -var slots = { Datas.Equipment.SLOT.cloth_hand: Slot.new( "cloths" )\ - , Datas.Equipment.SLOT.cloth_face: Slot.new( "cloths" )\ - , Datas.Equipment.SLOT.cloth_head: Slot.new( "cloths" )\ - , Datas.Equipment.SLOT.cloth_torso: Slot.new( "cloths" )\ - , Datas.Equipment.SLOT.cloth_legs: Slot.new( "cloths" )\ - , Datas.Equipment.SLOT.cloth_feet: Slot.new( "cloths" )\ - , Datas.Equipment.SLOT.cloth_back: Slot.new( "cloths" )\ - , Datas.Equipment.SLOT.weapon_hand_right: Slot.new( "attachment_hand_R" )\ - , Datas.Equipment.SLOT.weapon_hand_left: Slot.new( "attachment_hand_L" )\ - , Datas.Equipment.SLOT.weapon_hands: Slot.new( "attachment_hand_R" )\ - , Datas.Equipment.SLOT.weapon_hip_right: Slot.new( "attachment_hips_R" )\ - , Datas.Equipment.SLOT.weapon_hip_left: Slot.new( "attachment_hips_L" )\ - , Datas.Equipment.SLOT.weapon_back_right: Slot.new()\ - , Datas.Equipment.SLOT.weapon_back_left: Slot.new()\ - , Datas.Equipment.SLOT.weapon_holster_right: Slot.new()\ - , Datas.Equipment.SLOT.weapon_holster_left: Slot.new() } +var slots = { Equipment.SLOT.cloth_hand: Slot.new( "cloths" )\ + , Equipment.SLOT.cloth_face: Slot.new( "cloths" )\ + , Equipment.SLOT.cloth_head: Slot.new( "cloths" )\ + , Equipment.SLOT.cloth_torso: Slot.new( "cloths" )\ + , Equipment.SLOT.cloth_legs: Slot.new( "cloths" )\ + , Equipment.SLOT.cloth_feet: Slot.new( "cloths" )\ + , Equipment.SLOT.cloth_back: Slot.new( "cloths" )\ + , Equipment.SLOT.weapon_hand_right: Slot.new( "attachment_hand_R" )\ + , Equipment.SLOT.weapon_hand_left: Slot.new( "attachment_hand_L" )\ + , Equipment.SLOT.weapon_hands: Slot.new( "attachment_hand_R" )\ + , Equipment.SLOT.weapon_hip_right: Slot.new( "attachment_hips_R" )\ + , Equipment.SLOT.weapon_hip_left: Slot.new( "attachment_hips_L" )\ + , Equipment.SLOT.weapon_back_right: Slot.new()\ + , Equipment.SLOT.weapon_back_left: Slot.new()\ + , Equipment.SLOT.weapon_holster_right: Slot.new()\ + , Equipment.SLOT.weapon_holster_left: Slot.new() } func _ready(): @@ -64,9 +69,11 @@ func duplicate_meshes(): func set_blend_shape( p_blend_shape_name, p_value ): for child in $body_parts.get_children(): + Config.msg_debug("Child / name:" + child.name) var skeleton = child.get_node( "skeleton" ) for node in skeleton.get_children(): if node is MeshInstance: + Config.msg_debug("Node / name:" + node.name) node.set( "blend_shapes/"+p_blend_shape_name, p_value ) for child in $hair_parts.get_children(): var skeleton = child.get_node( "skeleton" ) @@ -80,7 +87,7 @@ func set_blend_shape( p_blend_shape_name, p_value ): node.set( "blend_shapes/"+p_blend_shape_name, p_value ) func load_from_name( p_name, p_emplacement = "usr" ): - var new_creature = Datas.Human.new() + var new_creature = Human.new() var name_split = p_name.split( "_" ) new_creature.set_data( "first_name", name_split[0] ) new_creature.set_data( "last_name", name_split[1] ) @@ -398,7 +405,7 @@ func drop_item( p_item ): pickup_item_node.item_filename = p_item.get_filename() pickup_item_node.global_transform = $drop_point.global_transform - var pickup_item = Datas.PickupItem.new( p_item.get_filename(), $drop_point.global_transform, p_item ) + var pickup_item = PickupItem.new( p_item.get_filename(), $drop_point.global_transform, p_item ) pickup_item_node.item = pickup_item if self.get_tree().get_root().has_node( "main/scene/game" ): @@ -410,7 +417,7 @@ func _on_body_animation_finished( anim_name ): func _on_body_limb_body_entered(limb, body): if body.is_in_group( "bullet" ): - if limb == Datas.Cloth.LIMB.head: + if limb == Cloth.LIMB.head: var blood_particle = preload( "res://scenes/fx/blood_particles.tscn" ).instance() $body_parts/body/skeleton/limb_head.add_child( blood_particle ) blood_particle.emit() diff --git a/scenes/creatures/creature_creation_menu.gd b/scenes/creatures/creature_creation_menu.gd index 4985b74..fd104f4 100644 --- a/scenes/creatures/creature_creation_menu.gd +++ b/scenes/creatures/creature_creation_menu.gd @@ -18,6 +18,7 @@ var max_caracteristiques_points = 5*5 + 5 func _ready(): # Race. + race_popup.add_item( Globals.race_label[ Globals.RACE.arche ] ) race_popup.add_item( Globals.race_label[ Globals.RACE.human ] ) race_popup.connect("id_pressed", self, "_on_race_id_pressed") diff --git a/scenes/creatures/creature_creation_menu.tscn b/scenes/creatures/creature_creation_menu.tscn index 99ffaf0..996a6c9 100644 --- a/scenes/creatures/creature_creation_menu.tscn +++ b/scenes/creatures/creature_creation_menu.tscn @@ -2,7 +2,7 @@ [ext_resource path="res://assets/interfaces/underwear_on_icon.png" type="Texture" id=1] [ext_resource path="res://scenes/creatures/creature_creation_menu.gd" type="Script" id=2] -[ext_resource path="res://ressources/themes/khanat_theme.theme" type="Theme" id=3] +[ext_resource path="res://assets/interfaces/themes/khanat_create_creature.theme" type="Theme" id=3] [ext_resource path="res://assets/fonts/ryzom.ttf" type="DynamicFontData" id=4] [ext_resource path="res://assets/interfaces/cloth_on_icon.png" type="Texture" id=5] [ext_resource path="res://assets/interfaces/zoom_head_icon.png" type="Texture" id=6] @@ -171,29 +171,29 @@ size_flags_horizontal = 6 size_flags_vertical = 6 [node name="general_label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_right = 251.0 -margin_bottom = 21.0 +margin_right = 249.0 +margin_bottom = 17.0 text = "Général" align = 1 [node name="size" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 25.0 -margin_right = 251.0 -margin_bottom = 46.0 +margin_top = 21.0 +margin_right = 249.0 +margin_bottom = 38.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/size"] -margin_right = 83.0 -margin_bottom = 21.0 +margin_right = 81.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Taille" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/size"] -margin_left = 87.0 -margin_right = 251.0 -margin_bottom = 21.0 +margin_left = 85.0 +margin_right = 249.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -203,30 +203,30 @@ step = 0.01 value = 1.0 [node name="ethnic_label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 50.0 -margin_right = 251.0 -margin_bottom = 71.0 +margin_top = 42.0 +margin_right = 249.0 +margin_bottom = 59.0 text = "Ethnie" align = 1 [node name="caucasian" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 75.0 -margin_right = 251.0 -margin_bottom = 96.0 +margin_top = 63.0 +margin_right = 249.0 +margin_bottom = 80.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/caucasian"] -margin_right = 83.0 -margin_bottom = 21.0 +margin_right = 81.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Caucasian" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/caucasian"] -margin_left = 87.0 -margin_right = 251.0 -margin_bottom = 21.0 +margin_left = 85.0 +margin_right = 249.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -234,23 +234,23 @@ max_value = 1.0 step = 0.1 [node name="african" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 100.0 -margin_right = 251.0 -margin_bottom = 121.0 +margin_top = 84.0 +margin_right = 249.0 +margin_bottom = 101.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/african"] -margin_right = 83.0 -margin_bottom = 21.0 +margin_right = 81.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "African" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/african"] -margin_left = 87.0 -margin_right = 251.0 -margin_bottom = 21.0 +margin_left = 85.0 +margin_right = 249.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -258,23 +258,23 @@ max_value = 1.0 step = 0.1 [node name="asian" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 125.0 -margin_right = 251.0 -margin_bottom = 146.0 +margin_top = 105.0 +margin_right = 249.0 +margin_bottom = 122.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/asian"] -margin_right = 83.0 -margin_bottom = 21.0 +margin_right = 81.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Asian" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/asian"] -margin_left = 87.0 -margin_right = 251.0 -margin_bottom = 21.0 +margin_left = 85.0 +margin_right = 249.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -282,53 +282,53 @@ max_value = 1.0 step = 0.1 [node name="skin_label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 150.0 -margin_right = 251.0 -margin_bottom = 171.0 +margin_top = 126.0 +margin_right = 249.0 +margin_bottom = 143.0 text = "Peau" align = 1 [node name="skin" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 175.0 -margin_right = 251.0 -margin_bottom = 196.0 +margin_top = 147.0 +margin_right = 249.0 +margin_bottom = 164.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/skin"] -margin_right = 83.0 -margin_bottom = 21.0 +margin_right = 81.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Peau" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/skin"] -margin_left = 87.0 -margin_right = 251.0 -margin_bottom = 21.0 +margin_left = 85.0 +margin_right = 249.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 max_value = 2.0 [node name="skin_tone" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 200.0 -margin_right = 251.0 -margin_bottom = 221.0 +margin_top = 168.0 +margin_right = 249.0 +margin_bottom = 185.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/skin_tone"] -margin_right = 83.0 -margin_bottom = 21.0 +margin_right = 81.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Teint" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/skin_tone"] -margin_left = 87.0 -margin_right = 251.0 -margin_bottom = 21.0 +margin_left = 85.0 +margin_right = 249.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -336,30 +336,30 @@ max_value = 0.5 step = 0.1 [node name="corpulence_label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 225.0 -margin_right = 251.0 -margin_bottom = 246.0 +margin_top = 189.0 +margin_right = 249.0 +margin_bottom = 206.0 text = "Corpulence" align = 1 [node name="fat" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 250.0 -margin_right = 251.0 -margin_bottom = 271.0 +margin_top = 210.0 +margin_right = 249.0 +margin_bottom = 227.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/fat"] -margin_right = 83.0 -margin_bottom = 21.0 +margin_right = 81.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Graisse" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/fat"] -margin_left = 87.0 -margin_right = 251.0 -margin_bottom = 21.0 +margin_left = 85.0 +margin_right = 249.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -368,23 +368,23 @@ max_value = 1.0 step = 0.1 [node name="muscle" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 275.0 -margin_right = 251.0 -margin_bottom = 296.0 +margin_top = 231.0 +margin_right = 249.0 +margin_bottom = 248.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/muscle"] -margin_right = 83.0 -margin_bottom = 21.0 +margin_right = 81.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Muscles" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/muscle"] -margin_left = 87.0 -margin_right = 251.0 -margin_bottom = 21.0 +margin_left = 85.0 +margin_right = 249.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -393,23 +393,23 @@ max_value = 1.0 step = 0.1 [node name="proportion" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 300.0 -margin_right = 251.0 -margin_bottom = 321.0 +margin_top = 252.0 +margin_right = 249.0 +margin_bottom = 269.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/proportion"] -margin_right = 83.0 -margin_bottom = 21.0 +margin_right = 81.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Proportions" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/proportion"] -margin_left = 87.0 -margin_right = 251.0 -margin_bottom = 21.0 +margin_left = 85.0 +margin_right = 249.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -418,30 +418,30 @@ max_value = 1.0 step = 0.1 [node name="female_label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 325.0 -margin_right = 251.0 -margin_bottom = 346.0 +margin_top = 273.0 +margin_right = 249.0 +margin_bottom = 290.0 text = "Femme" align = 1 [node name="breast" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 350.0 -margin_right = 251.0 -margin_bottom = 371.0 +margin_top = 294.0 +margin_right = 249.0 +margin_bottom = 311.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/breast"] -margin_right = 83.0 -margin_bottom = 21.0 +margin_right = 81.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Poitrine" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/breast"] -margin_left = 87.0 -margin_right = 251.0 -margin_bottom = 21.0 +margin_left = 85.0 +margin_right = 249.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -450,23 +450,23 @@ max_value = 1.0 step = 0.1 [node name="pregnancy" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect"] -margin_top = 375.0 -margin_right = 251.0 -margin_bottom = 396.0 +margin_top = 315.0 +margin_right = 249.0 +margin_bottom = 332.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/pregnancy"] -margin_right = 83.0 -margin_bottom = 21.0 +margin_right = 81.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Grossesse" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Corps/aspect/pregnancy"] -margin_left = 87.0 -margin_right = 251.0 -margin_bottom = 21.0 +margin_left = 85.0 +margin_right = 249.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -488,53 +488,52 @@ size_flags_horizontal = 6 size_flags_vertical = 6 [node name="hair_label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_right = 302.0 -margin_bottom = 21.0 +margin_right = 306.0 +margin_bottom = 17.0 text = "Cheveux" align = 1 [node name="hair" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 25.0 -margin_right = 302.0 -margin_bottom = 46.0 +margin_top = 21.0 +margin_right = 306.0 +margin_bottom = 38.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/hair"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Coupe" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/hair"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 max_value = 2.0 [node name="hair_color" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 50.0 -margin_right = 302.0 -margin_bottom = 77.0 +margin_top = 42.0 +margin_right = 306.0 +margin_bottom = 59.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/hair_color"] -margin_top = 3.0 -margin_right = 134.0 -margin_bottom = 24.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Couleur" align = 2 [node name="value" type="ColorPickerButton" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/hair_color"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 27.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 flat = true @@ -542,30 +541,30 @@ color = Color( 1, 1, 1, 1 ) edit_alpha = false [node name="eyes_label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 81.0 -margin_right = 302.0 -margin_bottom = 102.0 +margin_top = 63.0 +margin_right = 306.0 +margin_bottom = 80.0 text = "Yeux" align = 1 [node name="eyes_vert" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 106.0 -margin_right = 302.0 -margin_bottom = 127.0 +margin_top = 84.0 +margin_right = 306.0 +margin_bottom = 101.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/eyes_vert"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Yeux" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/eyes_vert"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -574,46 +573,46 @@ max_value = 1.0 step = 0.1 [node name="eyes_color" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 106.0 -margin_right = 302.0 -margin_bottom = 127.0 +margin_top = 105.0 +margin_right = 306.0 +margin_bottom = 122.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/eyes_color"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Couleur" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/eyes_color"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 max_value = 7.0 [node name="eyes_gap" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 131.0 -margin_right = 302.0 -margin_bottom = 152.0 +margin_top = 126.0 +margin_right = 306.0 +margin_bottom = 143.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/eyes_gap"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Yeux espace" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/eyes_gap"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -622,30 +621,30 @@ max_value = 1.0 step = 0.1 [node name="ears_label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 156.0 -margin_right = 302.0 -margin_bottom = 177.0 +margin_top = 147.0 +margin_right = 306.0 +margin_bottom = 164.0 text = "Oreilles" align = 1 [node name="earlobes" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 181.0 -margin_right = 302.0 -margin_bottom = 202.0 +margin_top = 168.0 +margin_right = 306.0 +margin_bottom = 185.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/earlobes"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Lobes d'oreille" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/earlobes"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -653,23 +652,23 @@ max_value = 1.0 step = 0.1 [node name="ears_wing" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 206.0 -margin_right = 302.0 -margin_bottom = 227.0 +margin_top = 189.0 +margin_right = 306.0 +margin_bottom = 206.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/ears_wing"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Décolement oreille" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/ears_wing"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -677,30 +676,30 @@ max_value = 1.0 step = 0.1 [node name="nose_label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 231.0 -margin_right = 302.0 -margin_bottom = 252.0 +margin_top = 210.0 +margin_right = 306.0 +margin_bottom = 227.0 text = "Nez" align = 1 [node name="nose_galbe" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 256.0 -margin_right = 302.0 -margin_bottom = 277.0 +margin_top = 231.0 +margin_right = 306.0 +margin_bottom = 248.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/nose_galbe"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Galbe du nez" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/nose_galbe"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -709,23 +708,23 @@ max_value = 1.0 step = 0.1 [node name="nose_grec" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 281.0 -margin_right = 302.0 -margin_bottom = 302.0 +margin_top = 252.0 +margin_right = 306.0 +margin_bottom = 269.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/nose_grec"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Nez grec" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/nose_grec"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -734,23 +733,23 @@ max_value = 1.0 step = 0.1 [node name="nose_horiz" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 306.0 -margin_right = 302.0 -margin_bottom = 327.0 +margin_top = 273.0 +margin_right = 306.0 +margin_bottom = 290.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/nose_horiz"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Nez horizontal" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/nose_horiz"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -759,23 +758,23 @@ max_value = 1.0 step = 0.1 [node name="nose_depth" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 331.0 -margin_right = 302.0 -margin_bottom = 352.0 +margin_top = 294.0 +margin_right = 306.0 +margin_bottom = 311.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/nose_depth"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Nez profondeur" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/nose_depth"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -784,30 +783,30 @@ max_value = 1.0 step = 0.1 [node name="mouth_label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 356.0 -margin_right = 302.0 -margin_bottom = 377.0 +margin_top = 315.0 +margin_right = 306.0 +margin_bottom = 332.0 text = "Bouche" align = 1 [node name="mouth_horiz" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 381.0 -margin_right = 302.0 -margin_bottom = 402.0 +margin_top = 336.0 +margin_right = 306.0 +margin_bottom = 353.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/mouth_horiz"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Bouche horizontale" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/mouth_horiz"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -816,23 +815,23 @@ max_value = 1.0 step = 0.1 [node name="mouth_vert" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 406.0 -margin_right = 302.0 -margin_bottom = 427.0 +margin_top = 357.0 +margin_right = 306.0 +margin_bottom = 374.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/mouth_vert"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Bouche verticale" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/mouth_vert"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -841,23 +840,23 @@ max_value = 1.0 step = 0.1 [node name="lips_up_shape" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 431.0 -margin_right = 302.0 -margin_bottom = 452.0 +margin_top = 378.0 +margin_right = 306.0 +margin_bottom = 395.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/lips_up_shape"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Forme bouche 1" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/lips_up_shape"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -866,23 +865,23 @@ max_value = 1.0 step = 0.1 [node name="lips_up_shape_2" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 456.0 -margin_right = 302.0 -margin_bottom = 477.0 +margin_top = 399.0 +margin_right = 306.0 +margin_bottom = 416.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/lips_up_shape_2"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Forme bouche 2" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/lips_up_shape_2"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -891,30 +890,30 @@ max_value = 1.0 step = 0.1 [node name="chin_label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 481.0 -margin_right = 302.0 -margin_bottom = 502.0 +margin_top = 420.0 +margin_right = 306.0 +margin_bottom = 437.0 text = "Menton" align = 1 [node name="cleft_chin" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 506.0 -margin_right = 302.0 -margin_bottom = 527.0 +margin_top = 441.0 +margin_right = 306.0 +margin_bottom = 458.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/cleft_chin"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "double menton" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/cleft_chin"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -922,23 +921,23 @@ max_value = 1.0 step = 0.1 [node name="chin_angle" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect"] -margin_top = 531.0 -margin_right = 302.0 -margin_bottom = 552.0 +margin_top = 462.0 +margin_right = 306.0 +margin_bottom = 479.0 size_flags_horizontal = 7 alignment = 1 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/chin_angle"] -margin_right = 134.0 -margin_bottom = 21.0 +margin_right = 138.0 +margin_bottom = 17.0 size_flags_horizontal = 3 text = "Menton" align = 2 [node name="value" type="HSlider" parent="margin_box/window_box/content_box/tabs_box/Tête/aspect/chin_angle"] -margin_left = 138.0 -margin_right = 302.0 -margin_bottom = 21.0 +margin_left = 142.0 +margin_right = 306.0 +margin_bottom = 17.0 rect_min_size = Vector2( 164, 0 ) size_flags_horizontal = 3 size_flags_vertical = 1 @@ -954,40 +953,40 @@ size_flags_horizontal = 6 size_flags_vertical = 6 [node name="lasting_points" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/caracteristiques"] -margin_right = 502.0 -margin_bottom = 21.0 +margin_right = 638.0 +margin_bottom = 17.0 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/caracteristiques/lasting_points"] -margin_left = 145.0 -margin_right = 249.0 -margin_bottom = 21.0 +margin_left = 214.0 +margin_right = 317.0 +margin_bottom = 17.0 size_flags_horizontal = 10 text = "Points restants" [node name="value" type="Label" parent="margin_box/window_box/content_box/tabs_box/caracteristiques/lasting_points"] -margin_left = 253.0 -margin_right = 261.0 -margin_bottom = 21.0 +margin_left = 321.0 +margin_right = 330.0 +margin_bottom = 17.0 size_flags_horizontal = 2 text = "5" [node name="strength" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/caracteristiques"] -margin_top = 25.0 -margin_right = 502.0 -margin_bottom = 56.0 +margin_top = 21.0 +margin_right = 638.0 +margin_bottom = 54.0 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/caracteristiques/strength"] -margin_left = 211.0 -margin_top = 5.0 -margin_right = 249.0 -margin_bottom = 26.0 +margin_left = 277.0 +margin_top = 8.0 +margin_right = 317.0 +margin_bottom = 25.0 size_flags_horizontal = 10 text = "Force" [node name="value" type="SpinBox" parent="margin_box/window_box/content_box/tabs_box/caracteristiques/strength"] -margin_left = 253.0 -margin_right = 315.0 -margin_bottom = 31.0 +margin_left = 321.0 +margin_right = 401.0 +margin_bottom = 33.0 size_flags_horizontal = 2 min_value = 1.0 max_value = 10.0 @@ -995,22 +994,22 @@ value = 5.0 align = 1 [node name="perception" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/caracteristiques"] -margin_top = 60.0 -margin_right = 502.0 +margin_top = 58.0 +margin_right = 638.0 margin_bottom = 91.0 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/caracteristiques/perception"] -margin_left = 174.0 -margin_top = 5.0 -margin_right = 249.0 -margin_bottom = 26.0 +margin_left = 241.0 +margin_top = 8.0 +margin_right = 317.0 +margin_bottom = 25.0 size_flags_horizontal = 10 text = "Perception" [node name="value" type="SpinBox" parent="margin_box/window_box/content_box/tabs_box/caracteristiques/perception"] -margin_left = 253.0 -margin_right = 315.0 -margin_bottom = 31.0 +margin_left = 321.0 +margin_right = 401.0 +margin_bottom = 33.0 size_flags_horizontal = 2 min_value = 1.0 max_value = 10.0 @@ -1019,21 +1018,21 @@ align = 1 [node name="endurance" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/caracteristiques"] margin_top = 95.0 -margin_right = 502.0 -margin_bottom = 126.0 +margin_right = 638.0 +margin_bottom = 128.0 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/caracteristiques/endurance"] -margin_left = 175.0 -margin_top = 5.0 -margin_right = 249.0 -margin_bottom = 26.0 +margin_left = 240.0 +margin_top = 8.0 +margin_right = 317.0 +margin_bottom = 25.0 size_flags_horizontal = 10 text = "Endurance" [node name="value" type="SpinBox" parent="margin_box/window_box/content_box/tabs_box/caracteristiques/endurance"] -margin_left = 253.0 -margin_right = 315.0 -margin_bottom = 31.0 +margin_left = 321.0 +margin_right = 401.0 +margin_bottom = 33.0 size_flags_horizontal = 2 min_value = 1.0 max_value = 10.0 @@ -1041,22 +1040,22 @@ value = 5.0 align = 1 [node name="constitution" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/caracteristiques"] -margin_top = 130.0 -margin_right = 502.0 -margin_bottom = 161.0 +margin_top = 132.0 +margin_right = 638.0 +margin_bottom = 165.0 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/caracteristiques/constitution"] -margin_left = 162.0 -margin_top = 5.0 -margin_right = 249.0 -margin_bottom = 26.0 +margin_left = 232.0 +margin_top = 8.0 +margin_right = 317.0 +margin_bottom = 25.0 size_flags_horizontal = 10 text = "Constitution" [node name="value" type="SpinBox" parent="margin_box/window_box/content_box/tabs_box/caracteristiques/constitution"] -margin_left = 253.0 -margin_right = 315.0 -margin_bottom = 31.0 +margin_left = 321.0 +margin_right = 401.0 +margin_bottom = 33.0 size_flags_horizontal = 2 min_value = 1.0 max_value = 10.0 @@ -1064,22 +1063,22 @@ value = 5.0 align = 1 [node name="agility" type="HBoxContainer" parent="margin_box/window_box/content_box/tabs_box/caracteristiques"] -margin_top = 165.0 -margin_right = 502.0 -margin_bottom = 196.0 +margin_top = 169.0 +margin_right = 638.0 +margin_bottom = 202.0 [node name="label" type="Label" parent="margin_box/window_box/content_box/tabs_box/caracteristiques/agility"] -margin_left = 198.0 -margin_top = 5.0 -margin_right = 249.0 -margin_bottom = 26.0 +margin_left = 263.0 +margin_top = 8.0 +margin_right = 317.0 +margin_bottom = 25.0 size_flags_horizontal = 10 text = "Agilitée" [node name="value" type="SpinBox" parent="margin_box/window_box/content_box/tabs_box/caracteristiques/agility"] -margin_left = 253.0 -margin_right = 315.0 -margin_bottom = 31.0 +margin_left = 321.0 +margin_right = 401.0 +margin_bottom = 33.0 size_flags_horizontal = 2 min_value = 1.0 max_value = 10.0 diff --git a/scenes/creatures/creatures_creation.gd b/scenes/creatures/creatures_creation.gd index fb477cb..182d72d 100644 --- a/scenes/creatures/creatures_creation.gd +++ b/scenes/creatures/creatures_creation.gd @@ -3,15 +3,18 @@ extends Spatial onready var character = $character var is_over_ui = false +var Creature = load("res://ressources/scripts/datas/creature.gd") +var Human = load("res://ressources/scripts/datas/human.gd") func _ready(): $creature_creation_menu._on_race_id_pressed( 0 ) $creature_creation_menu._on_sex_id_pressed( 0 ) - if Globals.creatures_editor_mode == Globals.CREATURES_EDITOR_MODE.player: - $creature_creation_menu/margin_box/window_box/content_box/tabs_box/definition/race.hide() - elif Globals.creatures_editor_mode == Globals.CREATURES_EDITOR_MODE.npc: + #if Globals.creatures_editor_mode == Globals.CREATURES_EDITOR_MODE.player: + # $creature_creation_menu/margin_box/window_box/content_box/tabs_box/definition/race.hide() + #elif Globals.creatures_editor_mode == Globals.CREATURES_EDITOR_MODE.npc: + if Globals.creatures_editor_mode == Globals.CREATURES_EDITOR_MODE.npc: $creature_creation_menu.max_caracteristiques_points = 999 $creature_creation_menu/margin_box/window_box/tools_box/buttons_box/choose.hide() @@ -92,9 +95,9 @@ func load_creature( p_name = null ): var race = Globals.get_race_id( $creature_creation_menu/margin_box/window_box/content_box/tabs_box/definition/race/value.text ) if race == Globals.RACE.human: - creature = Datas.Human.new() + creature = Human.new() else: - creature = Datas.Creature.new() + creature = Creature.new() var filename = $creature_creation_menu/margin_box/window_box/content_box/tabs_box/definition/name/value/first_name.text + "_" + $creature_creation_menu/margin_box/window_box/content_box/tabs_box/definition/name/value/last_name.text+".creature" if p_name: filename = p_name + ".creature" diff --git a/scenes/creatures/creatures_creation.tscn b/scenes/creatures/creatures_creation.tscn index 2033817..d18ee07 100644 --- a/scenes/creatures/creatures_creation.tscn +++ b/scenes/creatures/creatures_creation.tscn @@ -47,6 +47,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.98872, 2.59328 ) light_specular = 0.1 [node name="root" type="Spatial" parent="."] +visible = false [node name="Cube" type="MeshInstance" parent="root"] mesh = SubResource( 1 ) diff --git a/scenes/creatures/human/human_male.tscn b/scenes/creatures/human/human_male.tscn index 72385ee..28a1b5c 100644 --- a/scenes/creatures/human/human_male.tscn +++ b/scenes/creatures/human/human_male.tscn @@ -4,7 +4,6 @@ [ext_resource path="res://scenes/creatures/creature.gd" type="Script" id=2] [ext_resource path="res://scenes/creatures/human/mh_human_male_hair.tscn" type="PackedScene" id=6] - [sub_resource type="CapsuleShape" id=1] radius = 0.448335 height = 0.810096 @@ -26,4 +25,5 @@ transform = Transform( 1, 0, 0, 0, -1.62921e-07, 1, 0, -1, -1.62921e-07, 0, 0, 0 [node name="cloths" type="Spatial" parent="."] transform = Transform( 1, 0, 0, 0, -1.62921e-07, 1, 0, -1, -1.62921e-07, 0, 0, 0.852 ) + [connection signal="animation_finished" from="body_parts/body" to="." method="_on_body_animation_finished"] diff --git a/scenes/creatures/human/mh_human_female.tscn b/scenes/creatures/human/mh_human_female.tscn index 5982533..c1edc1c 100644 --- a/scenes/creatures/human/mh_human_female.tscn +++ b/scenes/creatures/human/mh_human_female.tscn @@ -14,32 +14,34 @@ script/source = "extends Spatial signal animation_finished( anim_name ) signal limb_body_entered( limb, body ) +var Cloth = load(\"res://ressources/scripts/datas/cloth.gd\") + func _on_AnimationPlayer_animation_finished(anim_name): emit_signal( \"animation_finished\", anim_name ) func _on_limb_head_area_body_entered(body): - emit_signal( \"limb_body_entered\", Datas.Cloth.LIMB.head, body ) + emit_signal( \"limb_body_entered\", Cloth.LIMB.head, body ) func _on_limb_tosro_1_body_entered(body): - emit_signal( \"limb_body_entered\", Datas.Cloth.LIMB.torso, body ) + emit_signal( \"limb_body_entered\", Cloth.LIMB.torso, body ) func _on_limb_torso_2_body_entered(body): - emit_signal( \"limb_body_entered\", Datas.Cloth.LIMB.torso, body ) + emit_signal( \"limb_body_entered\", Cloth.LIMB.torso, body ) func _on_limb_torso_3_body_entered(body): - emit_signal( \"limb_body_entered\", Datas.Cloth.LIMB.torso, body ) + emit_signal( \"limb_body_entered\", Cloth.LIMB.torso, body ) func _on_limb_torso_4_body_entered(body): - emit_signal( \"limb_body_entered\", Datas.Cloth.LIMB.torso, body ) + emit_signal( \"limb_body_entered\", Cloth.LIMB.torso, body ) func _on_limb_torso_5_body_entered(body): - emit_signal( \"limb_body_entered\", Datas.Cloth.LIMB.torso, body ) + emit_signal( \"limb_body_entered\", Cloth.LIMB.torso, body ) func _on_limb_upper_arm_left_body_entered(body): - emit_signal( \"limb_body_entered\", Datas.Cloth.LIMB.left_upper_arm, body ) + emit_signal( \"limb_body_entered\", Cloth.LIMB.left_upper_arm, body ) " @@ -86,7 +88,7 @@ material/0 = ExtResource( 6 ) material/0 = ExtResource( 2 ) [node name="limb_head" type="BoneAttachment" parent="skeleton" index="7"] -transform = Transform( 1, 0, 0, 0, 0.0523112, -0.998451, 0, 0.99863, 0.0523236, 0, 0.631645, 0.0409583 ) +transform = Transform( 1, 0, 0, 0, 0.0523111, -0.998451, 0, 0.99863, 0.0523234, 0, 0.629455, 0.0158642 ) bone_name = "head" [node name="area" type="Area" parent="skeleton/limb_head" index="0"] @@ -96,7 +98,7 @@ transform = Transform( 1, 0, 0, 0, 0.999999, -7.45058e-09, 0, 7.45058e-09, 1, 0, shape = SubResource( 2 ) [node name="limb_torso_1" type="BoneAttachment" parent="skeleton" index="8"] -transform = Transform( 1, 0, 0, 0, 0.0981498, -0.994991, 0, 0.99517, 0.0981703, 0, 0.383938, 0.01275 ) +transform = Transform( 1, 0, 0, 0, 0.182603, -0.983004, 0, 0.98318, 0.182639, 0, 0.383466, -0.000238065 ) bone_name = "spine01" [node name="area" type="Area" parent="skeleton/limb_torso_1" index="0"] @@ -107,7 +109,7 @@ transform = Transform( -1.62921e-07, 0, 0.999999, 0, 0.999999, 0, -0.999999, 0, shape = SubResource( 3 ) [node name="limb_torso_2" type="BoneAttachment" parent="skeleton" index="9"] -transform = Transform( 1, 0, 0, 0, -0.00632599, -0.999801, 0, 0.99998, -0.00632417, 0, 0.231632, 0.0117867 ) +transform = Transform( 1, 0, 0, 0, 0.0789178, -0.996701, 0, 0.99688, 0.0789349, 0, 0.231632, 0.0117867 ) bone_name = "spine02" [node name="area" type="Area" parent="skeleton/limb_torso_2" index="0"] @@ -117,7 +119,7 @@ transform = Transform( -1.62921e-07, 0, 0.999999, 0, 0.999999, 0, -0.999999, 0, shape = SubResource( 4 ) [node name="limb_torso_3" type="BoneAttachment" parent="skeleton" index="10"] -transform = Transform( 1, 0, 0, 0, -0.13324, -0.990902, 0, 0.991081, -0.133261, 0, 0.141423, -0.000345033 ) +transform = Transform( 1, 0, 0, 0, -0.13324, -0.990903, 0, 0.991081, -0.133261, 0, 0.141423, -0.000345025 ) bone_name = "spine03" [node name="area" type="Area" parent="skeleton/limb_torso_3" index="0"] @@ -127,7 +129,7 @@ transform = Transform( -1.62921e-07, 0, 0.999999, 0, 0.999999, 0, -0.999999, 0, shape = SubResource( 4 ) [node name="limb_torso_4" type="BoneAttachment" parent="skeleton" index="11"] -transform = Transform( 1, 0, 0, 0, -0.32935, -0.944017, 0, 0.944188, -0.329407, 0, 0.0787433, -0.0222167 ) +transform = Transform( 1, 0, 0, 0, -0.329351, -0.944018, 0, 0.944188, -0.329407, 0, 0.0787433, -0.0222167 ) bone_name = "spine04" [node name="area" type="Area" parent="skeleton/limb_torso_4" index="0"] @@ -138,7 +140,7 @@ transform = Transform( -1.62921e-07, 0, 0.999999, 0, 0.999999, 0, -0.999999, 0, shape = SubResource( 5 ) [node name="limb_torso_5" type="BoneAttachment" parent="skeleton" index="12"] -transform = Transform( 1, 0, 0, 0, 0.534014, -0.845263, 0, 0.845413, 0.534112, 0, 0.0066183, 0.0233583 ) +transform = Transform( 1, 0, 0, 0, 0.534014, -0.845263, 0, 0.845413, 0.534112, 0, 0.00661829, 0.0233583 ) bone_name = "spine05" [node name="area" type="Area" parent="skeleton/limb_torso_5" index="0"] @@ -149,7 +151,7 @@ transform = Transform( -1.62921e-07, 0, 0.999999, 0, 0.999999, 0, -0.999999, 0, shape = SubResource( 5 ) [node name="limb_upper_arm_left" type="BoneAttachment" parent="skeleton" index="13"] -transform = Transform( -0.745066, -0.0134922, -0.666855, -0.666773, 0.03218, 0.744323, 0.0114208, 0.999391, -0.0329804, 0.208593, 0.385909, 0.019574 ) +transform = Transform( -0.970824, 0.133984, -0.198431, -0.20868, -0.0676765, 0.975425, 0.117262, 0.988696, 0.0936781, 0.170717, 0.366623, -0.00909948 ) bone_name = "upperarm02.L" [node name="area" type="Area" parent="skeleton/limb_upper_arm_left" index="0"] @@ -160,21 +162,21 @@ transform = Transform( -1.62921e-07, 0, 0.999999, 0, 0.999999, 0, -0.999999, 0, shape = SubResource( 6 ) [node name="attachment_hand_R" type="BoneAttachment" parent="skeleton" index="14"] -transform = Transform( 0.587628, 0.647439, 0.485299, 0.412693, -0.755596, 0.508329, 0.695927, -0.0984435, -0.711334, -0.440104, 0.124054, 0.17144 ) +transform = Transform( 0.439623, 0.845161, 0.303632, 0.0253603, -0.349546, 0.936193, 0.897875, -0.404187, -0.175111, -0.243995, -0.0185078, 0.0149495 ) bone_name = "metacarpal3.R" [node name="handle" type="Spatial" parent="skeleton/attachment_hand_R" index="0"] transform = Transform( -0.0511686, 0.991695, -0.116549, 0.320607, -0.0942135, -0.942455, -0.946104, -0.0855632, -0.313081, 0.0258782, 0.0285175, -0.0395434 ) [node name="attachment_hand_L" type="BoneAttachment" parent="skeleton" index="15"] -transform = Transform( 0.587628, -0.647439, -0.485299, -0.412693, -0.755596, 0.508329, -0.695927, -0.0984435, -0.711334, 0.440104, 0.124054, 0.17144 ) +transform = Transform( 0.439623, -0.845161, -0.303633, -0.0253602, -0.349546, 0.936193, -0.897875, -0.404187, -0.175111, 0.243995, -0.0185078, 0.0149495 ) bone_name = "metacarpal3.L" [node name="handle" type="Spatial" parent="skeleton/attachment_hand_L" index="0"] transform = Transform( 0.248711, -0.966789, 0.0577959, -0.32067, -0.138623, -0.937039, 0.914105, 0.214413, -0.344196, -0.0963456, 0.0583696, -0.12191 ) [node name="attachment_hips_R" type="BoneAttachment" parent="skeleton" index="16"] -transform = Transform( -0.0959694, 0.091845, 0.991138, 0.312981, -0.942256, 0.11762, 0.944878, 0.321558, 0.0616928, 0, 0.0066183, 0.0233583 ) +transform = Transform( -0.0959694, 0.091845, 0.991138, 0.312981, -0.942256, 0.11762, 0.944878, 0.321558, 0.0616928, -1.00505e-09, 0.0066183, 0.0233583 ) bone_name = "pelvis.R" [node name="handle" type="Spatial" parent="skeleton/attachment_hips_R" index="0"] diff --git a/scenes/creatures/human/mh_human_male.gd b/scenes/creatures/human/mh_human_male.gd index 6286038..515f57f 100644 --- a/scenes/creatures/human/mh_human_male.gd +++ b/scenes/creatures/human/mh_human_male.gd @@ -3,4 +3,4 @@ extends Spatial signal animation_finished( anim_name ) func _on_AnimationPlayer_animation_finished(anim_name): - emit_signal( "animation_finished", anim_name ) + emit_signal( "animation_finished", anim_name ) diff --git a/scenes/decors/vegets/grass/grass_01.res b/scenes/decors/vegets/grass/grass_01.res index 4030bfe..56ae273 100644 Binary files a/scenes/decors/vegets/grass/grass_01.res and b/scenes/decors/vegets/grass/grass_01.res differ diff --git a/scenes/game/game.tscn b/scenes/game/game.tscn index d34f90e..77f12aa 100644 --- a/scenes/game/game.tscn +++ b/scenes/game/game.tscn @@ -24,8 +24,8 @@ noise = SubResource( 1 ) [sub_resource type="ShaderMaterial" id=3] resource_local_to_scene = true shader = ExtResource( 5 ) -shader_param/iTime = 4.27346 -shader_param/iFrame = 402 +shader_param/iTime = 101.769 +shader_param/iFrame = 5732 shader_param/COVERAGE = 0.5 shader_param/THICKNESS = 25.0 shader_param/ABSORPTION = 1.031 @@ -173,6 +173,7 @@ margin_left = 908.654 margin_top = 51.8173 margin_right = -115.346 margin_bottom = -412.183 + [connection signal="douleur_minus_pressed" from="debug_window" to="." method="_on_debug_window_douleur_minus_pressed"] [connection signal="douleur_plus_pressed" from="debug_window" to="." method="_on_debug_window_douleur_plus_pressed"] [connection signal="mist_level_changed" from="debug_window" to="." method="_on_debug_window_mist_level_changed"] diff --git a/scenes/game/generate_map.gd b/scenes/game/generate_map.gd new file mode 100644 index 0000000..2b30d02 --- /dev/null +++ b/scenes/game/generate_map.gd @@ -0,0 +1,142 @@ +extends Node + +# Cache : ~/.cache/godot/ + + +func GenerateMap(filemap:String, longitude:int, latitude:int): + Config.msg_debug("GenerateMap => Start") + Config.msg_debug(" [" + filemap + "] longitude:" + str(longitude) + " latitude:" + str(latitude)) + var image = Image.new() + var arr = [] + var mesh = ArrayMesh.new() + + arr.resize(Mesh.ARRAY_MAX) + # Set up the PoolVectorXArrays. + var verts = PoolVector3Array() + var uvs = PoolVector2Array() + var normals = PoolVector3Array() + var indices = PoolIntArray() + + # Vertex indices. + var thisrow = 0 + var prevrow = 0 + var point = 0 + image.load(filemap) + var width = image.get_width() + var height = image.get_height() + image.lock() + Config.msg_debug("width:" + str(width) + " , height:" + str(height)) + var lvl = image.get_pixel(0,0).v + Config.msg_debug("level:" + str(lvl)) + Config.msg_debug("a:" + str(image.get_pixel(0,0).a)) + Config.msg_debug("r:" + str(image.get_pixel(0,0).r)) + Config.msg_debug("v:" + str(image.get_pixel(0,0).v)) + Config.msg_debug("b:" + str(image.get_pixel(0,0).b)) + var txt + # y => height, x => width + for y in range(height): + for x in range(width): + var z = int(image.get_pixel(x,y).v * 500) + var vert = Vector3(x, z, y) + Config.msg_debug("x:" + str(x) + " , y:" + str(y) + " , z:" + str(z)) + verts.append(vert) + normals.append(vert.normalized()) + uvs.append(Vector2(x, y)) + point += 1 + if x > 0 and y > 0: + indices.append(prevrow + x - 1) + indices.append(prevrow + x) + indices.append(thisrow + x - 1) + indices.append(prevrow + x) + indices.append(thisrow + x) + indices.append(thisrow + x - 1) + if y > 0: + indices.append(prevrow + width - 1) + indices.append(prevrow) + indices.append(thisrow + width - 1) + indices.append(prevrow) + indices.append(prevrow + width) + indices.append(thisrow + width - 1) + prevrow = thisrow + thisrow = point + + arr[Mesh.ARRAY_VERTEX] = verts + arr[Mesh.ARRAY_TEX_UV] = uvs + arr[Mesh.ARRAY_NORMAL] = normals + arr[Mesh.ARRAY_INDEX] = indices + image.unlock() + # Create mesh surface from mesh array. + mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arr) # No blendshapes or compression used. + # Commit to the ArrayMesh. + ResourceSaver.save("res://map" + str(longitude) + "-" + str(latitude) + ".tres", mesh, 32) + Config.msg_debug("GenerateMap => End") + + +func GenerateSphere(rings:int = 50, radial_segments:int = 50, height:int = 1, radius:int = 1): + Config.msg_debug("GenerateSphere => Start") + var arr = [] + var mesh = ArrayMesh.new() + + arr.resize(Mesh.ARRAY_MAX) + # Set up the PoolVectorXArrays. + var verts = PoolVector3Array() + var uvs = PoolVector2Array() + var normals = PoolVector3Array() + var indices = PoolIntArray() + + # Vertex indices. + var thisrow = 0 + var prevrow = 0 + var point = 0 + + # Loop over rings. + for i in range(rings + 1): + var v = float(i) / rings + var w = sin(PI * v) + var y = cos(PI * v) + + # Loop over segments in ring. + for j in range(radial_segments): + var u = float(j) / radial_segments + var x = sin(u * PI * 2.0) + var z = cos(u * PI * 2.0) + var vert = Vector3(x * radius * w, y, z * radius * w) + verts.append(vert) + normals.append(vert.normalized()) + uvs.append(Vector2(u, v)) + point += 1 + + # Create triangles in ring using indices. + if i > 0 and j > 0: + indices.append(prevrow + j - 1) + indices.append(prevrow + j) + indices.append(thisrow + j - 1) + + indices.append(prevrow + j) + indices.append(thisrow + j) + indices.append(thisrow + j - 1) + + if i > 0: + indices.append(prevrow + radial_segments - 1) + indices.append(prevrow) + indices.append(thisrow + radial_segments - 1) + + indices.append(prevrow) + indices.append(prevrow + radial_segments) + indices.append(thisrow + radial_segments - 1) + + prevrow = thisrow + thisrow = point + + # Assign arrays to mesh array. + arr[Mesh.ARRAY_VERTEX] = verts + arr[Mesh.ARRAY_TEX_UV] = uvs + arr[Mesh.ARRAY_NORMAL] = normals + arr[Mesh.ARRAY_INDEX] = indices + + # Create mesh surface from mesh array. + mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arr) # No blendshapes or compression used. + + # Commit to the ArrayMesh. + ResourceSaver.save("user://sphere.tres", mesh, 32) + Config.msg_debug("GenerateSphere => End") diff --git a/scenes/interfaces/creatures_menu/creatures_menu_ui.gd b/scenes/interfaces/creatures_menu/creatures_menu_ui.gd index 59ddaab..29193b4 100644 --- a/scenes/interfaces/creatures_menu/creatures_menu_ui.gd +++ b/scenes/interfaces/creatures_menu/creatures_menu_ui.gd @@ -25,30 +25,32 @@ func _ready(): for file in files: var creature_box = preload( "res://scenes/interfaces/creatures_menu/creature_box.tscn" ).instance() creature_box.get_node( "label" ).text = file - creature_box.slot = self.slots_number + creature_box.slot = slots_number creature_box.creature_filename = file creature_box.connect( "select_pressed", self, "_on_creature_box_select_pressed" ) creature_box.connect( "delete_pressed", self, "_on_creature_box_delete_pressed" ) $screen_box/scroll_container/v_box_container/creatures_box.add_child( creature_box ) - self.slots[ self.slots_number ] = creature_box - self.slots_number += 1 - - var creature = Creatures.Ra_old2.new() - creature.from_file( file ) - creature_box.get_node( "label" ).text = creature.pseudonym + slots[ slots_number ] = creature_box + slots_number += 1 + #var creature = Creatures.Ra_old2.new() + var creature = Data.new() + Config.msg_debug( "File:" + file ) + creature.load( file ) + creature_box.get_node( "label" ).text = creature.get_data("pseudonym", "No name") + func _on_new_pressed(): - emit_signal( "new_pressed", self.slots_number ) + emit_signal( "new_pressed", slots_number ) func _on_cancel_pressed(): emit_signal( "cancel_pressed" ) func _on_creature_box_select_pressed( slot ): - emit_signal( "select_pressed", self.slots[ slot ].creature_filename ) - + emit_signal( "select_pressed", slots[ slot ].creature_filename ) + func _on_creature_box_delete_pressed( slot ): - if self.slots[ slot ].creature_filename: + if slots[ slot ].creature_filename: var dir = Directory.new() - dir.remove( "user://creatures/" + self.slots[ slot ].creature_filename ) - self.slots[ slot ].queue_free() + dir.remove( "user://creatures/" + slots[ slot ].creature_filename ) + slots[ slot ].queue_free() diff --git a/scenes/main/main.gd b/scenes/main/main.gd index b7751b4..7c73a48 100644 --- a/scenes/main/main.gd +++ b/scenes/main/main.gd @@ -143,8 +143,9 @@ func _on_main_menu_play_pressed(): func _on_creatures_menu_ui_new_pressed( slot ): self.creature_selected_slot = slot -# Globals.goto_scene( "res://scenes/interfaces/creatures_editor/creatures_editor_ui.tscn" ) - Globals.goto_scene( "res://scenes/creatures/creatures_creation.tscn" ) +# Globals.goto_scene( "res://scenes/interfaces/creatures_editor/creatures_editor_ui.tscn" ) + #Globals.goto_scene( "res://scenes/creatures/creatures_creation.tscn" ) + Globals.goto_scene( "res://scenes/creature_creation/creature_creation.tscn" ) func _on_creatures_menu_ui_cancel_pressed():