ENDLESS™ Legend is a turn-based 4X fantasy-strategy game, where you control every aspect of your civilization as you struggle to save your homeworld Auriga. Create your own Legend!
As the Health is a "proportion" of the maximum health, you will increase a little the health... but yes, you are right it's not the same.
In a battle, you can use some "Direct health change" because the BattleAction allow this kind of stuff. It's build to be able to change the simulation based on action (hit, start of the round, etc).
But in the simulation, it's more a description of the things regardless of the moment of the time...
Another things good to know is the sealed properties.
You will find them sometimes. They are used to define a property which is not modifiable by modifier and simulation. They are used when we need to store a value computed in the code. Like the health of a unit for example.
If you want to modify the Health of a unit you have to modify the MaximumHealth or the unit regen. but you should never try to modify directly the health.
The Health don't seem to be sealed, but can we just add ? :
[CODE]IsSealed="false"/>[/CODE]
I know that our simulation is pretty hard to handle and even more when you have no tools to display it... but yeah, we are able to do a lots of stuff with it ^^
I will try to keep giving you input when I see something wrong or when you are totally lost... I just have a lot of work and cannot answer all your question... but I will read them and try, with Pikou to give you answer as much as possible...
Head up guys, your are tearing our game apart to make it even better and we love that!
Keep up the good work and we will try to support you as much as possible.
The path depend on where you are starting in the hierarchy.
If you start on the empire (like it is for the faction traits) and you want to modify a property in all the unit of all the armies of your empire, you have to write this path:
ClassEmpire/ClassArmy/ClassUnit
If you are modifying a unit ability which is applied directly on a unit and you want to modify a property in the corresponding unit your path will be:
ClassUnit or nothing.
if you are modifying a unit ability which will modify a property on all units alongside it and this in a city or an army then you will need:
../Garrison/ClassUnit
(../ will try you then your parent and the parent of the parent and ... until it find the next tag which is "Garrison" in the example. So if you are starting on a unit in an army, the path will ask the unit if it has the "Garrison" tag which is not the case, then ask the parent of the unit. The parent is the army and an army has the tag "Garrison" so the path will say "ok, I can continue the search from the army".
It will then try to find the tag "ClassUnit" in all the army children.)
Another things good to know is the sealed properties.
You will find them sometimes. They are used to define a property which is not modifiable by modifier and simulation. They are used when we need to store a value computed in the code. Like the health of a unit for example.
If you want to modify the Health of a unit you have to modify the MaximumHealth or the unit regen. but you should never try to modify directly the health.
I know that our simulation is pretty hard to handle and even more when you have no tools to display it... but yeah, we are able to do a lots of stuff with it ^^
I will try to keep giving you input when I see something wrong or when you are totally lost... I just have a lot of work and cannot answer all your question... but I will read them and try, with Pikou to give you answer as much as possible...
Head up guys, your are tearing our game apart to make it even better and we love that!
Keep up the good work and we will try to support you as much as possible.
SimulationDescriptors are built from SimulationProperties and SimulationModifiers
SimulationDescriptors include Classes that are related by a hierarchy, including ClassEmpire.EmpireTypeMajor/ClassArmy.ClassCity.Garrison/ClassUnit
SimulationModifierDescriptors (anywhere) point to TargetProperty and Path
Path points to the SimulationDescriptor that contains those SimulationProperties that are the subject of TargetProperties
You can think of it as analogous to a folder structure. You have a bunch of folders (SimulationDescriptor is the folder, Path is the folder path) and within the folder you have a bunch of files you need to access (SimulationPropertyDescriptor is the file, TargetProperty is the filename). Then you have software that accesses and edit those files (SimulationModifierDescriptor is the software). So you need to look through all of the folders, and see what files are in them, to see what you will be able to change or work with; then keep track of their paths and filenames which you will need to input into the software.
In more detail, with examples:
There are a number of things you have to look at:
First, SimulationDescriptors[Class].xml
has the following classes (these are SimulationDescriptor of Type "Class"):
ClassArmy
ClassBattleUnit
ClassCity
ClassConstruction
ClassDistrict
ClassEmpire
ClassEmpirePlan
ClassImprovement
ClassMinorEmpireGarrison
ClassPointOfInterest
ClassResearch
ClassTimedBonus (Type "ClassTimed")
ClassTradeRoute
ClassUnit
ClassItem
MainCity (Type "SubClass")
Now, they are all related with a hierarchy, too. Something like
ClassEmpire
> ClassCity
> > ClassDistrict
> > ClassUnit
> ClassArmy
> > ClassUnit
etc.
Notice that you can have both ClassArmy and ClassCity as the parent to ClassUnit? Yeah. Confusing. But my theory is that ClassArmy/ClassUnit corresponds to field units, and ClassCity/ClassUnit corresponds to garrisoned units.
Now, for each of those Classes, there are SimulationPropertyDescriptors. For example:
[code]
[/code]
For any object that is of ClassArmy, there are a whole bunch of properties such a MilitaryUpkeep. Now, ClassArmy are the stacked units that you move around on the map.
These are the properties that you modify when you use a tag. If you want to modify MilitaryUpkeep on an army, you have to point the path to ClassArmy.
But ClassArmy is below ClassEmpire, and ClassEmpire has its own properties, such as ArmyUnitSlot, CityUnitSlot, EmpireUpkeep and so on. ClassEmpire, obviously, is your empire. But for some reason, there are only a handful of properties.
And below ClassArmy there is ClassUnit. ClassUnit are the units that you make armies with, and garrison cities with. Now, ClassUnit has A LOT of properties. Many of those are shared by ClassArmy, such as VisionRange (Army VisionRange = best unit's VisionRange), MaximumMovement (Army MaximumMovement = worst unit's MaximumMovement), MilitaryUpkeep (army upkeep = 4 + sum of unit upkeep); but there are other unit-specific properties, such as Experience, Attributes, and UnitRegen.
To further complicate matters, there is an oft-used "Garrison" class, I believe it's defined in: SimulationDescriptors[Garrison].xml; and for some reason, it appears to be assigned to all units, as you will find "Garrison" in the path of many different SimulationModifiers. There are only a few properties, and they don't appear to be relevant to this discussion.
Then there's EmpireTypeMajor (and EmpireTypeMinor) which you will find defined in SimulationDescriptors[EmpireType].xml: This is where all of the empire's properties generally sit, including "GlobalUnitRegenImprovement".
To really complicate matters, if you're only going to be modifying a property of ClassUnit (the lowest in the hierarchy), do you really need to point to the upper two hierarchy levels? I'm not sure. And if so, do you pick ClassEmpire or EmpireTypeMajor? Do you pick ClassCity or ClassArmy or Garrison? Will it matter? What about faction traits? They are never seen alongside ClassEmpire, and always seen alongside EmpireTypeMajor. Why is that? Is there a significance or is it really just a preference?
On that note, it's worth mentioning the extra options (as if it wasn't complex enough):
You can use "#Summer" or "#Winter" in the path to only apply the modifier during those seasons (but I'm not sure where these are defined). You can also exclude SimulationDescriptors from the search by using an exclamation mark (!) prior, e.g. "EmpireTypeMajor/Garrison,!Militia,ClassUnit". You can also include or exclude FactionTraits or Affinities in the path.
I'm trying to create a new trait. "Cold blood". In winter, units cant move and lose health.
I followed the tutorial modding pdf step by step.
1) My NewTrait.xml
[CODE]
Nomis
Aquatique et Sang froid
Aquatique : Obligation de construire près d'une rivière ou d'un lac.
Sang froid : Les unités en dehors des villes durant l'hiver perdront progressivement des points de vie et ne peuvent pas bouger.
Gui/GuiElements
.xml
Simulation/FactionTraits.xml
Simulation/FactionTraits
.xml
Simulation/SimulationDescriptors.xml
Simulation/SimulationDescriptors
.xml
Localization
[/CODE]
2) gui element faction trait :
[CODE]
Aquatique/Title>
<br/><br/> <Description>Obligation de construire près d'une rivière ou d'un lac.</Description>
<br/><br/> </GuiElement>
<br/><br/>
<br/><br/> <GuiElement Name="SangFroid">
<br/><br/> <Title>Sang-froid
Les unités en dehors des villes durant l'hiver perdront progressivement des points de vie et ne peuvent pas bouger.
[/CODE]
It is not a problem if my title is "Sang-froid" instead of "SangFroid", right ?
3) Faction trait custom
Code:
4) And the last but not the least, the simulation descriptor (and i think it's why my mod crash ^^" :
[CODE]
[/CODE]
As u can see, i didnt worked on the Aquatic trait (not yet ), and i have "commented" the regen part of the Cold blood trait. I just want to work on the movment.
And i'm pretty sure that's the line who is faultive.
Code:
a)TargetProperty : is it the right property to affect the movment? (seems to be a silly question but... i want to be sure ^^' I guess yes... didnt see any other movment stuff in the simulation descriptors :
Code:
b) Operation : Can i use percent? where can i see if i can ? What's the Composition="Minimum" mean in the simulation descriptor?
c) Value : Can i use a negative %? like that? or just "-100" ?
d)Path : I didn't really understood how "to designate the target".
Seems to be easier to only work with ".../" ?
Where can i find all the Class ? all the classes are here ? :
EmpireTypeMajor (ou plus simplement ClassEmpire) <= some french words in the tutorial
>ClassCity
>ClassDistrict
>ClassPointOfInterest
>ClassArmy
>ClassUnit
>ClassEmpirePlan
#Winter ? didnt see any reference in the pdf, i guess that's a sort of trigger who affect the unit only in winter ?
PS : Should i create one unique trait per mod or can i create multiple traits per mod ?
I don't know the difference between a SimulationModifierDescriptor and a BinarySimulationModifierDescriptor though.
If you scroll up to the top of each SimulationDescriptor, you'll see the reason there's two instances of line 91/268:
One is for "EmpireTypeMajor" (major faction, e.g. Broken Lords), the other is for "EmpireTypeMinor" (minor faction, e.g. Ceratan)
EmpireTypeMinor have less variables to deal with (no heroes for example).
Also, I replied to the Winter Mechanics thread you posted in, with three possible solutions. I haven't had the opportunity to test them. If you could, let me know how it goes.
Well, the first example checks two properties of an empire related to Luxury1, takes the difference, and tests if that difference is equal to zero. I'm not particularly sure why. "MaximumLuxury1Count" and "NetLuxury1" are no longer SimulationPropertyDescriptors of the SimulationDescriptor "ClassEmpire" defined in SimulationDescriptors[Class].xml; through looking at ResourceDefinitions.xml, it looks like there used to be a monopoly bonus for Luxury1 but that effect has since been deprecated, so the example might have been an old version of that bonus.
The second example does this
1.
new NetDust = NetDust + ($(RawDust)-$(DustUpkeep))
but if I'm not wrong, NetDust is initially zero, so it's really:
NetDust = $(RawDust)-$(DustUpkeep)
In simple terms, it's the calculation of dust profit (NetDust), from dust income (RawDust) and dust expenditure (DustUpkeep)
and
2.
new Offense = Offense * (1 + $(Morale)*0.1)
In other words, it adds X% to offense, because of morale, based on the formula X = Morale * 0.1
So if Morale is, say, 5, then Offense is multiplied by 150% because: new Offense = Offense * (1 + 5*0.1) = Offense * (1 + 0.5) = Offense * 1.5
Modifiers are quite simple once you understand them (tedious though):
Well... it could be useful to "shell" (décortiquer in french) the example, and tell what is doing what. Translate it in human words / make commonplace.
@VieuxChat thanks for the tip about the morale
---
I'm now at my second step of my trait, the anti-regen while winter.
b) Operation : Can i use percent? where can i see if i can ? What's the Composition="Minimum" mean in the simulation descriptor?
c) Value : Can i use a negative %? like that? or just "-100" ?
d)Path : I didn't really understood how "to designate the target".
Seems to be easier to only work with ".../" ?
Where can i find all the Class ? all the classes are here ? :
EmpireTypeMajor (ou plus simplement ClassEmpire) <= some french words in the tutorial
>ClassCity
>ClassDistrict
>ClassPointOfInterest
>ClassArmy
>ClassUnit
>ClassEmpirePlan
#Winter ? didnt see any reference in the pdf, i guess that's a sort of trigger who affect the unit only in winter ?
PS : Should i create one unique trait per mod or can i create multiple traits per mod ?
You can use percent.
Minimum means the Movement will be the "minimum" from all the properties that are tied to it (in an army, the movement is the movement of the unit with the least movement points)
You can use -100%.
Paths : I'm not sure how it works, I had a lot of difficulties to make my mod works because of that
The #Winter is a global variable (as the # means), it means your path will only look at the path that will also have the winter tag.
Sorry for the point 3 code tag didnt worked properly, and i cant edit my post dunno why ^^"
I tried this :
[CODE][/CODE]
And tadaaa ♪ :
[ATTACH]14396[/ATTACH]
That's not percentage but...it's nearly what i wanted to do ...
EDIT : after looking how the seasons works i copy pasted this :
[CODE] [/CODE]
Aaaand it works
Sooo... i answered to my a)b)c) questions... but i'll be glad to have some enlightments about the Path.
By exemple, how to detect if an units is on a town center / district ? How to know if an unit is "into the wild" (not on or near a city, district, watchtowers) ? How to detect ... if x unit is in garnison ? (well for that i could try to find the .xml with the cultist quest with 2 preachers lvl 6 i guess), How to detect terrain? ?
Linithe
Newcomer
Linithe
Newcomer
38 700g2g ptsReport comment
Why do you report Linithe?
Are you sure you want to block Linithe ?
BlockCancelAre you sure you want to unblock Linithe ?
UnblockCancelLinithe
Newcomer
Linithe
Newcomer
38 700g2g ptsReport comment
Why do you report Linithe?
Are you sure you want to block Linithe ?
BlockCancelAre you sure you want to unblock Linithe ?
UnblockCancelMODVieuxChat
Chameleon
Truth is a chameleon. Herbert
MODVieuxChat
Chameleon
25 400g2g ptsReport comment
Why do you report VieuxChat?
Are you sure you want to block VieuxChat ?
BlockCancelAre you sure you want to unblock VieuxChat ?
UnblockCancelLinithe
Newcomer
Linithe
Newcomer
38 700g2g ptsReport comment
Why do you report Linithe?
Are you sure you want to block Linithe ?
BlockCancelAre you sure you want to unblock Linithe ?
UnblockCancelDEVThorTillas
Dev
Florian - Lead programmer on Humankind
DEVThorTillas
Dev
30 200g2g ptsReport comment
Why do you report ThorTillas?
Are you sure you want to block ThorTillas ?
BlockCancelAre you sure you want to unblock ThorTillas ?
UnblockCancelLinithe
Newcomer
Linithe
Newcomer
38 700g2g ptsReport comment
Why do you report Linithe?
Are you sure you want to block Linithe ?
BlockCancelAre you sure you want to unblock Linithe ?
UnblockCancelDEVThorTillas
Dev
Florian - Lead programmer on Humankind
DEVThorTillas
Dev
30 200g2g ptsReport comment
Why do you report ThorTillas?
Are you sure you want to block ThorTillas ?
BlockCancelAre you sure you want to unblock ThorTillas ?
UnblockCancelLinithe
Newcomer
Linithe
Newcomer
38 700g2g ptsReport comment
Why do you report Linithe?
Are you sure you want to block Linithe ?
BlockCancelAre you sure you want to unblock Linithe ?
UnblockCancelDEVThorTillas
Dev
Florian - Lead programmer on Humankind
DEVThorTillas
Dev
30 200g2g ptsReport comment
Why do you report ThorTillas?
Are you sure you want to block ThorTillas ?
BlockCancelAre you sure you want to unblock ThorTillas ?
UnblockCancelTigregalis
Newcomer
Tigregalis
Newcomer
100g2g ptsReport comment
Why do you report Tigregalis?
Are you sure you want to block Tigregalis ?
BlockCancelAre you sure you want to unblock Tigregalis ?
UnblockCancelLinithe
Newcomer
Linithe
Newcomer
38 700g2g ptsReport comment
Why do you report Linithe?
Are you sure you want to block Linithe ?
BlockCancelAre you sure you want to unblock Linithe ?
UnblockCancelTigregalis
Newcomer
Tigregalis
Newcomer
100g2g ptsReport comment
Why do you report Tigregalis?
Are you sure you want to block Tigregalis ?
BlockCancelAre you sure you want to unblock Tigregalis ?
UnblockCancelLinithe
Newcomer
Linithe
Newcomer
38 700g2g ptsReport comment
Why do you report Linithe?
Are you sure you want to block Linithe ?
BlockCancelAre you sure you want to unblock Linithe ?
UnblockCancelTigregalis
Newcomer
Tigregalis
Newcomer
100g2g ptsReport comment
Why do you report Tigregalis?
Are you sure you want to block Tigregalis ?
BlockCancelAre you sure you want to unblock Tigregalis ?
UnblockCancelMODVieuxChat
Chameleon
Truth is a chameleon. Herbert
MODVieuxChat
Chameleon
25 400g2g ptsReport comment
Why do you report VieuxChat?
Are you sure you want to block VieuxChat ?
BlockCancelAre you sure you want to unblock VieuxChat ?
UnblockCancelLinithe
Newcomer
Linithe
Newcomer
38 700g2g ptsReport comment
Why do you report Linithe?
Are you sure you want to block Linithe ?
BlockCancelAre you sure you want to unblock Linithe ?
UnblockCancelDEVPikou
Dev
DEVPikou
Dev
19 600g2g ptsReport comment
Why do you report Pikou?
Are you sure you want to block Pikou ?
BlockCancelAre you sure you want to unblock Pikou ?
UnblockCancelMODVieuxChat
Chameleon
Truth is a chameleon. Herbert
MODVieuxChat
Chameleon
25 400g2g ptsReport comment
Why do you report VieuxChat?
Are you sure you want to block VieuxChat ?
BlockCancelAre you sure you want to unblock VieuxChat ?
UnblockCancelMODVieuxChat
Chameleon
Truth is a chameleon. Herbert
MODVieuxChat
Chameleon
25 400g2g ptsReport comment
Why do you report VieuxChat?
Are you sure you want to block VieuxChat ?
BlockCancelAre you sure you want to unblock VieuxChat ?
UnblockCancelLinithe
Newcomer
Linithe
Newcomer
38 700g2g ptsReport comment
Why do you report Linithe?
Are you sure you want to block Linithe ?
BlockCancelAre you sure you want to unblock Linithe ?
UnblockCancel