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...

ulrim

Allies
  • Posts

    29
  • Joined

  • Last visited

Posts posted by ulrim

  1. From what I understand:

    If the player is not in the house (aavLEMInHouse == 0):

    - move aavLEMMarkB to player location (in the world)

    - move player to aavLEMMarkA (I suppose this is the marker inside the house)

    If the player is in the house (aavLEMInHouse == 1):

    - move player to aavLEMMarkB (where player came from)

    Remarks:

    - fast travel from the house should be disabled so the spell works right.

    - without any other way to travel to a location other than where the player came from, how is that supposed to make the player appear in Cyrodiil instead of SI, and vice-versa?

    (edit: I got it. LAME or other teleportation spells.)

    Then again, best bet is to warn user to not use any other teleportation spells or you are going to have to fix the spell in case other teleportation method is used.

    (@Willie:

    quick looking at AncientSpellTeleportScript, your SI checks are also bypassed in case player uses custom teleportation, am I wrong?)

  2. I could add a stay command, so horses stay at the current location when player fast travels.

    I'm just waiting for the new OBSE 19 to come out...

    EDIT.

    Actually, I have this mod finished but I won't be releasing it.

    Armor sounds are not updated on horses because I am waiting for the SetCreatureSoundBase function.

    I have moved on to another project.

    Not many people interested in *modding* horses (at least for horse armors, equipment slots and AI), so I may get back at requests or improvements after this is released.

  3. I'm working on AI for horses. Still have some issues matching a horse reference with an editor ID.

    The idea is make a horse follow another horse right? It is easy to implement with an AI package and a marker.

    Set the AI package to follow marker. Set a monitor quest script to move the marker to the target horse to be followed. Assign the AI package to the horse that carries stuff. The monitor could make the horse act like a container. Like, when it is activated, open a custom container to put your stuff, just like Maboroshi done with saddle bags.

    Nice idea.

    I should be getting some other workaround soon if I don't get any help with the scripting.

    I've posted here on the study hall and also on bethsoft's cs forum section.

  4. ref horseRef
    
    
    short horseFound
    
    short showMsg
    
    
    set horseRef to GetPCLastHorse
    
    
    if horseRef == HorsePCWhiteAnvilRef  ; original intention, isn''t recommended to use
    
    
    (also tried:)
    
    
    if horseRef.GetIsReference HorsePCWhiteAnvilRef  ; EditorID
    
    if horseRef.GetIsID HorsePCWhiteAnvil  ; Base Object
    
    
    (and this stops script from running because HorsePCWhiteAnvil is already a Base Obj.
    
    
    set baseObj to horseRef.GetBaseObject
    
    
    if baseObj.GetIsID HorsePCWhiteAnvil
    
    
      let horseFound := 1
    
      let showMsg := 1
    
      ; do something
    
    else
    
      let horseFound := 0
    
    endif
    
    
    if showMsg
    
      if horseFound
    
        Message "I Found AnvilWhite horse."
    
      else
    
        Message "I found nothing."
    
      endif
    
      let showMsg := 0
    
    endif[/code]

    Results:

    Found nothing so far.

    Can you help me find it?

  5. Update with the script.

    I've let this message on beth, hope you don't mind me posting here too.

    I've been trying to associate two objects by array with little success. Maybe one of you could help.

    Is it a good idea to use string map arrays to associate references? Feel free to discuss your opinion, too.

    The idea is to mark some location with a marker reference. An AI package tracks the reference, affecting behavior of a creature.

    For each creature that the mod changes, give it a unique marker. (One marker for each creature.)

    Basic idea:

    ref creature		 ; some selected creature by external script
    
    ref markerRef		; marker the AI package targets
    
    
    array_var markers	; the association between creatures and markers!
    
    array_var item
    
    
    short newMarker
    
    
    if eval !(markers)					   ; array not initialised before
    
      let markers := ar_Construct StringMap
    
    endif
    
    
    ForEach item <- markers				  ; check if this creature has a marker already associated
    
      if eval creature := item["key"]
    
    	let markerRef := item["value"]	   ; already has one, get marker
    
      else
    
    	let newMarker := 1				   ; doesn't have one, lets give the creature a new marker
    
      endif
    
    loop
    
    
    if newMarker
    
      let markerRef := CloneForm xMarkerRef  ; xMarkerRef is the one created in the CS Editor
    
      let markers[creature] := markerRef	 ; associate the creature with the marker
    
      let newMarker := 0
    
    endif
    
    
    ; do stuff with marker
    
    markerRef.MoveTo player
    
    
    ; update creature AI
    
    if eval !(creature.GetIsCurrentPackage somePkgWithMarker)
    
      creature.AddScriptPackage somePkgWithMarker
    
      creature.EvaluatePackage
    
    endif
    This doesn't work. The error goes like: "Invalid operands for operator [." To make it work you have to do like this:
    let markers[$(creature)] := markerRef

    The problem is, when calling toString (or the "$" sign) on a reference, it takes the object name if it has one. However, different objects may have the same name.

    I just want to associate two objects by taking their references.

    It is meant to pass the object ID (or ref) to the StringMap array and check if there is one. If $(creature) passes a string with the name instead of the ID, then it's not good.

    What do you propose?

  6. I'd appreciate if someone could enlighten me a bit on array keys and ar_HasKey.

    What I intend to do is to get a value from a StringMap array that matches the key given.

    I am using a reference var that holds the key, like so:

    if (ar_HasKey some_array horseRef)
    ar_HasKey - returns true if the array has an element with the specified key
    
    (hasKey:bool) ar_HasKey src:array key:arrayKey

  7. Ok. Like I promised, now that I got to play with it I managed to get what I wanted.

    Just need some help figuring out if this can be optimized or if there's something that should be better.

    XD ) array_var horses ref thing array_var horse short init short finding short found short key short queue ref horseRef short menu short button begin GameMode if fQuestDelayTime == 0 let fQuestDelaytime := 0.001 endif if init let horses := ar_Construct Array let thing := GetFirstRef 36 2 ; Begin scanning creatures within a 25-cell radius (depths: 1 scans 8 cells, 2 scans 25 cells) while (thing) ; Continue until thing == 0 if (GetCreatureType thing == 4) ; Horse if (GetOwner thing == player) if (thing.GetDead == 0) let horses[(ar_Size horses)] := thing ; (ar_Size horses) starts at zero and increases every time we add an entry. ; Conveniently, array indices also start at zero. This saves managing an index variable! endif endif endif let thing := GetNextRef ; If there are no more creatures this returns 0 Loop ; You now have an array of all local player-owned horses. ; Do something with it! let found := (ar_Size horses) if found > 0 let finding := 1 else SetMessageIcon "icons\uh_icon.dds" MessageEx "I have no horses." endif let init := 0 endif if finding ForEach horse <- horses if menu == 0 let key := horse["key"] if key == queue ; queue starts at zero ;let queue := queue + 1 ; menu handles queue. let horseRef := horse["value"] let menu := 1 endif endif loop let finding := 0 endif if menu ; only starts if there is at least one horse if found == 1 let menu := 0 ;let uchMenuQ.pcHorseRef := horseRef ;let uhcMenuQ.menu := 1 ;StartQuest uchMenuQ ;StopQuest uhcFindQ return endif if menu == 1 ; which horse to select? 2 if queue > found let queue := 0 ; reached end of array. cycle from begining.. else let queue := (queue + 1) ; since queue starts at zero, key zero = horse one endif MessageBoxEX "There are %.0f horses near me. %r Horse %.0f of %.0f is %n. %r Command this horse? %r ========================================= %r | Yes | No | Cancel " found queue found horseRef let menu := -1 let button := -1 elseif menu == -1 let button := GetButtonPressed endif endif end begin MenuMode if button == 0 ; Yes let queue := 0 let menu := 0 ;let uchMenuQ.pcHorseRef := horseRef ;let uhcMenuQ.menu := 1 ;StartQuest uchMenuQ ;StopQuest uhcFindQ return elseif button == 1 ; No, cycle to next horse. let finding := 1 elseif button == 2 ; Cancel let queue := 0 let menu := 0 ;StopQuest uhcFindQ endif end
    ; 2010/05/19: created by ulrim
    
    ;------------------------------------------------------------------
    
    ; Info: service, finds horses
    
    ;
    
    ; Related: uhcFindQ (quest)
    
    ;------------------------------------------------------------------
    
    scn uhcFindQscr
    
    
    float fQuestDelayTime
    
    
    ; find horse variables for the while loop suggested by Tejón (thanks mate 

  8. I'm building an area of effect spell with a script to catch references near the player.

    This is for the horse mod I am making, so lets talk about something concrete.

    The quest I am building is for commanding player owned horses.

    When activated by some key, the quest should search for horse references and open a menu.

    In the menu, the player may choose what horse to command.

    I am investigating how to store the references in an array so the menu could be built. A while loop builds the buttons. Each button represents the selection of the reference found.

    It might get more difficult with the menu part but I can handle that.

    For now, however, I just want to start to know how should I build the array.

    Edit: Found "Ref Walking Functions" in the obse page. I'll post my code later.

  9. Speaking of arrays, I'm building an area of effect script that catches references, stores them in an array and processes each one for showing in a menu, with the new while control functions in obse 18.

    If anyone is interested in sharing knowledge about array, pm me.

  10. From the bethsoft thread:

    Work done so far:

    With the help of Psymon's suggestions, I have finally got travel options for horses working.

    Each vanilla horse is supported by the default quest that has new travel flag variables. The control flags allow vanilla horses travelling to a marked location, home stables, nearest stables or stop travelling, when you command it or change mounts.

    The configuration is done inside the game. I don't have external ini file configuration because each command is different for each horse found in the game. Support for other horses is still being developed, more on this below.

    Each horse can have unique settings. You can command as many mounts as you want, since the horse references are stored for each horse. I may have to test this better though.

    The set of horse commands bundled has been reworked. It features some of the ideas by kuertee already, for example, though the way I started coding it is different.

    Downsides for this project is that AI has changed for every horse, meaning it is not compatible with other horse mods that change their behaviour too.

    The work done so far allows the horses to be equipped with any kind of outfit, and is compatible with Maboroshi's Saddle bags out-of-the-box, at last.

    Now that I've sorted my new Oblivion installation, I got the chance of checking out some other mods for horses. Kuertee's horse commands for instance. It would be nice to know if modders like kuertee would like to contribute too. I checked his ideas on horse speed and ownership but I won't be adding them myself.

    About the support for other horses:

    The initial idea was to provide better horse management. Since OBSE now provides function creation and encapsulation techniques, this should make it much easier to allow other modders to start adding their ideas.

    I have spoken to Zira, asking if she wanted to participate in the project. I believe she didn't want to get involved because of the difficulty, though I had approval to use her work. I should point out that horse textures and meshes are not all this is about. It's about the way you can use the equipment and putting it into the game.

    An example is Zira's Battle Shop Mod. You can buy the horses with the equipment. But you cannot use the equipment on other horse. Same thing that happened with the official DLChorsearmor plugin. And neither can use the shield or sword that are attached to the outfit - they're just for show. Not anymore! The methods I'm developing allow the horse to display each mesh according to the gear you want. You could attach the shield to the horse, much like Maboroshi allowed you to "attach" a saddlebag.

    The idea is roughly the same as in the mod Shields on Back, except you have it equiped on the horse and it can be more than shields. Just like you could move the way the sword is positioned in Swords on back, it could be made an equip slot of sorts for the horse.

    It is not spectacularly new idea, but it's fun and adds to game-play experience. With the examples given, modders that like modelling don't have to worry about scripting or dense thought behind the scenes. Just make the equipment so I can add support for it in game.

    Work to be done:

    Now that I have sorted out horse behaviour and added patches with help from suggestions, lets polish this.

    The way it worked in the demo required the horses to use a cheating technique. I made them swap with clone vanilla horses with hard-coded meshes. One day I opened the CS and just started anew. Actually, it was more trouble than it was worth it, since the horse swapping made the horses head to the home stables every time they changed equipment. Now it works with any horse without cheap tricks involved. Thanks, again, to Psymon for testing this in the pre-release demonstration.

    The support for horses has to be coded though, so it does not display certain oddities, such as mesh clipping or pink textures appearing.

    I am making a record to track known horses from already available mods. For example, if you have Knights of the White Stallion, now you can add or remove equipment just like any other vanilla horse.

    Things that are most important to catalogue are the location of the equipment meshes and horse manes, for now.

    If anyone would like to help me assemble this list would speed up my development greatly. Thanks in advance.

    Other than this, I have to improve the way horse selection works. Maybe add a spell to search for the horses around and let you choose which mount you want to command at a time. Another option is to set a key to get reference from crosshair and add a ini to fetch what key you want to set. Any advice is welcome.

    Oh! And I found out how to package the meshes now, from my Ulrim's horses mod (doh!) so I can release!

    P.S.: I made a video with the horse equipment. You can see why I want to track the available mane meshes, for example, so it avoids clipping with certain armours equipped.

    http://www.youtube.com/watch?v=ssYckTseVNM

    (Youtube sound audio-swap sucks. Here's a link to listen the music. And nevermind the silly pipe thing...)

    The horse equipment bags are actual items that display as, well, bags. Meshes used for the bags were made by Quarn. Notice how they gain or loose weight and value as you take the equipment.

    Modellers, show your mesh suggestions!

×
×
  • Create New...