Logo Platform
logo amplifiers simplified

Broken Lords "Dust Care" (HealableWithDust) question

Reply
Copied to clipboard!
10 years ago
Nov 5, 2014, 1:22:53 PM
I'm struggling with understanding many of the abilities, especially Broken Lords' "Dust Care" ability - I cannot find it defined in the XML files:

Broken Lords units are defined in UnitBodyDefinitions.xml, all of them have this within their UnitBodyDefinition, e.g.:

[code]



...

<UnitAbilityReference Name="UnitAbilityHealableWithDust"/>

...



[/code]

The unit has a unit ability, so we look at UnitAbilities.xml where the ability is defined:

[code]

UnitAbilityHealableWithDust">

<SimulationDescriptorReference Name="UnitAbilityHealableWithDust"/>

[/code]

The ability is comprised of a simulation descriptor, so we look at SimulationDescriptors[UnitAbility].xml:

[code]

UnitAbilityHealableWithDust"/>

[/code]

The simulation descriptor does not have a property descriptor, and it does not have a modifier descriptor, in fact it has nothing defined except the name. We've hit a dead end. How does it work?



Just as an example, what if I wanted to create a faction that heals its units with Influence? How might I go about doing that?



Also, are SimulationDescriptors global?
0Send private message
10 years ago
Nov 5, 2014, 1:54:14 PM
I'm afraid your pointing an ability which is hard coded. It would explain the descriptor being only the name of the ability itself.



I will ask about this though.
0Send private message
10 years ago
Nov 5, 2014, 2:03:54 PM
I'm quite at the same point about that ability.

I try to modify the way the units regen (no regen in winter), and i tough an inverted dust care could be a way... but nowhere there is the descriptor for the ability UnitAbilityHealableWithDust

I think it's linked to the affinity faction trait FactionTraitBrokenLords3

And where for the others factions there is a descriptor like (for the vaulters):



for the broken lord trait smiley: biggrin :











there is only the tooltip override, no descriptor neither.

Soooo... there is no way to know how that ability works, and use it to do something else with.

Dead end for me too v_v.



EDIT : ah Pikou was faster smiley: biggrin

If it is hard coded. Maybe there is a way to create a new simulation descriptor who do the same thing ?
0Send private message
10 years ago
Nov 5, 2014, 4:00:38 PM
Well as you have guessed it is hard coded. Now that you are trying to do some heal with the influence resource I am kinda sad...

We didn't think about that when developing the dust heal... and that's bad.



I'll try to check how the whole system works to see if I can do something about it... I will keep you informed about it.



For the regen. I think you can do something by adding a simulation descriptor with a modifier which set the regen of the unit at 0.

Something like that:

[CODE][/CODE]



Cheers!

flo.
0Send private message
10 years ago
Nov 5, 2014, 5:45:28 PM
I stopped the regen like this :



The Path is not exactly good, i have to be more specific because it should focus only units into the wild.

Didnt figured it out how to inflict damage to units.
0Send private message
10 years ago
Nov 6, 2014, 1:22:26 AM
Thank you for the answers, Pikou and ThorTillas. Is there a list of things which are hard-coded? I was sad to hear that battle mechanics are hard-coded as I wanted to implement the ability for units to take one turn at a time (among other things). smiley: frown



I have another question. Are the Broken Lords' lack of passive health regeneration tied into, or distinct from, their ability to heal with dust?



@Linithe, on the Broken Lords Faction Trait specifically, I don't believe that Faction Trait has any actual effect on regen or healing ability - it's just there to provide a tool-tip (to be hooked into GuiElements and EF_Localization_Assets files). The reason I believe that is because if you look at UnitBodyDefinitions.xml, the ability to heal with dust is hooked into the Broken Lords units' UnitBodyDefinition themselves (as in my post above).

You can test this by modifying the faction trait to unlock it so that you can apply it on any other affinity. What you will find is that you won't be able to heal your Dekari Rangers with dust, for example. However, on the flipside, you could modify other affinities to open up the ability to build Broken Lords units with them. What you will find is that even though you are a Wild Walkers faction, you can heal your Stalwarts with dust, for example.



Linithe, did you try this yet?



Tigregalis wrote:
OK, Linithe, try this (changes in red):



As a season mod, applying to all units:

1. SimulationDescriptors[Class].xml:

[code]



...

MinValue="Negative"/>

...



[/code]



2. SimulationDescriptors[Season].xml:

[code]















[/code]

Maybe "ClassEmpire" should be "EmpireTypeMajor", and maybe "ClassArmy" should be "Garrison".



3. Seasons.xml:

[code]



Winter

LongSummer



30

Winter





















EmpireTypeMajor,FactionTraitVaultersMezari











Winter

ShortSummer



15

Winter





















EmpireTypeMajor,FactionTraitVaultersMezari











Winter

ChaoticSummer



50

Winter





















EmpireTypeMajor,FactionTraitVaultersMezari













Winter

Winter





















EmpireTypeMajor,FactionTraitVaultersMezari







[/code]



I have left open the possibility of Frostbite Immunity.



4. Do the rest to make a mod.



As a Faction Trait (Option 1):



