Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Custom Horse Scripting Options.


myrmaad
 Share

Recommended Posts

Following is a variable that I made up just for that script, so I can reference that variable throughout that script as much as I like. If the script was a quest script I can reference it from other scripts too :). How do you know about globals and now script variables?

Example:

Short Jello

Begin GameMode

If Jello == 0
MessageBox"Beware Jello is quite the mad hatter :)"
Endif
Set Jello to 1
End[/code]

Attach that to a quest script, test in-game and that message will be displayed once :)

Link to comment
Share on other sites

Da Mad Hatter! :P

What's the Mad Hatter? :)

Anyways;

So, We have a basic idea of what to make for Myrmaad's horse-script. Who would've known this'd be such a long process. :)

A mad person from Alice in Wonderland, only know this becuase Johnny Depp is gonna play him in the new film :)

Its only a long process when you are learning new ways of developing something, in theory something like this is simple, but when you start adding ideas and other options the practical side of things becomes harder and a longer process.

Link to comment
Share on other sites

I am trying to learn to script myself. I don't think I'm the only one. Of course there are multiple ways to "skin a cat", there always are, but seeing the different approaches is helpful. It's a great exercise.

But more to the point, the killer horse app has not yet been made, and we are brain-storming here an applet/mod that I think would fill a huge void in the community. I appreciate all the approaches, I hoped for as much.

Link to comment
Share on other sites

Just wondering here, is this to be used for multiple horses or just one?

I am also willing to to both write or show examples of how the menu will work, though how it works depends entirely on how many commands you would want.

I think it would be much more valuable if it accommodated multiple horse ownership. This is something I have looked for extensively and as far as I know it's never been done.

There is one mod I haven't used myself that offers a horse farm near the IC but I believe it just uses the "HorseGoHome" AI package on the horses.

I'm going to start investigating all the ones I have and know of.

I always noticed that the Shivering Isles horse mod seemed to have the very best AI, and it had a whistle you could use to call the horse to you when you needed him.

Link to comment
Share on other sites

Hmm multiple horses is harder, will have to brainstorm a way of making this work as easy as possible for the user :P

Do you want me to find examples of mods that add similar functionalities?

The reason I ask, is there is a mod I use in Morrowind that allows you to "tune" to a companion, and lets you talk with the companion in case they get lost.

The mod is

GRM_Companion_Recall_Ring by Grant McDorman

I don't know if it would be helpful, but it may be interesting to see his approach to the script:

Begin _GRM_CompanionRing

; Version 1.0.

;

; Grant McDorman 14 January 2007

;

; This script provides a generic "companion recall" ring. It can be used

; with any NPC that is in "follow" mode (i.e. that is following you).

;

; There is no associated dialog.

;

; It is "tuned to" (associated with) a companion by putting it on.

; The player is then presented with a list of nearby NPCs who are in

; follow mode (up to 8); the player can select an NPC from the list

; or cancel.

;

; Once "tuned", attempting to equip the ring will not actually equip it,

; but will take various actions:

; * If the NPC cannot be found or is dead, a message will be displayed

;   and the player will have the option of resetting the ring.

; * If the NPC is within sight (can see the player), then the player

;   is presented with the options of talking to the NPC or resetting the

;   ring.

; * Finally, if the NPC is not within sight, the player is presented with

;   a message giving the NPC's location, and giving the options of talking,

;   teleporting the NPC here, resetting the ring, or doing nothing.

;

; Note that currently, no effect is played when the NPC is "summoned" (since

; this is a ring, and in any event it doesn't seem to be possible to force

; a player cast effect).

;

; Each ring can be associated with a unique NPC. They do not interfere with

; each other.

;

; Inspired by various generic companion teleport/communication rings.


short OnPCEquip

short PCSkipEquip


long newCompanionRef  ; Set to ID (internal name) of companion when ring

                     ; is associated with a companion.



short initMessage    ; display the initialization message

short initCheck      ; check which, if any, companion was selected to attach


short displayMessage ; display the initial communication message


long discard         ; temporary variable, for various uses


; ID of associated companion, saved as long

; max 4*16 = 64 characters

long n00

long n01

long n02

long n03

long n04

long n05

long n06

long n07

long n08

long n09

long n10

long n11

long n12

long n13

long n14

long n15



float disp         ; disposition, used when "nothing" is selected

