-
Announcement
-
Simtropolis Returns! 05/26/2026
See here for details about our site recovery efforts.
-
Search the Community
Showing results for tags 'mats'.
Found 1 result
-
Scripting Reader to place sidewalk textures on overpassed networks
delta9 posted a topic in SC4 Modding - Open Discussion
Hello Simtrop! Boy this place has changed. Recently getting back into the game after many years, and a lot more on the modding side this time around too, thanks to all the wonderful things GoFSH can do to customize your game (can't thank rivit and MGB/rsc and everyone else enough for that). It's been crazy trying to catch up on how far things have come, much less trying to remember where I left off. So, much to my joy I learned that RHW can go over NWM now, and much to my dismay I ran into my old nemesis, the sad, bare network textures under overpasses. I searched high and low for a mod or script or anything that could do this for me. The closest I got was MGB's underbridge and the JPN Facelift, which while brilliant, were narrow misses. I already adventured through the Reader figuring out how to change base textures on lots (note to self: make alphas to GoFSH the grass on Clayhurst lots) so I figured there has to be a way to do this. After much digging (and lots of glass shattering sounds because of Simtrop's Xmas CSS...) I found this SC4D thread by ebina from almost 10 years ago telling how to add base textures to a puzzle piece. Followed the steps, and with a little trial and error due to missing imageshack pictures and never messing with S3D files before, I got it to work! First on the Road, then the TLA-5: I'm using Gobias's Brooklyn Brick (HD) and this directly references the mid-wealth sidewalk texture Instance. Of course, now I have to figure out why the Road one is scaled down to SD and properly shaded while the TLA-5 one is at the proper resolution but needs color correction. My first mistaken attempt at the Road had the sidewalk layered on top, but it was HD with the puzzle piece brightness, so I'm not sure what happened. So, to the main point, that's fine and dandy, but I don't want to do this by hand. I want to script it, but try as I might I can't figure out how to muck with anims/meshes/frames. The code for textures makes sense to me and I can get it to work, but not frames and meshes. Part of the confusion for me is not knowing exactly what a "block" refers to on the anims tab. "s3d_Count(s3d, 5)" returns that there's only 1 anim element. Aren't the meshes the anim elements, given that textures are mats elements? And are frames elements of meshes as the script code and Reader UI would indicate? The plan is to export relevant S3Ds to separate dat(s) and process those. The exact steps that need to be performed (aka automated) on each S3D file is as follows: - Mats > Add Texture - Set Texture >> 0x08200004 - Set Flags: depth test, texturing, backface culling; Alpha Func: greater than; Depth Func: less than or equal; Src Blend: one; Dest Blend: zero; Alpha Threshold: 0; Wrap Mode U: clamp V: clamp, magni filter: bilinear; mini filter: linear mipmap linear (trilinear) - Anims > [last mesh = 4th mesh = L0 network i.e. Road] >> first/only frame >> change/increment Mat Block from 3 to 4 - Add Group >> first/only frame >> set vertex block = 3, index block = 0, prim block = 0, mat block = 3 (same as L0 network's initial settings) - Save S3D Seems simple enough but I just can't crack it, and scripting Reader doesn't seem to have ever been a popular topic, at least on anything Google has managed to crawl. Thanks for any help you can offer. Sidebar funny/tragic story: through some mix of confusion and swapping addons back and forth and figuring out how to GoFSH everything, I nailed one of my other ancient enemies: SAM-7 textures for connecting to NWM. I spent several hours learning GoFSH and making a full texture replacement for all SAM-7 x Ortho&Diag NWM only to learn Tarkus had already done a better job with his Default Asphalt Streets... which I was already aware of and had used at that point! I think trying to use TGN and TRK-NAM at the same time and/or in wrong loading order, and later removing TRK-NAM had convinced me they still didn't exist. oof

