Page 1 of 1

abomination tile variations

PostPosted: Saturday, 22nd August 2015, 23:12
by luna vagrant
hi, i´d like to ask for a little help here....playing 0.15.2, i noticed macabre masses and small abominations, when they fuse and turn into large abominations, always seem to generate only the first tile style (the one which looks like a green mound with bits of flesh). is it possible to alter the source code so they could generate the other tile versions as well, randomly ? if so....what exactly should i add or change in the source code to make it so ?
thank you for your attention.

Re: abomination tile variations

PostPosted: Sunday, 23rd August 2015, 03:53
by neil
luna vagrant wrote:hi, i´d like to ask for a little help here....playing 0.15.2, i noticed macabre masses and small abominations, when they fuse and turn into large abominations, always seem to generate only the first tile style (the one which looks like a green mound with bits of flesh). is it possible to alter the source code so they could generate the other tile versions as well, randomly ? if so....what exactly should i add or change in the source code to make it so ?
thank you for your attention.


Probably you'd need to do something like:
  Code:
#ifdef USE_TILE
    merge_to->props[TILE_NUM_KEY].get_short() = ui_random(256);
#endif

somewhere in _do_merge_crawlies() in mon-abil.cc.

Re: abomination tile variations

PostPosted: Sunday, 23rd August 2015, 17:59
by luna vagrant
thanks, but...mmmmm....maybe i placed it somewhere wrong in the mon-abil.cc. it couldn´t compile.

"mon-abil.cc: in function 'bool _do_merge_crawlies(monster*, monster*)´:
mon-abil.cc:541: error: 'TILE_NUM_KEY' was not declared in this scope
make: *** [mon-abil.o] Error 1".

.....i really don´t know much about c++, i should have said...no idea what went wrong.

Re: abomination tile variations

PostPosted: Sunday, 23rd August 2015, 18:52
by neil
luna vagrant wrote:thanks, but...mmmmm....maybe i placed it somewhere wrong in the mon-abil.cc. it couldn´t compile.

"mon-abil.cc: in function 'bool _do_merge_crawlies(monster*, monster*)´:
mon-abil.cc:541: error: 'TILE_NUM_KEY' was not declared in this scope
make: *** [mon-abil.o] Error 1".

.....i really don´t know much about c++, i should have said...no idea what went wrong.


Whoops... the TILE_NUM_KEY macro was added later it seems. Try "tile_num" (with the quotes) instead.

Re: abomination tile variations

PostPosted: Sunday, 23rd August 2015, 19:50
by luna vagrant
and that did it. thank you very much. i was kind of puzzled by how abominations had variations, but those only showed up on spawning, but not from them fusing together.