FSM Modding Tutorial

Guides on how to make skins, modify JPOG and much more

FSM Modding Tutorial

Unread postby Melea Lord » Thu, 9th Aug 2007 23:52

Due to severe lack of interest in FSM modding I was compelled to write this.
Fsms can be complicated but with a little logic, common sense, very rarely some maths and some knowledge, they're eays to understand. My only problem is coming up with Ideas that aren't too farfetched.
Let's start with the basics. Fsm files are found in JPOG/Data/Units/Win and can be opened with a normal notepad. The files immeidiatly in this foulder are named according to what dino uses them, sometimes. There a lot of exceptions and some are never used. All large carns use the spno files (not the ambush one). TRex does not use its own flee file. The cera files of stress and fenc aren't used either. The GenFSM file contains FSMs for ramming fences, being knocked over etc. The DinoFSM foulder contains the FSM files dinos were meant to use geerally. A good number of the H files are used, the D files I don't think are used. A good number of the C files aren't used too. C-thirst is used by all carns (maybe not dilopho) C-hngr is only used by alberto. C-idle is used by all carns. This is what carns do when they aren't hunting, drinking etc. The code below is taken from this file:

Code: Select all
/* Generic Carnivore Idle Behaviour
//
*/

machine CarnIdle
{
   state Start
   {

First about the starts and slashes, when you see a /*, anything between this and a */ the dino does not run. Every FSM file begins with a machine. I do not advice touching this! Then after the machine you immediatly get an oppening bracket. THis braket is the start of the FSM. Next we have our first state. Sometimes the first stae has a default infront of it. Do not ever misspell state or give it any caps, instant crash. All FSM files are made from state after state after state. The name of the state is immediatly after "state". This can be spelt anyway you like. The beggining of the state starts with another opening bracket.
This is another state with it's transitions:
Code: Select all
        state HealthCheck
        {
                transition GetVariable("health") < 50.0
                {
         action SetAutoMovementBlend(true)
         goto WanderStart
                }
                transition IAmSmall()
                {
                        call RaptorFence WanderStart
                }
                transition
                {
                        goto FenceBCD
                }
        }

As you can see, the state ends with a closing bracket, and every transiton starts and closes with a bracket. I remined you, do not misspell or missout the word transition and do not miss brackets, crash. Transitions are questions. The word follwoing "transition" is the question. For the first transition it is asking "Is the dino running this have a health less than 50% (or it could be health less than 50)". If it is, it will do the commands inside the transition. An action is a thing that happens. This can affect the dino (IE, roar) or it could affect the file (IE, a timer). I actually don't know what this action does, but I will explain them in greater detail later. The command goto WanderStart means that the dino will now go to teh state called WanderStart. if there is a goto command any where with a state name that does not exist, crash. Misspelling goto also causes a crash. In the next transition it's asking whether the dino running this is small (I forgot what is the min number to be a med dinosaur but it is 12 to be large). If it is then is is to do a call command. This means it will run the file RaptorFence. The words "RaptorFence" are the exact words which follow the word "machine" at the begging of RaptFenc. Misspelling of call and RaptorFence and if you put uneeded caps it crashes (almost gave up modding because I placed a capital C on call) The word following tells the dino where to go when it has finished running RaptorFence. It is a state name, and if it doesn't exist, crash.
The last transition is the simplest, it isn't asking a question, so everything flows down this path if it isn't small and has a grater health than 50%.
Now back to actions. Here is another state:
Code: Select all
   state IdleChoose
   {
      action ClearTarget()
      action SetRand(0, 7)
      transition GetRand() == 0
      {
         direct goto SniffStart
      }
      transition GetRand() == 1
      {
         direct goto ScratchStart
      }
      transition GetRand() == 2
      {
         direct goto SpecStart
      }
      transition GetRand() == 3
      {
         direct goto FullCallStart
      }
      transition GetRand() == 4
      {
         direct goto RandSpecStart
      }
               transition GetRand() <= 6
                {
                goto HealthCheck
                }
   }

The action clear target tells the dino to forget it's last target. Targets are items a dino has acquired. These can range from a dino doing a terre battle with, a dino your fleeing from, a human, a heli, a lure. Loads of things. This action can be done when acquiring a new target. The next action below means to set a randomn number between 0 and 6. 7 means the amount of numbers that can be chosen. So with a number of 5, the number that can be chosen is between 0 and 4. The transitions below are connected to this action. They're asking if the number is 0 (first case) or in the last case, if the number is 6 or below. In case your wandering, transitions are asked in order. And if they're all no, it starts at the beggining transition of the state.

Just a few last things:

A) Crashes can happen ranging from an official error report or where your dinosaur freezes or loops doin something. Like screaming for example.
B) It doesn't matter about the distance of the start of a transiton, state, braket is form the left of the page. Missed lines are also not worried about.
C) Here is a list of transtions and actions that ERC provided. Unfourtunately, the questions and actions are mixed up, but you can search for these things in the files and learn about them from there (This is basically qouted from a mail ERC sent me):

