Rahcul Posted January 27, 2018 Report Share Posted January 27, 2018 I created a custom shield using blender and I am wondering how I can import said shield into my custom mod folder. What do I need to save the file as and what is the location I need to save it to? Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 27, 2018 Report Share Posted January 27, 2018 If you want to follow the conventions said shield should be put in something like (from the top of my head) The mesh should be exported in Collada format (DAE). binaries/data/mods/public/art/meshes/props/units/shields and you need to create an actor file that will be put into nearly the same folder binaries/data/mods/public/art/actors/props/units/shields Looking forward to see what you will come up with. Feel free to ask questions if you are stuck. Also look at the wiki (trac.wildfiregames.com) there are some good tuts here and in this subforum. 2 Quote Link to comment Share on other sites More sharing options...
Rahcul Posted January 27, 2018 Author Report Share Posted January 27, 2018 First of all thank you very much for the quick reply. I tried creating the actor file and all that comes with it, with the help of the basic 3D implementation guide, but it didn't work since I do not know what to type in exactly because only a crate was used in that example. If you could tell me what to type in the code to make the shield work, or link me to a thread where that is explained, I would be very thankful. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 27, 2018 Report Share Posted January 27, 2018 Just now, Rahcul said: First of all thank you very much for the quick reply. I tried creating the actor file and all that comes with it, with the help of the basic 3D implementation guide, but it didn't work since I do not know what to type in exactly because only a crate was used in that example. If you could tell me what to type in the code to make the shield work, or link me to a thread where that is explained, I would be very thankful. Can you be more specific than "It did not work" ? Can you upload the actor file here ? Also note you will only be able to see the shield in the editor by switching to actors(all) Quote Link to comment Share on other sites More sharing options...
Rahcul Posted January 27, 2018 Author Report Share Posted January 27, 2018 1 minute ago, stanislas69 said: Can you be more specific than "It did not work" ? Can you upload the actor file here ? Also note you will only be able to see the shield in the editor by switching to actors(all) I can't upload the file, but I uploaded screenshots of the error message and the file Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 27, 2018 Report Share Posted January 27, 2018 @Rahcul Okay, the mesh won't load unless it's uvmapped. That's one of the requirement. 2 Quote Link to comment Share on other sites More sharing options...
Rahcul Posted January 28, 2018 Author Report Share Posted January 28, 2018 Thank you, the shield loaded into the game now. But where would I put a sword .dae since there is no folder that says weapons? Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 28, 2018 Report Share Posted January 28, 2018 15 minutes ago, Rahcul said: Thank you, the shield loaded into the game now. But where would I put a sword .dae since there is no folder that says weapons? You can create a new folder. I'm trying to organize the art repository, and that's one thing I'm planning to add after the next release. Quote Link to comment Share on other sites More sharing options...
Rahcul Posted January 28, 2018 Author Report Share Posted January 28, 2018 Oh, so I just create a weapon folder in the exact folder as the shield one? And if yes, does that apply to structures, helmets and armour aswell? Sorry im asking that much, im just trying to make a mod and have troubles finding the right directories. Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 28, 2018 Report Share Posted January 28, 2018 1 hour ago, Rahcul said: Oh, so I just create a weapon folder in the exact folder as the shield one? And if yes, does that apply to structures, helmets and armour aswell? Sorry im asking that much, im just trying to make a mod and have troubles finding the right directories. No problem, always nice to see new modders We do not have armors in the main game but I guess they'd go in something like binaries/data/mods/public/art/meshes/props/units/armors/ helmets would go in binaries/data/mods/public/art/meshes/props/units/helmets swords would go into either binaries/data/mods/public/art/meshes/props/units/weapons/ or something like binaries/data/mods/public/art/meshes/props/units/weapons/swords/ Image you have a roman unit prop gladius which is a sword. with no folder the name would be binaries/data/mods/public/art/actors/prop_unit_weapon_sword_rome_gladius.xml With our last naming convention, the file name would simply be : binaries/data/mods/public/art/actors/props/units/weapons/swords/rome_gladius.xml Quote Link to comment Share on other sites More sharing options...
Rahcul Posted January 28, 2018 Author Report Share Posted January 28, 2018 hmm, is there any rule on how to name the different props like swords for example, because if I try to put the sword into the game, with the directories you told me, I get this error message: <!DOCTYPE html> <meta charset="utf-8"> <title>Pyrogenesis Log</title> <style>body { background: #eee; color: black; font-family: sans-serif; } p { background: white; margin: 3px 0 3px 0; } .error { color: red; } .warning { color: blue; }</style> <h2>0 A.D. (0.0.22) Main log (warnings and errors only)</h2> <p class="error">ERROR: Could not load mesh 'art/meshes/props/spartan_test.dae'</p> <p class="error">ERROR: CObjectEntry::BuildVariation(): Model art/meshes/props/spartan_test.dae failed to load</p> <p class="error">ERROR: Could not load mesh 'art/meshes/props/spartan_test.dae'</p> <p class="error">ERROR: CObjectEntry::BuildVariation(): Model art/meshes/props/spartan_test.dae failed to load</p> <p class="error">ERROR: Could not load mesh 'art/meshes/props/spartan_test.dae'</p> <p class="error">ERROR: CObjectEntry::BuildVariation(): Model art/meshes/props/spartan_test.dae failed to load</p> <p class="error">ERROR: Could not load mesh 'art/meshes/props/spartan_test.dae'</p> <p class="error">ERROR: CObjectEntry::BuildVariation(): Model art/meshes/props/spartan_test.dae failed to load</p> And this is what I see in the editor: Also, for a sword it uses a .dds texture file, but for the shield it needed a .png, is there a reason for that? Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 28, 2018 Report Share Posted January 28, 2018 Can you show me your xml file ? Where did you put your dae file ? In the past we only had dds for textures, now the engine automatically converts png to dds, so we use png for new textures. Quote Link to comment Share on other sites More sharing options...
Rahcul Posted January 28, 2018 Author Report Share Posted January 28, 2018 Ah okay, well this is what is say in the XML file: This is the directory for the XML file: This is the directory for the DAE file: And this is the directory for the DDS file: This is every file, I hope you can tell me what's wrong with it. Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 28, 2018 Report Share Posted January 28, 2018 Oh I think I might have confused you sorry. The following actor should do it. <?xml version="1.0" encoding="UTF-8"?> <actor version="1"> <castshadow/> <group> <variant frequency="1" name="Laconic Sword"> <mesh>props/weapons/spartan_test.dae</mesh> <textures> <texture file="props/weapon/prop_test.png" name="baseTex"/> </textures> </variant> </group> <material>basic_trans.xml</material> </actor> Quote Link to comment Share on other sites More sharing options...
Rahcul Posted January 28, 2018 Author Report Share Posted January 28, 2018 It's still not working, but the error message has changed, it now says this in the crashlog: crash_log.txt And this is what it says in the Editor: Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 28, 2018 Report Share Posted January 28, 2018 4 minutes ago, Rahcul said: It's still not working, but the error message has changed, it now says this in the crashlog: crash_log.txt And this is what it says in the Editor: Okay, so this error is not really explicit. It might means different things A ) Your model has more than one blender materials B ) Your model has edges or vertices that are not par of a face, to solve this in blender, go to face mode, press A to select everything, and press h to hide, then switch to vertice mode and you should see the culprits. 1 Quote Link to comment Share on other sites More sharing options...
Rahcul Posted January 28, 2018 Author Report Share Posted January 28, 2018 Thank you, it finally worked! You can only see it from one side of the camera angle but I can probably fix that in blender. If you could let me know what exactly you changed in the code for it to work, that would be great. Thank you again and I will let you know if I need help with anything else if that is okay! Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 28, 2018 Report Share Posted January 28, 2018 @Rahcul Your paths were wrong for the mesh and the texture <mesh>props/spartan_test.dae</mesh> Instead of : <mesh>props/weapons/spartan_test.dae</mesh> and <texture file="props/prop_test.png" name="baseTex"/> instead of <texture file="props/weapon/prop_test.png" name="baseTex"/> 1 Quote Link to comment Share on other sites More sharing options...
Rahcul Posted January 31, 2018 Author Report Share Posted January 31, 2018 Hello, it's me once again! Would you mind walking me through importing custom buildings into the game? What I mean is basically, what directories the files need to be in, and the necessary code if possible. I would really appreciate it! Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 31, 2018 Report Share Posted January 31, 2018 For actors: binaries/data/mods/public/art/actors/structures/{civ}/building_name.xml For prop actors: binaries/data/mods/public/art/actors/props/structures/{civ}/building_name_propname.xml For meshes binaries/data/mods/public/art/meshes/structural/{civ}/building_name.dae For mesh props binaries/data/mods/public/art/meshes/props/structures/{civ}/building_name.dae Though currently it's a complete mess and is in the following folder. binaries/data/mods/public/art/meshes/props/{civ}_building_name.dae For textures for main buildings binaries/data/mods/public/art/textures/skins/structural/{civ}_struct.png Quote Link to comment Share on other sites More sharing options...
Rahcul Posted January 31, 2018 Author Report Share Posted January 31, 2018 42 minutes ago, stanislas69 said: For actors: binaries/data/mods/public/art/actors/structures/{civ}/building_name.xml For prop actors: binaries/data/mods/public/art/actors/props/structures/{civ}/building_name_propname.xml For meshes binaries/data/mods/public/art/meshes/structural/{civ}/building_name.dae For mesh props binaries/data/mods/public/art/meshes/props/structures/{civ}/building_name.dae Though currently it's a complete mess and is in the following folder. binaries/data/mods/public/art/meshes/props/{civ}_building_name.dae For textures for main buildings binaries/data/mods/public/art/textures/skins/structural/{civ}_struct.png What if I do not have any prop actors etc. and just the bulding itself, can I just ignore all the prop actor code in the actual actor file or do I have to delete them? Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 31, 2018 Report Share Posted January 31, 2018 <?xml version="1.0" encoding="UTF-8"?> <actor version="1"> <castshadow/> <group> <variant frequency="1" name="Laconic Sword"> <mesh>props/weapons/spartan_test.dae</mesh> <textures> <texture file="props/weapon/prop_test.png" name="baseTex"/> </textures> </variant> </group> <material>basic_trans.xml</material> </actor> Yeah just like this example you can have no props. Quote Link to comment Share on other sites More sharing options...
Rahcul Posted February 10, 2018 Author Report Share Posted February 10, 2018 On 1.2.2018 at 12:09 AM, stanislas69 said: <?xml version="1.0" encoding="UTF-8"?> <actor version="1"> <castshadow/> <group> <variant frequency="1" name="Laconic Sword"> <mesh>props/weapons/spartan_test.dae</mesh> <textures> <texture file="props/weapon/prop_test.png" name="baseTex"/> </textures> </variant> </group> <material>basic_trans.xml</material> </actor> Yeah just like this example you can have no props. I see, sorry for being this late in replying, I have encountered another error though: <!DOCTYPE html> <meta charset="utf-8"> <title>Pyrogenesis Log</title> <style>body { background: #eee; color: black; font-family: sans-serif; } p { background: white; margin: 3px 0 3px 0; } .error { color: red; } .warning { color: blue; }</style> <h2>0 A.D. (0.0.22) Main log (warnings and errors only)</h2> <p class="error">ERROR: Actor gaul_test_building: required texture sampler aoTex not found (material art/materials/player_trans_ao_parallax_spec.xml)</p> I guess it has something to do with textures and materials, im just not quite sure what? Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 10, 2018 Report Share Posted February 10, 2018 2 minutes ago, Rahcul said: I see, sorry for being this late in replying, I have encountered another error though: <!DOCTYPE html> <meta charset="utf-8"> <title>Pyrogenesis Log</title> <style>body { background: #eee; color: black; font-family: sans-serif; } p { background: white; margin: 3px 0 3px 0; } .error { color: red; } .warning { color: blue; }</style> <h2>0 A.D. (0.0.22) Main log (warnings and errors only)</h2> <p class="error">ERROR: Actor gaul_test_building: required texture sampler aoTex not found (material art/materials/player_trans_ao_parallax_spec.xml)</p> I guess it has something to do with textures and materials, im just not quite sure what? Okay, so this is a more "recent" change. Let's take some materials as examples <material>player_trans.xml</material> <material>player_trans_spec.xml</material> <material>player_trans_parallax_spec.xml</material> <material>player_trans_ao_parallax_spec.xml</material> First one just needs a diffuse texture. ex: <texture file="skeletal/kart_cjv_e_1.dds" name="baseTex"/> Second needs diffuse and spec. ex: <texture file="skeletal/kart_cjv_e_1.dds" name="baseTex"/> <texture file="skeletal/kart_cjv_e_1_spec.dds" name="specTex"/> Third needs diffuse and spec and a normal (parallax) map <texture file="skeletal/kart_cjv_e_1.dds" name="baseTex"/> <texture file="skeletal/kart_cjv_e_1_spec.dds" name="specTex"/> <texture file="skeletal/kart_cjv_e_1_norm.dds" name="normTex"/> Last one needs an ao map on top of that. ex: <texture file="skeletal/kart_cjv_e_1.dds" name="baseTex"/> <texture file="skeletal/kart_cjv_e_1_spec.dds" name="specTex"/> <texture file="skeletal/kart_cjv_e_1_norm.dds" name="normTex"/> <texture file="skeletal/kart_cjv_e_1_ao.dds" name="aoTex"/> Quote Link to comment Share on other sites More sharing options...
Rahcul Posted February 10, 2018 Author Report Share Posted February 10, 2018 (edited) . Edited February 10, 2018 by Rahcul Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.