Logo Platform
logo amplifiers simplified

Question about modding factions

Reply
Copied to clipboard!
10 years ago
Dec 6, 2014, 12:15:48 AM
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?
0Send private message
0Send private message
10 years ago
Dec 9, 2014, 8:24:17 AM
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!!!!



Cheers,

flo.
0Send private message
10 years ago
Dec 10, 2014, 10:30:24 AM
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.



Thanks for reading!

flo.
0Send private message
0Send private message
?

Click here to login

Reply
Comment