Where is the birth dialog called in Example module?

Moderator: Moderator

Post Reply
Message
Author
andar_b
Cornac
Posts: 30
Joined: Thu Nov 08, 2012 6:28 pm

Where is the birth dialog called in Example module?

#1 Post by andar_b »

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.

andar_b
Cornac
Posts: 30
Joined: Thu Nov 08, 2012 6:28 pm

Re: Where is the birth dialog called in Example module?

#2 Post by andar_b »

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. )

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Where is the birth dialog called in Example module?

#3 Post by Grey »

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?
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

andar_b
Cornac
Posts: 30
Joined: Thu Nov 08, 2012 6:28 pm

Re: Where is the birth dialog called in Example module?

#4 Post by andar_b »

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.

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Where is the birth dialog called in Example module?

#5 Post by Grey »

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
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

andar_b
Cornac
Posts: 30
Joined: Thu Nov 08, 2012 6:28 pm

Re: Where is the birth dialog called in Example module?

#6 Post by andar_b »

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.

Post Reply