I've added a key to the project configuration (saved in a project's project_config.json) that remembers the user's choice concerning whether to include the pre-identified "vanilla entities" in the entities python modules generated. This boolean is passed into the base MSB.write_entities_module instead of the append_to_module string. Now, the logic for generating the append_to_module string is within this base function, ensuring that it happens whenever the modules are regenerated (whether during project initialization or manually via the entities editor's "Write Entities" button).
Repeating the steps to reproduce outlined in #20 no longer produces a fatal error during compilation, since the module now still contains the 'Flags' class (whereas previously it would be excluded upon module regeneration).
None of the other games have logic that runs the write_entities_module on MSBs during project initialization, so I assume that the modules are only generated via the entities editor for games besides DS1R. I don't have the other games so I can't test it, but I think this solution should work for the other games as well (too lazy to install Elden Ring on my laptop where I dev since it can't run it ;P).
Collaboration
Hi again! I'm super interested in identifying/cataloguing all of the flags that are used in DS1. About a year ago I started making a mod with Soulstruct with the goal of refactoring all flag IDs into imports from a constants class, with docstrings for each flag that explained its usage. I went on hiatus before last summer to focus on other things, and it looks like since the summer emevd has changed a lot within Soulstruct - including Soulstruct's expected syntax. I've been familiarizing myself with the changes so I can restart my development.
One of the changes I've noticed is this addition of a class of pre-identified flags that are included as entities for use in an event script. With this change, it makes more sense to me to include identified flags in Soulstruct itself, rather than in an external 'mod' made with Soulstruct.
I would love to help expand this list and provide more detailed information about each flag if that's in your envisioned scope of this project. If you're interested, I'd like to work together to come up with what that should look like in the code. You can reach out to me by replying here or on Discord (mine is LugeL#2716 ).
fixes #20
Solution
I've added a key to the project configuration (saved in a project's
project_config.json
) that remembers the user's choice concerning whether to include the pre-identified "vanilla entities" in the entities python modules generated. This boolean is passed into the baseMSB.write_entities_module
instead of theappend_to_module
string. Now, the logic for generating theappend_to_module
string is within this base function, ensuring that it happens whenever the modules are regenerated (whether during project initialization or manually via the entities editor's "Write Entities" button).Repeating the steps to reproduce outlined in #20 no longer produces a fatal error during compilation, since the module now still contains the 'Flags' class (whereas previously it would be excluded upon module regeneration).
None of the other games have logic that runs the
write_entities_module
on MSBs during project initialization, so I assume that the modules are only generated via the entities editor for games besides DS1R. I don't have the other games so I can't test it, but I think this solution should work for the other games as well (too lazy to install Elden Ring on my laptop where I dev since it can't run it ;P).Collaboration
Hi again! I'm super interested in identifying/cataloguing all of the flags that are used in DS1. About a year ago I started making a mod with Soulstruct with the goal of refactoring all flag IDs into imports from a constants class, with docstrings for each flag that explained its usage. I went on hiatus before last summer to focus on other things, and it looks like since the summer emevd has changed a lot within Soulstruct - including Soulstruct's expected syntax. I've been familiarizing myself with the changes so I can restart my development.
One of the changes I've noticed is this addition of a class of pre-identified flags that are included as entities for use in an event script. With this change, it makes more sense to me to include identified flags in Soulstruct itself, rather than in an external 'mod' made with Soulstruct.
I would love to help expand this list and provide more detailed information about each flag if that's in your envisioned scope of this project. If you're interested, I'd like to work together to come up with what that should look like in the code. You can reach out to me by replying here or on Discord (mine is LugeL#2716 ).