float health       ; Health. Used to check for dead companion.

short disabled     ; Enabled/disabled state.

short canSee       ; Companion can see player.


short checkInSight ; Check answer to in sight query ("talk", "reset ring")

short checkReset   ; Check answer to reset query when companion can't be detected.

short checkAnswer  ; Message is displayed, check for button press.

short button       ; Button pressed.

short teleportHere ; Player chose "come here" option.

short forceGreet   ; Player chose "talk" option.

short noAction     ; Player chose "nothing" option.


short polite       ; Respond politely (or not) when player choses "nothing."


long companionID   ; ID of companion.

long companionRef  ; reference to companion

long companionName ; companion's display name

long cellName      ; companion's cell name, if available


; Player's location.

float px

float py

float pz

float pa


; Setup variables; up to 8 companions will be examined.

long companion1     ; References to companions (not IDs or names).

long companion2

long companion3

long companion4

long companion5

long companion6

long companion7

long companion8

long name1          ; Display names of the companions (xGetName).

long name2

long name3

long DoNotUse_long  ; long #34, do not use due to MW bugs

long name4

long name5

long name6

long name7

long name8


; If the ring is "tuned", do not equip it.

if (n00 != 0)

  set PCSkipEquip to 1

endif


; Don't do anything when a menu is active.

if ( MenuMode != 0)

  return

endif


; If equipped, either display the normal message or the tuning message.

if (OnPCEquip != 0)

  if (n00 != 0)

    set displayMessage to 1

  else

    set initMessage to 1

  endif

  set OnPCEquip to 0

endif


; Set up the ring to attach to a companion.

ifx (initMessage)

  ; Find companions in this cell.

  set companion1 to 0

  set companion2 to 0

  set companion3 to 0

  set companion4 to 0

  set companion5 to 0

  set companion6 to 0

  set companion7 to 0

  set companion8 to 0

  setx companionRef to xFirstNPC

  whilex (companionRef)

    xSetRef companionRef

    set discard to GetCurrentAIPackage

    if (discard != 3)

      set discard to 0

    endif

    ifx (discard)

      if (companion1 == 0)

        set companion1 to companionRef

      elseif (companion2 == 0)

        set companion2 to companionRef

      elseif (companion3 == 0)

        set companion3 to companionRef

      elseif (companion4 == 0)

        set companion4 to companionRef

      elseif (companion5 == 0)

        set companion5 to companionRef

      elseif (companion6 == 0)

        set companion6 to companionRef

      elseif (companion7 == 0)

        set companion7 to companionRef

      elseif (companion8 == 0)

        set companion8 to companionRef

      else

      endif

    endif

    setx companionRef to xNextRef companionRef

  endwhile


  ifx (companion1)

    setx name1 to companion1->xGetName

  else

    MessageBox "There are no companions nearby to tune the ring to. (The companion has to be following you for the tuning to work.)"

    set initMessage to 0

    return

  endif


  ifx (companion2)

    setx name2 to companion2->xGetName

  else

    xMessageFix "Tune to?" name1 "Cancel"

    MessageBox "Tune to?" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "Cancel"

    set initMessage to 0

    set initCheck to 1

    return

  endif


  ifx (companion3)

    setx name3 to companion3->xGetName

  else

    xMessageFix "Tune to?" name1 name2 "Cancel"

    MessageBox "Tune to?" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "Cancel"

    set initMessage to 0

    set initCheck to 1

	  return

  endif


  ifx (companion4)

    setx name4 to companion4->xGetName

  else

    xMessageFix "Tune to?" name1 name2 name3 "Cancel"

    MessageBox "Tune to?" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "Cancel"

    set initMessage to 0

    set initCheck to 1

	  return

  endif


  ifx (companion5)

    setx name5 to companion5->xGetName

  else

		xMessageFix "Tune to?" name1 name2 name3 name4 "Cancel"

		MessageBox "Tune to?" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "Cancel"

    set initMessage to 0

    set initCheck to 1

	  return

  endif


  ifx (companion6)

    setx name6 to companion6->xGetName

  else

		xMessageFix "Tune to?" name1 name2 name3 name4 name5 "Cancel"

		MessageBox "Tune to?" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "Cancel"

    set initMessage to 0

    set initCheck to 1

	  return

  endif


  ifx (companion7)

    setx name7 to companion7->xGetName

  else

		xMessageFix "Tune to?" name1 name2 name3 name4 name5 name6 "Cancel"

		MessageBox "Tune to?" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "Cancel"

    set initMessage to 0

    set initCheck to 1

	  return

  endif


  ifx (companion8)

    setx name8 to companion8->xGetName

  else

		xMessageFix "Tune to?" name1 name2 name3 name4 name5 name6 name7 "Cancel"

		MessageBox "Tune to?" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "Cancel"

    set initMessage to 0

    set initCheck to 1

	  return

  endif

  xMessageFix "Tune to?" name1 name2 name3 name4 name5 name6 name7 name8 "Cancel"

  MessageBox "Tune to?" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" "Cancel"

  set initMessage to 0

  set initCheck to 1

  return

