SimMedieval

Post Info TOPIC: Things to look into...


Lord

Status: Offline
Posts: 216
Date:
Things to look into...
Permalink   
 


1: - Further animal control


This is a post of zero7's from 2007 that I came across: 

xx.gif
« on: 26-08-2007, 20:03:16 »
Reply with quoteQuote

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 ...my 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  Smiley.

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).





There were no replies so I pm'ed him and got this further info:

"Hi

It's a long time since I looked at this and I didn't complete my investigations.  A good starting point for what you want to do would be to look at one of the school LUA scripts.  For what you are trying to do you need to look at the 'attractor' block of code.

You'll see that there is a calendar block that controls days and times and for each time there's a strength value.  The range is -1 to 1 where 1 is the maximum attraction - this pulls kids to the school and then at the end of the day it is -1 which 'repels' them away from the schools again.  This is basically what you are looking to do with cows and, presumably, a milking shed.

The bit I'm very sketchy on now is how I got it to work for just llamas - although Maxis.lua may have been chosen as it is already set up to attract llamas.  If that's the case you could probably change it from llamas to cows quite easily assuming there are cow automata.  You'd then give your milking shed the Maxis occupant group.

Sorry for being a bit vague, but hopefully it will point you in the right direction."



So the first thing I was thinking of were cows that came to be milked at a particular time; or any livestock that came to feed at a trough at a particular time of day. I think these sort of effects would add a lot to give the animal automata some variation. What else could be done...?  


__________________


Serf

Status: Offline
Posts: 10
Date:
Permalink   
 

I've looked at all the lua scripts as it is these scripts that also control rewards.

The generators and attractors work on any of the automata. Only problem is there is not much domestic, no pigs, no chooks, no sheep or goats. Most is wild and again not much of it.

These are all animations and that was the problem I think when you see all the posts about horse and carts etc. easty to make static stuff not so easy to make animated stuff.

Maybe the files are re-wrapped gifs, because reader give the option to save them as gifs. we'll have to see.



__________________


Lord

Status: Offline
Posts: 216
Date:
Permalink   
 

but can new animations be brought into the game?

What we really need is pigs. I know there is the Bitmap animation builder but I don't know how it works yet. I assume/hope there will be a way to bring a walking pig animation into the game...

But we do have cows at least. I'm keen to at least see what the effect of attracting the cows in to feed would look like.

__________________


Serf

Status: Offline
Posts: 10
Date:
Permalink   
 


You make a feed lot and I'll write a lua script and we'll see if we can get it to work.

__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us
Members Login
Username 
 
Password 
    Remember Me  


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard