Getting creatures to kill each other?

Post » Wed May 12, 2010 10:05 pm

There's this firefly mod that I use to have that caused all the creatures to try and kill fireflies for some reason. I'm wondering how I could go about doing this for a mod I plan on working on. I tried looking at the firefly script but all there was to it was whether or not the firefly light would turn on or off a curtain time of day.
User avatar
SEXY QUEEN
 
Posts: 3417
Joined: Mon Aug 13, 2007 7:54 pm

Post » Thu May 13, 2010 6:10 am

a sort of hack way of getting this to happen is to have the fireflies scripted to toggle to AIFollow or AIEscort, then the other creature will target it to kill if they have a high fight rating. otherwise, a much verbose way would be to give everything unique id's and script for getdetected every few seconds so it doesn't kill framerates.
User avatar
herrade
 
Posts: 3469
Joined: Thu Apr 05, 2007 1:09 pm

Post » Thu May 13, 2010 1:43 am

a sort of hack way of getting this to happen is to have the fireflies scripted to toggle to AIFollow or AIEscort, then the other creature will target it to kill if they have a high fight rating. otherwise, a much verbose way would be to give everything unique id's and script for getdetected every few seconds so it doesn't kill framerates.


Not quite the approach I'm looking for, on the firefly mod it was still under wanderer I'm fairy sure. :sleep:
User avatar
SHAWNNA-KAY
 
Posts: 3444
Joined: Mon Dec 18, 2006 1:22 pm

Post » Thu May 13, 2010 9:15 am

Not quite the approach I'm looking for, on the firefly mod it was still under wanderer I'm fairy sure. :sleep:


I've actually done this on a mod I ended up scrapping, but it does require the actors to have unique ID's. Do the detection routines, and then "startcombat " I don't believe startcombat will take a partial ID, but I'd have to refer to the scripting guide to be sure.

You might also ask on Fliggerty's site, but the answer may involve MWSE.
User avatar
MarilĂș
 
Posts: 3449
Joined: Sat Oct 07, 2006 7:17 am

Post » Wed May 12, 2010 6:52 pm

maybe somthing like this example
(EG: script placed on a predator (unique kaguoti), so it targets its prey (unique guar) when the player gets close enough)


begin i_could_kill_that_guar

if( getdistance player == 500 )
AI_my_kagouti->startcombat "AI_my_guar"
endif

end

something like that?
theres also one in "waterlife" by abot that causes slaughterfish to be predatory and attack other fish, which i would assume to work better than my simple one, but you may need permissions from him to use it.
User avatar
tiffany Royal
 
Posts: 3340
Joined: Mon Dec 25, 2006 1:48 pm

Post » Wed May 12, 2010 11:42 pm

There's this firefly mod that I use to have that caused all the creatures to try and kill fireflies for some reason. I'm wondering how I could go about doing this for a mod I plan on working on. I tried looking at the firefly script but all there was to it was whether or not the firefly light would turn on or off a curtain time of day.
Morrowind world is almost player centric. You can do (sort of) this just using AI packages.
Set a "predator" creature to attack player (AI Fight setting >= 82 ), set some "prey" creatures around to escort player
Example AI packages
1: Wander (Distance: 4000, Duration: 24, Time of Day: 7)
2: Escort (Target: player, Cell: NONE, Duration: 0)
You can also do the same using equivalent script commands so you can test for conditions.
For other details and examples, you could see for instance Trevor Demented's http://www.tesnexus.com/downloads/file.php?id=1336 for AI packages samples on NPC, http://planetelderscrolls.gamespy.com/View.php?view=mods.detail&id=258 for AI packages/scripts samples ON creatures.
User avatar
marina
 
Posts: 3401
Joined: Tue Mar 13, 2007 10:02 pm


Return to III - Morrowind