SC4 Devotion Forum Archives

SimCity 4 Devotion Custom Content Showcase => Independent Development Projects => Independent Mod Projects => Topic started by: whatevermind on October 27, 2012, 11:48:19 PM

Title: Whatevermind's House of Wonders
Post by: whatevermind on October 27, 2012, 11:48:19 PM
I know, creative title, right? That's a better title  $%Grinno$%

The purpose of this thread is to showcase all my miscellaneous projects that generally don't fit into any neat category. BATs will still be over at my BAT thread (http://sc4devotion.com/forums/index.php?topic=15060.0), which isn't dead, just moving very slowly as I try to learn the software. Fortunately, there's plenty of other software I do know how to use just fine  :P and it can be used to research all sorts of random things and come up with all sorts of random new inventions. Anyway, introductions aside, onto the first topic...




The Fantastic World of Flora Families

This all started over here (http://sc4devotion.com/forums/index.php?topic=13223.msg437005#msg437005), with some discussion that stemmed from vortext's amazing new tree controller. If you haven't checked out what's happening over there yet, you should. The topic of Flora Families was brought up, and it seemed like one of those topics that needed further research. In case you don't know, Flora Families deal with the exemplar property kSC4FloraFamilyProperty, found in Flora exemplars.

Maxis uses Flora Families on its small offering of flora, and many of the older flora mods, such as those by c.p. tend to include the same Flora Families as used by Maxis. A third flora family is generated by PIM-X when you create a new flora exemplar, possibly as a typo in the programming. These three Flora Families, 0xE8F02107, 0x48F02107, and 0xE8F02106 seem to be the only ones out there, following a very cursory search through my plugins.  ()stsfd()

Which is to say there could be others in use, but it's not a common thing by a long shot. Flora Families are known to be the cause of the City Hall Random Tree Bug - whereby when you plop the Maxis City Hall, you sometimes get a random and entirely out of place tree on the lot. This is because the City Hall lot contains flora, but instead of pointing to any particular flora IID, it points to one of the Maxis Flora Families. When c.p. created all of his flora and gave them the same family ID, it opened up that lot to a whole new world of trees that can appear on it. This was, until very recently, the only information on this site about Flora Families, and the advice was "don't use them". Good advice, but imprecise. Better advice is, "don't use that ID".

As you've probably gathered, one of the (and perhaps the only) uses for Flora Families are to allow random flora to appear on a lot. They behave in this regard the same as Prop or Model Families, and are even called by the Lot in the same way. In the Lot exemplar property LotConfigPropertyLotObject, one of the options for Lot Objects are flora, and when you use flora on a lot, the 13th rep of that property (http://www.wiki.sc4devotion.com/index.php?title=LotConfigPropertyLotObject) can be used to point to a particular flora IID, or a Flora Family ID. This is how the City Hall does it, by pointing to one of the Maxis Flora Family ID's.

Now, a note about those Flora Family ID's - they don't seem to correspond to anything that I can see. They are not the TID, GID, or IID of any file in the .dat's. This has two important implications in working with them. First, it doesn't seem possible to use Flora Families in tree controllers. Second, you can make up any ID you want, provided there isn't some limit on this in the .exe. Which means we'll probably want a Flora Family ID Registry before this gets too far.  ::)

The reason I don't think Flora Families have any future in tree controllers boils down to the fact that tree controllers don't have any single master file that could point to a Flora Family. Instead, they are made up of a collection of flora exemplars that work together to define the tree controller. Flora Families are a property of flora exemplars, they exist because some flora exemplar lists them. As I mentioned above, they don't correspond to any file of their own. This is important because of how tree controllers work. When you go to plant trees using a tree brush, the game checks various conditions, and points towards the appropriate flora exemplar for where you are trying to plant a tree. The flora exemplar in turn uses its RKT property to point to a S3D file for that particular tree, and the result you see is that model (S3D etc) file on the spot where you clicked your tree brush. RKT properties require the full TGI of whatever they are pointing to. Flora Families are not files themselves, so there is no TGI the RKT could point to. There may be a way around this, but it looks like a dead end at the moment.

So, I researched their other potential use: Lots. Following on the idea that you could randomly make up any Flora Family ID (FFID) and supposedly use that ID on lots to point to an entire family of flora, letting the game randomly choose one to place on the lot, I put together a series of new flora exemplars to test this theory, and gave them all the same, new FFID. The models in this case were the topiaries from BSC MEGA Props RT Vol01, because I needed something tree like that would be different enough I could ensure random placement. Actually, any old model would do, but I figured might as well stick with something that's actually a plant. I then created a new lot, a simple ploppable 1x1 with a small building and a flora. I modded the lot flora to point it towards my new FFID that I was using on the topiaries, and (after some trial and error, of course) fired up the game.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2Fff03.jpg&hash=dea84755b7dcab314fb9f76188530b6928f3e898)

Behold, Topiaryville! I'll just let that picture say it's thousand words. Here's another:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2Fff08_800x.jpg&hash=da83acfabb6945716a2f27f20108de8832d03cb4)

As you can see, the game picks a flora randomly from the Flora Family, seems to give it a random rotation, and everyone gets a nice leafy animal in their back yard.

So there you go, Flora Families are very real, and very useable. Now, I'd be interested to hear if anyone else has ever tried doing anything with these, and what the results were. Happy modding!  :)
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on December 01, 2012, 06:16:47 PM
Well, that last one was quite the crowdpleaser!  $%Grinno$%

Anyway, until I do some lotting or create some flora, that's pretty much the end of that topic, which brings us to my latest little research project:


Exploring the Flora Brush

This project actually came about following the discovery that some terrain mods do not include a flora brush. The flora brush is an exemplar that contains the settings for God mode tree planting. So, for example, if you're planting trees in God mode, that tool you're using is the flora brush. Anyway, c.p. always included it in his terrain mods, and I had become used to those modified brushes, so when I found some terrain mods without it, it seemed necessary to essentially recreate c.p.'s supersize brush as a standalone plugin. I already did this actually. But of course I couldn't just leave it at that, I had to explore all the parts of that brush and figure out what they do and if there's any way to optimize it.  ;D

The flora brush actually has only a few properties that influence its behavior, and these are common to all of the brushes, such as the terrain brushes, animals, etc. Basically, the brushes consist of components, and can contain up to four components that are essentially layered over each other. All brushes must have at least one component, some brushes use two. Each component then has a series of properties that are defined for it that determine its behavior.

