Buy a villager

Discussion and help with creating scenarios and campaigns in the Editor
Tinkerbell
Posts: 5415
Joined: Fri Sep 07, 2007 3:42 am
Location: San Diego, California
Contact:

Buy a villager

Postby Tinkerbell » Thu Aug 14, 2008 6:34 pm

I'm trying to get a buy a villager function to work properly, but I am having trouble. So far, it looks like it can be beaten, cuz it only stops when the huts are built. Also terrain geography apparently is a problem.

What I want is to give the player X new villagers ~ period

So far, I have tried changing the area size, delays & the min/max (really don't know what this one does).

The biggest problem is that the results are not consistent & can be beaten by having more unpopulated buidings available.

Any hintz out there?

sakasiru
Posts: 1968
Joined: Thu Jan 17, 2008 12:26 am
Location: Germany

Postby sakasiru » Thu Aug 14, 2008 7:56 pm

I´m not sure what exactly you want and where the problem is. Can you explain it again for a not-native speaker? :o
What condition do you want for your villagers to show up?

This is how I created the new villagers in Exile:
If (condition is met)
then "effect: create villagers"

The effect:
1. Go to Area: design an area. I never tested this, but I think it´s better if it´s not already built upon, since villagers don´t settle on roads. In exile, I made the area over the hills. Name it "Area 1".

2. Go to Objects: Select "units": villagers (Im not sure how this is called in the english editor. It´s in the second box from which you can select something), the number you want, and check "in Area 1" I always made 5 male and 5 female villagers by each setting min and max to "5".
I tried huts too, but that made huts without villagers, so make sure you create the people units. Name this object "new villagers"

3. Go to Effects: Select objects: create "new villagers". Name this effect "create villagers".

4. Go to Triggers: You can now select "create villagers" as an effect.

This trigger will create 5 villagers that show up in your area, wander around a bit until they find a spot and then settle down if there is ground to build a hut upon.


As for the condition, I´m not sure what you want, so please explain, maybe I can help you.
Last edited by sakasiru on Thu Aug 14, 2008 8:43 pm, edited 1 time in total.

Yahya
Posts: 1544
Joined: Tue Jul 20, 2004 11:09 pm
Location: The Ocean State

Postby Yahya » Thu Aug 14, 2008 8:35 pm

Hey Tink,

It sounds like you just want to grant X new villagers at some point in your scenario, correct?

Sakasiru's procedure is right on, but describes adding villager people, and I think you want hovels, right?

If so, you have to choose an Area first. You can make it the entire map if you like, that way they can build anywhere.

Then you have to make an Object. Give it the criteria previously mentioned, but set your min/max to X. If you want to add 25 hovels and exactly 25 hovels, make both min and mix equal 25. If you want something more random, you can make them min=10 and max=30, for example, and the game will pick a number in there.

Once that is done, you have to make a "Create Object" effect. Have it create the Object that you made, in the Area that you made.

Then the trigger gets made, and it should work.

You mentioned that having unpopulated buildings is a problem, but I don't understand. If you are adding villager people, they will just emigrate, at least that is what I have found to date. Though villagers might build a hovel. I'm not sure about that. That is their default behavior. Either that, or a vagrant mat. :eek:

If you are creating hovels, the only way for something on the map to affect how many gets made is to have a condition that checks the number of hovels in an area, and sets that to the maximum (i.e., If Player1 buildings - hovels >= 25, or whatnot).

If you just make an object like I said, it should drop down 25 hovels in your area, provided there are available spots for 25. No trees, roads, animals, people, and such can be in the way.

If you can give a little more detail, I might be able to help better, as I am pretty familiar with objects, though I've not used them extensively (yet :rolleyes :) .

Tinkerbell
Posts: 5415
Joined: Fri Sep 07, 2007 3:42 am
Location: San Diego, California
Contact:

Postby Tinkerbell » Thu Aug 14, 2008 9:16 pm

God, I am such a dummy. I made this waaay too hard.

Thankx, sakasiru & Yahya, but I figured it out myself. I had been playing with this for TWO days! :o

My area was too small. I was doing crazy things with lots of triggers & looping. :D I went back to square one & did it totally different.

I now have create male villagers fire five times when the WM site is open, with the min/max set to 1/1. It gives me five villagers every time. Change the min/max to 2/2 & I get consistently 10. No "condition true for" & no looping.

Second trigger is set for "true for 5 seconds" & looping. It kills the site if open & turns first trigger back on.

Now I can buy 5 villagers only, over & over

EDIT: Perhaps a bit more explaination would help. I began by looking at the designer's scenarios who created villagers when they were gone. THAT was my problem. It totally threw me off track. Grad used a one tile area & that threw me off too! That method uses completed villager huts to stop the process & different min & max made the process random.

I just wanted a set number of villagers & I wanted it to not be enough. They don't come cheap in my scenario. :D

By the way, you don't need males, females & children. Just one will create a whole family. Not always kids, though, but they will grow them later. The created villagers build huts, if there are not unpopulated buildings to go to. Triggering both males & females gets you double the number if the area is large enough & perhaps interaction between males & females adds to the randomness. I started by doing females & kids. Then just females & lastly just males.

With small area, the game will ignore the larger min/max. And each effect fires once only, so I did the effect five times in the same trigger.
Last edited by Tinkerbell on Thu Aug 14, 2008 10:27 pm, edited 1 time in total.

Yahya
Posts: 1544
Joined: Tue Jul 20, 2004 11:09 pm
Location: The Ocean State

Postby Yahya » Thu Aug 14, 2008 10:24 pm

Aha. I see what you mean. Good job! :D

Tinkerbell
Posts: 5415
Joined: Fri Sep 07, 2007 3:42 am
Location: San Diego, California
Contact:

Postby Tinkerbell » Thu Aug 14, 2008 10:50 pm

I probably could have done it the no villagers way if there was flat in my scenario, but there isn't much of that. It's an island...

He He

;)

