Author: vivanto
Version: 1.04
Date: 2011.02.13.
Cateogry: Utilities
Link:
===============
Description:
===============
Modding resource and utility tool.
===============
Details:
===============
This is a modding and utility tool that I created for my own use in future mods, as well as most of my existing mods will be converted to it in the future.
For users, it is useless to download as it does nothing on its own, it's even disabled. I will probably also bundle it in my mods that require it, so normally you shouldn't be directed to this page.
Modders are free to add it as master to their own mods if they wish to utilize some features, detailed below with modding guide.
I do not expect this Toolkit to be widely used, only including the Modders Guide for completeness.
===============
For Modders:
===============
The Toolkit can perform the following functions and features:
- NVSE Version verification.
- Toolkit Version verification.
- Verified startup of quest handlers.
- Key Utility for catching custom key bindings.
- Token Distribution across Actors.
- Reference Collections.
Since the Toolkit itself is using NVSE functions, if you don't assign NVSE requirements to it in your own mod, it won't launch and thus is useless. I only included it as a safety net, so no one can accidentally launch it.
The Reference Collections, Tokens and Startup Lists are stored in Form Lists. So if you want to have your own mod to be handled by the Toolkit, you need to add it first and also specify which NVSE and Toolkit version you are using in your mod. Technically, you still need a Start Game Enabled quest in your own mod, but it is much simpler and not resident. It's best to use an example for it. ::
scn MyStartupScript
begin GameMode
if NVSEReq 1.06;sets the NVSEReq Global to the required nvse version of your mod
set NVSEReq to 1.06;it is suggested to do it via script, because other mods may use lower or higher NVSE values
endif
if FNVTVersionReq 1.00
set FNVTVersionReq to 1.00;same as the above for the Toolkit version
endif
AddFormToFormList FNVTStartupList MyMainQuest
;adds your Quest to the Startup List
;the Toolkit will verify both version numbers and launch your quest if it passes
;if verification fails, it will periodically prompt the user of version errors (30 seconds period time)
AddFormToFormList FNVTTokenList MyToken
;adds a Token to the Token List
;this token will be distributed to every Actors (NPC and Creature) in the game
;the Token distribution does not verify if the actor is disabled or dead, if you need specific handling for scripted tokens, do that in the token script
stopQuest MyStartup
;stops your init quest, everything defined above will be processed by the Toolkit
end
The above script is pretty self explanatory. It takes off some work from you to init, verify, do whatever you want with nvse and launch your quest, as well as removes resident startup quests since after passing your Main Quest to the Startup List, it will be all handled by a single script. This startup snippet also only uses GECK functions, no NVSE. The startup also makes sure to only launch your quest if you have exited Doc's house, to avoid conflicts caused by the tutorial.
The Key Utility is designed to create a user friendly interface for assigning custom key bindings to whatever you wish in your mod. It takes over control of your currently running configuration script, by doing the following steps.:
- prints a message for the user to press the hotkey
- catches a keystroke
- prints the pressed key in alphanumeric format
- verifies the pressed key for conflicting control keys, if it conflicts, notifies the user, but continues as normal
- returns the scancode of the key in a global variable and returns control to your original script
As a general modding practice, a pseudo-key binding script previously looked like this
if MenuStage == $m1;user is in configuration menu currently
...
if Button == $b1;user pressed the button to config the hotkey
set MenuStage to $m2
endif
...
endif
...
if MenuStage == $m2;key-catching stage
...
;some complicated and long code to catch, verify and do whatever you want with your key
;then return to MenuStage $m1
...
;exit point
endif
Just replace it with the following
if MenuStage == $m1
...
if Button == $b1
;set FNVTKeyInput to $someKey;optional, only use if you want to DISPLAY a ScanCode, not catch one
startQuest FNVTKeyUtil;launches the KeyUtil handler to do all the work for you
set MenuStage to $m2
endif
endif
...
if MenuStage == $m2
if getQuestRunning FNVTKeyUtil == 0
set MyHotkey to FNVTKeyOutput
;exit point
endif
endif
Note that the KeyUtil is designed and tested in GameMode, but should also work in MenuMode (pipboy based menu screens). Let me know if you find any errors.
The rest of the Toolkit's features are more self explanatory, as they are only a Collection of Form Lists. Only use these lists as Read-Only because the Toolkit constantly changes them, as it discovers new items. All the lists start out as blank and are built up in runtime, so they only contain Valid references.
Actor related lists
- FNVTActorList - Contains every NPC and Creature that the Toolkit has discovered through reference walking during gameplay.
- FNVTTokenList - User input list, any items put in the Token List will be distributed to the Actors, as demonstrated in the Startup example.
Item related lists
- FNVTArmorList - Contains every Armor and clothing that has ever been worn by the discovered actors or the player.
- FNVTWeaponList - Contains every Weapon that has every been equipped by the discovered actors or the player.
Derived lists from weapons list:
- FNVTWeaponUnarmedList
- FNVTWeaponMeleeList
- FNVTWeaponGunsList
- FNVTWeaponEnergyList
- FNVTWeaponExplosivesList
- FNVTAmmoList
Map Marker related lists
- FNVTMapMarkerList (static)
- FNVTMapMarkerDiscoveredList (dynamic)
- FNVTMapMarkerUndiscoveredList (dynamic)
- FNVTLocationDiscovered (Global value)
For map markers, static means that they get built up at start and then only expanded, this is the behaviour of the other lists as well. Dynamic however is only built in runtime and always starts as blank on GameLoaded. This means that if you reference any of the Dynamic Lists, always delay a few frames (preferably seconds), before using them.
The Global value FNVTLocationDiscovered gets set to 1 whenever a new map marker has been found, simulating an event. It stays on 'true' for a few seconds, and then resets itself to 0. If you use it, once reading out the value, do NOT reset it to 0 to avoid event spamming, but rather implement your own method of a 'ValueToggle', because other scripts may also rely on the global.
===============
Compatibility:
===============
Includes the Chicken and Egg script, so be vary of dirty mods.
===============
Bugs/Issues:
===============
No known issues so far, please let me know if you find any.
===============
History:
===============
1.00 2011.01.07. - Initial Release
1.01 2011.01.07. - Minor menumode fix
1.02 2011.01.29. - Some improvements in version controls and related stuff
1.03 2011.01.31. - Some script stability fixes
1.04 2011.02.13. - Script robustness improvements, menumode fix for PN.
===============
Contact:
===============
Nexus
===============
Recommended Mods:
===============
===============
Credits:
===============
NVSE Team.
ElminsterAU for FNVEdit.
JustinOther for Chicken and Egg.
InsanitySorrow for ReadMe Generator this readme is based on.
me.
===============
Tools Used:
===============
GECK
FNVEdit
Fallout 3 ReadMe Generator
===============
License/Legal:
===============
This file is provided as is and the author holds no responsiblity for anything that may come to happen from using this file.