Wildlife Script

Aus

Villager
Member
Joined
Sep 2, 2013
Messages
22
Reaction score
4
First Language
English
Primarily Uses
I'm sorry if this is addressed elsewhere, or if I'm asking in the wrong forum. I'm still new here, so, try to forgive me, or point me in the right direction, or... whatever needs to be done. Thanks!

So, at some point in the past, I saw what I think was a "widlife" script. By that, I mean, some script where wildlife had predators that would hunt their prey, and stuff like that. Sorry for the lack of descriptive details.

At any rate, I can no longer find that script or one like it. I'm working on a game where I could use something like that, or at the very least could get some ideas from it. I'd also be very thankful if someone just straight up made one or shares one that they have made, but I don't necessarily expect that.

Any help would be appreciated!
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
You need to give more details because I don't even know how it's supposed to behave.


Who are the predators?


Who are the prey?


What does it mean to hunt prey?


What happens when someone gets hunted?


What is the point of this?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
It would be helpfull if you could give some details.


A lot of options like that don't need scripts, you can use autonomous movement for either random (regular animals), approach (predators attacking player) or custom (fixed routes for events).


The only things that would require scripts are events hunting other events (predator attacking animal) or if you want the predator events to have limited reaction (not hunting as soon as player is in range, but dependent on other factors.
 

Aus

Villager
Member
Joined
Sep 2, 2013
Messages
22
Reaction score
4
First Language
English
Primarily Uses
Say, for example, we have wolves as the predators, while rabbits serve as prey. Wolves would attack the player or rabbits on sight (rabbits would try to flee). At times, wolves would also venture out to hunt rabbits (or whatever other prey exists). I figure I can Event wolves coming after the player, but wolves chasing rabbits is a bit out of my league, maybe.

As for the goal that I'm trying to reach overall, I guess I'd have to explain portions of the game idea in general. So, let me try my hand at that:

Without giving too much away, the player is stranded in the wilderness, and I want the wildlife to feel somewhat realistic and dangerous. Ideally, wolves have dens that they primarily thrive in, but will venture out to hunt rabbits, deer, and whatever else they can find (including the player).

I hope that helps, at least a little. Forgive me if I'm not useful, scripting is still very much beyond me.
 

xein

A stranger in a strange world
Veteran
Joined
Mar 17, 2012
Messages
307
Reaction score
15
Primarily Uses
So you want a script where events randomly chase events and events randomly avoid approaching events and avoiding events triggered when touched by an approaching event.

Just curious, how many of these events are you planning to have inside a map and how large will the map be?
 
  • Like
Reactions: Aus

Aus

Villager
Member
Joined
Sep 2, 2013
Messages
22
Reaction score
4
First Language
English
Primarily Uses
So you want a script where events randomly chase events and events randomly avoid approaching events and avoiding events triggered when touched by an approaching event.

Just curious, how many of these events are you planning to have inside a map and how large will the map be?
Haha. Something like that, yeah. I'd like to not give too much away, here, but, the map's pretty big and (hopefully) there's enough predator/prey to make it interesting and quasi-realistic.

You can probably do it with events, though you will need some scripts to extend the eventing system

For example, to have events trigger other events, you can use

http://himeworks.wordpress.com/2013/04/05/custom-event-triggers/
Thanks a lot!!! I'll take a look at this. Truth be told, I've already built an overworld combat system that uses zero scripting, and it works fairly well (I'm currently working on incorporating a long-range attack without scripts, too). I'm happy with that. The more stuff I can do without scripting, the better, because as it is, the game already incorporates about four different scripts. If I keep adding scripts, the odds are, at some point, something's going to clash.

I don't know if this is helpful in explaining anything, but here's how I envision parts of this: the player is stranded in a large, open wilderness, and there are wild animals that roam around and eat food, hunt/kill prey, sleep in dens, and so on. Anything that makes the wildlife feel more real is what I'm after.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
Haha. Something like that, yeah. I'd like to not give too much away, here, but, the map's pretty big and (hopefully) there's enough predator/prey to make it interesting and quasi-realistic.
Giving a map size and a number of events is hardly giving away anything from the story, but there is a very important reason why that was asked:
If you have too many events on large maps that will cause your game to lag. The exact number depends on the CPU/RAM of your computer, but as a general rule of tumb one or two hundred regular events create lag even on good machines.


And events chasing other events need much more processing power than regular events on random movement, so you might expect lag if you pass fifty such events.


Given that you need two types of chasing events and still a few more decorative events on any map, I don't think that you should place more than 10 predators and 20 animals on a single map. And that does limit the size of your "hunting area" no matter how you go about it, because that would be very empty if you place those 30 events on a really large map...
 
  • Like
Reactions: Aus

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Given that you need two types of chasing events and still a few more decorative events on any map, I don't think that you should place more than 10 predators and 20 animals on a single map. And that does limit the size of your "hunting area" no matter how you go about it, because that would be very empty if you place those 30 events on a really large map...
If they were randomly moving towards specific events that probably shouldn't be that big of an issue.
 

Aus

Villager
Member
Joined
Sep 2, 2013
Messages
22
Reaction score
4
First Language
English
Primarily Uses
Thanks for the help, guys, really. Means a lot.

In all honesty, I don't know why I'm so paranoid about giving things away other than it's my knee-jerk reaction, so let me back up and explain a little bit: the game's entire premise is having the player stuck in some vast expanse of wilderness, where he has to fight off weather, temperature, hunger, thirst, and predators.

As far as lag is concerned, I've thought about it, and as irresponsible as this sounds, I'll just cross that bridge when I get there. The maps are as big as I can make them, yeah, but, A, it's generally a big expanse of mostly nothing (tundra, desert), and B, ninety to ninety-five percent of the events that populate the maps will be wildlife. I think the game can probably tolerate it, and if not, I don't mind toning it down.

For example, I have a big tundra, which is one of the places the player can get lost in. In terms of predators, wolf packs would be the most dangerous, but bears also exist and are fully capable of mauling your face off. Other animals (serving largely as prey) would likely be foxes, deer/caribou, and rabbits. Ideally, these animals interact in ways that are semi-realistic; they hunt or are hunted, they kill or are killed, they eat or are eaten. Etc.

It occurs to me that Skyrim would be a fair example, if anyone has played that. In the wilderness of Skyrim, wolves will hunt down foxes, and so on. That's basically what I'm going after.

Anyways, sorry for long-post. Tsukihime, thank you for your script; I'll dance around with it to see if I can get something working fashionably.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top