Jump to content
⚠ Known Issue: Media on User Profiles ×

isathar

Premium Member
  • Posts

    18
  • Joined

  • Last visited

Everything posted by isathar

  1. No idea if this is the recommended way to do it, but I'll try to outline how I'm setting up my own projects at the moment. The bonus of this approach is that you don't need to manually include any headers and source files in the project file, they'll get linked automagically. Just a quick disclaimer: I'm not all that great at any of this, and wouldn't be surprised if someone called out some massive mistakes I'm making somewhere :smile: Preparations: - Place the F4SE source code into a working directory (obviously). - Open src/f4se/f4se.sln with Visual Studio. - Open the f4se project's properties and change its Configuration Type to Static Library (.lib). - Edit the Post-Build options for the f4se, f4se_loader and f4se_steam_loader to remove the Post-Build Events. - You can compile the f4se solution now or wait until you're compiling your own project with it. - Just make sure you have it configured to build in Release Mode (otherwise you'll need to attach a debugger to finish building). Custom Project Setup: - Keep your project directory with the f4se source files in src/f4se/ . - Create a copy of src/f4se/f4se.sln, name it whatever and add your project to it. Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YourProject", "YourProject\YourProject.vcxproj", "{YourProject's ID}" EndProject - Add the following to your project's vcxproj file to include F4SE (probably before rest of the inludes) : <ItemGroup> <ProjectReference Include="..\..\common\common_vc11.vcxproj"> <Project>{d4c128a1-73dc-4941-a453-ce55af239ba8}</Project> </ProjectReference> <ProjectReference Include="..\f4se\f4se.vcxproj"> <Project>{a236f69d-8ff9-4491-ac5f-45bf49448bbe}</Project> </ProjectReference> <ProjectReference Include="..\f4se_common\f4se_common.vcxproj"> <Project>{f1447a44-f26a-4680-8e20-2d9186766e51}</Project> </ProjectReference> </ItemGroup> - Also add the following to AdditionalIncludeDirectories to include f4se_common's path: $(SolutionDir)\..; - The building process will sometimes fail if you haven't built the rest of f4se before your custom project. Try to compile the full solution if your project refuses to compile. That should be it. A bunch of us are using Github to share and manage F4SE plugin source code. Just run a search for f4se on Github, and you should find some good examples. The source code for my probably completely unsafe dynamic patcher plugin can be found here and should be a better practical example than this short description.
  2. Good timing, I just saw this in the recent threads list. It's not possible (well, maybe not impossible, just not realistic) in the current version since there are a lot of edits to the base game's records that are linked together in a spaghetti-like structure. Yeah, it's as bad as it sounds... The next version is going to include a configuration template system that can be used to enable parts of the framework separately without digging through a bunch of script properties and form edits. *Edit: If you're still willing to give it a try, Use FO4Edit to remove all edits to ammo-related leveled lists. Look for the mod collections containing the alternate ammo types and remove any you want to disable. It's not quite what you're asking for, but may point you in the right direction.
  3. I hadn't heard of GrepWin before and will have to check it out now. Someone recommended AgentRansack for text searches on the Bethesda forums a while back, and I've been using it for Papyrus and Unreal Engine source code since. Notepad++ is great since you can define custom language highlighting and color schemes. I started out with Papyrus definitions for Skyrim and added the Fallout 4-specific classes and functions to it one by one as I ran across them. It definitely helped me figure out some of the differences between the two. There are pages on the Creation Kit wiki about the differences between Skyrim and Fallout 4 in terms of scripting (link) and general Fallout 4 scripting (link) that also helped a lot.
  4. You'll need to call the GlobalVariable function GetValue() for that. fBatteryLevel = gBatteryLevel.GetValue() should work. If you plan to edit the GlobalVariable's value, use SetValue(YourNewBatteryLevel). A description of the functions you can use on GlobalVariables can be found here. SKK50: I'm not sure what you mean. As I mentioned, the two flags are unrelated, so it's not about elegance but functionality. Here's a description of the GlobalVariable form's const flag, and here's the same for Papyrus - explained in a much better way than I can pull off.
  5. Yep, that's what the globalvariable form's const flag does. The script-side flag is unrelated to this - it just marks the property/variable as a constant so that its contents (the globalvariable form the property points to) can't be changed dynamically (or swapped out for another globalvariable) . It's possible to create an override of the globalvariable's form in a separate plugin and clear the const flag on the override to allow editing it - but, as mentioned, no clue if there are any negative effects to doing this.
  6. The const flag on GlobalVariables actually has nothing to do with the script-side flag. The flag for GlobalVariables sets its value to be constant, so any changes to them can't be saved. I'm not sure if its purpose is memory optimization or just locking the value to its default. It's possible to create an override for the globalvariable to disable the const flag, but I'm not sure if there are any long-term negative effects since we don't know how they're handled by the game engine. The const flag in scripts is mostly for memory optimization, and will prevent changes to the variable or forms used as properties. If the GlobalVariable property will only be used for its default form and you're not planning to set it to a different GlobalVariable in the script, use const in its definition. It won't prevent you from changing the globalvariable's value in the script.
  7. There are also some perk entry points that you can use to add a multiplier to XP gained depending on source. They aren't as fine-tunable as the methods discussed here, but they're a good option if you want to dynamically edit XP amounts based on some conditions. Mod Exp = all experience Mod Exp Location = XP gained from discovering locations Mod Exp Speech = XP gained from speech successes Mod Kill Experience = combat XP I'm using them for a private level cap/xp limiter mod and to disable XP gains while crafting ammo in AmmoTweaks.
  8. Multiply and Add takes the base value it's editing and multiplies it by the value you enter, then adds the outcome to the base value. At least that's what I think it does after lots of experimenting. So, for example, if the weapon's base damage is 10, and you do a Mult. and Add 1.0, you'll end up with 10 being added to the value. It doesn't account for anything adding to/subtracting from the base value elsewhere - only the value as set in the weapon's form or any Set function used in a mod that's already attached. I'm not sure about uNumProjectiles since I've only used Set and Add for this one, but you may be seeing the result of rounding after multiplying an integer by a float. EDIT: Never mind, the base nvalue for it is generally going to be 1, so Multiply and Add will have the same result as Add.
  9. The setting called fProjectileMaxDistance should help. It's set to 32768.00 by default. I have it set to 65536.0 in my AmmoTweaks mod, and it seems to increase the distance bullets can travel. It's a little bit more reasonable, but I'm not sure if there is much benefit past this distance due to the world being divided into cells. No idea if it can be accessed via ini editing but it works if used in a plugin. Each projectile's range is still limited by its own settings (10000.0 for a lot of them), and weapon range changes the amount of damage done past a certain distance.
  10. Haha, seriously. If it makes you feel any better: based on some of the comments in the base scripts, it looks Bethesda's scripters agree completely :D
  11. I ran into the same thing recently. It looks like the standard OnExitFurniture event isn't fired when you leave a crafting bench, so you have to use a menu open/close event as outlined here. It works for regular crafting workbenches if you listen for CookingMenu, but I haven't tested it with weapon/armor workbenches yet.
  12. Nice to see other modders interested in the indie development side of things. I agree completely, Unreal engine is pretty awesome, and a huge upgrade over UDK, let alone the Creation Kit. It can be pretty intimidating when first starting out, but nothing headache-inducing like trying to get the CK to do something it wasn't designed for :D I'm not all that active on the UE forums, but I guess I'll see you over there. Given your modding work, it should be interesting to see what you do with it. Good luck!
  13. There's actually an ini edit you can do to make AIs use ammo: [Combat] bForceNPCsUseAmmo=1 I think it's enabled by default in survival mode, but am not 100% sure. This will affect all weapons except the special weapons your followers start out with. You'll have to edit their weapons to use the standard ammo types (they use a special follower ammo type by default). There's also a bool property you can add to weapon mods that will do it. I forgot its actual name, but it should be close to the ini variable's name.
  14. I don't know much about actual ammo crafting, but did a bunch of research on it for my AmmoTweaks mod. I've removed a lot of the components I added in previous versions (Zinc, Sulfur, etc), and included ways to craft the few new components that remain with existing ones. At this point, my mod adds Brass (for shell casings, unrealistically crafted with copper and steel), Gunpowder (2 variations with different recipes - one closer to black powder, the other more like cordite), Saltpeter (for gunpowder), Nitro explosive (for primers and mines/grenades/missiles), Animal fat (for Nitro Exposive, made with hides), Charcoal (for gunpowder, saltpeter), and casings/drained cells for each ammo type that makes sense. For ballistic rounds, I'm using a small amount of lead for every 10 bullets crafted (1 for smaller rounds). It used to have a pretty convoluted crafting system that I just replaced in a recent update, but I'm planning to revisit it in the near future to tie in with a crafting overhaul. You're welcome to dissect it for ideas. Script source files are also included for the other stuff in the mod.
  15. The keyword cap seems to involve keywords that have a type set in the editor and are used as menu or modification categories. There's a lot of conflicting information out there, and people seem to have their own opinions on which keywords are involved, so I won't go any deeper than this. You can create a Magic Effect form that serves to temporarily add a perk to the character it's applied to (check out ModArmorPenetrationAddPerkEffect [MGEF:001F4423] for an example) . If you link the magic effect to an Object Effect, you can make an object mod add the effect when the weapon is equipped and remove it when unequipped. You can add an Object Effect to an OMOD by adding a property with the following: Value Type: FormID, Int Function Type: Add Weapon Property: Enchantments Value 1: effectID value 2: 1
  16. I tried to make energy weapons ammo charge based for one of my mods at one point, and thought I'd share what I found. The value you're editing is the actual number of charges/shots for each ammo item. The relevant part is F4 01. Since the bytes are ordered in reverse, it's actually 01 F4, which is 500 when converted to a number. So, if you want 50 charges, for example, you'd convert 50 to a 2-byte hex value (00 32) and use its reverse (32 00) in this field (also the last two bytes, so it would be 32 00 00 00). (This is a field that hasn't been decoded yet, so be careful with it :D ) If you don't want to end up with a bunch of almost depleted ammo items, match the weapon's Ammo Capacity with the number of charges per ammo item. The amount of charge used per shot can be influenced via perk by modifying "Mod Ammo Health Mult" . If you do a little bit of math, you can pretty easily match this with any increases to ammo capacity added to weapons by object mods (but it will require adding a few perks). There is a pretty big issue, though. If you add the isPowerArmorBattery keyword to items other than fusion cores, you won't be able to add fusion cores to power armor frames by pressing E while you have any of the modded ammo type in your inventory. The animation plays, but no fusion core is added. :sad:
×
×
  • Create New...