Code: Select all
HGenStress......................HGenLure........................HGenHurt........................Assert..........................Print...........................IsDeadPoseLocked................LockDeadPose....................SetDeadTranslate................WantDeadCollision...............LockMachine.....................LockTargetMachine...............IsNextDrive.....................DisallowRestState...............SetTargetPoint..................SetWander.......................PushTarget......................LatchOnTarget...................IsAttached......................UnLatchFromTarget...............SetStandStill...................SetStandStillTarget.............HasArrived......................AvoidTarget.....................SetSpeedDirect..................SetSpeedModifier................SetSpeedModifierWalk............SetSpeedModifierRun.............UpdateFleeSpeed.................ClearTarget.....................SeekRandomPointInsideTerritory..FaceTarget......................FaceTargetInstant...............FaceTargetLocator...............FaceTargetsFacing...............FaceLand........................FaceSetPosition.................FaceSideOnToTarget..............HasSteerEffect..................SetAvoidanceSteer...............SetAvoidanceWorld...............SetMass.........................ScaleDeathRadius................StepBackFromTarget..............StepBack........................SetLockFacing...................SetTransfromFromLocator.........IsTargetStationary..............IsSteerStuck....................SetStuckFlag....................EnterBuilding...................SeekBuildingEntranceOffset......IsInBuilding....................SetRandomTimerBetween...........IsTimerUp.......................IsUnitInsideTerritory...........AddTerritoryFactor..............IsTargetTerritoryBhvrLocked.....LockTargetTerritoryBhvr.........LockTerritoryBhvr...............SetTerritoryScriptRunning.......IsTargetTerritoryScriptRunning..IsTargetTerritoryAllowed........IsTerritoryUpdateNeeded.........SetTerritoryUpdateNeeded........IsDefendTerritory...............SetDefendTerritory..............UpdateTerritoryAesthetics.......IsTerritorial...................IsInGrazeArea...................IsInWaterArea...................IsAwayFromWater.................AcquireTree.....................EatFromTree.....................SetTargetsTargetToMe............SetTargetToFaceMe...............SetVisibility...................AcquireFence....................AcquireBuilding.................AcquireClosestUnit..............AcquireClosestAliveUnit.........IsTargetPosWaterArea............IsTargetHuman...................IsTargetVehicle.................IsTargetDinosaur................IsTargetHelicopter..............ControlHuman....................IsHumanWaitingToDie.............IsHumanAttached.................KillHuman.......................AcquireHuman....................IsTargetInBuilding..............IsTargetSameSpecies.............AddKillExperience...............SetKillCause....................IsKillCause.....................PlayAnimState...................PlayAnimStateLooping............PlayAnimLooping.................PlayAnim........................PlayAnimInstant.................PlayAnimInstantRandom...........PlayAnimSpeed...................PlayAnimLinked..................PlayPreHuntAnim.................PlayHungryAnim..................PlayRandomIdleAnim..............StopAnimState...................StopAnim........................StopAnimInstant.................StopAnimLinked..................SetAutoMovementBlend............IsAutoMovementBlendOn...........StopAllUserAnimations...........SetAutoMovementBlendTarget......StopAllUserAnimationsTarget.....SetAutoLinkAnimOff..............SetAutoLinkAnimOffTarget........SetLockLastPose.................SetLockLastPoseTarget...........PlayAnimParam...................PlayAnimParamTarget.............SetLockLastPoseParam............IsAnimPlayingParam..............IsAnimLoadedParam...............StopAnimInstantParam............StartLook.......................StopLook........................StopLookTarget..................SetLookSpeed....................AcquireClosestLookTarget........SetRandomLookTimer..............IsRandomLookTimerUp.............DestroyActionUnit...............PlayAnimTarget..................PlayAnimLoopingTarget...........PlayAnimLinkedTarget............StopAnimTarget..................StopAnimStateTarget.............StopAnimLinkedTarget............CanWinFatality..................SetFatalityAnims................CanPerformFatality..............SetInterpolation................SetInterpolationTarget..........StopVehicleTarget...............SetVehicleInterpolation.........InterpolateVehicleDir...........AnimStateFinished...............AddRandomAnimation..............StopAllRandomAnimations.........IsAnimStatePlaying..............IsAnimPlaying...................IsAnimPlayingTarget.............IsAnimLoaded....................IsRandomAnimLoaded..............IsIdleLocked....................SetRunMode......................SetWalkBackMode.................SetSick.........................CanSneeze.......................LookAtTargetPosition............LookAtLookTargetPosition........LookEnd.........................LookAt..........................LookAtRandomPosition............LookAtRandomPositionExtent......SetSeekAnim.....................GetVariable.....................SetVariable.....................UpdateVariable..................UpdateDeltaVariable.............UpdateDeltaTraitVariable........UpdateDeltaVariableTarget.......HurtTargetUnit..................TargetHurtMe....................SetHurt.........................SetTargetHurt...................UpdateTargetKills...............SetUpdateTargetKillsFlag........DefecateStart...................DefecateUpdate..................DestroyTargetUnit...............DestroyMyself...................RamFence........................SetFenceExclusion...............SeekFenceOffset.................DetermineFenceSide..............FaceFence.......................LeaveFence......................FenceLeapSnap...................FenceLeapInterp.................FenceShockFall..................IsFenceShot.....................IsTargetMedFence................IsFenceElectrified..............CanBreakFence...................DamageFence.....................CanAmbush.......................AlertFenceJumpBreakout..........ShockDamage.....................CanLandOnOtherFenceSide.........StartDecay......................UpdateDecay.....................StopDecay.......................IsTargetEdible..................CarnEatTarget...................HerbEatTarget...................UpdateSleep.....................HasTarget.......................AcquireTarget...................AcquireFlockTarget..............AcquireLatchTarget..............AcquireCannibalFoodTarget.......AcquirePrefPrey.................AcquireDinoTargetInProximity....SeekTarget......................SeekTargetOffset................SeekTargetOffsetParam...........SeekBehindTarget................SeekSetPosition.................SeekSetDirection................SeekPosOffset...................AcquireWaterPoint...............SeekWaterPoint..................FaceWaterPoint..................WithinTargetDistance............WithinTargetDistanceParam.......InTargetProximity...............InTargetProximityRadius.........InSetPosProximity...............InSetPosProximityRadius.........InSetNuzzleProximity............CanKnockTarget..................CanGetUp........................CanRamTarget....................CanLatchTarget..................CanNuzzleTarget.................SetNuzzleTargetPos..............CreateKnockMusterZone...........CreateKnockMusterZoneTarget.....SetMusterAngry..................SetMusterAngryAttack............IsMusterAngry...................IsMusterAngryAttack.............IsKnockRecoil...................CheckTailHittingTarget..........IsTargetLatchedOn...............IsTargetDead....................CanGrabTarget...................GrabTarget......................PreGrabTarget...................AttachTarget....................DetachTarget....................ReleaseTarget...................SwallowScaleTarget..............SetDispInjured..................SetMusterSteering...............HasMusterTarget.................GetMusterTarget.................ClearMusterTarget...............FleeMusterTarget................InMusterTargetRange.............IsTargetSmall...................IAmLarge........................IAmSmall........................HasTickInfestation..............HasBumbleFoot...................RemoveTargetFromPerception......DeleteAllCommands...............SetCommandDrive.................SetDeathDrive...................IsTargetOnLeft..................IsInFlock.......................CanJoinTargetFlock..............JoinTargetFlock.................LeaveFlock......................IsTargetFlockBetter.............IsAwayFromFlock.................SeekTowardsFlock................CanFlock........................SetFlockImpulse.................GetFlockTarget..................SetFlockTarget..................ClearFlockTarget................FlockHasTarget..................SetFlockHungerNeed..............GetFlockHungerNeed..............InitFlockAway...................UpdateFlockAway.................CanAttackTarget.................IsFacingTarget..................IsFacingTargetUnit..............IsFacingTargetsFacing...........IsFacingOppositeTargetsFacing...SetTargetToSlave................SetTargetFSM....................IsTargetFSMRunning..............SetNumPassedParam...............SetNumPassedParamTarget.........GetNumPassedParamTarget.........SetPassedParam..................GetPassedParam..................GetPassedParamTarget............SetPassedParamTarget............SetPassedParamTargetKnockDir....SetRand.........................GetRand.........................SendParkEvent...................SendParkEventTarget.............SendEnclosureEvent..............SetIconType.....................SetRageIcon.....................SetRampageTime..................SetRampageSleepTimer............GetRampageTime..................InitStressHealthDecr............UpdateRampageHealth.............SendComataseEvent...............SetDefenseRoar..................SetDefenseRoarTarget............GetDefenseTarget................StopAllLoopingSounds............PlayDistressedSound.............PlaySound.......................StopLoopingSound................AActiveUnit


