How to change a character's tile only on the birth screen?

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
Nagyhal
Wyrmic
Posts: 282
Joined: Tue Feb 15, 2011 12:01 am

How to change a character's tile only on the birth screen?

#1 Post by Nagyhal »

I'm adding the finishing polish to the Beholder re-release with new Gauth class (and two more classes on my private test version.)

Beholders (or rather the soon-to-be Watchers) evolve through several growth stages, each growth stage for a specific Beholder sub-class having a unique look.

However, at birth they are all displayed with the same basic Nymph tile - I think it would be much more exciting for players to see the more disctinct intermediate forms for each sub-class at the character creation screen (and it would showcase more of rexorcorum's lovely art!). However, I haven't found a successful method to do this yet. Adding particles is easy, but changing tiles is a little harder, particularly because of the lack of a useful post-birth hook (that sounds painful).

Now, I'll probably figure it out, but I'm not sure because the "map object" code is opaque to Lua. Nevertheless, if I do, I'll report back. If I don't then I gravely need the help of someone who can!

Nagyhal
Wyrmic
Posts: 282
Joined: Tue Feb 15, 2011 12:01 am

Re: How to change a character's tile only on the birth scree

#2 Post by Nagyhal »

Official DarkGod-sanctioned solution:

Code: Select all

 @DarkGod: in the class definitions:
 @DarkGod: 	birth_example_particles = {
 @DarkGod: 		function(actor)
 @DarkGod: 			actor.moddable_tile_base = "beholder_base_mage.png"
 @DarkGod: 		end,
 @DarkGod: 	},
My error was in not noticing birth_example_particles took a function!

Also it's one of those things I don't think you can overload from the class definition, and the race definition demands a tile or it will break! Anyway!

Thanks, DG! <3

Post Reply