Jump to content

DerpHammer


Timnaka
 Share

Recommended Posts

37 minutes ago, wowgetoffyourcellphone said:

Check template_structure and its obstruction component. :)

Thanks, but I think I formulated my question poorly.
I only want specific units (spells, ghosts and the like) to be able to walk through buildings while still being impassible for regular units.
I've been tinkering with the obstruction component in template_unit but I can't get it to work the way I want it to.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

so it's been a while since I posted
DerpHammer 2.0 is progressing slowly, but it is progressing!
I just ported it over to the Alpha 25 Pre-release version (the second release candidate specifically)
everything went well, except I'm having issues with the structure tree
for the Dwarf faction it is completely broken and I'm getting these messages, though I don't know what they mean:
unknown.png
for the Empire faction, the tree works but I'm still getting some of the messages:
unknown.png
I've tried looking what I did differently between the two to find out why one works and the other doesn't, but I can't figure it out...

  • Like 3
Link to comment
Share on other sites

Have you altered the Structure Tree within your mod at all? Perhaps increased the amount of "Trainer Units"? (Do you have a file called: gui/reference/structree/Sections/Trainer/TrainerSection.xml ?) If so, you will need to change style="StructNameSpecific" to style="StructNamePrimary".

As to the other error, could you check that all templates listed in the StartingEntities section of your simulation/data/civs/{civ}.json files exist? (If they don't then you should also see errors when starting a "Random" (instead of Skirmish or Scenario) map with that civ in play.)

  • Like 2
Link to comment
Share on other sites

10 hours ago, s0600204 said:

Have you altered the Structure Tree within your mod at all? Perhaps increased the amount of "Trainer Units"? (Do you have a file called: gui/reference/structree/Sections/Trainer/TrainerSection.xml ?) If so, you will need to change style="StructNameSpecific" to style="StructNamePrimary".

As to the other error, could you check that all templates listed in the StartingEntities section of your simulation/data/civs/{civ}.json files exist? (If they don't then you should also see errors when starting a "Random" (instead of Skirmish or Scenario) map with that civ in play.)

That solved it!
Thank you very much!

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Oh boy, I haven't posted here in over a year...
I've continued working on DerpHammer despite my silence (even though I made some months long hiatuses along the way) and posting some progress updates over on my Mod DB page.
I've had some struggles here and there, but mostly I've been able to figure stuff out by myself.

That said, there are some problems I can't seem to solve on my own.
Most recently, I've tried to have my units change color based on the player's color, like the vanilla units do!
But for some reason it isn't working even though I just copied how it's done in the base game...

In the example here, I want the pants of the orcs to be the player color.
I've copied the file structure from the actor file of the female citizen, just changing the textures to my own.
(fabric.png is a transparent image and fabric_spec.png is single flat color)
But no matter what I do, in-game the pants just show up as pitch black.

906398640_0adtest2.png.41f084d7cab79dbb51eccdf62d23d4a5.png1430718309_0adtest1.png.df6dfe8ae1ebecc86db32d66c3eb3427.png

What am I doing wrong?

  • Like 1
Link to comment
Share on other sites

3 hours ago, Timnaka said:

In the example here, I want the pants of the orcs to be the player color.

Given your pants are black I think it might be GIMP at play. There is a weirdly undocumented feature of GIMP when exporting a PNG

> Stanislas Dolcini:
The background color on a png of a full alpha pixel becomes the background color of the brush when exporting [...] 

Try to set your background brush to white.

If that still does not work, add a white layer with 1% opacity below your texture prior to exporting to png.

Also note that actors do not change color, only actors with templates do.

PS: Would you like to make your mod available on mod.io for all A26 users ? 0ad.mod.io

This way it can be downloaded from the game. It just needs a team signature to check there are no viruses in it.

  • Like 1
Link to comment
Share on other sites

33 minutes ago, Stan` said:

Given your pants are black I think it might be GIMP at play.

I didn't use GIMP for my textures, I'll go give this a try!

33 minutes ago, Stan` said:

Also note that actors do not change color, only actors with templates do.

I'll keep that in mind.

33 minutes ago, Stan` said:

PS: Would you like to make your mod available on mod.io for all A26 users ? 0ad.mod.io

That sounds neat! I'm not confident to release my current build as there's still some work to be done, but once I'm ready to release it I would be interested.

Link to comment
Share on other sites

Another question about textures that change to the player's color:
Is there any way to retain transparency fo some parts of the texture?

I really like the new feature of the banners for formations, since it allows me to easily include unique banners for every faction. However, since I don't want to make every banner a simple square or to individually model every flag shape, I was gonna use transparency to get differet flag shape. However, the player_trans material turning everything fully transparent into solid black is thrwing a wrench into that.

Left is how it is supposed to look like, right is how it actually looks currently.

banners.png.5a28282e5efefe51c2b4528862137c42.png

  • Thanks 1
Link to comment
Share on other sites

6 hours ago, Timnaka said:

Another question about textures that change to the player's color:
Is there any way to retain transparency fo some parts of the texture?

I really like the new feature of the banners for formations, since it allows me to easily include unique banners for every faction. However, since I don't want to make every banner a simple square or to individually model every flag shape, I was gonna use transparency to get differet flag shape. However, the player_trans material turning everything fully transparent into solid black is thrwing a wrench into that.

Left is how it is supposed to look like, right is how it actually looks currently.

banners.png.5a28282e5efefe51c2b4528862137c42.png

You can only use one kind of material blending per object or actor. You could either give the golden fringe its own geometry in the mesh or make the fringe a prop with its own material blending (basic_trans.xml).

  • Like 1
Link to comment
Share on other sites

2 hours ago, wowgetoffyourcellphone said:

You can only use one kind of material blending per object or actor. You could either give the golden fringe its own geometry in the mesh or make the fringe a prop with its own material blending (basic_trans.xml).

I see.
I'll have to work around that then!

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

So it has been almost 2 years since my last post here.
I've been working on DerpHammer throughout that time, getting better at 3D modelling and slowly learning how templates work and stuff. (the comparison of the steam tank models does a good job at showing my progress I think)

screenshot0029.thumb.png.78a0fecb3ac12a2bbf0a54125e974504.png

For the most part I've been managing to figure out stuff on my own, but there have been some issues that I just don't know how to solve. One of them is this error message that gets triggered by AI players (it appears once for every AI player at the beginning of a game). As far as I can tell, the only template with the 'unrestricted' class is the ambient buzzard and that one doesn't seem to be the culprit, so I really don't know what the cause would be.

unrestricted.png.20bf0171e126090e06d9175a64c18a07.png

  • Like 3
Link to comment
Share on other sites

Another thing is in regards to sounds and animations.
I decided early on to not have animations for most of my units, mostly to make things easier for myself. Unfortunatly that means the units do not make any sounds when attacking, building, etc.

Is there a way to trigger those sounds without needing to add animations to an actor? I tried looking at the variants but I'm very lost as to how exactly they work.

Now there are some entities that do require animations (most notably gates opening and closing, as well as gyrocoptors having spinning propellers), but I haven't quite figured out how to export them from blender into 0ad, so for now those use jury-rigged solutions until I figure it out.

(Admittedly I haven't really looked much into how to animate in Blender to begin with)

Link to comment
Share on other sites

Hey nice to see you haven't given up on your mod after all this time :)

Regarding the first error maybe you have an outdated simulation/data/pathfinder.xml file in your mod ?

10 minutes ago, Timnaka said:

Is there a way to trigger those sounds without needing to add animations to an actor? I tried looking at the variants but I'm very lost as to how exactly they work.

Sadly no this is an engine limitation. The only exception is Buildings (with the BuildingAI component) where there is an explicit call to play sounds in js script.

11 minutes ago, Timnaka said:

Now there are some entities that do require animations (most notably gates opening and closing, as well as gyrocoptors having spinning propellers), but I haven't quite figured out how to export them from blender into 0ad, so for now those use jury-rigged solutions until I figure it out.

(Admittedly I haven't really looked much into how to animate in Blender to begin with)

Let me know if you need help with this. See also https://gitea.wildfiregames.com/0ad/0ad/wiki/AnimationExportTutorial

Link to comment
Share on other sites

Thanks for the quick reply!

I did check the pathfinder.xml, but the only difference are the various custom passability classes I added. The 'unrestricted' class itself is the same as in the vanilla file. (I'll share it here if you want to take a look for yourself)

As for the animations, thanks for the tutorial! I'll try to look into that.

pathfinder.xml

Link to comment
Share on other sites

Btw you might consider putting you mod on 0ad.mod.io to make accessible to more people :)

47 minutes ago, Timnaka said:

 

I did check the pathfinder.xml, but the only difference are the various custom passability classes I added. The 'unrestricted' class itself is the same as in the vanilla file. (I'll share it here if you want to take a look for yourself)

Mmh strange :/

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