List your questions here, or PM me if you really have too.
Image
Look at me, don't look away... don't ever look away, you'll be looking at me forever!
The GEPv2 Trailer The GEPv2 Download
User avatar
Melea Lord
G.E.P. member
G.E.P. member
 
Posts: 2360
Joined: Wed, 25th Jul 2007 12:50
Location: Britain, Essex
Gender: Male
User Title: FSM Personnel #2

Re: FSM Modding Tutorial

Unread postby Eternal_Rocker_Chick » Fri, 10th Aug 2007 21:29

Well done on putting this up ^-^ Lets hope others become more interested in the files now.
[url=http://o-eternal-o.deviantart.com/][img]http://4.bp.blogspot.com/_OlIrXdcBUNA/RnK5AbBuSmI/AAAAAAAAAIE/yvytUqMgZps/s400/DuckParty.png[/img][/url]
In case you're wondering, I'm the upside-down one
User avatar
Eternal_Rocker_Chick
Apex Hunter
Apex Hunter
 
Posts: 3541
Joined: Fri, 5th Jan 2007 23:39
Location: England
Gender: Female
User Title: Talking Duck

Re: FSM Modding Tutorial

Unread postby MAD » Sun, 12th Aug 2007 15:21

Thanks a lot dude. ive been wanting to mess with the fsm for the past week, i just didn't know how to do it. i tried looking on the forums and internet, but i found nothing very helpful. hopeful this will clear things up. :D
User avatar
MAD
Park Visitor
Park Visitor
 
Posts: 46
Joined: Thu, 26th Jul 2007 9:33
Location: Oklahoma

Re: FSM Modding Tutorial

Unread postby Melea Lord » Sun, 12th Aug 2007 23:04

If you get stuck in anything specific be sure to PM me.
Image
Look at me, don't look away... don't ever look away, you'll be looking at me forever!
The GEPv2 Trailer The GEPv2 Download
User avatar
Melea Lord
G.E.P. member
G.E.P. member
 
Posts: 2360
Joined: Wed, 25th Jul 2007 12:50
Location: Britain, Essex
Gender: Male
User Title: FSM Personnel #2

Re: FSM Modding Tutorial

Unread postby MAD » Mon, 3rd Sep 2007 4:58

How can you tell which FSM files a dinosaur uses? :?:
User avatar
MAD
Park Visitor
Park Visitor
 
Posts: 46
Joined: Thu, 26th Jul 2007 9:33
Location: Oklahoma

Re: FSM Modding Tutorial

Unread postby Dark Star » Mon, 3rd Sep 2007 5:01

Er, if you're talking about a specific dino, look at the file name. Like PchyTrty, means PACHYCEPHALOSAURUS Territory, it's quite simple.
User avatar
Dark Star
Colossus
Colossus
 
Posts: 1121
Joined: Sun, 11th Mar 2007 21:24
Gender: Male

Re: FSM Modding Tutorial

Unread postby MAD » Mon, 3rd Sep 2007 5:32

i know that, but he said that sometimes that is not the case, like trex doesn't use it Trex flee FSM.
User avatar
MAD
Park Visitor
Park Visitor
 
Posts: 46
Joined: Thu, 26th Jul 2007 9:33
Location: Oklahoma

Re: FSM Modding Tutorial

Unread postby Melea Lord » Mon, 3rd Sep 2007 9:21

I had to hunt around if I didn't kjnow what dinosaur did what FSM when....What dinosaur's FSM do you want to know?
Image
Look at me, don't look away... don't ever look away, you'll be looking at me forever!
The GEPv2 Trailer The GEPv2 Download
User avatar
Melea Lord
G.E.P. member
G.E.P. member
 
Posts: 2360
Joined: Wed, 25th Jul 2007 12:50
Location: Britain, Essex
Gender: Male
User Title: FSM Personnel #2

Re: FSM Modding Tutorial

Unread postby MAD » Mon, 3rd Sep 2007 19:03

well, this might sound pretty silly, but im "trying" to get dinos to mate. like on zoo tycoon when they mate they lay next to each other and stuff, im trying to do that one. But i don't know if dinos run the C_mate FSM. I dont even now if the FSM even works :P


Code: Select all
/* Generic Carnivore Mate Behaviour
//
*/

machine CarnMate
{
   default state MateStart
   {
      action SetAutoMovementBlend(true)
      action SetStandStill(true)
      transition
      {
         goto MateLoop
      }
   }

   state MateLoop
   {
      transition
      {
         goto MateLoop
      }
   }
}

state MateLoop
{
    action StartLook("LookTarget", 0.5)
    action SetRunMode(false)
    transition
    {
       goto AcquireCompetitor
    }

}

 state AcquireCompetitor
 {
     
        action AcquireTarget("friend")
        {
            goto TerritoryExit
        }
         transition HasTarget()
        {
            goto SameSpeciesCheck
        }
}

state SameSpeciesCheck
{
    transition IsTargetSameSpecies()
    {
         direct goto FaceCompetitor
    }

}
  state FaceCompetitor
  {
     action SendEnclosureEvent("challenge_rival")
     direct goto SleepBegin
  }

}