You can see a screen grab from Reader of the original exemplar below.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0502-FloraBrushExemplar.jpg&hash=d92aebafe47137e54514d47eee32098aff7dfa10)

The properties that influence behavior are all those that start with Comp1..., in the case of the flora brush, there is only one component. The rest of the properties are all related to game appearance, menus, etc., which I won't be getting into.

The first property there, Comp1TextureID, is the one that so far has captured most of my attention. Basically, it points to the IID of a FSH file that defines the "texture" of the brush. That part there is about as simple as it gets when it comes to modding. What gets crazy is the FSH file itself.

In theory, you could point that property at any FSH file, and the game would find some way to translate it into a brush, and would plant trees in some pattern depending on how it interpreted the texture. The problem is creating or finding a texture that you want the brush to plant in, and getting the brush to actually plant in that pattern.

The default texture looks like this:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-0x7ab50e440x891b0e1a0x08f65da6.jpg&hash=4c78b5b52dafb7aa6e6c2e3b7c191500f2a142bf)

If you've ever watched the flora brush in action, especially at larger sizes, such as used in c.p.'s Italia or Meadowshire terrain mods, you'll see that if you click and hold it in a spot for a while, it plants a big central clump and a series of outlying smaller clumps, then begins to rotate, and those outlying clumps become bands, until the full radius of the brush is filled with trees. Look at that picture above, and picture it spiraling, that's the default flora brush.

But what if you wanted it to paint trees in a different pattern? You'd need a different texture. So, as a tribute to SC4D, I made this:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-0x7ab50e440x891b0e1a0x08f65da6_5.jpg&hash=6f8f88ec30dbb751bf3272cd156ab28dfd06f6a7)

Also, the presence of letters makes it really easy to see if it's painting correctly. We'll deal with how I handled spiraling later, for now, focus on the texture.

Now, in theory, if you select the flora brush and click on one spot and hold it, you should see that same pattern repeated in trees:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0509_TexturesWork.jpg&hash=bf57490b8129885b664ea850ed70602d5a40fff7)

Wait, that's not right! I see a squished S, D, an some wavy lines below them. Hmm...let's try tweaking some of those other propeties:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0516_Base01.jpg&hash=2d1a582aeda067536043c74e59f9c57631ff0cb7)

Eh, that's even worse...

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0502.jpg&hash=fc8446a4d35bbfacc576b5887c3f95f830b5b18a)

Nope, not that either...

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0523_Base0F.jpg&hash=71b226366cf8ee8a4fbacbf10c1540e1ad1c33b4)

Ok, now I see C and 4, still squished into the top half of the brush, but still those wavy lines below them. However, the lines are bunched closer, more of a big clump below the letters now. Now, this was done just with clicking the flora brush. But as you probably know, you can also SHIFT+Click the brush, useful for painting bigger areas. Oddly, I haven't tried CTRL+Click to see what that does, but I almost never use that on flora. Also weird is that I was getting a different pattern depending on whether or not I just clicked or used SHIFT+Click. Now, something to notice about that last picture, although it's not terribly clear, is that that block of trees below the 4 has a pattern. It's easier to see in the SHIFT+Click, which in this case produces S and D and a block of trees below them.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0521_Base0F.jpg&hash=8269c6c3da5fcdca882035790c6760eb960cada7)

What you're looking at there is the more or less solid block of trees that appeared below the D. The S and D are hard to see in this shot, but trust me, they're there, just very blurry (this was due to some messing with the texture I had been doing that had blurred it), and mostly cut off. Now, look closely at where this block begins, and read it left to right, top to bottom, like text. There is a solid stripe of trees, then the next "line" contains a string of tiny clusters of trees separated by empty spaces. Keep reading, line by line. Looks like a numerical sequence, doesn't it? An increasing numerical sequence, wrapping lines. Each few clumps of trees, the size of the clump increases. I had been thinking up to this point that this block of "junk" trees that were planting below the letters that were supposed to be there was just random fill, but this changed my mind. It also proved to be a breakthrough in cracking the brush textures.

Til next time...
Title: Re: Whatevermind's House of Wonders
Post by: Swordmaster on December 01, 2012, 07:00:26 PM
Oh, I don't think I had seen your topic! Good research into the flora family property. This might be useful sometime to me.

I also have a standalone flora brush mod, but never looked at the texture. Doh! Great discovery. However, after running a first test, I don't understand at all how it determines the outcome of the brush. It doesn't look one bit like it. Needs further testing.

EDIT: The texture itself seems to be different from other FSH files. GIMP, for one, can't open it.


Cheers
Willy
Title: Re: Whatevermind's House of Wonders
Post by: Lowkee33 on December 01, 2012, 08:17:33 PM
I missed the topic too.

I have quite a few flora families in my own lottings.  As flora, they provide a pollution reduction so have a different value to a Lot.  Main problem is that PIMX doesn't see them, and MaxisLE shows the spinning diamond.  My solution is to make the lot with a member of the family so that I can tell what tree I'm planting, and then open up reader and switch the values over so the lot uses the family.

I had the same initial results as you with altering the brush.

But Lordy, how can you leave us like that?  :P
Title: Re: Whatevermind's House of Wonders
Post by: Silur on December 01, 2012, 10:31:57 PM
Yes, it's a very interesting theme  :thumbsup:...
Thank You, Whatevermind.
Title: Re: Whatevermind's House of Wonders
Post by: Gobias on December 09, 2012, 03:57:13 AM
Wow - awesome discovery regarding the distribution texture.  I haven't tried messing with it yet but looks quite interesting.  I've always been unhappy with the ugliness of the god mod tree distribution - I felt like it plopped a lot of trees at the center of the brush but too many stragglers popping up around the brush edges made it hard to create clean forest-edges without plopping trees in MM.  Now I can see why!
Title: Re: Whatevermind's House of Wonders
Post by: vortext on December 09, 2012, 07:33:00 AM
Interesting! I always wondered why the brush would spiral, now I know!  :D
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on December 09, 2012, 02:52:32 PM
Thanks guys!

I think flora families are pretty neat. It's certainly something to think about for anyone working on new flora or MMP's. Unfortunately, going back and changing all the existing flora into new families would be a monumental task, and could always cause problems with any lots that were using them, so I don't know if it would ever make for a useful public release. And, as Lowkee33 mentioned, they're something of a pain to use in lotting. I had to use pretty much the same method to get "Topiaryville" all lotted.




