Logo Platform
logo amplifiers simplified

Help with custom Faction Traits.

Reply
Copied to clipboard!
10 years ago
Feb 10, 2015, 4:13:06 PM
Heya, new to forums and stuff, so if I'm in the wrong place please direct me to the correct one.



Anyway, my issue: I'm creating a little mod for friends which adds a bunch of faction traits. However there are a couple complex ones that I would really like to implement, though I'm stuck when it comes to creating them.



So: My problem is with a trait called "BioMetalic Defence". What it's supposed to do is negate damage (min and max) for all weapons on your empire by -1% for each CP you lose - permanently. At the same time, however, it grants +1% to all defences per CP you lose.



Now, I've only been fiddling around with the .xml files for the past few days and have no previous experience in modding, but this is what I have so far:





























The thing I'm stuck on at the moment is how to have this trait only take affect after an encounter when you have lost CP in the same way the 'Dust Recyclers' trait does - except it's when you lost CP, not your enemy.



Any help is greatly appreaciated, thanks.
0Send private message
10 years ago
Feb 10, 2015, 5:49:42 PM
Yeah, unless someone else has more insight this is not doable.

The DustBonusPerCPAfterEncounter is calculated by the game engine not by code that is accessible from the xml files.

All you can do with it is feed it a factor by which to calculate its results.

This is the case with alot of the elements of endless, you can feed a variable modifiers in various ways and there is quite a bit that can be done in that vein but simply put there is no real way to create a totally new compound function.

Thus you can create a variable called DamageModPerCPAfterEncounter but there is no way to create a function to calculate the value you are looking for based on your lost CP after a battle.
0Send private message
0Send private message
10 years ago
Feb 11, 2015, 6:48:14 AM
Bugger. Thanks for the quick responses, though.

When my friend suggested the idea for the trait, I initially thought it was impossible - at least with my level of 'skill'. After brainstorming the idea to use Dust Recyclers, I figured it was a long-shot.

I'll try a simpler approach next time I sit down to it.



Thanks again!
0Send private message
?

Click here to login

Reply
Comment