state SleepBegin
{
      action SendEnclosureEvent("rest")
      action SetVisibility(0.6)
      action SetFlockImpulse(false)
      action SetStandStill()
      action StopLook()
      action SetRandomTimerBetween(1, 3.0, 4.0)
      transition
      {
          goto SleepPlayStart
      }

}

state SleepPlayStart
      {
   transition IsTimerUp(1)
      {
      action SetAutoMovementBlend(false)
      action PlayAnim("sleep", "st", false)
      }

;------------------------ Exit States Begin ----------------------

      exitstart state CleanUp
      { 
         action action SetSpeedModifier(1.0)
      transition
         {
         action StopAnimState("sleep")
         goto CleanUpLoop
         }
 }

state CleanUpLoop
{
       transition IsAnimStatePlaying("sleep", false) == false
       {
                  action SetVisibility(0.6)
         action SetFlockImpulse(true)
         action SetAutoMovementBlend(true)
         action StopLook()
         goto CleanUpEnd
        }
 }
 
 exitend state CleanUpEnd
 {
 }

*/
;------------------------ Exit States End ----------------------
}


I just took bits and pices from C_sleep and ToroTrty. :D i cant test it cause i dont know which fsms the dinos use. I heard about the idea somewhere, so i decided id take a whack at it. Got head a make fun of the idea, i can take criticism. (sorta :D)
User avatar
MAD
Park Visitor
Park Visitor
 
