Stan` Posted February 26, 2021 Report Share Posted February 26, 2021 33 minutes ago, DanW58 said: Hrmmm... The last Windows I worked with was XP; I wasn't aware of "compressed folders" at all. I'm so sorry. It's just a zip file, they like to complicate things. One thing you could do is provide a pyromod file Then anyone with 0ad installed can double click to install it for their game basically it's a zip file renamed to .pyromod. It's exactly the same folder structure you use in the public mod. here is an example. dan-shaders.pyromod file structure DAN-SHADERS | mod.json | \---shaders \---glsl model_common.fs model_common.vs terrain_common.fs water_high.fs 1 Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 26, 2021 Author Report Share Posted February 26, 2021 (edited) Okay, so I go into the ~/0ad/binaries/mods/public/ folder, I create a zip file, include the four files in /shaders/glsl/ and all the xml files in /art/materials/ and then rename the file? EDIT: The "mod.json" in it is just a text file I should write and include in /public/ ? Edited February 26, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
Panther Posted February 26, 2021 Report Share Posted February 26, 2021 Awesome work 4 Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 26, 2021 Author Report Share Posted February 26, 2021 Hahaha, glad to hear; thanks! Quote Link to comment Share on other sites More sharing options...
maroder Posted February 26, 2021 Report Share Posted February 26, 2021 (edited) Stans mod package made it work. And i quite like the metal shine. Edited February 26, 2021 by maroder 4 Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 26, 2021 Author Report Share Posted February 26, 2021 Cool! So glad to hear! In the meantime I'm still hacking the high water shader (water_high.fs) ;-) Managed to hide the repeating tiles of the waves by mixing the wave pattern with different scalings and rotations. I also got rid of the terrible artifacts I was getting on land; it was just a funny constant in the Fresnel approximation routine that is supposed to be 1.0 but anything less than 1.12 causes those artifacts. Now I have 1 artifact left at a distance, which this funny constant doesn't fix... Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 27, 2021 Author Report Share Posted February 27, 2021 SUCCESS!!!! Kind of ... Got the coasts to look wet. But the artifact I wrote about in the previous post is still there. 5 Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 27, 2021 Author Report Share Posted February 27, 2021 (edited) 10 hours ago, Stan` said: file structure DAN-SHADERS | mod.json | \---shaders \---glsl model_common.fs model_common.vs terrain_common.fs water_high.fs Man, why does life have to be so difficult? Archive Manager AND Ark BOTH have no option for keeping the folder structure. Then Xarchiver has two options: Full path, or NO path; no option for relative path; and it crashes anyways; tells me to check some viewing option to see the error, which viewing option is nowhere to be found. Linux coders, 90% of them, seem bent on pushing people away from using the OS; they booby-trap everything they do. How do you make this zip file, Stan? EDIT: Spent like two hours searching the internet for what's a good archive manager; and they all agreed it is PeaZip. Had to install a special installer to get it installed. Full of options, but I specified to keep paths of the files; but when I test the file it extracts everything in a folder it creates by the name of the zip file. There's no end to suffering... Edited February 27, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
Samulis Posted February 27, 2021 Report Share Posted February 27, 2021 (edited) Generally I do this kind of folder setup by making a temporary 'staging' folder somewhere and then replicate the folder structure and copy in my files. Once this is done, you can install this as a mod into your own copy of 0 A.D. and instead of directly modifying game assets, you just modify your 'mod' files instead. If you need to add more files to the scope of the mod, just copy them out of the game files and into your mod and modify there. This is very useful for sound stuff at least, where I can A/B test new and old sounds by disabling the mod, no need to uncomment lines or even move around files. I can imagine you might find the approach useful too. I would start with Stan's mod file, extract the contents and/or install it, and then replace the files in the folder structure he's already made for you with the latest files you've updated. Continue work as usual working only in this mod folder, with the mod installed. When you have a new version for people to check out, pack up as a .zip and upload for everyone to try, no need for fancy archive management. Edited February 27, 2021 by Samulis 1 Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 27, 2021 Author Report Share Posted February 27, 2021 Ahhh, I'm going to try this. Many thanks. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 27, 2021 Author Report Share Posted February 27, 2021 Not working for me. Even using Stan's file; I place it into a test folder, but it creates a "dan_shaders" folder. Even if I right-click and say "Extract Here"; no matter, it always creates a stupid subfolder. Quote Link to comment Share on other sites More sharing options...
maroder Posted February 27, 2021 Report Share Posted February 27, 2021 (edited) From what i know, it should create this subfolder: " Each mod is contained within its own folder, which should have the same name as the mod. Thus, a mod named my_awesome_mod would be placed in the folder ./0ad/mods/my_awesome_mod/. "https://trac.wildfiregames.com/wiki/Modding_Guide#Wherearethemods Edited February 27, 2021 by maroder Quote Link to comment Share on other sites More sharing options...
Samulis Posted February 27, 2021 Report Share Posted February 27, 2021 (edited) 1 hour ago, DanW58 said: Not working for me. Even using Stan's file; I place it into a test folder, but it creates a "dan_shaders" folder. Even if I right-click and say "Extract Here"; no matter, it always creates a stupid subfolder. Just move it out of the subfolder after extracting? Layout should be: (mods} dan-shaders shaders glsl fs & vs files mod.json Edited February 27, 2021 by Samulis Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 27, 2021 Author Report Share Posted February 27, 2021 Thanks, guys, but I'm having a breakdown here. I did everything as you guys said. I created a test folder. Extracted Stan's zip; it created dan_shaders folder with a shaders subfolder and a glsl sub-sub-folder. I replaced all 4 files with latest versions. I added the art/materials folder, with all the xml files. Opened Stan's zip file again with PeaZip, went to AddFile, added all the files, saved. Then open the result with ArchiveManager and it wants to unzip all the files in the one subfolder. This stuff is INSANE to try to understand. Quote Link to comment Share on other sites More sharing options...
sarcoma Posted February 27, 2021 Report Share Posted February 27, 2021 cd .local/share/0ad/mods/ 7z x file.whatever Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 27, 2021 Author Report Share Posted February 27, 2021 Sorry, Sarcoma; I've no idea what that means. Quote Link to comment Share on other sites More sharing options...
sarcoma Posted February 27, 2021 Report Share Posted February 27, 2021 Are you using Linux? you can unzip the mod like that from terminal Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 27, 2021 Author Report Share Posted February 27, 2021 (edited) I'm using Linux, but I'm an eternal newbie at it. The only thing I hate more than Linux is Microsoft; that's how I'm here. Okay; what I'm trying to find out is how to create a mod; not how to unzip one. I'm having a hard time persuading all these archiving tools to keep the file-paths when adding to a zip. Edited February 27, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
sarcoma Posted February 27, 2021 Report Share Posted February 27, 2021 (edited) then try 7z a file.zip dir/ cd first into the parent of dir/ Edited February 27, 2021 by sarcoma Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 27, 2021 Author Report Share Posted February 27, 2021 (edited) Okay, I think I got it; hope it works. Includes metal and skin detection. Metal is enhanced by matching hue of diffuse and specular and ensuring that diffuse saturation is higher than specular's, but not much higher; and that specular value is higher than diffuse. Skin is enhanced by adding partial Fresnel specularity to it, of low gloss (skin is colored in diffuse, but shimmer-reflects white), and by adding a hack to make it seem like it gives a hint of red translucency. Unfortunately, skin and metal are very hard to distinguish by color, and sometimes they cross into each other. Also, patches of grass and other things may detect as skin, or as metal; but they don't look bad; just a bit shinier than they should be. Something no other shader has is a mega-hack to compute specular occlusion. That is, figure out if a sight ray reflecting off a shiny surface should reflect sky, or an object nearby. The common wisdom is that you need real time ray-tracing to get specular occlusion. Well, I got it to work based on the baked ambient occlusion. If you look at shiny pots or shields inside shady patios, you can see a limited reflection of sky on them that keeps facing you as you turn around the building. Also included is the latest water shader, with more realistic Fresnel specular and refractive factors, and with a hack to make coasts look wet. The terrains shader detects soils or tilings that are too white, and tones them down while increasing contrast. Ambient occlusion (ambient light self-shadowing) of buildings is better displayed. The material xml files are changed, in fact, to standardize the gain for ambient occlusion bakings to 1.0, rather than have manually adjusted gains everywhere. Also in the terrains shader there is a blue-tinted upward bias on ambient light, as most ambient light comes from above, and has a blue tint due to atmospheric scattering. For perspective, there are many shaders out there that do things like Fresnel; specular highlights, environment mapping and whatnot; however, they need to be told, via textures, what to do. The peculiar thing about this metal and skin shader is that it figures out what to do without being told... It's a way to enjoy a tiny hint of what will be coming next, without the work of adding new textures and all that. If there's any problems, shader not compiling, whatever, please report it to this thread. You may need to turn all the graphics options to maximum; I haven't even tested it non-maxed-out. metal_shader_set.pyromod Edited February 27, 2021 by DanW58 2 3 Quote Link to comment Share on other sites More sharing options...
maroder Posted February 27, 2021 Report Share Posted February 27, 2021 yes it does indeed Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 27, 2021 Author Report Share Posted February 27, 2021 Great! Thanks for all the patience, and enjoy. This set has the latest water shader in it. 1 Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 28, 2021 Report Share Posted February 28, 2021 Nice work! 1 Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 28, 2021 Report Share Posted February 28, 2021 How should I use it, My friend? Quote Link to comment Share on other sites More sharing options...
Panther Posted February 28, 2021 Report Share Posted February 28, 2021 (edited) 2 hours ago, gameboy said: How should I use it, My friend? Right click the Pyromod -> open with -> select Pyrogenesis.exe - once you've done that, you can activate it like any other mod in-game. Edited February 28, 2021 by Panther 1 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.