endif


; Check which button was pressed in response to the initial tuning

; message. Note that the "last" button is always cancel, even if there

; are fewer than 8 NPCs found; if there are fewer than 8, then

; the associated variable (companion2-8) will be zero.

ifx (initCheck)

  set newCompanionRef to 0

  set button to GetButtonPressed

  if (button == -1)

    return

  endif

  set initCheck to 0

  if (button == 0)

    set newCompanionRef to companion1

  elseif (button == 1)

    set newCompanionRef to companion2

  elseif (button == 2)

    set newCompanionRef to companion3

  elseif (button == 3)

    set newCompanionRef to companion4

  elseif (button == 4)

    set newCompanionRef to companion5

  elseif (button == 5)

    set newCompanionRef to companion6

  elseif (button == 6)

    set newCompanionRef to companion7

  elseif (button == 7)

    set newCompanionRef to companion8

    set initCheck to 0

  endif

  ; If a button corresponding to a companion was selected,

  ; convert the companion's ID into long variables (so it gets stored

  ; with saves).

  ifx (newCompanionRef)

    setx companionID to newCompanionRef->xRefID

    xFileRewind "grm_companionring_temp"

    xFileWriteString "grm_companionring_temp", companionID

    ; fill with zeros so the xFileReadLong below will read all 16

    ; values

    set discard to 16

    whilex (discard)

      xFileWriteLong "grm_companionring_temp", 0

      set discard to discard-1

    endwhile

    xFileRewind "grm_companionring_temp"

    set n00 to 0

    set n01 to 0

    set n02 to 0

    set n03 to 0

    set n04 to 0

    set n05 to 0

    set n06 to 0

    set n07 to 0

    set n08 to 0

    set n09 to 0

    set n10 to 0

    set n11 to 0

    set n12 to 0

    set n13 to 0

    set n14 to 0

    set n15 to 0

    setx discard, n00, n01, n02, n03, n04, n05, n06, n07, n08, n09, n10, n11, n12, n13, n14, n15 to xFileReadLong "grm_companionring_temp" 16

    xFileRewind "grm_companionring_temp"

    setx companionName to newCompanionRef->xGetName

    xMessageFix "The ring is now tuned to %s.", companionName

    MessageBox "The ring is now tuned to ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456."

    set newCompanionRef to 0

    return

  else

    MessageBox "Cancelled."

  endif

endif


; Display the initial communication message.

; This converts the stored form back to a string (thus avoiding

; worries about save/restore; since this is in a dialog/menu,

; performance is not a problem).

