[Suggestion] - Extended Modpack Support - Creating and set new Damage Types
Xarmat-GitHub opened this issue ยท 5 comments
Creating and set new damage types
- by Script (ZenScript, JSON)
Note: This Suggestion expands/change/manipulates the vision of "Distinct Damage Descriptions", if the project owner don`t want to realize it, it will be repost in the community sides. (in the next 3 days)
Description
This idea has the opportunity for modpack makers to create tables of damage types, mob lists and weapon lists to force the player to craft and change his equipment on each adventure / boss fight / journey / event tweaked by the game.
Example
-
Create a new damage type "holy_dmg"
-- Set in game description -
Create a table of items with the Tag "holy_item"
-- Set in game description
-- Add the damage type "holy_dmg" -
Create a new mob list with the tag "undead_mob"
-- Set in game description
-- Add "holy_dmg" weakness
Now all undead mobs get "extra damage" from holy_item's.
Values and Functionality
Damage Type Creation:
- name: "holy" (string for scripting purpose)
- display: "Holy" (in game name) (when not set, fall back to "name"; when "" empty, hide)
- description: "Strong against undead" (in game description) (when not set, empty)
- amplified_damage: "true" (true = damage will be add on top of the base weapon damage)
- partial_damage: "25" (X% = how much of the base damage will be replaced by this damage type -> when "amplified_damage" is "true", the damage will be added on top
- hide = "true" (true = hide this damage type completely in the game; default: false)
Example:
- Item: "Excalibur"; 10 damage; "holy" damage type added
- damage against normal mobs = 10 damage (7,5 damage when "amplified_damage" would be "false")
- damage against undead mobs = 10 damage + 2,5 holy damage = 12,5 damage (10 damage when "amplified_damage" would be "false")
Item Table Creation:
Note: items's can be at more then one list
- name: "holyWeapons" (scripting)
- display: "Holy Weapon" (display, shown in lore section of the item)
- description: "I will hide this anyway..." (when not set, no lore will be added to the item)
- hide = "true"
- item_list:
minecraft:iron_sword
modID:itemID
Entity Table Creation:
Note: entity's can be at more then one list
- name: "undead"
- display: "Undead"
- description: "ewww... ugly..."
- priority: "3" (when this mob is added in more then one entity table, it will take the display&description of higher priority)
- damage_type_01: "holy", "100" (add damage type "holy" with 100% damage received)
- damage_type_02: "shadow", "25" (add damage type "shadow", damage received reduced to 1/4)
- hide: "false" (spawn egg description / Wawla support)
- entity_list:
"minecraft:zombie"
"minecraft:skeleton"
"modid:entityID"
Working with this mechanics
As modpack maker there is a easy way to create and export excel sheets into a config / script.
Export Lists with Craft Tweaker and manipulate them in an excel would be the easiest way to work with it.
Expandable
Note: I can extend the list if you want, just contact me and I rework this post
- Damage types for mobs
- Resistance % damage reduction on armour
- Player values
- Create potion effects for each entry
More Ideas/Thought's
-
Separate Scripts for more overview
-
In game feedback / HUD information
-- Some way to list all damage types visually in game -
Potential conflicting with other damage mods
-- Like "Spartan Weaponry" or Items with potion effects -
What about Arrows / Projectile, Tinkers Weapons, Construct Armoury, Splash Potions, Vanilla Minecraft Damage Types
-
Game Stages Support
Stay in Contact
Discord: #7574 Xarmat
Currently, Distinct Damage Descriptions has custom damage types and creature types that can be defined via JSON, although it may be a little more simplistic than what you're after. Creature types include things like immunities to potion effects and resistances/weaknesses to vanilla, modded and custom damage types. The main idea was to allow for more dynamic interactions between mobs - the player was more of an afterthought. As such, armors have no inherit resistance bonus/penalty against custom damage types, and will instead use normal armor calculations. Tools and weapons can be define to inflict holy damage as an example. If a mob has a holy weakness, then the overall damage is buffed, after physical damage is handled, if I recall correctly.
The ability to define a batch of damage types/creature types via ZenScript is an interesting one, however with the JSON system already in place, I'd much rather support that one system then either dropping that in favour of ZenScript or supporting both systems. However, it probably wouldn't be too hard to whip together a small Python script that could take a properly formatted .csv file and parse it to produce individual JSON files formatted for use in DDD. If anyone wants to whip such a tool together, you can open a PR with it and I'll gladly include it as a resource in this repo for people to use. Doesn't have to be Python, but Python would make it easy to use for end users - just run the script, follow prompt, and let it do the rest - with minimal overhead.
A goal for DDD is to enable native CraftTweaker support, allowing pack developers to hook onto DDD's custom events. With additional CraftTweaker support, pack developers should be able to quickly access mob creature type information in general, not just through the custom events. This can allow for more complex interactions, like allowing a holy weapon to smite an undead creature, giving it some kind of negative potion effect, or allowing plant types to regenerate health during the day. The framework exists, I just need to learn how to enable CraftTweaker integration, which from my minimal research, isn't too complicated. This goal probably more or less realizes many of the features (and more) that you wanted from an extended creature and damage type system (I hope).
Some additional comments:
In game feedback / HUD information
This has always been a challenge for DDD. There's a lot more complex interactions and underlying systems, and communicating it clearly and concisely has always been important to me. Providing information through tooltips seems to be working so far, but I don't want to clutter tooltips with a bunch of information either.
Potential conflicting with other damage mods
With mods that inflict potion effects with weapons (Like TConstruct), it shouldn't really be much of a problem. If you have some enemies that shouldn't be getting the TConstruct Bleed potion effect, just make a creature type, like Construct and give them that potion immunity. Should solve that problem. I expect some mods may be problematic, and that may require changes on DDD's end. Some mods may just end up being incompatible, and that might just have to be the way things are. I'll keep and up to date list of incompatible mods on the CurseForge page to keep users informed - should it ever arise.
What about Arrows / Projectile, Tinkers Weapons, Construct Armoury, Splash Potions, Vanilla Minecraft Damage Type
Arrows and projectiles should work fine, you'll just need to specify the arrow entity, not the item. Going out of my way to ensure Tinker's items (weapons and armor) play nicely with DDD, or adding integration to specify damage distributions and damage types for certain material types is something I'm willing to consider, as seeing these mods working together would create a very cool combat system, but nothing is set in stone yet. I'll need to look at their respective API's first. Splash potions inflicting custom damage types is not something I expect to do, as it may not be possible to distinguish which potion effect the damage came from. Vanilla damage types can already be specified, so unless you mean something else here, that should already exist and work.
Game Stages Support
Could you elaborate a little bit? What would be blocked by each game stage?
First, tank you for the nice feedback. ๐
Second, I want to say sorry, because I didn't test your mod enough and was to fast with my Suggestion.
I tried several features and take a look at the functionality.
Costume damage, c. mob lists (worked), play around with the "spb" options and resistance plus immunity (and high negative values >1)
1. Armor Damage Resistance:
Something that I miss is the player configuration part.
Lets say, that I want a player use "Shadow Armor" to protect himself from "shadowDamage" caused by "WitherSkeleton".
This isn't possible at the moment.
2. Python / Import Excel Data:
For me, it is possible to create a excel spreadsheet and export all informations in your config as its needed.
It would be nice when there is someone who will generate the Python feature, but it is not necessary at the moment.
3. Feedback: Config
I needed quite a time to get the custom JSON files to work.
- it could help when you add these lines to your example JSON files
-- B:"Use Custom Damage Types" <- must be "true" to use this feature
-- B:"Use Custom Death Messages" <- must be "true" to use this feature
-- B:"Use Creature Types" <- must be "true" to use this feature
Something that can also help: - How to find "dmgSource" (its not really your job, but a hint can help to earn fast progress)
-- just put 2-3 exampels like "magic", "indirectMagic", "fire" and explain them with a link to a list of them
4. HUD and Feedback
An option to set them on/off and what can be shown and hide would be good.
But this is worth a own ticket, don't want to spam your GitHub to much.
5. Game Stages and more
- Game Stages (GS), Reskillable (RA) support
-- GS: When player reach a game stage, all mobs in DIM 0 lose 50% resistance
-- RA: When player hast 5 points in leather armor, gain 10% resistance on all leather armor
-- But seriously: That is feature Creep, don't implement it, it isn't worth it...
Conclusion of my Suggestion in total
Sorry for the waste of time. It isn't worth it now that I learn how your mod really work.
Optional:
If you wish, I can create new Tickets, but for know I spammed enough ;)
- Player Values
-- Option to set resistant values for the player; "minecraft:player" useable in JSON files - Armor Damage Typs
-- Enable damage configuration for armor - HUD
-- Configuration, Key Shortcut (on/off), Configuration JSON (shown/hide) - Feedback
-- Learn to use the right weapon (sort of Feedback Item, collects Entity Data with values, player can use it to know resistances, and change his play style), normally this is the job of the modpack maker - Integration Waila
-- Symbols with % numbers - Custom NPC integration
-- Many medieval adventure modpacks work with Custom NPCs, but the mod creators must be ready to work with you to achieve this for version 1.12 - Option to delete lines in the JSON file
-- Lets say I don't need the lines: "slashing_resistance","slashing_resistance","critical_hit_immunity" (the block on top of the script)
-- Then I can just delete it, without crashing the game - Disable "example" script creation via config
- using OreDict / Base Material
-- for Items mad of gold, or Items with the same oredict "ore:dagger"
Final Note: Really nice work, I will test it and hopefully it has no heavy bugs so I can use it for my adventure modpack ๐
Lets say, that I want a player use "Shadow Armor" to protect himself from "shadowDamage" caused by "WitherSkeleton".
This isn't possible at the moment.
The custom damage types was for mob interactions mainly, not player interaction (in it's current form). CraftTweaker may be able to handle some of that, but if not, I'll think about if it fits in the JSON.
For the config feedback, I'm willing to make descriptions a little more clear if they aren't already. The damage sources can be found on the Minecraft Wiki. There's a bit of a list here, but making it more accessible would be nice, I agree. If I make a wiki for this mod (And I probably should) I'll make sure to include it.
HUD control is nice, might make them a config option for now. Related to #5.
Some GameStages, WAILA, and Reskillable support would be interesting, but I'll save that for later.
Player Values
-- Option to set resistant values for the player; "minecraft:player" useable in JSON files
Possible, but kind of annoying. Minecraft treats the player in a special way, so to speak. The current code for adding resistance capabilities to mobs doesn't work for players.
Ore Dict/Base Material idea is interesting. I'll think about it.
Don't worry about spamming with tickets too much. More smaller tickets are easier to handle and work through than one large ticket, in my opinion.
If you do decide to add support for TiC and perhaps Construct's Armory too (adding support should be similar), that'd be great!
And in case me chipping in is of any value, Tinkers Construct and Construct's Armory both use base items, such as tconstruct:broadsword, with a material associated via NBT - example: Materials: ["wood", "copper", "stone"].
To elaborate, items look like the below -- including NBT, which controls all of the associated materials/stats:
<tconstruct:broadsword>.withTag({StatsOriginal: {AttackSpeedMultiplier: 1.0 as float, MiningSpeed: 2.3 as float, FreeModifiers: 3, Durability: 68, HarvestLevel: 3, Attack: 3.75 as float}, Quality: {}, Stats: {AttackSpeedMultiplier: 1.0 as float, MiningSpeed: 2.3 as float, FreeModifiers: 1, Durability: 68, HarvestLevel: 3, Attack: 3.75 as float}, Special: {Categories: ["weapon", "tool"]}, TinkerData: {Materials: ["wood", "copper", "stone"], Modifiers: ["toolleveling"]}, Modifiers: [{identifier: "ecological", color: -7444965, level: 1}, {identifier: "established", color: -1204473, level: 1}, {identifier: "cheap", color: -6710887, level: 1}, {identifier: "toolleveling", color: 16777215, level: 1}], Traits: ["ecological", "established", "cheap", "toolleveling"]})
In the case of the above NBT, the blade itself is copper, so it is (effectively) a copper sword - but with a wooden handle and a stone guard.
So support might be a bit tricky, since items can consist of multiple materials - and it might get a bit strange when you mix and match. Whilst it'd be a cool feature if 'blending' of material stats was an option, I think most of us would be just looking at having blade materials solely handle the whole blunt v pierce v slash stats.
Take a look at #17. There, I mention the following:
So basically, users would have to define a damage distribution for each head piece. So an axe head piece made of stone would have a different distribution than an axe head piece made of iron, for example. Then we combine these distributions and slap that onto the item.
For Tinker's, we should only consider head pieces for damage distribution (makes sense, avoid any complications). Some items, like the Mattock, have multiple head pieces. All head pieces' distributions should be combined, like with Tetra.
So yeah, I was thinking of only using parts that count as head pieces for the tool in question (Subject to how I can access that kind of information dynamically with TiC's API). Something like a Mattock has two head parts - and axe head and a shovel head (You can tell it uses two head pieces because the tool uses both traits that come from the head parts of the materials), so we can average the distributions there. It would be nice to be able to have parts of certain materials be able to inflict custom damage types, but this would mean the part wouldn't inflict any physical damage of any kind, lest I go against #24.
Whilst it'd be a cool feature if 'blending' of material stats was an option...
The system as a whole is still pretty cool and dynamic, regardless if 'blending' stats is a thing, because of tool traits. Tinkering with Distinct Damage Descriptions now becomes a balance between getting the traits you want and the damage distribution you want. And if certain materials inflict custom damage (like say radiant damage from a Lumium blade) then the possibilities to consider become deeper. Blending stats creates one of two problems. Either it's way too easy to minmax damage distributions which ruins the point of blending, or everything is averaged too much to the point where you can't really customize damage. So sticking with head pieces seems to be the way to go.
For ConArm, I also mentioned something in the same issue:
Construct's Armory might be trickier. It may be best to define resistances for each material, then define what percentage of that distribution is used for each armor piece. For example, Cores could use only 85% of their distribution, Plates could use 10%, and the remaining 5% comes from the Trim. Combine that together, and that's the armor's distribution. The armor piece weight would be defined in the configs, so users can fine tune each piece's influence. This seems like a good idea, but I'm open to others.
Refer to what I mentioned before, but replace 'damage' with 'armor':
Either it's way too easy to minmax damage distributions which ruins the point of blending, or everything is averaged too much to the point where you can't really customize damage.
It may be better to only consider the core for armor distributions. It'd make it similar to TiC integration, which would make it easier to understand and use. Not entirely sure though...