Jump to content

Importing custom props?


Rahcul
 Share

Recommended Posts

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.

 

  • Like 2
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

pyrogenesis_2018-01-27_22-38-25.png

notepad++_2018-01-27_22-43-24.png

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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


 

Link to comment
Share on other sites

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?
 
 
 
 

d882d4c7243fbbdd1016beb28be39fca.png

Link to comment
Share on other sites

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>

 

Link to comment
Share on other sites

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:

000000000000.png.e39389f750d6455b24c0349f1616e8b8.png

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.

  • Like 1
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

@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"/>

 

  • Like 1
Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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?5a7230c5da0ea_notepad_2018-01-31_22-09-24.png.0fad0a555de593de37bdccabdf5c9154.png5a7230dd83519_notepad_2018-01-31_22-09-47.png.abea68874556976b43119aa9bd68f440.png5a7230f7cf288_notepad_2018-01-31_22-10-01.png.a571e00479c35449acb35da0aaeb55e8.png

Link to comment
Share on other sites

<?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.

Link to comment
Share on other sites

  • 2 weeks later...
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?

Link to comment
Share on other sites

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"/>

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...