Well, as it happens swordmaster is on the right track there, as these FSH files are no ordinary FSH files. They follow the FSH spec well enough, they're just another flavor. I'll have to work out the details and update the spec on the Wiki (http://www.wiki.sc4devotion.com/index.php?title=FSH_Format) at some point, but I think most of the information is already there, at least enough to decipher the files.

As I had been testing different variations on the texture, I had already been thinking that some of my weird results were due to the way the game was parsing the texture. However, it was seeing what looked like patterns in the trees that got me thinking about the file type, and led me to pop open the textures in Reader's hex viewer and take a closer look at them.

First thing I noticed was that the textures I had been creating, using Null45's PNGtoFSH tool, looked nothing like the original texture. Both were clearly FSH files, but the ones I was creating were far more "advanced", for lack of a better description, especially in the compression of the files.

This, remember, is what the original texture looks like:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-0x7ab50e440x891b0e1a0x08f65da6.jpg&hash=4c78b5b52dafb7aa6e6c2e3b7c191500f2a142bf)

When you open that up in Reader's hex viewer, you see this:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0524_OriginalTextureInHex_800.jpg&hash=05e27b3677a01d1f079410ea70eca1c552fe28b0)

Definition: bitmap. (or bytemap, perhaps  $%Grinno$%)

At this point it became pretty obvious that if I was going to create new brush textures, it was going to have to be by way of hex editing. The compression options offered by the PNGtoFSH tool are just way to advanced for these files. So, that's what I did. It's tedious, sure, but once you figure out what goes where, it's doable, kind of like ASCII art, actually.

The remainder of the file actually consists of a giant block of "text" that simply counts up the character list from 0x00 to 0xFF:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0525_OriginalTextureInHex_800.jpg&hash=e8e9382f988326eb6af95d15bc1c9effe24abb96)

Anyway, a little trial and error determined what part of the file contained the image itself, and so I recreated my SC4D texture thus:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-0x7ab50e440x891b0e1a0x08f65da6_10_32_HexEdit_SC4D.jpg&hash=8c09d6153c8445e0da058643f269e299c6b168d5)

Result:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0517_WidthTestMedium_800.jpg&hash=3ff328187c7c9f09bae7beeb78f4b2dcadb0f5c4)

Beautiful!  ;D

So that's the basics of changing brush textures. A lot of the other brush textures are far bigger than the 32x32 of the flora brush, so viewing/editing them like this in Hex is a little harder, but they all seem to follow this same basic format, so I think you could apply this sort of change to any brush texture you wanted. You could also make brushes simply 32x32. There's no reason they have to be bigger that I can see other than creating more room for detail, because the brushes use a different method to scale the texture to the correct size.

Now, I didn't get such a pretty square picture without messing around with all those other properties, and I got some pretty interesting results along the way. The site being down yesterday actually gave me the chance to work out some of the last bugs, too. However, I need to get my screenshots in order first, so that'll have to wait for now.


Title: Re: Whatevermind's House of Wonders
Post by: vortext on December 09, 2012, 02:56:54 PM
Nice going! &apls

So I guess a collection of different flora brushes is soon to be expected?!  ;D

Seriously though, are gradients possible with this - apparently rather simple - fsh texture? And if so, I wonder what it'll look like.  ::)
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on December 11, 2012, 07:30:39 PM
Thanks! I don't know about a collection of brushes  $%Grinno$% but something, soon perhaps. Personally, I mostly just cover the entire city in trees, and selectively replant later as required, so I'd be making one that is a full square, and big enough to plant an entire big city with one click. However, each brush is capable of 15 different sizes, and you have pretty good control over the sizes.

I was thinking the closer zooms could be sized to more detail oriented brushes, as tiny even as 1 square, though I think you can take it as tiny as a single line of trees. I'd have to test that though. So, for a square texture, do you guys have any sizes in particular you'd find useful? Or is there a texture more useful than a square that would be worth making?

As to gradients, it is possible to write them into the textures, but the flora brush doesn't recognize them. The terrain brushes use the full range of greyscale however.

In other news, I've got the file format about 90% worked out. There's a bit near the end of the file, between the palette code and the actual RGB strings that has me baffled, but the rest is pretty straightforward. I've even charted the header parts to help keep them straight:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-FSHBrushTextureFormatSpec_800.jpg&hash=78f1a23656c167a426e0c8454a67a984fbc856b5)

Looks like the developers took the opportunity for some shameless self-advertising!  ::)
Title: Re: Whatevermind's House of Wonders
Post by: vortext on December 12, 2012, 04:22:48 AM
Quote from: whatevermind on December 11, 2012, 07:30:39 PM
Personally, I mostly just cover the entire city in trees, and selectively replant later as required, so I'd be making one that is a full square, and big enough to plant an entire big city with one click.

How dense do the forests get with this one click? I'm asking because since I reworked the brushes it takes quite some time to get at the proper density, so a bigger brush would be usefull. However, would it also be possible to have a 'stronger' brush - so to speak - which forces the individual items to cluster faster? That would be of even greater help. 
Title: Re: Whatevermind's House of Wonders
Post by: Swordmaster on December 12, 2012, 04:37:29 AM
So, that hex bitmap or whatever it is needs to be 32 columns wide to represent the texture, right? I figure you could get there with reader 1.4, but not the 0.93 version. Annoying. . .
And how many rows does this have? 31 or 32?

Anyway, I concur with Gobias that these outlying bushes aren't always desirable. So I made a perfectly round brush and got a perfectly round forest. Yay!

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.majhost.com%2Fgallery%2Fswm666%2FVarious%2Froundbrush.jpg&hash=3d9314d2f2c7a6c5cd5d97dd2a63028da57fa543)