ifx (displayMessage)

  set displayMessage to 0

  ; Convert long variables to strings.

  xFileRewind "grm_companionring_temp"

  xFileWriteLong "grm_companionring_temp", n00

  xFileWriteLong "grm_companionring_temp", n01

  xFileWriteLong "grm_companionring_temp", n02

  xFileWriteLong "grm_companionring_temp", n03

  xFileWriteLong "grm_companionring_temp", n04

  xFileWriteLong "grm_companionring_temp", n05

  xFileWriteLong "grm_companionring_temp", n06

  xFileWriteLong "grm_companionring_temp", n07

  xFileWriteLong "grm_companionring_temp", n08

  xFileWriteLong "grm_companionring_temp", n09

  xFileWriteLong "grm_companionring_temp", n10

  xFileWriteLong "grm_companionring_temp", n11

  xFileWriteLong "grm_companionring_temp", n12

  xFileWriteLong "grm_companionring_temp", n13

  xFileWriteLong "grm_companionring_temp", n14

  xFileWriteLong "grm_companionring_temp", n15

  xFileRewind "grm_companionring_temp"

  setx companionID to xFileReadString "grm_companionring_temp"


  setx companionRef to xGetRef companionID

  ifx (companionRef)

    ; Make sure the companion is alive and enabled.

    ; (Fatigue is not checked.)

    xSetRef companionRef

    set health to GetHealthGetRatio

    if (health > 0)

      xSetRef companionRef

      set disabled to GetDisabled

    else

      set disabled to 1

    endif

    ; Regrettably there is no way of checking local variables

    ; (to wit, 'companion'). Using AI (GetCurrentAIPackage) is not

    ; appropriate, since the companion could have been told to wait

    ; or guard.

    setx companionName to companionRef->xGetName

    ifx (disabled)

      ; The companion is disabled or dead.

      xMessageFix "There is no response from %s. Reset the ring?", companionName, "Yes", "No"

      MessageBox "There is no response from ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456. Reset the ring?", "Yes", "No"

      set checkReset to 1

    else

      ; If the companion can see the player just force greeting.

      xSetRef companionRef

      set canSee to GetLOS Player

      ifx (canSee)

        xMessageFix "%s is within sight of you. What do you want to do?", companionName, "Talk", "Reset Ring"

        MessageBox "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456 is within sight of you. What do you want to do?", "Talk", "Reset Ring"

        set checkInSight to 1

        return        

      endif

      ; Can't see the player.

      setx cellName to companionRef->XMyCellID

      ; Under some circumstances (possibly after 72 hours alone?), the

      ; cell name of the companion can no longer be retrieved.

      ifx (cellName)

        xMessageFix "%s: Hi, ^PCName. I'm in %s. What is it?", companionName, cellName, "Come Here", "Talk", "Nothing", "Reset Ring"

        MessageBox "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456: Hi, ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456. I'm in ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456. What is it?", "Come Here", "Talk", "Nothing", "Reset Ring"

        set checkAnswer to 1

      else

        xMessageFix "%s: Hi, ^PCName. Um, I'm lost. What is it?", companionName, "Come Here", "Talk", "Nothing", "Reset Ring"

        MessageBox "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456: Hi, ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456. Um, I'm lost. What is it?", "Come Here", "Talk", "Nothing", "Reset Ring"

        set checkAnswer to 1

      endif

    endif

  else

    xLogMessage "_GRM_Companion_Recall_Ring: Couldn't find companion %s.", companionID

    ifx (n00)

      MessageBox "The ring vibrates but does nothing. Perhaps it can't detect your companion. Should it be reset?", "Yes", "No"

      set checkReset to 1

    else

      MessageBox "The ring vibrates but does nothing. Did you tune it to a companion?", "OK"

    endif

  endif

  return

endif


; Check which button was pressed when the ring can't find the companion,

; or the companion is dead or disabled.

ifx (checkReset)

  set button to GetButtonPressed

  if (button == -1)

    return

  endif


  set checkReset to 0

  if (button == 0)

    set n00 to 0

  endif

  ifx (n00)

  else

    xMessageFix "The ring is no longer tuned to %s.", companionName

    MessageBox "The ring is no longer tuned to ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456."

  endif

endif


; Check which button was pressed for in-sight communication.

ifx (checkInSight)

  set button to GetButtonPressed

  if (button == -1)

    return

  endif


  set checkInSight to 0

  ifx (button) ; reset

    set n00 to 0

  else ; talk

    xSetRef companionRef

    ForceGreeting

  endif

  ifx (n00)

  else

    xMessageFix "The ring is no longer tuned to %s.", companionName

    MessageBox "The ring is no longer tuned to ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456."

  endif


endif


; Check to see which button was pressed, if any, for distance communication.

ifx (checkAnswer)

  set button to GetButtonPressed

  if (button == -1)

    return

  endif


  set checkAnswer to 0

  if (button == 0)

    set teleportHere to 1

  elseif (button == 1)

    set forceGreet to 1

  elseif (button == 2)

    set noAction to 1

  elseif (button == 3)

    set n00 to 0

  endif

  ifx (n00)

  else

    xMessageFix "The ring is no longer tuned to %s.", companionName

    MessageBox "The ring is no longer tuned to ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456."

  endif

