Jump to content

DlinnyLag

Members
  • Posts

    99
  • Joined

  • Last visited

Everything posted by DlinnyLag

  1. Get know how CPU works Get know assembler language, it will be necessary to understand what code implemented by Bethesda does Get know C/C++ on some level, to design some API for other people Get know how C++ compiler generates machine codes Get know how to use debuggers for reverse engineering Get know how operating systems (Windows, in particular) works. You need aspects related to processes, threads, memory, files and so on. As a plus - get know how other game engines are designed. Reserve several years for learning %)
  2. Could you describe it a bit more detailed? I never faced that script miss a event. How it would happen? What are conditions?
  3. Your solution still allow race condition. You can use the fact that calls of DS:*Set.Add/Remove and DS:*Dict*.Add/Remove are atomic and returns result of operation and build your own mutex. An example, how it can be done: Keyword someKey int someNumber = 10 const bool function AcquireLock() return DS:IntSet.Add(someKey, someNumber) ; returns true if value was added to the set, otherwise - false endfunction function ReleaseLock() DS:IntSet.Remove(someKey, someNumber) endfunction function CriticalSection() while !AcquireLock() Utility.Wait(1) ; endwhile ; Do the stuff .... ReleaseLock() endfunction
  4. hm... Not sure that I understand the problem correctly, but you can try to make your Dynamic function non-global. The reason why scripts need to be "locked" - sync access to script's variables. Global functions do not use script's variables, so it is possible that calls of global function does not "lock" script. I know that global native functions doesn't lock the script where they are declared, but I'm not sure about just global functions.
  5. And additional note: Hazmat Suit has a 1000 points of resistance to dtRadiationExposure. So it looks like a reason why Hazmat Suit gives an 100% protection to Gamma Gun fire.
  6. Would this finder quest cause overall game lag if it started/stopped too often?
  7. Or you can use arrays from F4DS, where it is suitable %)
  8. I do not see any way how it might work. f4se_1_10_163.lib has only single function for linker - StartF4SE. This is the only function that you can call from f4se_1_10_163.dll I suppose your code do not call it %) Actually, I do not see any code that calls this function. It looks like a rudiment. Perhaps, you have changed process of f4se project building and it produces something different now. Perhaps, you've changed f4se project type from dynamic library to static library, like mentioned in another thread
  9. If you take a look to the folder with f4se_1_10_163.lib you can found also f4se_1_10_163.dll, that might give you a hint - it is for dynamic linking. Next step - take a look how f4se_1_10_163.dll is used at runtime. If you take a look to installation package, you found that f4se_1_10_163.dll is placed to the root folder of Fallout 4 game. Also, looking to the exporting functions table you found a single function only - StartF4SE. This might give you a hint - it is not about plugins, but about how F4SE is starting. By the way, f4se_1_10_163.lib has only single exporting function - StartF4SE. Surprised? %) So you are looking to the wrong place. f4se_1_10_163.lib is not for your plugins. In order to build your plugin you can include necessary C++ files to your project. In your particular scenario the files are: for Heap_Allocate, Heap_Free and Console_Print: GameAPI.cpp for StringCache::Ref::Ref : GameTypes.cpp for VMValue::SetNone: PapyrusValue.cpp for UnpackHandle and GetTypeID: PapyrusArgs.cpp You can take a look to my plugins (best example). Perhaps, they would give you a better start.
  10. Just ignore your feel. You have a fact of global variables existence in their form. Nobody will change it. Accept it, and use or don't use them. Perhaps, F4DS might help you.
  11. Another option to configure building of multiple files - project file. Project files has .ppj extension. Just create .ppj file with following structure and run PapyrusCompiler.exe "path\to\your\project.ppj": Unfortunately, I can't insert code block (it is blocked by Cloudflire), so screenshot and gist:
  12. All functions list can be found on https://wiki.bethesda.net/wiki/creationkit/Main/Tags?do=viewTag&tag=Papyrus Take a look at top right corner - there is search widget
  13. Actually, it is possible to achieve via F4SE plugin. Otherwise, Robco Patcher would not be able to work. Maybe authors of SUP or Garden of Eden Papyrus Extender can add functionality to get/set bit 2 of a Form's flags. UPD: Necessary functions just added to Garden of Eden Papyrus Extender. See SetFormFlag
  14. I don't think that it is correct. Take a look to the changes in scripting engine made for Fallout 4. And follow the links %) About reasons of 128 elements limit. We can only speculate here as there is no official notice (at least I didn't found anything from dev team) Why 128, but not 256? One of the potential reasons was mentioned by aurreth - errors check. Negative numbers are invalid (see the difference between signed an unsigned integer types). Looks like a kind of "over" reinsurance. It is hard to predict potential problems, so it is easier just to play more safe. Why the limit is so low? Some of the reasonable assumptions mentioned by SSK50 - prevent potential money loss. It will be necessary to invest more time ( read "money") to test impact of a higher array size limit. 128 elements can be viewed and tested manually, 32K/64K (16 bits) elements is extremely hard to review manually. Development of auto-tests is considered as "too expensive" by unqualified managers. There are much more unqualified personnel than qualified ones. So it is easy to imagine that Bethesda uses less qualified managers that you can expect %) Developers are people, managers are people, business owners wants to reduce costs... and they are people %) They tries to do their best, but software development is the area of a huge amount of uknowns. To reduce the risk of failure (read "money loss") people tries to make "safe" decisions on their level of competence and confidence. I'm personally do not see any technical problems with 16 bits for array size, but 32 bits looks dangerous. Imagine, some script developer made a mistake a wrote a code that adds elements to an array infinitely. 32 bits means 2(or 4) billions of elements, each elements is at least 1 byte size (more likely 4 bytes or even higher), so in case of such mistake game will crash or freeze due to lack of free RAM. Single mistake may cause a huge impact on the game process globally. If the limit is low, memory loss is insignificant, so it doesn't affect full game process. Mistake still cause a problem, but it is local problem, not global. I understand that it might not be an answer you can expect, but I would prefer to stop speculating %)
  15. I suppose you could try to request "Idle animation finish" detection from NAF. Maybe it will not be so hard to add such feature.
  16. Please refer to GetAnimationVariableXXX functions. LarannKiar just listed variable and event names that may present in .hkx files. Or may not. It seems that he provided a list of event/variable names from a behavior graph, most likely it is the representation of RaiderRootBehavior.hkx an example: bool isSneaking = Game.GetPlayer().GetAnimationVariableBool("bIsSneaking") There is no guarantee that this exact call will succeed.
  17. Is there an animation variable I can check to see if the animation I am playing on an actor is complete? In general, no. A .hkx animation may has own set of events. There is no strict standard.IDLE object has a start event name, so the system is able to start animation playing. But finishing event name may be any... if any! %) It is possible to create .hkx animation without "finishing" event at all. You can try to change your approach and define duration for each animation somehow in the design time. So you can interrupt idle animation on this duration expiration.Another option - define event name (in the design time) that represents animation finish for each animation. So you can subscribe to this event I suppose that many of existing .hkx files has similar events naming convention, that may allow to handle many of them, but not all of them.
  18. You have to initialize array and initialize each element in array before accessing element's fields. something like: AmmoTypes = new AmmoType[54] AmmoTypes[0] = new AmmoType AmmoTypes[0].AmmoList = .... AmmoTypes[1] = new AmmoType AmmoTypes[1].AmmoList = .... and so on
×
×
  • Create New...