Comments (32)
I created new issue (#27) with clarification of this problem.
@BurlyWurly this problem requires fix for ExtractBlueprintDirectReferences script. Blueprints will work fine after that.
from wrathmodificationtemplate.
For question 1, do you wish to add a new custom model or re-use an existing model?
Everything else can be accomplished by using a conditional action component. I've included an example, you should refer to the blueprints archive for more possibilities and actions that can be taken.
It's lengthy but it boils down to
if player has "x" feature { do "y" } else { do "z" }
{
"$type": "66e032e5cf38801428940a1a0d14b946, AbilityEffectRunAction",
"Actions": {
"Actions": [{
"$type": "52d8973f2e470e14c97b74209680491a, Conditional",
"Comment": "",
"ConditionsChecker": {
"Conditions": [{
"$type": "43f75bd73450e1f4aa1f6163f51956e3, ContextConditionCasterHasFact",
"m_Fact": "!bp_f0000000000000000000000000000011",
"name": "unique_ref"
}
]
},
"IfTrue": {
"Actions": [{
"$type": "5d13a597de91e4746b804f8233518523, ContextActionApplyBuff",
"m_Buff": "!bp_f0000000000000000000000000000034",
"DurationValue": {
"m_IsExtendable": true,
"Rate": "Hours",
"DiceCountValue": {
"m_CustomProperty": ""
},
"BonusValue": {
"m_CustomProperty": "",
"ValueType": "Rank"
}
},
"AsChild": true,
"name": "unique_ref"
}
]
},
"IfFalse": {
"Actions": [{
"$type": "5d13a597de91e4746b804f8233518523, ContextActionApplyBuff",
"m_Buff": "!bp_f0000000000000000000000000000035",
"DurationValue": {
"m_IsExtendable": true,
"Rate": "Hours",
"DiceCountValue": {
"m_CustomProperty": ""
},
"BonusValue": {
"m_CustomProperty": "",
"ValueType": "Rank"
}
},
"AsChild": true,
"name": "unique_ref"
}
]
},
"name": "unique_ref"
}
]
},
"name": "unique_ref"
}
from wrathmodificationtemplate.
Add new custom models such as creating new weapon models.
and the conditionals can be used to say disable a metamagic feat if you don't have a specific spellbook blueprint?
from wrathmodificationtemplate.
I'm afraid I can't help you with new models, it's nothing I've looked into.
Otherwise, conditionals are the best choice for creating specific actions based on what features a character has. I can't get any more specific without constructing it myself, I'd encourage you to experiment with it and see if it can be done, for yourself.
from wrathmodificationtemplate.
For question 1:
You could create your own model and place it in Content folder. Copy guid and file ID (right click on asset -> Modification Tools -> Copy guid and file id) then and use it in a patch for existing weapon or in a new weapon's blueprint (m_VisualParameters.m_WeaponModel).
Weapon's prefab must has EquipmentOffsets component on itself so you need to create script with the type inherited from EquipmentOffsets and use it on your weapon's prefabs:
internal class MyEquipmentOffsets : EquipmentOffsets {}
from wrathmodificationtemplate.
- I created the new script for the equipment offset.
- I imported a test model into the content folder.
- Created a new prefab of the model and added the script to it.
- Created a new replacement patch to replace the Dueling Sword weapon type in this:
{
"_#ArrayMergeSettings": "Replace",
"Data": {
"$type": "51210e03e441ea249be955610f84c748, BlueprintWeaponType",
"PrototypeLink": "",
"m_Overrides": [],
"Components": [],
"Comment": "",
"Category": "DuelingSword",
"m_TypeNameText": {
"m_Key": "188b5221-ceec-4a1f-a558-6e3765b5fca6",
"m_OwnerString": "a6f7e3dc443ff114ba68b4648fd33e9f",
"m_OwnerPropertyPath": "m_TypeNameText",
"m_JsonPath": "Strings/Mechanics/Blueprints/Weapons/Types/ExoticOneHanded/DuelingSword_m_TypeNameText.json",
"Shared": null
},
"m_DefaultNameText": {
"m_Key": "d1a0fb27-f386-4b60-9e33-809c6977391e",
"m_OwnerString": "a6f7e3dc443ff114ba68b4648fd33e9f",
"m_OwnerPropertyPath": "m_DefaultNameText",
"m_JsonPath": "Strings/Mechanics/Blueprints/Weapons/Types/ExoticOneHanded/DuelingSword_m_DefaultNameText.json",
"Shared": null
},
"m_DescriptionText": {
"m_Key": "",
"m_OwnerString": "",
"m_OwnerPropertyPath": "",
"m_JsonPath": "",
"Shared": null
},
"m_MasterworkDescriptionText": {
"m_Key": "",
"m_OwnerString": "",
"m_OwnerPropertyPath": "",
"m_JsonPath": "",
"Shared": null
},
"m_MagicDescriptionText": {
"m_Key": "",
"m_OwnerString": "",
"m_OwnerPropertyPath": "",
"m_JsonPath": "",
"Shared": null
},
"m_Icon": {
"guid": "9ff3a761cd8b9844e8e6e714557cb1e7",
"fileid": 21300000
},
"m_VisualParameters": {
"m_Projectiles": [],
"m_WeaponAnimationStyle": "SlashingOneHanded",
"m_SpecialAnimation": "None",
"m_WeaponModel": {
"guid": "f54e76ab2f34a82468921104b1aa0e73",
"fileid": 6121576017292949860
},
"m_WeaponBeltModelOverride": null,
"m_WeaponSheathModelOverride": {
"AssetId": "4c15ea392bf40914594d43aa195ac407"
},
"m_OverrideAttachSlots": false,
"m_PossibleAttachSlots": [],
"m_ReachFXThresholdBonus": 0.0,
"m_SoundSize": "Medium",
"m_SoundType": "SlashMetal",
"m_WhooshSound": "Weapon_1H_Slashing_Medium_Attack",
"m_MissSoundType": "MediumMetal",
"m_EquipSound": "Weapons_1H_Slashing_Equip",
"m_UnequipSound": "Weapons_1H_Slashing_Remove",
"m_InventoryEquipSound": "SwordEquip",
"m_InventoryPutSound": "SwordPut",
"m_InventoryTakeSound": "SwordTake"
},
"m_AttackType": "Melee",
"m_AttackRange": {
"m_Value": 5.0
},
"m_BaseDamage": {
"m_Rolls": 1,
"m_Dice": "D8"
},
"m_DamageType": {
"Type": "Physical",
"Common": {
"Reality": 0,
"Alignment": 0,
"Precision": false
},
"Physical": {
"Material": 0,
"Form": "Slashing",
"Enhancement": 0,
"EnhancementTotal": 0
},
"Energy": "Fire"
},
"m_CriticalRollEdge": 19,
"m_CriticalModifier": "X2",
"m_FighterGroupFlags": "BladesHeavy",
"m_Weight": 3.0,
"m_IsTwoHanded": false,
"m_IsLight": false,
"m_IsMonk": false,
"m_IsNatural": false,
"m_IsUnarmed": false,
"m_OverrideAttackBonusStat": false,
"m_AttackBonusStatOverride": "Unknown",
"m_Enchantments": [],
"m_Destructible": true,
"m_ShardItem": "!bp_e6820e62423d4c81a2ba20d236251b67"
},
"Meta": {
"ShadowDeleted": false
}
}
it's not changing the Dueling Sword model at all did I misstep anywhere?
from wrathmodificationtemplate.
Sorry, I was wrong, you need to use "AssetId": "some-guid"
format for "m_WeaponModel"
. Upload your modification if it doesn't work with AssetId.
from wrathmodificationtemplate.
Sorry, I was wrong, you need to use
"AssetId": "some-guid"
format for"m_WeaponModel"
. Upload your modification if it doesn't work with AssetId.
Would this work with adding portraits to NPC's without them? It seems like it should, but nothing I do seems to make them actually show up in dialog. Isn't it just a matter of putting the portraits in the content folder, and patching the NPC's portrait blueprint with the new portraits guids? Am I missing a step here? This is an example of a patch to Liotr Hawkblade's portrait blueprint.
{
"Data": {
"m_PortraitImage": {"AssetId": "744eda9e1fc78e34c8cecbfb7ffdf6d8"},
"m_HalfLengthImage": {"AssetId": "fa1074ebd3eacdd43ad639c9bff175a3"},
"m_FullLengthImage": {"AssetId": "285f2ea43cc32a64492251e4caa1b5a8"},
"InterchapterPortraitLink": null,
"PortraitCategory": "None",
"IsDefault": false,
"InitiativePortrait": true
},
"m_BackupPortrait": {"AssetId": "fa1074ebd3eacdd43ad639c9bff175a3"}
}
from wrathmodificationtemplate.
This suppose to work for any resource from bundle and your patch looks valid. Are you sure the image is Sprite?
from wrathmodificationtemplate.
Definitely Sprite. Sprite Mode is set to Single whereas your picture says multiple so I don't know if that matters. I notice that changing that removes the ability to expand the image.
from wrathmodificationtemplate.
This is how it configured in Wrath (AssetId is equals to guid of selected asset from last screenshot)
from wrathmodificationtemplate.
It looks like the bundle builder will only find references that have an asset id and file id.
PortraitData uses WeakSpriteLink which only has an asset id.
I changed the bundle building script:
if (bundleName == null)
{
bundleName = "bubbleraces_builtin";
}
I am sure there are better ways to do this though, like enhancing the directreferences code to find weakresource links
from wrathmodificationtemplate.
here is the modification since it's not working
AlchemistClothes.zip
.
from wrathmodificationtemplate.
So, how would I go about replicating that in my own PrepareBundles.cs? What exactly is "bubbleraces_builtin"? Is that an asset, or a list of assets?
from wrathmodificationtemplate.
bubbleraces_builtin in simply the name of an asset bundle, you can put whatever name you want there.
Here is more context for where to add the code:
public ReturnCode Run()
{
Debug.Log("Running");
var buildContent = m_BundleBuildContent;
var layout = new Dictionary<string, List<GUID>>();
// bundle name -> [material guid]
var materials = new Dictionary<string, List<string>>();
string[] assetGuids = AssetDatabase.FindAssets("t:Object", new[] {m_ModificationParameters.ContentPath});
foreach (string assetGuid in assetGuids)
{
Debug.Log($"asset guid: {assetGuid}");
string assetPath = AssetDatabase.GUIDToAssetPath(assetGuid);
string bundleName = m_LayoutManager.GetBundleForAssetPath(assetPath, m_ModificationParameters.TargetFolderName);
Debug.Log($"Bundle name: {bundleName}");
if (bundleName == null)
{
bundleName = "bubbleraces_builtin";
}
if (!m_Tracker.UpdateInfo(assetPath))
{
return ReturnCode.Canceled;
}
from wrathmodificationtemplate.
That was very helpful thank you, it looks like you're replacing the {continue} that was already there which is what I wasn't sure about.
Can you point me towards any resources on building an asset bundle?
from wrathmodificationtemplate.
I managed to build a bundle with the portraits and made the code substitution using my own bundle name, but still nothing. I set the portrait category in the blueprint to Wrath, figuring if it was getting into the game but not the character it would at least show up in character creation, but nothing there either. There's gotta be something else I'm missing here.
from wrathmodificationtemplate.
How did the you get the bundle generated? Even with the code substitution my bundle isn’t building in Unity. If I look in the file explorer, bundles are being created in the temp files—just not on my modification; only on the example one.
I think I’ve done something wrong as the game won’t even load with the modification enabled, but so far I cannot figure out what I’ve done wrong.
from wrathmodificationtemplate.
I used the script provided in the unity manual to build a bundle. 'AssetBundle Workflow' and 'Building AssetBundles. https://docs.unity3d.com/Manual/AssetBundlesIntro.html
I dropped it off in the mod's bundle folder after making it but so far no dice on getting it into the game.
from wrathmodificationtemplate.
I'll post a full portrait example later, I'm not at the computer right now.
I generate the blueprint in code though, not through jbp so perhaps that's what's going wrong?
from wrathmodificationtemplate.
I used the script provided in the unity manual to build a bundle. 'AssetBundle Workflow' and 'Building AssetBundles. https://docs.unity3d.com/Manual/AssetBundlesIntro.html
I dropped it off in the mod's bundle folder after making it but so far no dice on getting it into the game.
That worked—! Thank you! But my mod still won't load. :(
I'll post a full portrait example later, I'm not at the computer right now.
I generate the blueprint in code though, not through jbp so perhaps that's what's going wrong?
That would be great! Though I myself am not using jbp... should I be? I am just trying to patch a portrait for an NPC.
I did notice that my gamelog.txt has a few guids that I don't have in my modification folder.
from wrathmodificationtemplate.
How are you patching the NPC portrait?
from wrathmodificationtemplate.
I'll post a full portrait example later, I'm not at the computer right now.
Were you still planning to share this?
from wrathmodificationtemplate.
https://github.com/factubsio/BubbleTeachesLesson0#readme
from wrathmodificationtemplate.
Your method does appear to be completely dependent on coding in the blueprints, so I don't think it's the solution I'm after here.
@hmmvot So is this simply not a thing that can be done with jbp right now or are we all missing something here?
from wrathmodificationtemplate.
I am sure you can do it using jbp, but what's wrong with coding?
from wrathmodificationtemplate.
I dunno if this is an issue with the template or not, but over the course of several days I've been trying to modify etudes/dialogs/cues with no success it feels like the game is not registering the changes/patches/blueprints.
from wrathmodificationtemplate.
As you know, normal game behaviour is that if there's an error in your blueprint the game fails to parse it and falls back on the existing blueprint. Otherwise, we'll need more to work with to troubleshoot it.
from wrathmodificationtemplate.
So going through again trying to change the weapon models again I think it is the owlcat shaders that are running into issues as the model doesn't render in game or in the editor with an error for the shaders being.
Shader error in 'Owlcat/Lit': failed to open source file: 'Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl' at Assets/RenderPipeline/OwlcatShaders/Shaders/Lit/LitInput.hlsl(4) (on d3d11)
As can be seen the model is in and yet does not display and funny thing is that the cube mesh causes the character to go flying into the heavens as I assume the collision attached to it breaks it(Probably fixed by removing collision?)
from wrathmodificationtemplate.
Is there any specific options in the material that need to be checked for the model to be visible in game? Or do I need to wait for a fix?
Is there a way to spawn an npc/unit into a scene via blueprint?
from wrathmodificationtemplate.
Messing with and creating new blueprints for weapons seems to cause odd issues when brought into the game so I'm beginning to think the issue goes beyond just the shader.
from wrathmodificationtemplate.
Is there a way to spawn an npc/unit into a scene via blueprint?
I don't think you can do this with pure blueprints, only code.
from wrathmodificationtemplate.
Related Issues (20)
- Adding entirely new Music?
- Modifying Components HOT 1
- Adding New Blueprints HOT 51
- Companion Selection Choices Changing After Patching Selection Blueprint HOT 5
- Patching Blueprints After 1.1.1 HOT 3
- LocalizedName HOT 13
- Class Progression HOT 7
- Some blueprint patches no longer patching 1.1.1 HOT 16
- GUI Construction HOT 5
- Blueprint component patching HOT 29
- Curious Blueprint Issue HOT 1
- Help in changing Holy blare enchantment to reference correct ability HOT 5
- ExtractBlueprintDirectReferences doesn't support WeakResourceLink HOT 4
- PatchMaterialShaders tries to load StreamingAssets/Bundles/shaders
- Struggling to get Mods Running for Some Users
- Weapons issue HOT 1
- Is it possible to change armor color?
- All mods broken in 2.0.0. Affected saves no longer load. HOT 3
- About changing projectile models and reusing ToggleableThrowingWeapons
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wrathmodificationtemplate.