Jump to content

shavkacagarikia

Premium Member
  • Posts

    520
  • Joined

  • Last visited

Posts posted by shavkacagarikia

  1. Hi,

    First of all, Creation Kit is not the engine, it's a stripped down version of the much powerful tool that BGS uses internally. So most of the limitations modders are facing is the limitation of Creation Kit and not the engine.
    As for engine itself, its really good for the kind of games BGS makes, that's all. It's not some kind of general purpose language to compare either with Unreal or Unity or whatever, its pointless. BGS has been modifying this engine for years to fit their purposes as close as possible and its really good at that.

  2. The cons aren't really cons, it's the way its designed.
    You cannot directly edit records and you shouldn't be doing it. esm is master file where changes should be made only by merging .esp into it using version control system that's built in into creation kit.
    And because of this, of course they are always loaded before .esps

  3. if you are using f4se there is also an alternate way to get it without using instance data, from ammo count interface element directly

    int Function GetMagazineAmmoCount()
     int ret = -1
     if UI.IsMenuOpen("HUDMenu")
       string txt = UI.Get("HUDMenu", "root1.RightMeters_mc.AmmoCount_mc.ClipCount_tf.text") as string
       ret = txt as int
     endif
     return ret
    endFunction
    
  4. IDA is usually used for dissasembling the game .exe. I have seen people using ghidra as well.

     

    yeah, you need Visual Studio. the f4se is built with 2012 version iirc so its easier to start from that or 2015 version.

     

    No load orders or anything like that.

     

    No catch except you gonna need to look at asm code of game .exe in IDA and try to find stuff you need.

  5. Ok, so

    Are there any good (written) beginner-level tutorials on creating and using plugins for F4SE?


    No there aren't. Imho making beginner-level tutorial for it wouldnt make much sense, because making f4se plugins itslef is not beginner-level. If you have pretty good understanding of software reverse engineering, assembler language, familiar with stuff like IDA, have good understanding of c++, then pretty sure you will be able to figure out everything yourself if you look into f4se source code and check template skse plugin. I mean more low level stuff you know, easier it will be to understand how to do that. But if you are not familiar with low level programming then its pretty difficult. Talking from my experience, you gonna need to find some experieced people who understand all that and pester them to explain some stuff. And its still just beginnig. F4se project itself is not something like, you set up your plugin and have everything ready there. You basically gonna need to analyse how game works and hook into or change its memory to do stuff and as I mentioned it's very difficult if you don't have low level programming experience.

     

    What even can be done with custom plugins for F4SE?

    Pretty much everything reasonable

     

    And what are the limitations of F4SE plugins?

    There aren't. The limitation is your skill and time you are ready to spend on something specific

     

    And how is creating F4SE plugins different then just scripting in papyrus?

    You probably got a small idea about that already from what I wrote above. But some more info, with f4se you hook directly into game .exe and do stuff directly, papyrus is scripting language and it runs on its own virtual machine, it communicates with the gae by sending data and receiving events. because of that, papyrus is much slower and limited. And yes, with f4se .dll you can expose additional functions to be used in papyrus, because communication with papyrus is already reverse engineered by F4SE team.

    What even is a F4SE plugin?

    As you mentioned, its a built c++ project .dll that loads into game when you launch it with f4se loader. And of course you cannot just open it in notepad, because its built. Most of the ods that use it have their source code additionally available in GitHub or as additional download on mod page itself

     

    I hope you got a bit more info about it

  6. Well yeah, there are lots of limits with ck, but if there are really no workarounds for those limits then there comes f4se and its native plugins that can be used to do basically anything, because now you dont care about ck and working directly with game memory. But obviously its much more complicated than ck. and unlike to ck that at least has wiki with basic explanations of all of its stuff, there is basically 0 documentation about f4se plugins and its difficult to ask someone for some advices because there are probably like only 10 people with enough knowledge and if you are working on something new there is no living soul that can help you. But again it goes down to giving up or continue trying.
  7. All this may sound like a motivation speech but from my experience on modding Fallout 4, nothing is really impossible. It's just if something is worth spending time or not. I like to use "close to impossible" to indicate if something is not worth to spend time on. And that's purely personal thing for modder. One of the most user requested thing I have seen is dual wielding mechanics, and if someone asks if its possible to do, I would answer that its close to impossible, because it would require messing with so much unknown stuff that is not worth spending time for me, and in general most of the people will just give up in the end, but with strong motivation and will, its still possible

  8. iirc to initialize an array, it needs to be placed inside function body, something like:

    string[] myArray
    
    function somefunction()
     myArray = new string[5]
     myArray[0] = "Hello"
     myArray[1] = "World" 
     myArray[2] = "Hello"
     myArray[3] = "World"
     myArray[4] = "Again"
    endfunction 
    

     

    call that function whenever you want

    Also you can have that array as property and fill it from properties editor box

  9. There are various ways to achieve what you want, I will suggest what I think is the best way.

    If you want to show a warning when door is activated and make it available only after that, you just add script on it with something like this inside:

    Message Property myMessage Auto Const
    bool once
    
    Event OnLoad()
     if !once
      BlockActivation()
     endif
    endEvent
    
    Event OnActivate(ObjectReference akActionRef)
     if !once
      if akActionRef == Game.GetPlayer()
        myMessage.show()
        BlockActivation(false)
        once = true
      endif
     endif
    EndEvent
    

    So first time a messagebox will appear and only after that player will be able to enter that door.
    Now about making it locked after teleport.
    I havent tested whats going to happend if you call lock() as soon as onactivate happens, it may actually work and lock it but if not, do something like this, place trigger near door so player enters it when teleport finishes. then add script on that trigger activator

    with something like this inside:

    Door Property myDoor Auto Const
    
    Event OnTriggerEnter(ObjectReference akTriggerRef)
     if akTriggerRef == Game.GetPlayer()
      Objectreference[] mydoorref = Game.getplayer().FindAllReferencesOfType(myDoor, 200.0); reason for using this function instead of directly pointing  
      ;to door ref is that usually you shouldnt be filling objectreference properties, that way you make them persistent thats not very good.
      ;but if you want it too much, you can directly use your door as object reference property
      mydoorref[0].Lock() ;of course you should be sure thats only door of that base form nearby 
     endif
    EndEvent
    
    Event OnTriggerLeave(ObjectReference akTriggerRef)
     if akTriggerRef == Game.GetPlayer()
      Disable()
     endif
    EndEvent
    
  10. There is no rational way to do that without f4se.

    Though of course you can make quest, add script on it, inside make a struct that has two members of type actorbase and string. Then make array property of that struct type. Go in properties and fill it with that thousands! of actorbase forms and appropriate names. After thats done you can look for needed actor in that struct array actors and if its found return a string member that would be a name. As you probably guessed this is very unoptimized, slow and bad way that works only with base actor forms and excludes overriden names for references.

  11. Make sure you have message property filled

     

    Make sure you added that magic effect is in the list of Potion's magic effects

    Remove aiButton parameter from BandageUseMenu function, you dont need it there. make IButton as local variable inside that function. something like this:

    Event OnEffectStart(Actor Target, Actor Caster)
     BandageUseMenu()
    Endevent
    
    Function BandageUseMenu()
     int iButton = BandageMenu.show()
     if iButton == 0 
     ;further logic ....
     endif
    Endfunction
    

     

  12. I dont understand what you want to do. I think you may be misunderstanding some stuff. So let me ask some questions first:

    What is a final goal, enabling items in the world? If so why do you wan to use formlist or container at all? I dont understand whats the point of those indexes you want to have. Also, if you want to enable items in container then you wont be able to do that. Items in container dont have 3d and dont have object references if they arent persistent. So if you tell exactly what items you want to enable and just explain in more detail, there may be better solution and no formlist or container indexes will be required

  13. Onhit has two objectrefereference type parameters - target and aggresor, but you have only agressor, add objectreference aktarget parameter as well.

    I suppose you took the event signature from skyrim's onhit. Back in skyrims papyrus, onhit was a member of objectreference script so you didnt want to have target as parameter as it would be a script itself where you use it. In fo4 papyrus you can use onhit on any script object so it has one more parameter

  14. For testing purposes you can add item via console commands.

    When you want to make perk to be added on player, there are several ways. it depends when you want it to be added. I'll explain how you can do it when your save is loaded.

    You create a new quest, you check start game enabled checkbox and also check run once. then go to scripts tab, add new script and inside write

    Perk Property myperk Auto Const
    
    Event OnQuestInit()
     Game.Getplayer().addperk(myperk)
    endevent
    
    

    Fill myperk property with your perk. Thats all.

    But there are more simple way to do it if you lets say want it to be added by a book. Just mae new book, choose Addperk there and then choose your perk. Drop it somewhere in the world and when you pick up it, the perk will be added

  15. I have explained step by step how you can achieve what you want and you dont think that "iirc" in beginning of that response means that I dont know exactly what Im talking about, I was working on agony and made various mechanics for it, so you just needed to carefully follow what I wrote. You either not reading carefully or opened ck first time. If its second one then I cannot give any more detailed explanation, you need to learn some basics of how to use ck first. Just watch some tutorials.

    Also. "I tried, but failed" doesnt mean anything in this case, if you want additional help you should provide additional information on what part you failed. Now it sounds like "I was too lazy to do all that"

×
×
  • Create New...