Cheers
Willy
Title: Re: Whatevermind's House of Wonders
Post by: vortext on December 12, 2012, 04:46:31 AM
Nice work Willy! It's quite annoying indeed when flora ends up in pastures. 
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on December 12, 2012, 06:36:33 PM
Density is not controlled by the brush, that falls back on the tree controller and the Cluster/FloraParameters properties of the flora exemplars. All the flora brush does is tell the game where to plant, the game then plants in that spot according to the tree controller. The flora brush in particular is essentially binary - it understands two texture values: 0x00 (don't plant trees here) and anything else (plant trees here). Likewise, a controller that can't find flora for the height/moisture criteria would still leave a blank spot where the brush said to plant trees.

Strength is another thing the flora brush doesn't seem to understand. There is a property Comp1Strength, which is widely used by the terrain brushes to alter strength, but I couldn't come up with values for that property that had any visible difference on the brush's behavior. Certainly nothing within the usual range of values had any impact that I could see. The only thing that seems to control how fast/strong the brush plants is the computer's own abilities. There is a small, but noticeable, lag when planting an entire big city versus an entire small city. So it's not instantaneous, it will take some time.

To quote c.p. on the topic:

"Since it is so large, it will plant trees slowly, especially if you use certain custom tree controllers. But if you find some things to hold down the shift key on your keyboard and the mouse button, you can walk away from the computer and do something more interesting for several minutes while the computer busily covers your city with dense, complex forests."

Now, by using a full square texture, and ditching the shift-key requirement, I'd cut a little time out of this, maybe. c.p. kept with the default brush texture/behavior on his terrain mods, he just made it bigger. I still haven't tried this on a custom tree controller, and I am a bit concerned for lag issues. But, it should still be faster than using the standard size brushes and having to wave them all over the place for a few minutes.

Quote from: Swordmaster on December 12, 2012, 04:37:29 AM
So, that hex bitmap or whatever it is needs to be 32 columns wide to represent the texture, right? I figure you could get there with reader 1.4, but not the 0.93 version. Annoying. . .
And how many rows does this have? 31 or 32?

The default size is 32x32, but it doesn't have to be. The brush uses the Comp1Width property to determine how big the brush is. The texture image size is really just to cram more/less detail into the texture. The terrain brushes are typically larger, usually 64x64. For a solid square, it could probably be anything - though there might be restrictions, such as power of 2, etc. The way the file format is setup there doesn't seem to be any obvious lower or upper bounds to the image dimensions. When viewed 32 columns wide, there are 32 rows as well. And yes, Reader 0.93 can't go that wide, but 1.4 does. Just remember that if you do use a different image size to update the header bits to match the new size.

Nice circle, by the way  :)
Title: Re: Whatevermind's House of Wonders
Post by: Lowkee33 on December 14, 2012, 07:09:50 AM
Sweet!

The circle is a good brush, but there is an organic quality to the maxis brush that I like.

It's possible to add brushes to the menu (rather than just replace maxis), so I think a good first brush would the the solid square.  I envision something like when you are in zoom 5/6 (maybe 4), the brush places a 2x2 forest.  In this zoom, hitting control makes it 1x1 and shift makes it 4x4.  The ideal situation would have the zoom 0 make something that could cover an entire large map with trees in one click.  I'm not too concerned about the time it takes to plant all of the trees, but what I do find annoying is when I've clicked a whole bunch, and then come back later, and there are still gaps in the forest.
Title: Re: Whatevermind's House of Wonders
Post by: noahclem on December 14, 2012, 08:38:50 AM
Excellent work exploring these flora brushes  &apls  Very glad someone's taking on this project which goes so well with other things under development right now  :thumbsup:
Title: Re: Whatevermind's House of Wonders
Post by: vortext on December 14, 2012, 10:58:12 AM
Ah I see, too bad the flora brush seems to be more limited than the terrain brush. That said, a big square brush sounds like a good plan. I'd like to give that a go for sure!  ;)

Also, I noticed when treeing in zoom 6 or 5, items take longer to cluster than they do when applying the brush in zoom 2/3. Is this true or just my perception?
Title: Re: Whatevermind's House of Wonders
Post by: Swordmaster on December 14, 2012, 11:02:48 AM
Quote from: vortext on December 14, 2012, 10:58:12 AM
Ah I see, too bad the flora brush seems to be more limited than the terrain brush. That said, a big square brush sounds like a good plan. I'd like to give that a go for sure!  ;)

Also, I noticed when treeing in zoom 6 or 5, items take longer to cluster than they do when applying the brush in zoom 2/3. Is this true or just my perception?

My perception as well, although I always thought this had to do with the processing side of things. Takes longer to process all tree clustering in higher zooms.

Cheers
Willy
Title: Re: Whatevermind's House of Wonders
Post by: vortext on December 14, 2012, 11:26:24 AM
Quote from: Swordmaster on December 14, 2012, 11:02:48 AM
My perception as well, although I always thought this had to do with the processing side of things. Takes longer to process all tree clustering in higher zooms.

Hm yeah, good point. I could use a facepalm emoticon now. . .  ::)
Title: Re: Whatevermind's House of Wonders
Post by: epicblunder on December 14, 2012, 11:55:41 AM
sonuvafish!  how have i missed this thread?!

This is some very interesting work.  I too would be interested in the square brush, and trying out a brush large enough to cover a whole city tile (despite the fact it would make my computer create smoke  ;D)
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on December 16, 2012, 06:32:13 PM
Quote from: Lowkee33 on December 14, 2012, 07:09:50 AM
It's possible to add brushes to the menu (rather than just replace maxis)

How? Is it as simple as changing the IID (and icon/Ltext if desired)? I guess I'll try that and see what happens.




Ok, so updates. I've made the full square texture and worked out the brush sizes. Zooms 1 and 2 are full coverage sizes, while zooms 3, 4, and 5/6 are sized for detailing. I still have to test them to make sure they work as advertised, but it's mostly a formality, that part's all pretty straightforward.

I've also been playing around with the color palette for the file format, and it appears that it does support any 256 colors you want to code into it, not just the default greyscale. So I made something seasonal:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-0x7ab50e440x891b0e1a0x08f65da6_10_32_HexEdit_Colors_zpsfd113d64.jpg&hash=55b6bdfaa4d7f1a8f27e4a1789029ba978b8d3e7)

I doubt colors have any impact on the brushes themselves. In the case of the flora brush, they should still be interpreted as "plant trees", but if you define a color at 0x00, I don't know which way that would go. For the terrain brushes, it would probably treat them as equivalent to a grey, and assign an intermediate intensity to that pixel.

I had also mentioned a few posts back about controlling the spin of the brush. This turned out to be a somewhat messy property to work with, since there's a few different things going on there. The default behavior of the flora brush is to spin as long as you hold the mouse button down. These pictures were taken using the SC4D texture from a few posts above, after I had figured out the texture format and gotten it to work. The brush will spin:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0511_DefaultBehavior_zps795d105f.jpg&hash=b4e3645e0bcc6be9fb316127ea4a7b445117751c)

