Modifying Feature Properties

Modifying Feature Properties

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Modifying Feature Properties

Post by aeonios »

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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Modifying Feature Properties

Post by FLOZi »

User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Modifying Feature Properties

Post by smoth »

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.
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Modifying Feature Properties

Post by aeonios »

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.
Where do I find a template for that? Or better yet a good working example. :\

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.
User avatar
qray
Posts: 377
Joined: 02 Feb 2009, 18:49

Re: Modifying Feature Properties

Post by qray »

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,
If I remember right, they have to be in the right sub folder of the feature folder. Did you check this?

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
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Modifying Feature Properties

Post by smoth »

aeonios wrote: new features folder in my map's root,
did you make sure you put them in the same place within the /features folder?
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Modifying Feature Properties

Post by aeonios »

smoth wrote:
aeonios wrote: new features folder in my map's root,
did you make sure you put them in the same place within the /features folder?
hue hue! that might be why.

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.
Post Reply

Return to “Map Creation”