I know this is a stupid question, but I have yet to find an intelligible answer.
What I'm trying to do is change the reclaim values (and some other properties) from the trees I added to my map from springfeatures. I don't want to change the models or randomize them or do any such wizardry of that nature, but I don't really want to have to write a unique def for every stupid tree model that I used, if possible, just to end up giving them all the same properties.
I'm assuming this will involve some sort of lua, but I'm not really sure what.
EDIT: of course, even if I had to give them individual defs, I wouldn't know quite how to do that properly, either.
Modifying Feature Properties
Moderator: Moderators
Re: Modifying Feature Properties
Modifying feature defs post is dangerous should the project make extensive usage of it. As your map goes, the cleanest solution is always to make your own variation of the def file.
Re: Modifying Feature Properties
Where do I find a template for that? Or better yet a good working example. :\smoth wrote:Modifying feature defs post is dangerous should the project make extensive usage of it. As your map goes, the cleanest solution is always to make your own variation of the def file.
EDIT: Nevermind!
EDIT EDIT: Ok I went through the list of features that FP generated and copied over the .lua files from the features directory in spring features into a new features folder in my map's root, edited them, and then when I loaded the game there was no sign that the changes I'd made had taken effect. I checked everything vs river nix and the directories looked the same. I rechecked the files themselves to be sure, but everything seemed in order and I couldn't find a peep about it in infolog, either. :\
The features load, the custom properties aren't for some reason.
Re: Modifying Feature Properties
If I remember right, they have to be in the right sub folder of the feature folder. Did you check this?aeonios wrote:Ok I went through the list of features that FP generated and copied over the .lua files from the features directory in spring features into a new features folder in my map's root,
Other things you could check:
- remove dependecy of springfeatures in mapinfo (after copying all used features files into your map folder) so only your defs are seen
- delete all files belonging to the map in all cache dirs from spring / lobby (often helped me when map updates were not being "noticed")
- sometimes it was already enough to give it a different version number in mapinfo so for spring / lobby it is a "new" map
P.S.: if you're under linux you could use a combination of cat+sed for changing feature defs to the same value for many files
Re: Modifying Feature Properties
did you make sure you put them in the same place within the /features folder?aeonios wrote: new features folder in my map's root,
Re: Modifying Feature Properties
hue hue! that might be why.smoth wrote:did you make sure you put them in the same place within the /features folder?aeonios wrote: new features folder in my map's root,
EDIT: Ok that didn't work either. I ended up 'fixing' this by copying all the feature data into my map and dropping the dependency for spring-features. I'm not sure how to override the defs in springfeatures when importing it, if that's even possible, but it seems like everyone else takes the same approach I ended up taking.