Until it has rotated through a full circle:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0512_MaxDecalEtcstillspunafullcircle_zps35006207.jpg&hash=0dba5a427787459b24de23e84544b0bd1abe4253)

The property that disables/enables spinning is Comp1AlignedWithMouseMoveDirection. The default setting for this property is False, but when you set it to True, the brush now points however your mouse is moving, and also stops spinning when you use it. When you look at the full range of terrain brushes, some have True as the default, and some have False. Because brushes can have multiple components, you could also have one that moves with the mouse, and another that does not. The trick with this setting though is that the game is very sensitive to the mouse movement direction, and the results aren't always predictable. Sometimes, when I thought I'd get it to plant aligned with the city square, it planted at a diagonal instead, and vice versa. I've found though that just making sure to move the brush back and forth a few times in the desired direction before clicking usually produces the desired direction. Usually.  ::)

No worries though, the full coverage sizes of my brush are sized to handle being placed on the diagonal as well, so it shouldn't matter how you point the mouse, just try to aim for the center of the city.  :D

While I was trying to figure out spin, I found two other exemplar properties that look like they would affect spin as well. The first, Comp1MaxDecalRotation, is not actually used by any of the Maxis brushes, and doesn't appear to actually do anything when you do use it. There are actually a bunch of "Decal" related brush exemplar properties, and they generally don't seem to be used, so perhaps they are leftovers from game development that were never removed.

The other property is TypicalBrushAngleIncrement, which is actually found in the Terrain Exemplar. According to the Reader definition, this defines an angle, in degrees, that the brush spins between successive applications, and the default is 0.5. There are five values defined, one for each zoom. Theoretically, this should control how fast the brush spins, but I haven't actually tried out different values to see what it does. Maybe someday. Also note that this should effect every brush in the game. I also wonder if the values aren't actually in radians, because 0.5d is a really tiny angle, it would take 720 iterations to trace a circle at that rate. Of course, how does the game define "successive applications", that plays a big role in what that value would have to be.


Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on December 26, 2012, 01:23:15 PM
Quick update here, folks. I've tested and tweaked and tested and tweaked the brush sizes, and I think I've found some that work well pretty universally. Zoom all the way out and you get full coverage, while the closer zooms are set up for detailing/infill planting. The tiniest brushes are heavily influenced by clustering effects. So, while the brush might only paint one tile wide, the trees might end up 3 tiles away for a big cluster. Still, I kept the tinier brushes in there, because for grasslands/meadows, evergreen forests, etc. where they do cluster tightly, you can get very thin strips of flora. So, from a functional standpoint, things are essentially done. All that remains is to wrap it all up into a tidy package.

I've also played around a little with setting up this brush to be in addition to the Maxis brush, instead of a replacement, and it's a lot more complicated than I had guessed. As far as I can tell with what research I've done, it would require modding the UI to create a submenu for Flora tools. I'm still trying to get a sense of just how big a project that would be. If anyone does know how to do this I'd love to know.
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on January 12, 2013, 04:34:23 PM
Woohoo! Triple post!  :P

So, I've finished up this mod, and opened up a LEX candidacy, so hopefully in the near future you should all be able to plant forests in plentiful abundance with the optimized standalone flora brush. Compatible with all known tree and terrain mods, coming soon to an exchange near you!

I ended up simply setting it as a replacement to the Maxis flora brush. I haven't run into any roadblocks so far with tweaking the UI to make it into an additional brush, but working on the UI is intensely tedious, and I didn't want to let that get in the way of getting this mod released. I may still pick away at the UI and see where I get, and if I can make multiple flora brushes possible, I'd probably just release it as a separate mod, and update this one if necessary.

So, want some pretty pictures? Here's the brush in action (animated gif, I'm to lazy to make a movie  $%Grinno$% )

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-BrushInMotion_zps66b31238.gif&hash=b1230084a68e2de9887e50793cc9be6e3ebdfff6)

That's the brush at full zoom out on a large city, no tree or terrain plugins. It actually moves a little faster than that on my computer, but it gives you an idea of performance.

And here's a little something from the blooper reel:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img1188a_zps2f0409e0.jpg&hash=3e8d45652bbb3c2f3822d5a57410b9d6dbd116cd)

I was testing it with custom terrain and trees, but was missing the prop mega packs that contained some of the trees.  Sure makes things easier for the cardboard industry though!  :P
Title: Re: Whatevermind's House of Wonders
Post by: jmyers2043 on January 12, 2013, 05:52:52 PM
Works pretty good. I planted a large city and didn't have to wave my hand around and about. Although, I didn't see it plant a small square. I'll do a small city tomorrow and experiment with brush sizes.

- Jim

Title: Re: Whatevermind's House of Wonders
Post by: Swordmaster on January 13, 2013, 05:19:26 AM
I'd love to get my hands on this. Curious to know how it behaves. Well, by the looks of it.


Cheers
Willy
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on January 16, 2013, 07:18:39 PM
It's official folks! Now on the LEX!

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-OnTheLEX_zpse54c20e7.jpg&hash=8e7305a72b4f5161f538e3bedbbe8046f4298825) (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2882)


&dance &dance First upload !!!  &dance &dance
Title: Re: Whatevermind's House of Wonders
Post by: Serkanner on January 17, 2013, 09:31:24 AM
Congratulations!  &apls

Very nifty mod. I almost always fully forest my maps so this will make life a lot easier.
Title: Re: Whatevermind's House of Wonders
Post by: xannepan on January 17, 2013, 09:34:55 AM
Thank you very much for this great and very useful mod!
Title: Re: Whatevermind's House of Wonders
Post by: Kergelen on January 19, 2013, 08:32:33 AM
Very useful. Thanks! :thumbsup:
Title: Re: Whatevermind's House of Wonders
Post by: Dantes on January 19, 2013, 09:40:34 AM
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img1188a_zps2f0409e0.jpg&hash=3e8d45652bbb3c2f3822d5a57410b9d6dbd116cd)

-> haha, the kingdom ob boxes  :D Fantastic picture an something of art  :P
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on January 20, 2013, 06:41:10 PM
Thanks for the kind words! Hopefully it'll be a useful tool for years to come.