endif


; "Come Here" was chosen. Teleport companion here.

ifx (teleportHere)

  xMessageFix "You summon %s to you with the ring.", companionName

  MessageBox "You summon ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456 to you with the ring."

  ; Acquired from Improved Teleportation 2.0.

  ; Get player's current location

  set px to player->GetPos X

  set py to player->GetPos Y

  set pz to player->GetPos Z

  set pa to player->GetAngle Z

  ; Move companion slightly in front of player

  ; [note: what if player has their nose in a wall? - grm]

  set pz to pz - 25

  if ( pa < 60 )	

    if ( pa > -60 )

      set py to py + 50

    elseif ( pa < -120 )	

      set py to py - 50

    endif

  elseif ( pa > 120 )

    set py to py - 50

  endif

  if ( pa > 30 )	

    if ( pa < 150 )

      set px to px + 50

    endif

  elseif ( pa < -30 )

    if ( pa > -150 )

      set px to px - 50

    endif

  endif

  set pa to pa + 180

  setx cellName to xPCCellId

  companionRef->xPositionCell px py pz pa cellName

  xSetRef companionRef

  Disable

  xSetRef companionRef

  Enable

  set teleportHere to 0

endif


; "Talk" was chosen.

ifx (forceGreet)

  xSetRef companionRef

  ForceGreeting

  set forceGreet to 0

endif


; "Nothing" was chosen.

ifx (noAction)

  xSetRef companionRef

  set disp to GetDisposition

  if (disp > 75)

    set polite to 1

  else

    set polite to 0

  endif

  ifx (polite)

    xMessageFix "%s: Nothing? OK, talk to you later.", companionName

    MessageBox "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456: Nothing? OK, talk to you later."

  else

    xMessageFix "%s: Nothing? Then why did you bother me? *grumble*", companionName

    MessageBox "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456: Nothing? Then why did you bother me? *grumble*"

  endif

  set noAction to 0

endif



end

Link to comment
Share on other sites

Hmmm looks good, something similar for horses would not be too hard, the hardest part is tying the scripts to the horses. So say you had 4 options for horses, you would need to get the ID or something else for each horse for a central spell to work correctly :P

In order to wrap my head around this concept, I would like to post the Shivering Isles script I mentioned for some comparison.

My CS is on a different computer than this so I will edit this post later.

I mentioned above how early in my Oblivion game play I lost a favorite horse.

Later it happened again, but by then I had grown to be a savvy player, and what I did then, was load an earlier savegame in which I was standing looking at my horse at the moment of the save. I then simply opened the Console (not the CS sorry for typo/thinko/crapo) and copied down his ID, reloaded my current game and used the moveto command to go find him.

Link to comment
Share on other sites

Question: Will the horses ID's be entered via the CS?, if so then what you want will be far easier to make.

But the main downside is that when you make or aquire a new horse it must be in the same ESP as the script and the ID added into the script. I can easily whip up a menu of commands for a horse that allows you to recall it and things like that, specifically for that horse.

Link to comment
Share on other sites

Question: Will the horses ID's be entered via the CS?, if so then what you want will be far easier to make.

But the main downside is that when you make or aquire a new horse it must be in the same ESP as the script and the ID added into the script. I can easily whip up a menu of commands for a horse that allows you to recall it and things like that, specifically for that horse.

Humor me for a moment but I just have to toss out this horrible idea! It's truly a stinker!

So say we have the "horse ranch" mod. For lack of another name.

And so we want all the horses in the ranch to be in the plugin.

But - the fly in this ointment, is we want to be able accommodate other mod-added horses. So maybe there's some kind of placeholder, to add horses from other mods.. not so sure about that piece.

But even if that's not do-able..

We could have a horse character creation screen. Where you pick the horse textures, male or female or gelding, and mane color and length, tail color & length, all that stuff you do when you're creating a horse for your own mod. Set them all to be automatically a good horse, you know essential, fast and all that jazz, and maybe even give the option for a daedric or undead version of the horses at the ranch.

And then you could outfit them in the various horse attire dependent.

Then even if you couldn't get your favorite mod added horse into your game you could essentially design all the horses you owned at your horse ranch.

Kill me now!

Link to comment
Share on other sites

