6 years ago
Adding custom familiars (Realm of Magic) without overriding tuning files [SOLVED]
Hi! I have been looking to add new familiars without adding the possibility of them being overwritten by another mod that aims to add their own. Here is my progress thus far:
There are 2 things that need to be changed in order to add a familiar in the game using Python:
1. familiars.familar_enums
This enum is easily modifiable and poses no problem.
2. familiars.familiar_tracker
Within this one is contained the FAMILIAR_DATA TunableMapping. The structure of which is found within the familiars-familiar_tracker.tdesc.
The problem that I have encountered, however, is that I find myself unable to inject additional data within that FAMILIAR_DATA as it is immutable.
So my problem is that I cannot add familiars without editing the familiar_tracker tuning itself which is undesirable and increases the chances of conflicts immensely. Is there a possible workaround to this or a change that Maxis could make in order to allow us to add new familiars through scripting?
EDIT: I have solved this problem.
There are 2 things that need to be changed in order to add a familiar in the game using Python:
1. familiars.familar_enums
with FamiliarType.make_mutable():
FamiliarType._add_new_enum_value("nameofthesummon", IDofthesummon)
This enum is easily modifiable and poses no problem.
2. familiars.familiar_tracker
Within this one is contained the FAMILIAR_DATA TunableMapping. The structure of which is found within the familiars-familiar_tracker.tdesc.
The problem that I have encountered, however, is that I find myself unable to inject additional data within that FAMILIAR_DATA as it is immutable.
So my problem is that I cannot add familiars without editing the familiar_tracker tuning itself which is undesirable and increases the chances of conflicts immensely. Is there a possible workaround to this or a change that Maxis could make in order to allow us to add new familiars through scripting?
EDIT: I have solved this problem.