Advertisement

defend sacred animals quest

Started by August 27, 2016 03:32 PM
12 comments, last by Norman Barrows 8 years, 2 months ago

i'm currently adding quest generator #24 to Caveman 3.0 (FPSRPG / person sim hybrid - stone age setting).

the quest: defend a herd of scared animals from hunters.

current behavior:

player goes to where herd is.

herd spawns.

player must wait for hunters to show up.

herd probably wanders off before hunters arrive.

if player leaves area: quest failure.

hunters later show up, and attack player for being there and interfering with their hunt.

i don't have any turn key AI that will make a critter just hang out in a specific area, except for "defend location" AI which would attack anything nearby including the player. i could always code some up right quick, but setting the herd to use it might be a bit of work, it would require modding the spawn code.

i could spawn both the herd and hunters when the player arrives at the scene and say they arrive just as the hunt is about to begin... somewhat contrived?

suggestions?

wait for the hunters can be either challenging (when in a remote area) or boring - IE the fact that you have to wait. but you can always accelerate time. and you can always craft something or learn a skill while you wait.

the hunters are set to spawn:


' 12 in 1000000 per sec = 23.1 hrs on avg
so they should show up within one game day.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

You might consider salt licks as a reason for a herd to stay in one place for a bit - they can be both naturally occurring or artificially placed. You could also generate an amount quantity for the salt lick which would act as a timer for the quest itself i.e. lick is finished, herd moves on.

Advertisement

@[member='Stormynature'], Great idea about the salt lick. Gives the herd a real reason to be there over another location and it can be a good visual clue for the player.

Developer with a bit of Kickstarter and business experience.

YouTube Channel: Hostile Viking Studio
Twitter: @Precursors_Dawn

Suggestions? Well, let the player join the hunters and kill the animals, getting something in return. Or dont join the hunters and let the player kill the animals for themselves (sell the pelts or something). Or let the player kill everything and everyone for no reason. Those should all be properly handled and possible quest outcomes.

Nothing screams RPG to me more than getting a "Bandits are attacking our village, help us!" quest, then going to the bandits and joining them in the raid.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

I think the herd should move from place to place stopping to eat etc. and run if they hear or sent the player. This forces the player to have to stay with the herd to protect them, rather than just sitting around passing time. When the hunters then show up they should be stalking the prey and the player can try and take out the hunters quietly if they can find them, scare the herd to charge off to have the hunters reveal themselves or wait until the hunters reveal themselves to strike.

Or let the player kill everything and everyone for no reason.

Don't forget to eat the hearts to gain their courage. Their rich tasty courage.

Advertisement

You might consider salt licks as a reason for a herd to stay in one place for a bit

well, that would be a very believable justification for the behavior, but i'd still have to code up the custom AI behavior. and set the herd to use that AI when it was spawned. right now there is no "just hang out" AI in the game. but a copy/paste/edit of the "defened location" AI can fix that - probably in less than an hour. also, AI is currently assigned on a per type basis, not per entity. for some quest critters, a flag is used to override the default type-specific AI for that entity and instead use the 'defend location" AI for that critter. "hang out" AI would require a second flag, or changing the flag to a variable for "entity specific AI type" (defend location, hang out, or normal AI for that critter type). a non-trivial amount of modding to the code. its probably the right way to do it though.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

Well, let the player join the hunters and kill the animals, getting something in return. Or dont join the hunters and let the player kill the animals for themselves (sell the pelts or something). Or let the player kill everything and everyone for no reason.

lots of good plot twists there!

but for the moment i'm starting with the straight-forward quests with no plot twists.

i started to code the first quest generator (kill animals defending treasure) with plot twists like; "you're not the only group going after the treasure", but found that the possible permutations quickly grew into a very large branching quest. the time to write the quest code was measured in days, not hours.

so quest generator #24 is a simple quest, defend herd for reward, with no plot twists (yet). success if hunters dead, fail if leave area. right now it doesn't even matter if the herd wanders off, although it definitely doesn't look right <g>. by spawning the herd and hunters at the same time, the battle with the hunters should be over before the herd wanders off - and i don't have to create "hang out in one spot" AI.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

Nothing screams RPG to me more than getting a "Bandits are attacking our village, help us!" quest, then going to the bandits and joining them in the raid.

yes, the ability to choose either side is very nice. in this particular case, unless you give the player a chance to parlay with the hunters, the hunters will attack the player simply for being there (the way its coded right now). if the player parlayed with the hunters and "switched sides", it would be automatic quest failure, and the hunters would no longer be hostile. but you can also yield while in combat. but i think the hunters are set as "hostiles" which means they never accept a yield.

but as i said, i'm trying to think of a clever way to implement the basic quest (without plot twists) without having to add a bunch of new capabilities to the engine, such as "hang out" AI, and multiple types of entity specific AI (defend location, hang out, or the normal type-specific AI behavior).

am i just being lazy? <g>.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

I think the herd should move from place to place stopping to eat etc. and run if they hear or sent the player.

yes following the herd would be much more realistic. change the fail condition from "player beyond 500 feet from spawn point" to something like "no herd animals active" (animals deactivate when they move beyond 350 feet from all the player's band members). but tracking what's a quest animal is a bit tricky. definitely more coding work than "> 500 from spawn point". as i recall, other quests required me to add the ability to track which critters go with which quests for which band members. so odds are the code to do that already exists. that's one of the cool things about working on a big project when you're near the end of it. often times the code to do something already exists in some form in the game engine somewhere.

the critter type of the herd is random. their behavior is the normal AI for that critter type. so it may be a herd of small antelope that run from everything, or it may be a sabertooth

that has no qualms about eating the player for lunch, or it may be a herd of mastodon that will stomp anything that gets too close.

When the hunters then show up they should be stalking the prey and the player can try and take out the hunters quietly if they can find them, scare the herd to charge off to have the hunters reveal themselves or wait until the hunters reveal themselves to strike.

when the player encounters the hunters, either side might be surprised for a moment or two (as with all encounters), and the player can use stealth mode at any time in any combat. scaring off the herd depends on what kind of critter it is. rhim gazelle? no problem! woolly rhino? big problem! <g>. although a well placed missile attack from an unknown quarter might work even against large herd animals. reacting to "missile fire from undetected shooter" is part of the standard AI used by all critters.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

This topic is closed to new replies.

Advertisement