Here are the scripts at work in GGShiveringExp -- a mod that adds a nice stable to the Shivering Isles, and gives you a whistle that will summon your horse to you after you purchase it.

Buyable Horses Script

ScriptName GGSIStableSellScript

;Non-OBSE

short doOnce

Begin GameMode

if doOnce <= 0

AddTopic GGBuyBlack

AddTopic GGBuyChest

AddTopic GGBuyWhite

AddTopic GGNevermind

set doOnce to 1

endif

end

Ownership Script -Black Horse

ScriptName GGHorsePCBlackScript

;Shivering Isles Black Horse Kung Fu Script

;August 2008 - Gregg "Deepfreeze" Gean

;Non-OBSE

Short RespawnHorse

Short TellPC

Short NewWorld

Short Mounted

Short MoveOut

Begin OnDeath

Set RespawnHorse to 1

Set GGSIHorseQuest.OwnSIBlack to 0

Set Mounted to 0

HorseSaleBlackSIRef.Enable

ModPCMiscStat 14 -1

End

Begin OnPackageEnd GGHorseBlackSIGoHome

If TellPC == 0 && Mounted == 1

If GetInWorldSpace SEWorld == 1

Message "Your Black horse has returned to Shivering Isles stables."

Set TellPC to 1

EndIf

EndIf

End

Begin OnPackageEnd GGBlackTravelToPlayer

set MoveOut to 0 ;clear the travel package condition

