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!
I've been trying several different things with faction data, and I just got curious. Is there anyway to swap/add default units of the faction with other existing models?
well... You cannot import new models. but you can try to swap a model with another. Like spawing battlemage with the brokenlords model or create a new faction with have the broken lords cavalry, the rage wizard ranged unit and a necro profilerator.
In fact, we use the file "Mapping/Mapping.xml" to define which 3d asset to spawn based on the simulation and some other variables. So if you open it and if you go down a little in the file you should find something like: "WorldPawn". And you can see that we use the "BodyDefinitionName" for looking through the 3d asset.
So, you can either:
- add some check to detect your affinity and try to force which body should be spawn in the mapping file.
OR (and I prefer this one... though a little more complicated at first, it will then allow you to do that as much as you want).
- Create a new body with a new descriptor which will describe which body prefab using and modify the mapping file to use your descriptor instead of the body definition name.
Warning: the name of the descriptor is really important. Prefix it by the descriptor type and then the unit body name that you target. When you will try to map the asset 3d, the engine should remove the descriptor type from the name of the descriptor and search for the correct body name without any additional code. (I know it's not really clear... sorry...)
something like that:
[CODE]
SimulationDescriptors.xml
UnitBodyDefinition.xml
...
...
Mapping.xml
[/CODE]
Just don't hesitate to ask if something is not clear or if this does not work!!!!
Well as Pikou tested what I said, I have modified my example to spawn the battle mage instead of brokenlords infantry.
For the unitbody part. Just copy past the borkenlords infantry body and add the descriptor reference.
If you want to override it, leave the name as it.
If you want to create a new body, choose a new name (better than "MyBrokenLordsWhichIsAWizard" if possible).
Be aware that you still have to add a gui part to this stuff otherwise the picture of the body will be blank.
Pikou is working on a example mode which will make a working example of this. She will also give you some information about the weapon which can be handled by each body.
Riuny
Newcomer
Riuny
Newcomer
100g2g ptsReport comment
Why do you report Riuny?
Are you sure you want to block Riuny ?
BlockCancelAre you sure you want to unblock Riuny ?
UnblockCancelAgathorn
Newcomer
Agathorn
Newcomer
9 300g2g ptsReport comment
Why do you report Agathorn?
Are you sure you want to block Agathorn ?
BlockCancelAre you sure you want to unblock Agathorn ?
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 ?
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 ?
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 ?
UnblockCancel