Posts: 46
Joined: Thu, 26th Jul 2007 9:33
Location: Oklahoma

Re: FSM Modding Tutorial

Unread postby Doc 42 » Mon, 3rd Sep 2007 21:34

Thanks for posting this! I have been trying to get my head around FSMS for ages. Maybe now with this I can finally get somewhere.
THE DOC of ROCK
"These people are consantly trying to find new ways to hurt our citizens, and so are we"-prez Bush-
Doc 42
Friendly Herbivore
Friendly Herbivore
 
Posts: 143
Joined: Sun, 14th Jan 2007 14:58
Location: Ireland,somewhere

Re: FSM Modding Tutorial

Unread postby Melea Lord » Tue, 4th Sep 2007 0:08

I'm sorry but I don't think that FSM is ever used. I was thinking we could replace the defecate files with the breeding. I have ideas on how to do it...but I would just be taking over.

You've done pretty well. A few errors:

action AcquireTarget("friend")
{
goto TerritoryExit
}

This is a transition and you have started it with an action. I don't think you can aquire a target "friend". However I could be wrong as I haven't looked at all of the FSM files yet. Where did you find this??

state FaceCompetitor
{
action SendEnclosureEvent("challenge_rival")
direct goto SleepBegin
}

No transition (only allowed in an EndExitState) and you must have all calls and gotos in a transition.
There are quite a couple more. Here I give you a hand.

