-
Posts
7150 -
Joined
-
Days Won
1
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Well the purpose really is to be a useful framework. Theres no overall goal so theres no focus per se. But it basically boils down to: 1. Give modders functionality they didnt have before: Eg: Events, alias operation, array utilities. 2. Interoperability layers - Forks (pregnancy/sex/needs/followers). + individual direct interfaces. 3. Context. I've always maintained context is very important. Take prostitution mods for example. Most have you just bang clients anywhere. In the streets, in the middle of the bannered mare etc. . With MGF you can determine a private room with a bed. Or extend that even further. Say you're whoring yourself out. Perhaps one of the factors for successful solicitation is wearing a nice outfit (Armor coverage). Something revealing. Now say you're whoring yourself to Ulfberth. You can find out that his wife is Adrianne (relationships), have him lead you to his actual bed (one of the composed functions in _MGF_Main). Close the door to the bedroom (room detection). Maybe Adrianne's already asleep in the bed (room detection). If so then do it downstairs in the kitchen. Maybe Adrianne hears something, wakes up and goes to have a look. Maybe she enters the room (room tracking) to find you and Ulfberth doing the unspeakable. Maybe you just gained a rival (soft relationships). This would be pretty difficult if not impossible to do without mgf. As for when. Dont know. Bethesdas latest update didnt help...
-
Sneak peek at the 'Armor Coverage' system in MGF. The system can automatically determine: Cover - How much of an area is actually covered in armor. Fit - How tightly, on average, that armor sits to the skin. (Recent addition. Still tweaking it). 'n/a' for fit means there wasn't enough coverage in the area to provide an accurate fit value. No messing about with keywords etc involved. Information is parsed from the mesh itself. May or may not make it into the final product depending on reliability but I've been encouraged by recent results. Examples: Body: I've expanded the system to cover feet: Head: Armor By Region: Allows you to ask which armor actually covers any region. Either from the outside to inside or vice versa. Nothing to do with slotmasks etc. API:
-
These are Relationship form (RELA) specific functions. These are low level 'building block' functions. Relation functions (more practical): Soft Relationships (runtime modifiable relationships):
-
This is a super useful diagnostic feature. This allows you to watch native function (must be a native function) calls to debug problems that would otherwise be very opaque and difficult to untangle. Json Structure: { "enabled": true, "watch": [ { "objectType": "_MGF_Util", "functionName": "IsAnyMenuOpen" }, { "objectType": "Game", "functionName": "DisablePlayerControls" }, { "objectType": "Game", "functionName": "EnablePlayerControls" } ] } "enabled": Must be set to true for MGF to monitor function calls at all. "watch": Each item in 'watch' will get logged to _MGF_Util.log any time they are called. The beauty is that the system will tell you exactly which script initiated the call, which function within that script and even the parameters it was called with. Simply modify MgfNativeWatch.json - add the script and function you want to watch. Set 'enabled' = true. Start the game and open (or even better 'tail') _MGF_Util.log to monitor activity. Search 'MgfNativeWatch' to isolate details (the log is used for many other things). Modifications to the json will not take effect while the game is running. Example: I was having some trouble nailing down player control problems. This is the kind of problem you could spend hours doing the old debugging loop: Disable mods, try to reproduce issue, etc. Enter MgfNativeWatch and immediately you can see two mods fighting for controls: Log:
-
Same premise as the other 'Forks' - Single user facing surface that plugs into several popular follower frameworks providing normalized functions. Supports: AFT, EFF, NFF, UFO, Vanilla. Functions: GetFollowers() GetFollowerCount() GetMaxFollowerCount() IsFollower() AddFollower() RemoveFollower() CanRecruit() GetExtendedInventory() See also 'Events' entry for 'Follower Change Event'. _MGF_ForkFollowers:
-
Alias Events: Regular Alias functions: FIFO Aliases: Fifo alias functions are a system of managing aliases on a First-In-First-Out basis. Initially the system will seek to fill all empty aliases on a quest. Once all aliases are filled the system will begin overwriting the oldest alias first. The primary function here is AliasFillFifoAuto() PS: If anyone knows how to actually do a 'ForceRefTo' equivalent natively then get in touch please. I'm currently doing a dispatch to a simple papyrus wrapper...
-
MGF broadcasts a number of useful events. Game Events: Location Events: Teammate Change Event: Scene Events: Sex Events: Player Controls Event: Collision Events: Actor Slope Event: Pregnancy Event (See also blog section 'Pregnancy Fork'): Crafting: Alias Change: Reference Load: Actors Meet Event: Keyword: Global Mirror: Service Events: More....
-
I've often wondered how many OnPlayerLoadGame events are fired when you load a save. A huge chunk of these would be compatibility checks. Event OnPlayerLoadGame() If Game.GetModByName("CoolMod.esp") != 255 ; CoolMod is installed. ; Do Stuff. Else ; CoolMod is not installed. ; Do other stuff. EndIf EndEvent Inefficient - How many of these checks end up doing nothing really? - Yup 'CoolMod.esp' still IS or is NOT installed. What percentage of save loads has your load order actually changed? And it leads to a huge spike in papyrus activity right when you kind of don't want it. Alternatively you can register with MGF for load order change events and it will let you know when you need to check for real. Usage: Event OnInit() RegisterForModEvent("_MGF_LoadOrderChanged", "On_MGF_LoadOrderChanged") EndEvent Now any time mods: are added. removed. the order of mods changed (nothing was necessarily added or removed). the modified timestamp has changed on a plugin file. Something's actually changed. You'll get this event: Event On_MGF_LoadOrderChanged(Bool OrderChanged, Bool ModsAdded, Bool ModsRemoved, Bool ModsModified) ; OrderChanged - The order has simply changed since last load. ; ModsAdded - Mods were added since the last load. ; ModsRemoved - Mods were removed since last load. ; ModsModified - At least one of the plugin files has been modified since the last load. ; All these flags are set individually -> ModsAdded and ModsRemoved could both be true! EndFunction You can use these functions to pull a list of what's changed: ; Returns a string array of the mods added since last load. String[] Function GetAddedMods() Global Native ; Returns a string array of the mods removed since last load. String[] Function GetRemovedMods() Global Native ; Returns a string array of the mods modifed (time modified check) since last load. ; Note this detects changes to the esp. And not changes to scripts (unless properties were changed). String[] Function GetModifiedMods() Global Native Additional functions that might be useful: ; Returns a string array of the current load order. String[] Function GetCurrentLoadOrder() Global Native ; Returns a string array of the previous load order. String[] Function GetPreviousLoadOrder() Global Native Example usage: Event On_MGF_LoadOrderChanged(Bool OrderChanged, Bool ModsAdded, Bool ModsRemoved, Bool ModsModified) If ModsAdded String[] AddedMods = _MGF_Util.GetAddedMods() If AddedMods.Find("CoolArmorMod.esp") > -1 ; Cool armor mod added. Add it's armors to my shop! EndIf EndIf If ModsRemoved String[] RemovedMods = _MGF_Util.GetRemovedMods() Debug.Notification("Removed " + RemovedMods.Length + " mods") EndIf If ModsModified String[] ModifiedMods = _MGF_Util.GetModifiedMods() If ModifiedMods.Find("CoolArmorMod.esp") > -1 ; Check if CoolArmorMod.esp added a new armor set for my shop! EndIf EndIf If OrderChanged Debug.Notification("Load order was rearranged") HandleOrderChange() EndIf EndEvent This load order event is used extensively in MGF's interface scripts.
-
LocOps - Location Operations - The yellow pages of Skyrim. Get information about the area you're in. The system is data driven and can be expanded via Json. I've already got one for JK's Skyrim. Multiple jsons are 'rolled together' for a complete picture. Highlights: Look up people by roles/location, Jarl's, Stewards, House carls, Court wizards, Inn keepers, blacksmiths, shop keepers, etc. Respects civil war status. Location agnostic. You don't need to know where the player is. MGF will figure that out for you. Layered area, hold, world scripts/functions. Slaverun status. Vanilla home ownership. Thane status. Custom roles. You can expand the lookup with custom roles (not Jarl, Blacksmith etc) via Json. Eg: 'Tailor'. Again duplicate roles will be rolled together. Coming soon: Get the closest whatever - Example in LocOpsWorld. 2 'Points Of Interest' quests - (Area / Hold) with aliases that are automatically populated on area/hold change: Some of these I'm still cleaning up. LocOpsArea: LocOpsHold: LocOpsWorld:
-
A pretty comprehensive array of ConstructibleObject functions. Highlights: Crafting event. Other mods have crafting events. This one includes the exact recipe used. Find every recipe for an item or ingredient. Recursively calculate what your ingredients can ultimately produce. Iron Ore -> Iron Ingot -> Iron Dagger. Check craftability (what you can actually craft right now with what's in your inventory), includes perk and condition checks. Calculate material costs, output values, profits and profit margins. Find the most profitable recipes. Built in token compatibility system for mods like CACO that represent items like flour via hidden inventory tokens. Surface thus far:
-
This system uses the navmesh to build a picture of what kind of shape an interior cell takes. This allows you to ask questions like: How many rooms in this cell? What room am I in? Who's in this room with me? What kind of things are in this room? What rooms are adjacent to this room? How many exits does this room have? Where are the exits from this room? Where are the exits from this cell? Roughly what size is a room? And by extension which room is the biggest/smallest? Roughly where is the center? How far is the actual path between two actors? (They may be physically close but there might also be a wall in the way). Any actor or object ref can be tracked for room change events. If Belethor room == 1 & Player room == 1 then Belethor and the player are in the same room. If Player room changes to 2. Should Belethor follow the player? I hope to eventually be able to give you an idea of the purpose of the room though this could never be absolutely definitive. Here's a video of me plodding around a couple of cells. The player is tracked for room change events. Every time the player changes room we get an event to tell you which room I was in and which room I'm in now. AutoRoomMap is turned on so every time I change room the system maps out the current room with soul gems - It's a visual debugging functionality to make sure the map is right. API surface thus far:
-
Pregnancy Fork is an interoperability adapter layer that presents a single unified surface for modders to use. Single surface interface to 2/3 backend pregnancy mods. Modders don't need to know anything about the underlying pregnancy mod a user has installed. Another great feature of this approach is that expanding the system to include another pregnancy mod simply involves authoring a new backend interface. Once that backend interface is in place then any mod accessing pregnancy functions via MGF is automatically compatible with the new pregnancy mod without any changes on their end! Structure: Highlights: Unified pregnancy events - _MGF_Preg_Conceived, _MGF_Preg_LaborStarted, _MGF_Preg_Birthed, _MGF_Preg_Aborted. Query functions - IsPregnant(), GetFathers(), GetFatherRaces(), GetPregnancyPercent(), GetTrimester(), GetCyclePhase(). 'Action' functions - Impregnate(), ForceLabor(), Abort(). Faction Data: MGF_PregStatusFact. Rank -1/0 - Not pregnant. 1 -> First trimester. 2 -> Second trimester. 3 -> Third trimester. _MGF_PregActiveWithPcFact - This Npc is the Father of the player's current pregnancy. _MGF_PregConceivedWithPcFact - This Npc has conceived with a female player <FactionRank> times. _MGF_PregBirthedWithPcFact - This Npc has Fathered <FactionRank> babies with a female player. Mods: Fertility Mode v3 Fixes and Tweaks - Built, tested. Beeing Female NG - Built, requires testing currently. Fertility Mode Reloaded - In process. Fertility Mode (base) and Beeing Female (base) - Unsupported. _MGF_ForkPregnancy:
-
Fork Needs is similar to ForkPregnancy - A interoperability adapter layer that presents a single unified surface for modders to integrate with. ForkNeeds grants seamless access to Rnd, iNeed, Last Seed & Sunhelm without the modder needing to know or understand the underlying mod. Expanding the system to include another needs mod simply involves authoring a new backend interface. Once that backend interface is in place then any mod accessing Needs functions via MGF is automatically compatible with the new needs mod without any changes on their end. Very handy! Highlights: GetHungerPercent(), ModHungerPercent(), SetHungerPercent(), GetHungerLevelString() Same as above but for thirst and fatigue. There are additional forks for pregnancy, warmth (Frostfall, Sunhelm) and some others but I don't want to commit on those just yet. _MGF_ForkNeeds: