LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod

Author Topic: Zero7's experiments with generators and attractors (lua and occupant groups)  (Read 1831 times)

0 Members and 1 Guest are viewing this topic.

Offline zero7

I posted in the untamed wildlife thread about my experiment to create a fauna generating lot, but I've started looking at the attractor/generator system in areas beyond wildlife so I thought a new thread was appropriate.

So, continuing from my previous notes understanding of the attractor/generator system appears to be correct.

Using the fauna generating lot that I used in the last experiment I had a steady stream of assorted animals appearing.  I then changed maxis.lua to increase the strength and radius of attraction and added the Building: Maxis occupant group to another lot.

Most animals wandered randomly as fauna generally do, but any llama that was created made a beeline for the attractor lot.  Success  :).

The next step in this experiment is to create an occupant group and associated lua script for each animal type.  This will allow us to create lots that generate a specific animal.  After that I'll look at the attractor side again to make the attraction dependent on the time of day.

Not wildlife related, but part of the same system ... I'm also playing about with worship.lua.  At the moment it attracts worshippers to any building with Building: Worship occupant group on a saturday and sunday. I've changed my worship.lua to take effect on Sunday only (as the only religious buildings in my current region are churches) and am going to create an equivalent that attracts on a Friday that can be attached to mosques (Friday prayers).

Call me Richard