So, I had mentioned some time ago about getting into some of the other properties in the terrain brush exemplars, and then never quite finished up with that. There are three more properties of note to this exemplar (and probably a few more that I just haven't bothered with yet).

The first I actually brought up over in xannepan's thread, since it relates to his work there, which is Comp1IDOfEffectToPlace, which defines the Group ID and Instance ID of an effect to be created by the brush. This is used by the fauna brushes and the rain tool, but certainly could have other uses, too. The GID and IID it contains reference an effect from section 14 of the EFFDIR.

The next two are somewhat interrelated and define what the brush actually does. These are Comp1BaseTextureVal and Comp1OperationID. Comp1OperationID is actually pretty straightforward, as it controls what type of brush you are using, for example: flora, terrain, erosion, smoothing, fauna, etc. Values for this property are given as 0x0000000X. For brevity, I'll refer to them simply in 0xX format.

The possible values for Comp1OperationID are:

Theoretically, values higher than 0xA could be possible, but Maxis doesn't use them, and some quick tests didn't seem to reveal any higher values that did anything.

Comp1BaseTextureVal is a slightly more complex property, and it's purpose is to tell the game how to interpret the brush texture. There are only three values for this that are used by Maxis, and it only works on certain brushes, particularly the terrain (Operation ID 0x0 and 0x8) brushes. In the case of these two brush operations, this value determines whether the brush makes hills or valleys, or both. The values are as follows:

Grey in brush textures typically places that area under a medium strength, and presumably the closer that grey value is to either 0x00 (black) or 0xFF (white) determines how that pixel is interpreted by this property. I haven't tested that at all though. It's also possible that other values work, but probably still on a linear function between those three known values.

So, let's get into some pictures of these things at work. These were all tested using the SC4D texture I made, shown again below for reference:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-0x7ab50e440x891b0e1a0x08f65da6_10_32_HexEdit_SC4D.jpg&hash=8c09d6153c8445e0da058643f269e299c6b168d5)

Since many of the Operation IDs are used in Maxis brushes, I tried, for the sake of testing, to maintain Comp1Strength values similar to that used in the Maxis brushes for each operation, and this definitely helped make the effects more visible, as some of the brushes can be very sensitive (or insensitive) to small changes in strength.

Operation 0x0:
This is the basic terrain brush, useful for mountains, valleys, etc. I tried it with all three values for Comp1BaseTextureVal. It is very sensitive to strength, and works very fast. Combined with BaseTextureVal 0x00:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0551_Operation0strength01Base0x00_zpsb7f610e0.jpg&hash=686b7f97c789b4f685555b880ace37ea624b63c0)
With BaseTextureVal 0x80:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0577_Operation0Base0x80_zpsd20fff94.jpg&hash=254206769e365f0125e99c9cb20874d85a19dba7)
With BaseTextureVal 0xFF:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0576_Operation0Base0xFF_zps70a78881.jpg&hash=67ca38de870aea564aa234aba1b42b3d9df3c1bf)

Operation 0x1:
This is the flora brush. Comp1BaseTextureVal does not have any effect on this brush.

Operation 0x2:
This is the basic smoothing brush, also used for plains, etc. On level ground it does nothing, so I had to make some hills first to see what it could do.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0553_Operation2strength1after_zps65f57d96.jpg&hash=bddcea787d563477131c5e00520716565078168a)
That's not the clearest, but it is a gentle brush by default.

Operation 0x3:
This doesn't seem to be used. Maxis doesn't have any brushes that use this value, and I couldn't get it do anything.

Operation 0x4:
This is used for the fauna brushes. Simply setting the OperationID to 0x4 doesn't really do anything, I think the functionality of these brushes is really controlled by the effects they generate. The fauna brushes also have a few extra properties that I haven't looked into that probably play a role as well.

Operation 0x5:
This is the leveling brush. The operation is similar to 0x2, but stronger. First, I created some hills to test it on:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0560_Operation5strength4hill_zps6688adcf.jpg&hash=305a15ef33891a22b2c3f49ec19f1b8d8d3ebb6c)
Then I put some water in the middle and ran it again:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0561_Operation5strength4water_zpsc8f36c33.jpg&hash=edfbe297593ed351652e94d6dc9370d1e163d777)
It just grabs whatever terrain elevation is at the center of the brush, and applies it to whatever parts fall under the texture.

Operation 0x6:
This is the erosion brush. It appears to work over an area the size and shape of the brush texture, but doesn't seem to actually use the texture pattern itself. It just erodes everything that falls under the brush.

Operation 0x7:
This one is a weird one. It's not used by Maxis, but it appears to change the texture of the terrain. I call it "scorched earth" from the resulting appearance:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0574_Operation7_zps4fdb9426.jpg&hash=713676a08a6d8fcd285bbf792cbfb6474335c3de)
This pattern doesn't show up until you release the mouse button, and it is not saved by the game.

Operation 0x8:
This is also a terrain brush, similar to Operation 0x0. The only difference between the two seems to be that this one works more slowly. It has the same interaction with the BaseTextureVal property as Operation 0x0 does.

Operation 0x9:
This is the rain tool. It only seems to work if the Comp1BaseTextureVal is set to 0xFF. It's hard to describe how this one works, but the picture below shows it in use.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0581_Operation9_zpsab53cb6c.jpg&hash=9ff3da6786235e6aec77fc047caac37bf0a9991a)
This is a temporary effect, and just about anything will erase this, including terraforming over it with other brushes. This effect is not saved.

Operation 0xA:
This is supposedly the "spring" tool, but I couldn't get it to do anything. The Maxis brush for this tool isn't actually in the game, though it is set up to essentially work a strong pinpoint (less than 1 tile wide), and lower the terrain at that point. Whether it's meant to be a sinkhole or an attempt at surface water isn't clear since it doesn't seem to work.

So, that pretty much wraps up terrain brushes. There's a few unsolved mysteries left in there, and a few more that could use further research, but I think with these basics, just about any sort of terrain brush could be created. The ability to layer brushes into the same tool also opens up a lot of possibilities, for example having Comp1 do one thing, and Comp2 something entirely different.
Title: Re: Whatevermind's House of Wonders
Post by: epicblunder on January 20, 2013, 07:49:53 PM
Loving your terrain brush so far, it's quite the timesaver!

Quote from: whatevermind on January 20, 2013, 06:41:10 PM
Operation 0x7:
This one is a weird one. It's not used by Maxis, but it appears to change the texture of the terrain. I call it "scorched earth" from the resulting appearance:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12011-img0574_Operation7_zps4fdb9426.jpg&hash=713676a08a6d8fcd285bbf792cbfb6474335c3de)
This pattern doesn't show up until you release the mouse button, and it is not saved by the game.