1. SimulationDescriptors[Class].xml:

[code]



...

MinValue="Negative"/>

...



[/code]



2. SimulationDescriptors[Season].xml:

[code]













[/code]

Note that I'm not sure of the exact way to get the path to the Faction Trait.

Maybe "EmpireTypeMajor" should be "ClassEmpire", and maybe "ClassArmy" should be "Garrison"



3. SimulationDescriptors[FactionTrait].xml:

[code]



[/code]



4. Do the rest to add a faction trait.



As a Faction Trait (Option 2):



1. SimulationDescriptors[Class].xml:

[code]



...

MinValue="Negative"/>

...



[/code]



2. SimulationDescriptors[FactionTrait].xml:

[code]











[/code]

Maybe "EmpireTypeMajor" should be "ClassEmpire", and maybe "ClassArmy" should be "Garrison".



3. Do the rest to add a faction trait.



Notes:



I hope that works. I'm assuming that UnitRegen works the way we want it to, and forcing it to -0.1 will mean a 10% maxHP loss per turn.



In all of my research, I have noticed the following:



* "EmpireTypeMajor" seems to be somewhat synonymous with "ClassEmpire" - however, faction traits (and simulations that make reference to specific faction traits) seem to only use "EmpireTypeMajor" in the path. My theory is that ClassEmpire relates to all empires, while EmpireTypeMajor relates only to the target empire.



* "Garrison" seems to be somewhat synonymous with "ClassArmy", or units in "ClassCity" - I'm not sure. My theory is that the path "Garrison/ClassUnit" includes both "ClassArmy/ClassUnit" and "ClassCity/ClassUnit"- the former being units in the field, and the latter being units that are garrisoned.




It's very similar to ThorTillas' implementation, so I'm glad I was around the ballpark there.



What it does:

1. Set UnitRegen minimum to negative infinity, so that (if it works correctly) units can take damage.

[code] [/code]

2. Implement a season-based or trait-based SimulationDescriptor that forces the unitregen to be equal to -0.1. using:

[code] [/code]



EDIT: Well, negative regen certainly didn't work. Either that or the path is wrong. How can I test the path?

EDIT2: Ah, actually, it does work. I was playing Broken Lords, so I never noticed. However, the minor faction army with 111 maxHP now has 78 maxHP each, following 3 turns of winter, that's 33 damage which is 10% per turn as expected. The only problem is that Broken Lords units don't regenerate - in other words, they can't "degenerate" either. I'm also not sure whether Garrisoned units are immune or not. I also have not yet tested what happens when units reach 0 HP.



I'm thinking I'll try your Health-based approach, first by forcing UnitRegen to zero, and then subtracting Health per turn.



EDIT3: No luck. What am I doing wrong?

SimulationDescriptors[Season].xml:

[code]



























[/code]
0Send private message
10 years ago
Nov 6, 2014, 10:07:27 AM
Yes, the fact that unitregen does not apply to broken lord is hard coded on the faction trait too.

I will try to work on that to open it for modding...



You are using the unit regen correctly. What you are doing wrong is the use of force and another operation in the same priority range...



Force will "force" a value to the property. And this, no matter of the other operation applied before or during the same priority.

So if you want to reset the value to 0 and then modify it I would recommend something like that:

[CODE]















[/CODE]



So first you force the property to 0 and then you substract 0.1. I used the priority 5 to be sure to be after anything else. Normally you could use 0 and 1 but...



Does that make any sense?



Cheers!

flo
0Send private message
0Send private message0Send private message
10 years ago
Nov 7, 2014, 12:53:14 PM
Just as an example, what if I wanted to create a faction that heals its units with Influence? How might I go about doing that?


another idea could be a mix between BL and Necro : heal units with cadavers, like some sort of Ghouls/Cannibals.
0Send private message
10 years ago
Nov 10, 2014, 4:25:40 PM
Ok, I spent some of the day working on unit regen/instant health.



-> Broken lords accept only negative regen from now on. I have added a unit ability on the broken lord to represent that (UnitAbilityCannotRegen). So you should be able to use this ability on any other unit.

-> The fact that they can be positively regenerate by pacified village is now separate from the fact that the does not regen... (UnitAbilityCanRegenWithVillage).

-> The instant heal has now a parameter to determine the resource to use. I have rename the unit ability to match that. Example:

[Code]



[/Code]

-> Village has now some regen related properties if you want to play with them.

-> Unit with negative or equal to 0 health after the regen should now die...



I don't know when the next build will be and we will need some QA test on that to avoid regression... so don't expect it to come before one or two weeks at least...



I am working with Tichau on another gift for you guys... A simulation debugger which should allow you to display the whole simulation hierarchy. This should help you to understand how the path thingy works and to check if your mod works as intended...



We will let you know when we have something available to test!



Cheers!

flo.
0Send private message
10 years ago
Nov 10, 2014, 5:51:33 PM
ThorTillas wrote:
I am working with Tichau on another gift for you guys... A simulation debugger which should allow you to display the whole simulation hierarchy. This should help you to understand how the path thingy works and to check if your mod works as intended...




Great news!
0Send private message
0Send private message0Send private message
?

Click here to login

Reply
Comment