Yahya
Posts: 1544
Joined: Tue Jul 20, 2004 11:09 pm
Location: The Ocean State

Postby Yahya » Thu Aug 14, 2008 11:09 pm

Heh. Sweet.

Tinkerbell
Posts: 5415
Joined: Fri Sep 07, 2007 3:42 am
Location: San Diego, California
Contact:

Postby Tinkerbell » Thu Aug 14, 2008 11:25 pm

It started as a lab exercise with the 1.3 Editor. I wanted to build an island. Very weird things happened.

Then I started playing around with cliffs, internal rivers & learned something very interesting about farmers. :eek:

Finally, I wanted to learn about creating villagers.

Now, I just have to build a scenario around another famous ugly map. No idea what to do with it yet. :rolleyes:

Yahya
Posts: 1544
Joined: Tue Jul 20, 2004 11:09 pm
Location: The Ocean State

Postby Yahya » Fri Aug 15, 2008 12:27 pm

When you say "build an island," do you mean to actually change terrain with the game engine?

Jimaaten
Posts: 969
Joined: Fri Aug 27, 2004 6:03 pm
Location: Hanford, California, USA

Postby Jimaaten » Fri Aug 15, 2008 5:22 pm

"Tinkerbell" wrote:With small area, the game will ignore the larger min/max. And each effect fires once only, so I did the effect five times in the same trigger.
You probably already know this, but for anyone else reading this thread, you can only create one object per grid square. The grid square also can't be built on or have road in it. I also seem to remember that it has to be a buildable square.

Tinkerbell
Posts: 5415
Joined: Fri Sep 07, 2007 3:42 am
Location: San Diego, California
Contact:

Postby Tinkerbell » Fri Aug 15, 2008 5:30 pm

Yeah, I finally figured that out, Jim. :D

Also, it appears we can tell the size of the family the villager creates from the food he carries. Reminds me of your Lab with incoming Nobles. ;)

Yahya
Posts: 1544
Joined: Tue Jul 20, 2004 11:09 pm
Location: The Ocean State

Postby Yahya » Fri Aug 15, 2008 7:59 pm

Ah, yes, Jim. That is true. That is worth mentioning. If you want to create say 25 villagers, you have to have a buildable area of at least 25 squares, defined as an area.

And Tink, your statement is interesting. When you create an object, and it is a unit, you can specify how much of something he carries. So you can choose the amount of food he has, and therefore affect the size of the family. Just a little tidbit for you, in case you want to be more devious. :p


Return to “Editing”

Who is online

Users browsing this forum: No registered users and 2 guests