GGStableGate.enable ;re-enable the stable gate (disable to prevent horses from hanging up on it and never getting out of the corral.

evp ;make sure the travel package is dead

SetEssential HorsePCSIBlack 0 ;horse reached the player so we remove the essential status.

End

Begin OnActivate

if isActionRef player == 1

If GGSIHorseQuest.StumpyPresent == 1

Set GGSIHorseQuest.StumpyPresent to 0

Set Mounted to 1

Endif

EndIf

Set TellPC to 0

Activate

EvaluatePackage

End

Begin GameMode

if RespawnHorse == 1

Set GGSIHorseQuest.OwnSIBlack to 0

HorseOwnBlackSIRef.resurrect

HorseOwnBlackSIRef.disable

set RespawnHorse to 0

endif

end

Respawn script (in case horse dies before bought)

ScriptName GGHorseResurrectScript

;Shivering Isles HorsesForSale Resurrect Script

;August 2008 - Gregg "Deepfreeze" Gean

;Non-OBSE

short RespawnHorse

Begin OnDeath

Set RespawnHorse to 1

End

Begin GameMode

;Just in case one of the horses for sale dies.

if RespawnHorse == 1

if HorseSaleBlackSIRef.GetDead == 1

HorseSaleBlackSIRef.Moveto GGHorseReturnMarker

HorseSaleBlackSIRef.resurrect

set RespawnHorse to 0

elseif HorseSaleChestSIRef.GetDead == 1

HorseSaleChestSIRef.Moveto GGHorseReturnMarker

HorseSaleChestSIRef.resurrect

set RespawnHorse to 0

elseif HorseSaleWhiteSIRef.GetDead == 1

HorseSaleWhiteSIRef.Moveto GGHorseReturnMarker

HorseSaleWhiteSIRef.resurrect

set RespawnHorse to 0

endif

endif

end

Give Whistle script

ScriptName GGSIHorseQuestScript

;Non-OBSE

Short NewWorld

Short OwnSIWhite

Short OwnSIBlack

Short OwnSIChest

Short StumpyPresent

Short GiveWhistle

Begin GameMode

;Give the player the whistle the first time they buy a horse in the Isles.

if GiveWhistle != 1

if OwnSIWhite == 1 || OwnSIBlack == 1 || OwnSIChest == 1

set GGSIHorseQuest.GiveWhistle to 1

Player.AddItem GGSIHorseCall 1

endif

endif

;Handles transition if player gets back in the Tamriel Worldspace to make sure the horse stays in Shivering Isles

if Player.GetInWorldSpace Tamriel == 1 && NewWorld != 1

if GGSIHorseQuest.OwnSIBlack == 1

HorseOwnBlackSIRef.moveto GGHorseReturnMarker

endif

if GGSIHorseQuest.OwnSIWhite == 1

HorseOwnWhiteSIRef.moveto GGHorseReturnMarker

endif

if GGSIHorseQuest.OwnSIChest == 1

HorseOwnChestSIRef.moveto GGHorseReturnMarker

endif

elseif Player.GetInWorldSpace SEWorld ==1 && NewWorld == 1

set NewWorld to 0

endif

end

Horse Whistle Call (summon) script

ScriptName GGHorseyCall

;Shivering Isles Horse Whistle Script

;August 2008 - Gregg "Deepfreeze" Gean

;Script that allows player to call for their SI owned horse(s), bought at the Shivering Isles Stables. This is NOT a summon. It initiates a travel

;package on the horse that gets it to the player. SI isn't that big, and teleporting horses in doesn't seem realistic, so this should work.

short buttonVar

short DaCondition

ref refVar1

ref refVar2

ref refVar3

Begin OnEquip

;First, lets see where the player is because you know people will try to use this everywhere they're not supposed to.

;If they're not in the SE Worldspace, the script gets killed.

if Player.GetInWorldSpace SEWorld == 0 || Player.IsInInterior == 1 || Player.GetInWorldSpace SEDementiaGarden == 1 || Player.GetInWorldSpace SEManiaGarden == 1

MessageBox "The whistle won't work here."

return

elseif Player.GetInWorldSpace SENSBliss == 1 || Player.GetInWorldSpace SENSCrucible == 1 || Player.GetInWorldSpace SENSPalace == 1

MessageBox "The whistle won't work here."

return

elseif Player.GetInWorldSpace SETheFringe == 1|| Player.GetInWorldSpace SETheFringeOrdered == 1 || Player.GetInWorldSpace SEVitharnWorld == 1

MessageBox "The whistle won't work here."

return

endif

;Set the reference variables

set refVar1 to HorseOwnBlackSIRef

set refVar2 to HorseOwnChestSIRef

set refVar3 to HorseOwnWhiteSIRef

;Figure which horses player owns and set conditions for button pressed checks in the Begin Gamemode block

;Player owns all three horses

if GGSIHorseQuest.OwnSIBlack == 1 && GGSIHorseQuest.OwnSIChest == 1 && GGSIHorseQuest.OwnSIWhite == 1

set DaCondition to 1

MessageBoxEx "Which horse are you calling?|%n|%n|%n| Cancel" refVar1 refVar2 refVar3

;Player owns the black and chestnut horses

elseif GGSIHorseQuest.OwnSIBlack == 1 && GGSIHorseQuest.OwnSIChest == 1 && GGSIHorseQuest.OwnSIWhite == 0

set DaCondition to 2

MessageBoxEx "Which horse are you calling?|%n|%n| Cancel" refVar1 refVar2

;Player owns the black and white horses

elseif GGSIHorseQuest.OwnSIBlack == 1 && GGSIHorseQuest.OwnSIWhite == 1 && GGSIHorseQuest.OwnSIChest == 0

set DaCondition to 3

MessageBoxEx "Which horse are you calling?|%n|%n| Cancel" refVar1 refVar3

;Player owns the chestnut and white horses

elseif GGSIHorseQuest.OwnSIChest == 1 && GGSIHorseQuest.OwnSIWhite == 1 && GGSIHorseQuest.OwnSIBlack == 0

set DaCondition to 4

MessageBoxEx "Which horse are you calling?|%n|%n| Cancel" refVar2 refVar3

;Player owns only a single horse, be it a black, chesnut, or white

elseif GGSIHorseQuest.OwnSIBlack == 1 && GGSIHorseQuest.OwnSIChest == 0 && GGSIHorseQuest.OwnSIWhite == 0

set DaCondition to 5

MessageBoxEx "Which horse are you calling?|%n| Cancel" refVar1

elseif GGSIHorseQuest.OwnSIChest == 1 && GGSIHorseQuest.OwnSIWhite == 0 && GGSIHorseQuest.OwnSIBlack == 0

set DaCondition to 6

MessageBoxEx "Which horse are you calling?|%n| Cancel" refVar2

elseif GGSIHorseQuest.OwnSIWhite == 1 && GGSIHorseQuest.OwnSIBlack == 0 && GGSIHorseQuest.OwnSIChest == 0

set DaCondition to 7

MessageBoxEx "Which horse are you calling?|%n| Cancel" refVar3

;Player doesn't own any SI Horses

else

MessageBox "You don't own any SI horses!"

endif

end

Begin GameMode

set buttonVar to GetButtonPressed

if buttonVar > -1

if DaCondition == 1

if buttonVar == 0

GGStableGate.disable

set HorseOwnBlackSIRef.MoveOut to 1 ;set variable on the ref horse to make travel package valid

HorseOwnBlackSIRef.evp ;make sure the horse uses the travel package

SetEssential HorsePCSIBlack 1 ; keep the horse alive until it reaches the player. When it reaches the player the essential flag goes back to 0.

Message "Your black horse is on its way."

endif

if buttonVar == 1

GGStableGate.disable

set HorseOwnChestSIRef.MoveOut to 1

HorseOwnChestSIRef.evp

SetEssential HorsePCSIChestnut 1

Message "Your chestnut horse is on its way."

endif

if buttonVar == 2

GGStableGate.disable

set HorseOwnWhiteSIRef.MoveOut to 1

HorseOwnWhiteSIRef.evp

SetEssential HorsePCSIWhite 1

Message "Your white horse is on its way."

endif

elseif DaCondition == 2

if buttonVar == 0

GGStableGate.disable

set HorseOwnBlackSIRef.MoveOut to 1

HorseOwnBlackSIRef.evp

SetEssential HorsePCSIBlack 1

Message "Your black horse is on its way."

endif

if buttonVar == 1

GGStableGate.disable

set HorseOwnChestSIRef.MoveOut to 1

HorseOwnChestSIRef.evp

SetEssential HorsePCSIChestnut 1

Message "Your chestnut horse is on its way."

endif

elseif DaCondition == 3

if buttonVar == 0

GGStableGate.disable

set HorseOwnBlackSIRef.MoveOut to 1

HorseOwnBlackSIRef.evp

SetEssential HorsePCSIBlack 1

Message "Your black horse is on its way."

endif

if buttonVar == 1

GGStableGate.disable

set HorseOwnWhiteSIRef.MoveOut to 1

HorseOwnWhiteSIRef.evp

SetEssential HorsePCSIWhite 1

Message "Your white horse is on its way."

endif

elseif DaCondition == 4

if buttonVar == 0

GGStableGate.disable

set HorseOwnChestSIRef.MoveOut to 1

HorseOwnChestSIRef.evp

SetEssential HorsePCSIChestnut 1

Message "Your chestnut horse is on its way."

endif

if buttonVar == 1

GGStableGate.disable

set HorseOwnWhiteSIRef.MoveOut to 1

HorseOwnWhiteSIRef.evp

SetEssential HorsePCSIWhite 1

Message "Your white horse is on its way."

endif

elseif DaCondition == 5

if buttonVar == 0

GGStableGate.disable

set HorseOwnBlackSIRef.MoveOut to 1

HorseOwnBlackSIRef.evp

SetEssential HorsePCSIBlack 1

Message "Your black horse is on its way."

endif

elseif DaCondition == 6

if buttonVar == 0

GGStableGate.disable

set HorseOwnChestSIRef.MoveOut to 1

HorseOwnChestSIRef.evp

SetEssential HorsePCSIChestnut 1

Message "Your chestnut horse is on its way."

endif

elseif DaCondition == 7

if buttonVar == 0

GGStableGate.disable

set HorseOwnWhiteSIRef.MoveOut to 1

HorseOwnWhiteSIRef.evp

SetEssential HorsePCSIWhite 1

Message "Your white horse is on its way."

endif

endif

endif

end

Remain Shivering Horse script

endif

;Handles transition if player gets back in the Tamriel Worldspace to make sure the horse stays in Shivering Isles

if Player.GetInWorldSpace Tamriel == 1 && NewWorld != 1

if GGSIHorseQuest.OwnSIBlack == 1

HorseOwnBlackSIRef.moveto GGHorseReturnMarker

endif

if GGSIHorseQuest.OwnSIWhite == 1

HorseOwnWhiteSIRef.moveto GGHorseReturnMarker

endif

if GGSIHorseQuest.OwnSIChest == 1

HorseOwnChestSIRef.moveto GGHorseReturnMarker

endif

elseif Player.GetInWorldSpace SEWorld ==1 && NewWorld == 1

set NewWorld to 0

endif

end

There are custom AI packages as well and I haven't shown the relationship to which these scripts are attached, but maybe that's obvious.. gotta run!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...