Hey all,
I am trying to do my first steps in generating objects during compile-time.
To be precise I already have them defined in my tower wars map and want to edit/modify them according to some encoded Wurst scripts.
Note that my knowledge about this topic is very raw and my expectations of how this all works might be way off.
What I already found out is that I cannot modify existing objects, but instead create new ones based on existing ones.
So that's what I did for one example creep in my tower wars map.
Using `@compiletime` and `@objectgen` (from Escape Builder Reloaded) annotations for my functions (all combinations tried) I tried to simply create a new unit definition based on one of my many already existing creep units and set its maximum hp to a different value for testing purposes. Should be simple I thought.
However, when compiling or running the map I cannot use the new entities even though they show up in the associated .txt files generated in the build directory with the correct stats. So I guess it at least did something.
When trying to create the entities using their associated IDs no unit is created as if the unit definition was just not there which is what I think is the case. As far as I can imagine the objects are created but the injection of them into the resulting buildmap or runmap file did not happen. Am I supposed to do that manually? I have read in the manual that it is possible to automate this and I was hoping that it was what is happening with my configuration flags:
-injectobjects
-opt
-inline
-stacktraces
-runcompiletimefunctions
What steps do I need to take in order to make this work?
I am trying to do my first steps in generating objects during compile-time.
To be precise I already have them defined in my tower wars map and want to edit/modify them according to some encoded Wurst scripts.
Note that my knowledge about this topic is very raw and my expectations of how this all works might be way off.
What I already found out is that I cannot modify existing objects, but instead create new ones based on existing ones.
So that's what I did for one example creep in my tower wars map.
Using `@compiletime` and `@objectgen` (from Escape Builder Reloaded) annotations for my functions (all combinations tried) I tried to simply create a new unit definition based on one of my many already existing creep units and set its maximum hp to a different value for testing purposes. Should be simple I thought.
However, when compiling or running the map I cannot use the new entities even though they show up in the associated .txt files generated in the build directory with the correct stats. So I guess it at least did something.
When trying to create the entities using their associated IDs no unit is created as if the unit definition was just not there which is what I think is the case. As far as I can imagine the objects are created but the injection of them into the resulting buildmap or runmap file did not happen. Am I supposed to do that manually? I have read in the manual that it is possible to automate this and I was hoping that it was what is happening with my configuration flags:
-injectobjects
-opt
-inline
-stacktraces
-runcompiletimefunctions
What steps do I need to take in order to make this work?