I would be very interested in this.  At one point i was working on making paintable MMP snow using Lowkee's textures but i could never get a result i liked well enough to release (because i suck at BATing alpha maps, couldn't get good edges and patterns).  Would it theoretically be possible to make a brush only cover a small area and point to a snow texture? That would be awesome.
Title: Re: Whatevermind's House of Wonders
Post by: Swordmaster on January 21, 2013, 04:03:38 AM
I'll need to read through this again when I have the game at hand, but could any of this knowledge be applicable to make ports and docks more easily? Something like the draw function in terraformer, I guess.


Cheers
Willy
Title: Re: Whatevermind's House of Wonders
Post by: jmyers2043 on January 21, 2013, 05:18:02 AM
Quote from: Swordmaster on January 21, 2013, 04:03:38 AM
... but could any of this knowledge be applicable to make ports and docks more easily? ....


Cheers
Willy

Whoa! that would be very handy!

- Jim
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on January 21, 2013, 08:05:40 PM
Quote from: epicblunder on January 20, 2013, 07:49:53 PM
Would it theoretically be possible to make a brush only cover a small area and point to a snow texture? That would be awesome.

Like this (http://community.simtropolis.com/files/file/18216-smp-terrain-texture-brush-pack-01/)? I had forgotten all about that thing, but when I read your post, I remembered Lowkee posting (http://sc4devotion.com/forums/index.php?topic=14717) about the same thing. Anyway, I downloaded the mod and tested it and it works as advertised. You could of course replace the snow textures with some of your own choosing. And you should be able to get enough from my earlier posts here to set up the size and shape of the brush to your own liking, but I'd be happy to answer any questions.

Quote from: Swordmaster on January 21, 2013, 04:03:38 AM
...could any of this knowledge be applicable to make ports and docks more easily? Something like the draw function in terraformer, I guess.

That would be nice indeed!  ;D  But I don't think I've seen anything in the brush exemplars that could create such a tool. The problem is having something that can create terrain at a specific elevation (absolute, or relative to sea level) that the tool could be based off of, and I can't think of anything I've seen in game that can do that. Bridge approaches can do that, no idea how to tap into that function though.

Title: Re: Whatevermind's House of Wonders
Post by: Swordmaster on February 08, 2013, 08:40:03 AM
I've got a new challenge for you - as if you didn't have enough of them already :D

I've been trying to figure out the shadow texture (7AB50E44-1ABE787D-69D3A23B in SimCity2.dat). It looks like it's a similar type of FSH that I can only edit in HEX mode. Can you find out if it's possible to make a new texture like this which is blank? So we can assign this new texture to flora we want without shadows (http://sc4devotion.com/forums/index.php?topic=13548.0)? I've been trying to do this but I can't get my head wrapped around how the FSH is coded. Besides, both versions of reader don't reliably display the color version of the FSH.


Cheers
Willy
Title: Re: Whatevermind's House of Wonders
Post by: memo on February 08, 2013, 12:24:00 PM
Willy, are you sure it is not an ordinary FSH texture? Actually, there are FSH files the reader cannot display properly. Though, you can export them as usual (see attachment).
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on February 08, 2013, 05:29:50 PM
A new challenge!  ;D

Well, it looks like a mostly normal file as far as I can tell. There's something extra going on with it near the end of the file, but I'm not really sure what, it's not a palette in the same manner as the brush texture file types.

Either way, from what I gathered poking around the file, I made two versions of it that should be blanked out, and I've attached them. However, they are untested since I don't know how this file is used and what references it. I'm betting you do have some way of testing them though.  ;D

The one version is simply a blank FSH file, the other includes an offset. The original file has an offset, so I figured I'd create a version with the same offset as well just in case that is critical to functioning.

I'd be very interested in how this turns out and if these things work for you.



Edit: I saw that this texture is referenced by the flora exemplars while working on some today, so I tried these textures out, as well as a few other variations on them - and none of it seemed to have any effect on shadows. I even got rid of the shadow properties altogether and the trees still had shadows.
Title: Re: Whatevermind's House of Wonders
Post by: Swordmaster on February 10, 2013, 05:28:04 PM
Thanks! You're right, apparently the property is not functional. Too bad, this could have been interesting. Maybe they're used with software rendering, but for some reason this mode is usually very buggy for me.


Cheers
Willy
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on April 20, 2013, 10:52:07 PM
A question for all of you out there. I'm working on something that "requires" some modifications to the Rewards LUA, and unfortunately, you have to replace the entire thing anytime you mod it, you can't just replace those sections that you want to change (or at least if you can I can't seem to make that work).

So, I'm wondering if anyone knows of any mods out there that replace the Rewards LUA file. I'm already aware of Mr Truesage's City Hall Mod, but I'd love to know if there's others out there that I might have to take into consideration if this ever gets to a public release.
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on July 13, 2013, 02:14:42 PM
It's been a while since I've posted here, but it's not for lack of messing with things. I've just mostly been doing more maintenance type stuff, no real release potential, nothing that hasn't already been done, etc. Something a little different today though.

I had mentioned a while back, prior to releasing my flora brush mod, about trying to get multiple flora brushes to work from the flora brush button in the God Mode menus - which is essentially the same thing as taming the mythical beast of custom submenus. I never did get very far with it back then and ended up releasing the mod as a replacement for the Maxis brush, and didn't really pursue the idea any further.

Well, the other day I came across this post by GoaSkin (http://sc4devotion.com/forums/index.php?topic=2917.msg94394#msg94394) that got me thinking about the custom submenus again, and so I fired up the old project and dug a little deeper to see what I could find. Working with terrain brushes in the God Mode landscaping menu, since I had a lot of those pieces already laying around, I mapped out the menu structure and tracked down as much of the parts of it as I could find and ran a few tests, etc. Long story short, I came to the same conclusion that everyone else seems to have done - that it's not really possible to create custom submenus.

I was able to add new tools to existing menus, as you can see below:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2F12007-NewToolsInMenus_zps30f5b781.jpg&hash=6f3378024fea89b48ad423912e24de2965c4ed99)

That's all been done before, such as in the extra terraforming tools mod; it was really just to prove that at least the "adding new things to menus" concept/process worked as expected.

But attempts at linking a new menu to the flora button failed to do anything at all, even break the default menu structure. So, it's entirely possible I just missed something along the way, but everything I could find seemed to point to the old conclusion that there's just something in the EXE that we can't get to that is necessary to generate new menus. I suspect that it is either an exemplar or INI linking submenu keys to particular menus (as suggested by NetPCDoc (http://sc4devotion.com/forums/index.php?topic=15374.msg442584#msg442584)), or more likely from what I've seen of the menu file structure, a set of "button exemplars" in the EXE that are linked to particular buttons in the UI and define the button's function - whether to tie it into a particular tool, or fly out a submenu, etc.




On an entirely different topic, that question in my last post about the Rewards LUA still holds, I still haven't found any other mods that replace that file, but I'd be interested to know if they exist.

Title: Re: Whatevermind's House of Wonders
Post by: Simmer2 on October 02, 2013, 07:57:47 PM
Hello whatevermind.
Great work I see, however after installing your mod I noticed that every single oak in my cities are now brown boxes.
I did not save the game and exited the game, I then proceeded to remove your folder and when I reentered the game all the oaks are still brown boxes:(
I reinstalled your mod again and when I use the tool it just drops brown boxes.

Please help.

Sim2
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on October 02, 2013, 08:38:40 PM
Did you install anything else at the same time? There's nothing in my tree brush mod that should change what trees you see - it just changes how big or small of an area you plant at once.

I'd try the following to make sure:

If you still have problems, please let me know. If you can get a screenshot as well that might help. Otherwise, if that works, then the problem is something else in your plugins. Good luck!
Title: Re: Whatevermind's House of Wonders
Post by: catty on October 03, 2013, 01:31:42 AM
Quote from: whatevermind on July 13, 2013, 02:14:42 PM
...Long story short, I came to the same conclusion that everyone else seems to have done - that it's not really possible to create custom submenus....

I did have a go ... quite a few years now at trying to replace the MySim menu or at least some of its menus I gave up in the end, but still do wonder as you can add more MySims and Vehicles to the various tabs if instead of them you could add something else in their place  :'(
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on December 29, 2016, 01:18:22 PM
 &hlp NEW ITEMS ON THE LEX!! HOT AND FRESH LOTS FOR YOU!!  &hlp

Hello everyone! Hope you've all had a great 2016...and 2015...and 2014...and...how long has it been? Anyway, I have some new uploads for you all, some garbage facilities I made a few years ago and have finally gotten around to uploading. All told, there's three lots in this upload, a Garbage Export Facility that's meant to replace your landfills; a Recycling Center; and a Waste-to-Energy Plant. All of these are basically replacements to the in-game facilities, but with higher capacities, and better looking.

So, what's the backstory on these, you ask? Well, it goes like this. SC4 does a terrible job handling garbage removal. Or well, it's very good at it, but it wants you to stash your garbage in ever growing landfills. People started working on other ways of dealing with trash almost as soon as the game was released. Some people put it on boats to float forever in SimOcean. Some people ship it out of town on trains. Some people simply drop it over the edge into the Abyss. I've tried them all, and they work great, but I wanted a fourth option.

I liked the idea of the rail export facilities from SFBT and Twrecks, but often had cities without railroads, and while you can stick those lots on the edge of the city and fake the look, that bothered me. So, inspired by their great works, I set out to create a series of road-based garbage export facilities.

The results are:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2Fimg5764_garbage_600_wImages.jpg&hash=558dc72f1cbfecd8b4e183ec0f9f84f1d4b08c0a)
The Garbage Export Facility
This lot replaces your landfills. Garbage trucks come here to drop of their loads, which are then sorted and reloaded onto new trucks, which take the garbage to distant points to be disposed of. It is a corner lot, as it has vehicle access on two sides. One of these beauties will handle a city up to about 200,000 residents, particularly in combination with the recycling center.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2Fimg5768_recycling_600_wImages.jpg&hash=2bb0d0c67b9feeb58b32a6044877b48dd1900091)
The Recycling Center
This lot replaces the default in-game recycling center. It does basically the same thing as the default building, but it has higher capacity and looks more realistic.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi1129.photobucket.com%2Falbums%2Fm503%2Fwhatphots%2FMods%2Fimg5771_incinerator_600_wImages.jpg&hash=40cc04fda69f0e68f320ed5e1621d0c7ce1cc0d7)
The Waste-to-Energy Plant
This one was basically created just to fill out the set, but if you use W2E plants, it's a helpful addition to the family. If you'll notice, those blue trucks from the export facility, loaded up with incineratable garbage, come here to drop it off for burning. It's all a very efficient system.

