ToME: the Tales of Maj'Eyal
http://forums.te4.org/

Where is the birth dialog called in Example module?
http://forums.te4.org/viewtopic.php?f=45&t=35204
Page 1 of 1

Author:  andar_b [ Fri Nov 16, 2012 3:51 am ]
Post subject:  Where is the birth dialog called in Example module?

I'm comparing the Game.lua for the module I'm fiddling with (based on Grey's template) and the Game.lua from the default Example module. In _M:newGame(), by commenting out self:registerDialog(birth) in the example module, the Character Creation panel never pops up, so I assume that's where it starts. My problem is I have a self:registerDialog(birth) in my newGame, in essentially the same context, but it does not open the character creation dialog. WTF?

I know I'm missing something, but it's not clear what.

Author:  andar_b [ Fri Nov 16, 2012 5:09 am ]
Post subject:  Re: Where is the birth dialog called in Example module?

I suppose I could do it in the level up dialog, since I'm not planning to have choices for race or class. I'd like to figure out what I'm doing wrong though.

I tried using game:registerDialog(birth) from my custom dialog, but that didn't do anything. Then I tried returning true from my custom dialog and checking it with a conditional, that didn't work either.

(However, I did make a minor breakthrough in that I realized I could put a font= parameter into the text zone I made. When I looked it up in the documentation I think it just said "a generic text zone" with no useful information. )

Author:  Grey [ Fri Nov 16, 2012 8:35 am ]
Post subject:  Re: Where is the birth dialog called in Example module?

Post your code and I'll have a look. Been meaning to respond to a few of your questions actually when I get some proper time...

Why do you want a birth dialogue though if you have no race/class choice?

Author:  andar_b [ Fri Nov 16, 2012 3:33 pm ]
Post subject:  Re: Where is the birth dialog called in Example module?

Mostly because I want a few other sorts of choices. I'm picturing a character roller a lot like many *band variants.

I'll have to post code after class, in a rush. I just couldn't figure out what defines that birth dialog (there's no birthDialog.lua or anything) and where it lives.

If you were adding one to Jam, what would you have to do? I've really only made cosmetic changes to your template so far, it's bugging me that I can't get 'out the door' without asking ten million questions.

Author:  Grey [ Fri Nov 16, 2012 3:44 pm ]
Post subject:  Re: Where is the birth dialog called in Example module?

I've never made a game in the T-Engine with a birth dialogue. I believe in getting the player into the action straight away.

However some things I'd try out would be:
1. Check the example module, since it has some sort of birth dialogue
2. Check the arena mode in ToME4 as it starts with a special dialogue (the birth dialogue in ToME4 is likely too complicated to easily poach code from)
3. Try fiddling with the dialogue box that I make appear in Broken Bottle (check the zone declaration of the starting room)
4. Ask DarkGod :P (but by posting here you're essentially doing that)
5. Go on the IRC channel and ask for help there. Edg, yufra and tiger_eye are particularly helpful when they're around

Author:  andar_b [ Fri Nov 16, 2012 8:51 pm ]
Post subject:  Re: Where is the birth dialog called in Example module?

Thank you for you help, either way. :)

EDIT:

Okay. Grey, I bet if you added another 'role' to that Jam template you linked me, in descriptors.lua, it would suddenly give you a birth dialog. I decided on a whim to copy the Example descriptors in, which didn't work, but when I added a second Role descriptor into the original template file, it popped right up.

Now... idk where that dialog is or what it really does. ^.^ It really doesn't do anything I want it to do, I just couldn't figure out why in one module it was getting used and not in the other.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/