Sorry for asking for help again. I am stuck with changing a subrace in Gerband Quest. I have got it so only the slime subrace recieves the potion quest. I've also got it so that when the slime quaffs the potion, they get the CONGRATULATIONS message, and are awarded the title of winner. But I can't change their subrace into a classical subrace. Does anyone know how to do this? Thanks from Cosmic Gerbil.
TheFalcon: If you look at the "lycantropy.lua" file in the script folder of the Adamant module, there are examles of how to set the subrace. I don't know if it's entirely up to date though...
[later...] From player.pkg:
/** @fn set_subrace_title(int racem, cptr name) * @brief Set the subrace title.\n * @param racem Number \n index of subrace in subrace array * @brief Subrace index * @param name String \n new title of subrace * @brief New title * @note (see file xtra2.c) */ extern void set_subrace_title(int racem, cptr name);
and
/** @fn switch_subrace(int racem, bool copy_old) * @brief Change to an other subrace.\n * @param racem Number \n index of subrace in subrace array * @brief Subrace index * @param copy_old Boolean \n TRUE if the new subrace is to be saved, * otherwise FALSE. * @brief Copy old subrace? * @note (see file xtra2.c) */ extern void switch_subrace(int racem, bool copy_old);
I'm not sure which one you'd want to use, but you could try playing around with them. (Adamant uses set_subrace_title().)
CosmicGerbil Thanks for helping me again :D. I have played on Adamant, but I haven't really looked at the lua scripts. I'll try them out tonight. If I get it working, will I have to email Zonk to ask permission to use his scripts?
TheFalcon: Depends whether you just copy the script, or make your own and just look at Zonk's to see how the syntax works. If you wanted to use the whole thing you'd have to email him, of course, since I didn't see a "general permission" kind of statement in Adamant.
CosmicGerbil Ah, I expect I'll just be using the syntax then, because I already have a script. The script is about a potion, and when the slime quaffs it, it is supposed to turn the slime subrace into the classical sub race.
CosmicGerbil I managed to do a script, but it's quite buggy. It will have to do for now, as I'm more worried about T.o.M.E 3.0.0 I will have to email Zonk, because I used a lot of his script
ToME Wiki