Familarise yourself with the sleep stuff/hunger stuff and stress stuff. You can then meld the Action aquire closest alive unit...check if same species...then force the other dino to run the mating FSM and to set the target as me. Then move over to mating FSM.

Get it to seek target...and when in a close proximity....play the sleeping animations. Set a time. If the time runs out without a large carn bothering them...then you can get the one running the mating file to poo the babay out. Then copy the mating file back over to the defecate file so that the orriginal dinosaur can run everything as well.

I hope you can understand this.
Image
Look at me, don't look away... don't ever look away, you'll be looking at me forever!
The GEPv2 Trailer The GEPv2 Download
User avatar
Melea Lord
G.E.P. member
G.E.P. member
 
Posts: 2360
Joined: Wed, 25th Jul 2007 12:50
Location: Britain, Essex
Gender: Male
User Title: FSM Personnel #2

Re: FSM Modding Tutorial

Unread postby MAD » Tue, 4th Sep 2007 3:14

Melea Lord wrote:This is a transition and you have started it with an action. I don't think you can aquire a target "friend". However I could be wrong as I haven't looked at all of the FSM files yet. Where did you find this??
got that bit from ToroTry fsm.

thanks ML, for giving me some pointers. Ill mess with this a little more, but no promises. :D


Okay i tinkered with it a little more, got the thing you suggested in it, i just hope that i got them in the right spot.


Code: Select all
/* Generic Carnivore Mate Behaviour
//
*/

machine CarnMate
{
   default state MateStart
   {
      action SetAutoMovementBlend(true)
      action SetStandStill(true)
      transition
      {
         goto MateLoop
      }
   }

   state MateLoop
   {
      transition
      {
         goto MateLoop
      }
   }
}

state MateLoop
{
    action StartLook("LookTarget", 0.5)
    action SetRunMode(false)
    action AcquireClosestAliveUnit
    transition
    {
       goto SameSpeciesCheck
    }

}

