Fixing broken Mayor Mode Ploppables

Started by Andreas, March 02, 2009, 01:56:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Preface: I posted this tutorial yesterday at PEG's place, but unfortunately it got deleted together with my message to resign from the staff, which ultimately lead into a complete ban at that site. Since I put a lot of effort in writing this tutorial, I shall post it here, as there are quite a few Mayor Mode ploppables around that might bear one or another problem that is described below - even I made some of this mistakes in the past, as i wasn't understanding the flora properties completely at that time.

Remember the Ploppable Mayor Mode stuff that caused us so many headaches across several weeks some time ago? Tree stumps, and even construction equipment was placed on high mountains while using the God Mode tree brush and with PEG's mods installed. I tried to help PEG to identify the issue, but I was quite busy back then, so I wasn't able to perform a proper research myself. As my own knowledge in that field was limited, I did the obvious - I was simply asking someone who should know. So I contacted Cycledogg, creator of many terrain and tree mods himself, and after a while, he replied me with a nice explanation of the properties that control both God Mode and Mayor Mode flora. Let me show you what he told me, and why PEG's Mayor Mode items still don't work properly in some cases (click on the screenshots for full size).

Here's a screenshot of one of PEG's files, opened in the Reader. I highlighted the first flora exemplar file and marked the three most important properties that control both God Mode and Mayor Mode flora. First, there is the kSC4FloraPreferencesProperty, which is a collection of 256 different values. These values are divided into groups of 16, and each group represents the distribution probability of God Mode flora items depending of height and moisture level of the terrain. By editing this property, you can control up to which height God Mode flora appears, and more. If you don't want your Mayor Mode flora appearing in God Mode, all REPs have to be set to 0 (more about that below).

Another property that seems to control where the flora shows up is the Flora: Wild property - this is something that PEG suspected during his attempts to fix the error, but it was not the only cause for the problems that were reported. Maxis referred to the God Mode flora as "wild" flora, but it appears that this is more a marker than anything else, since the kSC4FloraPreferencesProperty comes into play as well.

Finally, the kSC4FloraFamilyProperty adds the flora item to a prop family, this was also a property that PEG deleted in a deliberate attempt to fix his mods. Actually, this property is the cause for another bug that has been reported over the time - back in the times when the first custom Mayor Mode Ploppables were released, people reported that those appeared on the Maxis city hall lot as well. I had a look at the issue back then and created a quick fix - which simply removed the flora prop family from the city hall lot, so the existing Mayor Mode Ploppable mods wouldn't have to be fixed immediately. As mentioned above, I did the same mistake by not removing said property back then.

But let us continue with PEG's mods. As I said above, for any Mayor Mode Ploppable that shouldn't show up in while using the God Mode tree controller, the kSC4FloraPreferencesProperty has to be set to zero. PEG didn't do this, apparently because he simply copied an exemplar file from somewhere else. I had a closer look at the exemplar files and discovered a curious thing:

As you can see, the second exemplar file actually has set all REPs of the kSC4FloraPreferencesProperty to zero, which should make this flora prop a Mayor Mode Ploppable exclusive. But now look at the User Visible Name Key property. To my surprise, this property points to an LTEXT label that is part of Cycledogg's Columbus Tree Mod - it's the ID for the "Subalpine Fir" label, as shown in the picture below. Actually, the LTEXT labels for the subsequent exemplar files are not necessary at all, since the game only refers to the first one of a plop cycle (you can click with the mouse several times without moving it for getting other props, similar to the NAM's TAB feature for intersections and puzzle pieces).

If you encounter User Visible Name Key properties that point to a completely different LTEXT file, you should remove them completely, except for the first exemplar file of a plop cycle. It can be identified easily, because it has a reference to the menu icon (Item Icon). The last exemplar file of a plop cycle is the one that doesn't have a Flora: Cluster Type property, as this contains the ID of the next flora prop in the plop cycle. For more information about creating Mayor Mode Ploppables, please refer to Jeronij's Tutorial.


Dear Andreas,
I hope you can help me!

I have had this problem with Pegasus' Construction Equipment mod.

I have written about him in Pegasus' site here:;topicseen#new

Pegasus has updated their files several times, but none of his arrangements have solved the problem.
And I do not think his solution is correct, either ... that mod is called logging.
If I add that one to my plugins, I have on my computer logging forests instead of construction equipment ... I did not want.

I have tried to understand what you have written, and I for the first time, even used Reader to view the files.
I do not know if I'm allowed to publish Pegasus' mod here, but I wonder if I can help to see the changes I made.
I want to be sure that I have not screwed up the files even more.

Thank you,



I do have PEG's mods on my HD, back from the time when he was trying to fix them. Now that I know how to fix the problem, it shouldn't be too hard to update the files. As I got banned from PEG's place (see the full story here), I cannot post anymore over there, but I will help you here. Please PM me with your e-mail address, then I can send the corrected files to you, as PEG's EULA doesn't allow me to publish them at SC4D.


Thanks, Andreas! :)
I just sent you a PM.