Typically, I use one export facility and one recycling center in my cities, and in the larger cities add a second of each, and it has been solving all my garbage problems for the last 2-3 years without fail. The W2E has been less extensively tested since I don't often use them myself, but I still ran it through the usual gamut of tests and it performed exceptionally well.

Special thanks to Marrast, cnut, and jestarr, who's excellent BATs are used on these lots.

So, where is it, you ask!?!?! Well, it's right here http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=3471, on the LEX, so come and get it!

Enjoy, y'all.
Title: Re: Whatevermind's House of Wonders
Post by: Vizoria on December 29, 2016, 01:22:13 PM
I like how these lots use older textures but still look good.
Title: Re: Whatevermind's House of Wonders
Post by: compdude787 on December 29, 2016, 10:34:12 PM
Wow, welcome back!! I'm going to be downloading your stuff shortly!
Title: Re: Whatevermind's House of Wonders
Post by: brick_mortimer on December 30, 2016, 12:30:48 AM
Thanks for these beautiful lots  :thumbsup:

I like the 'generic' Industrial look and the way they can blend in (without heaps of garbage etc.).
Title: Re: Whatevermind's House of Wonders
Post by: FrankU on December 30, 2016, 02:02:53 AM
Very nice lots indeed!
I mostly use one large waste to energy lot. It is an old one and considering the stats it should be called a cheat. This set is nicer.
Title: Re: Whatevermind's House of Wonders
Post by: whatevermind on December 30, 2016, 06:14:11 PM
Thank you all, and you're most welcome! I hope these lots come in handy!  :)
Title: Re: Whatevermind's House of Wonders
Post by: vinlabsc3k on December 31, 2016, 12:39:20 AM
I like very much this LOTs, but they are too clean and small for their category.


Happy New Year!!