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

TripleSixes

Allies
  • Posts

    193
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by TripleSixes

  1. I do something similar, take a look.

     

    I have a log fire the player can spawn at their location, after some time the log fire disappears (deletes).
    
    ;Called from an activation, can use in a script I guess...
    Actor PlayerRef = Game.GetPlayer(); Make an actor variable for the player so we don't have to keep calling it
    ObjectReference MyLitLogs = PlayerRef.PlaceAtMe(LitLogs, 1, false, true); places the lit logs, disabled
    MyLitLogs.MoveTo(PlayerRef, 0.0, 0.0, PlayerRef.GetHeight() - 137.5, True); translates the lit logs to my prefered location in relation to the player
    MyLitLogs.SetAngle(0.0, 0.0, 0.0);Set the angle of the rotation as well...
    MyLitLogs.Enable();Enable the logs
    
    ;Attached to the LitLogs Reference
    Event OnLoad()
    	Int BurnTime = Utility.RandomInt(10,180);Set a random extinguish time
    	Utility.Wait(BurnTime);wait...
    	Self.PlaceAtMe(RS_Item_Ashes, 1);place down ashes
    	Self.Delete();remove log fire
    EndEvent
    
    Should be able to use something similar to this to get it working.

     

  2. Preface: I am going to simplify my scripts to ease troubleshooting.

    I have script "A", which is used to declare properties that global functions in script "B" can use.

    Script "A":   

     ScriptName rsAPI_Properties Extends Quest
        {Contains all the properties for rsAPI scripts}
        
        MiscObject Property myMiscObjectProperty Auto

     

    Script "B":   

     ScriptName rsAPI_Functions Extends Quest Hidden
        {Contains all the functions for the rsAPI scripts}
        ;This function gets the forms from Script "A"
        rsAPI_Properties Function GetFrameworkProperties() Global
          return (Game.GetFormFromFile(0x294A97, "MyPlugin.esp") as Quest) as rsAPI_Properties
        EndFunction
    
        ;This function gets a specific form from Script "A" with the help of the above function.
        MiscObject Function GetMiscObject() Global
          return GetFrameworkProperties().myMiscObjectProperty
        EndFunction
    
        ;This function is an example of how I would like to handle the miscobject passed from Script "A"
        Function GivePlayerMiscObject(int howMany) Global
          Game.GetPlayer().AddItem((GetMiscObject()), howMany); I have tried declaring a MiscObject outside this command as well, but neither worked.
        EndFunction

    The second function in Script "B" is used to return a miscobject, but it only returns NONE. This way of obtaining a property from another script seems to only work for certain types of forms. The properties have been defined in the CK in Script "A".

    Any pointers papyrus wizards?

    p.s. The reason I am approaching it this way is because Script "A" and Script "B" are an API of sorts. I want to use a function in Script "B" that references properties in Script "A" after passing parameters directly from Script "C", which would utilize the third function in Script "B" like this:   

     

    Script "C":

    ScriptName GivePlayerItem Extends Activator
        {Utilizes the rsAPI framework to give the player 2 MiscObjects}
    
        Event OnActivate(Actor akActionRef)
          rsAPI_Functions.GivePlayerMiscObject(2)
        EndEvent

     

  3. Not a noob to scripting for Skyrim, but this issue is making me feel like one.

     

    No matter what script I write, it won't compile because it can't find the scripts it is extending or referencing. Here is an example:

     

    Script:

    Scriptname testScript extends ObjectReference
    {Test script to see if papyrus compiler is broken}
     
    Event OnHit(ObjectReference akAgressor, Form akSource, Projectile akProjectile, Bool abPowerAttack,Bool abSneakAttack, Bool abBashAttack, Bool abHitBlocked)
      Debug.MessageBox("You hit the thing!")
    EndEvent
    

     

    Compiler:

    C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\Source\testScr
    ipt.psc(0,0): unable to locate script ObjectReference
    C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\Source\testScr
    ipt.psc(4,28): unknown type objectreference
    C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\Source\testScr
    ipt.psc(4,45): unknown type form
    C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\Source\testScr
    ipt.psc(4,66): unknown type projectile
    C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\Source\testScr
    ipt.psc(5,1): variable Debug is undefined
    C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\Source\testScr
    ipt.psc(5,7): none is not a known user-defined type
    No output generated for testScript.psc, compilation failed.
     
    Batch compile of 1 files finished. 0 succeeded, 1 failed.
    Failed on testScript.psc
     
    C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\Source>pause
    Press any key to continue . . .
     
     
     
    
    

     

    This is coming from a modder that was compiling scripts no problem a few months ago before I took a break, was there some sort of update? I had to reinstall skyrim on this workstation (and the Creation kit, both programs from Steam, same as before).

     

    Also worth noting, there are no scripts in the scripts folder aside from the one I just made, the others are packed up with the other .bsas. I am going to extract those and try again, and let you guys know if I have any luck...

    Any ideas? I will be happy to provide any information :/

     
  4. The very fact that it is a 'property' means it needs to be taken to the CK level. It isn't like a variable where it can be referenced in the scope of a script. The CK uses these properties as it's objects.

     

    EDIT:
    You could use the MCM to make a tab that allows them to choose a new key to assign the key press to.

  5. My current mod I am working on is really big, and heavy. What I mean by that is there are lots of scripts, meshes, textures, music tracks, sounds effects, etc.

    This isn't my first time encountering this issue, and I have succeeded over it a few times by sheer determination.

    When I am happy with the latest version of a mod I am working on, I will save, and then 'Create Archive'. As the mod grows in size, it starts to kick out an error message "Failed to archive". I'm sure alot of you are familiar with this problem.

     

    The issue is that with big mods is that they may not be able to easily be put together in the tesArchive.exe program that is meant to be a alternative method to achieving the archive goal.

    In the past, I just deleted the new files created in the Skyrim folder from the failed archive, and just attempt to archive from the CK again. Sometimes, it works after a while. I am on attempt 24 now, and grow distraught. It has never taken more than 5-10 times to get it done.

    Has anyone figured out any way of getting this done successfully? I do not wish to upload to steam at this time as I am not ready to release it at this very second (Have to have some internal testing first).

    I also wanted to reemphasize that I wish to not use the actual tesArchive.exe program to achieve this since I am dealing with about 1000 asset files.

    EDIT: Does a failed archive signify that said archive will not work for use? It seems to initialize at the same file size everytime.

    EDIT:EDIT: The progress bar for the archive goes all the way to 100% then says it failed.

  6. As Schatten said, in the specific response where Salmo is supposed to give the player the note, use:
     

    game.getplayer().additem(BookProperty, 1)

    quest_name.setstage(); advance the quest to the next stage.

    note this will not be transferring any items from Salmo's inventory, but instead creating a new object inside the player's inventory.

    After you add these script fragments to the specific response. Immediately click ok, it will say that it failed to compile, this is okay!

    Save the object, save your mod. Then reopen the quest object, and navigate back to where you put the script fragment. click the script, and go to properties, pressing ok or yes until you arrive at the property window. Add a book property named "BookProperty" and once it appears set it to your note that you wish to have added to the player's inventory.

    When the player eventually arrives at Koris, add a condition to his/her response, GetItemCount "YourNote" >= 1 Run this condition of the Player. Then add this script fragment:

     

    When you talk to koris just do:

    game.getplayer().removeitem(BookProperty, 1)

    quest_name.setstage(); advance the quest to the next stage.

    Just like before save this quest object, without setting a property to start with. Save your mod, then reopen the quest. Add a book property to the new script fragment, and point it to your note.

    This should help you achieve what you're desiring.

    EDIT: You can use GetOwningQuest.SetStage(), as it has the same effect, but only if the responses are inside the of the quest you want to set the new stage for. Non-Latent native functions are brilliant.

  7. That does look like the normal map is a bit odd. Did you add an alpha channel to the normal map? You can do so with Dxtbmp, its a program that allows you to add alpha channels (Its the only reason I use it.)
    Open your diffuse in an image editor and desaturate it. I'd go really dark since it is a rock texture and not metal. Save it as a .bmp.

    Download dxtbmp, open your normal map, then import the .bmp you made earlier as an alpha channel. Save this as a new version of your normal map, so you have the original just incase you made the specular too dark or something. You will have then successfully fused your normal map with a specular map. Cheers!

  8. I managed to create my own custom menu using the MCM.

    I used the AddTextOption() function to display certain values in said menu.
    Is there some way of clicking on this field and opening a new sub-page in the MCM?

  9. I am thoroughly stumped, I wanted to create activation hot spots using a mesh borrowed from the effects objects. Specifically, I am using a splash effect's .nif to get the job done. Since this effect doesn't have a rigid body (i think) I cannot use it straight-up as an activator since it technically isn't a solid. My next thought was to use a triggerbox to obtain the results I required, but no amount of testing seemed to get this to work. I created a triggerbox over the effect's objectreference, and made the activator (the effect nif) a linked ref to the triggerbox. I also made it an activate parent. I toggled the "player activation" under primitives, and no dice. Any suggestions?

  10. That worked out nicely BrettM, I'm on the right track now. The problem is that the campfire is placed a bit too high, so i tried using getPostion and setPosition to fix this, but I can't get the script to compile... any idea what I may be doing wrong?

    Scriptname RS_Item_TinderBoxScript Extends ObjectReference
    {Script for Tinder Box}
     
    Message Property RS_Message_LogType Auto
    MiscObject Property RS_Item_Logs_Logs Auto
    ObjectReference Property LitLogs Auto
    Weapon Property RS_Item_TinderBox Auto
     
    Form LitLogs
    Int LogType
    Actor PlayerRef
     
    Event OnEquipped(Actor akActor)
    If akActor == Game.GetPlayer()
    PlayerRef = Game.GetPlayer()
    ExitMenu()
    LogType = RS_Message_LogType.show()
    If LogType == 0;Logs
    Int LogCount = PlayerRef.GetItemCount(RS_Item_Logs_Logs)
    If LogCount >= 1
    PlayerRef.RemoveItem(RS_Item_Logs_Logs, 1, True)
    Form LitLogsBase = LitLogs.GetBaseObject()
    PlayerRef.PlaceAtMe(LitLogsBase)
    Float X = PlayerRef.GetPositionX()
    Float Y = PlayerRef.GetPositionY()
    Float Z = PlayerRef.GetPositionZ()
    Float ModZ = (Z - 20.0)
    LitLogsBase.SetPosition(X,Y,ModZ)
    EndIf
    ElseIf LogType == 1;Oak
    ElseIf LogType == 2;Willow
    ElseIf LogType == 3;Maple
    ElseIf LogType == 4;Yew
    ElseIf LogType == 5;Magic
    EndIf
    EndIf
    PlayerRef.UnEquipItem(RS_Item_TinderBox, 0)
    PlayerRef.UnEquipItem(RS_Item_TinderBox, 1)
    EndEvent
     
    Function ExitMenu()
    Game.DisablePlayerControls(false, false, false, false, false, true, false)
    utility.wait(0.1)
    Game.EnablePlayerControls(false, false, false, false, false, true, false)
    EndFunction

    Compiler Error:
    SetPosition is not a function or does not exist.
×
×
  • Create New...