state SameSpeciesCheck
{
    transition IsTargetSameSpecies()
    {
         direct goto FaceCompetitor
    }

}
  state FaceCompetitor
  {
     action SendEnclosureEvent("challenge_rival")
     action SetRandomTimerBetween(4, 5.0, 6.0)
     direct goto SleepBegin
  }

}

state SleepBegin
{
      action SendEnclosureEvent("rest")
      action SetVisibility(0.6)
      action SetFlockImpulse(false)
      action SetStandStill()
      action StopLook()
      transition
      {
          goto SleepPlayStart
      }

}

state SleepPlayStart
      {
   transition IsTimerUp(1)
      {
      action SetAutoMovementBlend(false)
      action PlayAnim("sleep", "st", false)
      }

;------------------------ Exit States Begin ----------------------

      exitstart state CleanUp
      { 
         action action SetSpeedModifier(1.0)
      transition
         {
         action StopAnimState("sleep")
         goto CleanUpLoop
         }
 }

state CleanUpLoop
{
       transition IsAnimStatePlaying("sleep", false) == false
       {
                  action SetVisibility(0.6)
         action SetFlockImpulse(true)
         action SetAutoMovementBlend(true)
         action StopLook()
         goto CleanUpEnd
        }
 }
 
 exitend state CleanUpEnd
 {
 }

*/
;------------------------ Exit States End ----------------------
}



hey ML any other tips would be appreciated. :) im also trying to figure out how to get this and the defecate thing together.
User avatar
MAD
Park Visitor
Park Visitor
 
Posts: 46
Joined: Thu, 26th Jul 2007 9:33
Location: Oklahoma

Re: FSM Modding Tutorial

Unread postby Melea Lord » Tue, 4th Sep 2007 8:49

state SameSpeciesCheck
{
transition IsTargetSameSpecies()
{
direct goto FaceCompetitor
}

}
It's correct but if it isn't the same species...we get a loop. It'll get stuck in that state.




state FaceCompetitor
{
action SendEnclosureEvent("challenge_rival")
action SetRandomTimerBetween(4, 5.0, 6.0)
direct goto SleepBegin
}

}

No transition
There are still quite a few more.

You really have decided to do something quite complicated for your first FSM mod. Firstly...the aquireclosestaliveunit...along with the samespecies check should be in the defecate file. In the defecate file...you need to force the target to the mating FSM and have a copy of the mating FSM in the defecate file.
Image
Look at me, don't look away... don't ever look away, you'll be looking at me forever!
The GEPv2 Trailer The GEPv2 Download
User avatar
Melea Lord
G.E.P. member
G.E.P. member
 
Posts: 2360
Joined: Wed, 25th Jul 2007 12:50
Location: Britain, Essex
Gender: Male
User Title: FSM Personnel #2

Re: FSM Modding Tutorial

Unread postby Venatosaurus » Tue, 4th Sep 2007 9:04

Is it possible.That if this mod those work, after the dino's finish "mating",a dinosaur of the same species would pop out of nowhere..This could be a baby..
Image
Venatosaurus
Harmless Carnivore
Harmless Carnivore
 
Posts: 157
Joined: Fri, 13th Jul 2007 11:16

Re: FSM Modding Tutorial

Unread postby Melea Lord » Tue, 4th Sep 2007 10:54

Venatosaurus wrote:Is it possible.That if this mod those work, after the dino's finish "mating",a dinosaur of the same species would pop out of nowhere..This could be a baby..


Nope...we would have to apply the baby poop mod as well.
Image
Look at me, don't look away... don't ever look away, you'll be looking at me forever!
The GEPv2 Trailer The GEPv2 Download
User avatar
Melea Lord
G.E.P. member
G.E.P. member
 
Posts: 2360
Joined: Wed, 25th Jul 2007 12:50
Location: Britain, Essex
Gender: Male
User Title: FSM Personnel #2

Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

Help keep this forum ad-free - please Donate


This free, ad-free forum is hosted by ForumLaunch
cron