Middle-Earth By Night - [Old World of Darkness]
Moderator: Moderator
Re: Middle-Earth By Night - [Old World of Darkness]
Dialogs are modal in the way that they capture keyboard/mouse input but they wont pause the game for you if you want that.
It's the last registerDialog() call that gets on top with focus and when it unregisters it switches to the previous one and so on until it's back to the game.
It's the last registerDialog() call that gets on top with focus and when it unregisters it switches to the previous one and so on until it's back to the game.
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

-
- Higher
- Posts: 71
- Joined: Sun May 23, 2010 9:55 am
Re: Middle-Earth By Night - [Old World of Darkness]
Yeh, dialogs dont block excecution, but they do override keyboard and mouse input from other sources.
If you want to 'chain' dialogs as you describe, might I suggest that you have the first dialog register the second when it unregisters itself, as opposed to registering all of them at once, since at this time its not possible to 'block' till a dialog is finished. Its not desirable either actually, since this allows stuff like animations and particle effects to continue in the background, even if it makes it abit harder to code.
As for the stats starting at level 10... That gets set in load.lua, the 'default' parameter determines it.
Of course, its nice to have it at 10 tho, that way to create a average human you don't need to give any stats in npc definition and it will give you an average human. The way I would suggest it is to have a -8 to all stats in the base player descriptor, then add things from there.
EDIT: I had to scroll up a few posts, but found your old code dump. You are properly setting the default value in load.lua, and your birth descriptors don't seem to be overriding it. All I can think of is the Dialog might be forcing it to some value by default? I'm not sure, but if its not that it might be an engine bug, but unable to test defaults at this moment.
If you want to 'chain' dialogs as you describe, might I suggest that you have the first dialog register the second when it unregisters itself, as opposed to registering all of them at once, since at this time its not possible to 'block' till a dialog is finished. Its not desirable either actually, since this allows stuff like animations and particle effects to continue in the background, even if it makes it abit harder to code.
As for the stats starting at level 10... That gets set in load.lua, the 'default' parameter determines it.
Of course, its nice to have it at 10 tho, that way to create a average human you don't need to give any stats in npc definition and it will give you an average human. The way I would suggest it is to have a -8 to all stats in the base player descriptor, then add things from there.
EDIT: I had to scroll up a few posts, but found your old code dump. You are properly setting the default value in load.lua, and your birth descriptors don't seem to be overriding it. All I can think of is the Dialog might be forcing it to some value by default? I'm not sure, but if its not that it might be an engine bug, but unable to test defaults at this moment.
Re: Middle-Earth By Night - [Old World of Darkness]
That's not really a possibility. I'm just guessing here, but I don't think DarkGod implemented his own RNG into the engine and just employs hardcoded C or LUA interpreter stuff, which is pretty reliable and will give you numbers with a high degree of randomness. Definitely not something you should notice during regular playtesting.I also suspect the RNG favors lower numbers, but I can't really confirm that without using a random seed.
Something you could maybe look at, which I've had problems with before, is whether you are re-seeding the rand function between calls. Most RNGs are seeded by using the system clock, which means that if you have a lot of throws between one millisecond and the next they'll all be using the same seed, leading to a higher likelihood of throwing the same number over and over again. This isn't usually a problem, because most game events that require random throws don't usually happen within a millisecond of each other.
To fix this, try setting a delay between rand() calls and re-seeding after each delay. If you are still getting unusually many low throws it could be a problem with the actual RNG, but I really doubt it.
"Regular human" in the old WoD is maybe 4 in a whole group of stats, like Str + Dex + Stam put together, with a maximum of 5 in any one stat at all (which is the hard limit of the human body). 10 in any one stat, much less all stats, is like demigod level or better.Of course, its nice to have it at 10 tho, that way to create a average human you don't need to give any stats in npc definition and it will give you an average human. The way I would suggest it is to have a -8 to all stats in the base player descriptor, then add things from there.
Re: Middle-Earth By Night - [Old World of Darkness]
Na the default C generator is usualy pretty bad, TE4 ships with a mersene twister.Baker wrote:That's not really a possibility. I'm just guessing here, but I don't think DarkGod implemented his own RNG into the engine and just employs hardcoded C or LUA interpreter stuff, which is pretty reliable and will give you numbers with a high degree of randomness. Definitely not something you should notice during regular playtesting.I also suspect the RNG favors lower numbers, but I can't really confirm that without using a random seed.
Luckily stats are not hardcoded at all"Regular human" in the old WoD is maybe 4 in a whole group of stats, like Str + Dex + Stam put together, with a maximum of 5 in any one stat at all (which is the hard limit of the human body). 10 in any one stat, much less all stats, is like demigod level or better.

[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: Middle-Earth By Night - [Old World of Darkness]
Seriously? I let it run a diagnostic for like half an hour once, it seemed to do pretty well.That's not really a possibility. I'm just guessing here, but I don't think DarkGod implemented his own RNG into the engine and just employs hardcoded C or LUA interpreter stuff, which is pretty reliable and will give you numbers with a high degree of randomness. Definitely not something you should notice during regular playtesting.
Re: Middle-Earth By Night - [Old World of Darkness]
But a mersene twister is better, and most importantly is not bound to the OS.
Maybe on your OS it was good but it's not always the case
Maybe on your OS it was good but it's not always the case
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: Middle-Earth By Night - [Old World of Darkness]
If you start a new MEBN game (using the latest code uploaded) and read stdout.txt afterwards, you can see the roll logs in place. I see a lot more 1's than 10's, and you should too, since the default seed is 0 and we should get the same rolls in the same order.
I'll look into ToME and use the Mersenne Twister functions instead. I didn't realized it was there, I just did a quick search for random numbers in Lua and found what I'm using now.
The official spec on the C RNG is input and output, it doesn't actually set any standards on how the numbers form.
is a standards-compliant random number function for C.
I'll try registering the next dialog as I close the previous, as Antagonist suggested. I suspect that it might fix the issue with the stats dialog for some reason. Note that issue doesn't seem to be related to the initial values stats are set at (they all start at 1), but any keyboard movement sets the first 2 to 10 without spending points. I'm not sure how or why yet. Nothing adjusts the stats from their starting value until the player adds points to them.
I'll look into ToME and use the Mersenne Twister functions instead. I didn't realized it was there, I just did a quick search for random numbers in Lua and found what I'm using now.
The official spec on the C RNG is input and output, it doesn't actually set any standards on how the numbers form.
Code: Select all
int random()
{
//This number was chosen completely at random.
return 4;
}
I'll try registering the next dialog as I close the previous, as Antagonist suggested. I suspect that it might fix the issue with the stats dialog for some reason. Note that issue doesn't seem to be related to the initial values stats are set at (they all start at 1), but any keyboard movement sets the first 2 to 10 without spending points. I'm not sure how or why yet. Nothing adjusts the stats from their starting value until the player adds points to them.
Re: Middle-Earth By Night - [Old World of Darkness]
Huh... Weird. Isn't the C RNG defined in the C standard library? I thought that was the same for basically all modern versions of C, regardless of OS. I guess it might be a compile flag issue, if the RNG has changed a lot between ANSI C and C99.darkgod wrote:But a mersene twister is better, and most importantly is not bound to the OS.
Maybe on your OS it was good but it's not always the case
If you're always starting with a seed of 0, you shouldn't be surprised that you seem to be getting the same numbers over and over again. That's just what a PRNG will do in that case.If you start a new MEBN game (using the latest code uploaded) and read stdout.txt afterwards, you can see the roll logs in place. I see a lot more 1's than 10's, and you should too, since the default seed is 0 and we should get the same rolls in the same order.
But could you still do a test with a higher sample, like 5 million calls of rand() or so? The seed might just happen turn out a lot of low numbers at first but equal out later. I'm curious now if it's a seed issue or RNG issue, because it really shouldn't be that noticeable, even on a bad seed The Mersenne Twister is a high-end algorithm meant for actual statistical research, a simple little roguelike just shouldn't need something like this except if something is really broken.
Re: Middle-Earth By Night - [Old World of Darkness]
Well as FACM said, the spec only says what the function returns and takes as arguments, not how it should work
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: Middle-Earth By Night - [Old World of Darkness]
Today's update (and has been uploaded):
Fixed the character creation dialog bug (Turns out, I had Vampires getting +2 STR/DEX for some test purpose. That was causing the dialog to freak out apparently when values changed from a source that wasn't the dialog). Note to future mod developers: Do not pop up dialogs until after character creation is complete (at least, not a dialog that looks at something that changed during character birth. Use a welcome dialog that doesn't do anything if you need to.)
Implemented Celerity. It gives you 1 action per point you put in Celerity. [Remember, to activate a talent in MEBN, hit 'G' and then push Enter on the talent you want to use, assuming it's an activated talent.Brujah and Catiff have Celerity, as do a couple others I can't remember.] That makes 3 disciplines implemented (Fortitude, Potence, Celerity), 2 of which are passive and 1 of which was really easy. The more physical-based talents are next, then ones that affect enemies. Social disciplines may be a ways off still.
After getting some of the Vampire discilpines implemented, I think I'll start on Werewolves. They may or may not be easier, but I think that most of the difficult part of setting up the basic needs of a module are done at this point. They still need some polish, yes, but they're working now. Speaking of which, I think I'm gonna need to pirate the PlayerDisplay.Lua file next, because that's going to be very useful.
Fixed the character creation dialog bug (Turns out, I had Vampires getting +2 STR/DEX for some test purpose. That was causing the dialog to freak out apparently when values changed from a source that wasn't the dialog). Note to future mod developers: Do not pop up dialogs until after character creation is complete (at least, not a dialog that looks at something that changed during character birth. Use a welcome dialog that doesn't do anything if you need to.)
Implemented Celerity. It gives you 1 action per point you put in Celerity. [Remember, to activate a talent in MEBN, hit 'G' and then push Enter on the talent you want to use, assuming it's an activated talent.Brujah and Catiff have Celerity, as do a couple others I can't remember.] That makes 3 disciplines implemented (Fortitude, Potence, Celerity), 2 of which are passive and 1 of which was really easy. The more physical-based talents are next, then ones that affect enemies. Social disciplines may be a ways off still.
After getting some of the Vampire discilpines implemented, I think I'll start on Werewolves. They may or may not be easier, but I think that most of the difficult part of setting up the basic needs of a module are done at this point. They still need some polish, yes, but they're working now. Speaking of which, I think I'm gonna need to pirate the PlayerDisplay.Lua file next, because that's going to be very useful.
Re: Middle-Earth By Night - [Old World of Darkness]
No real progress to speak of. Was messing around with activated/sustained talents, and didn't seem to get anywhere. Specifically, I couldn't get an ability to change the damage type I did in melee combat. I'll need to figure out that before that ability works.
Beyond that, I've mostly slept instead of working on this mod, and this weekend won't see a lot of progress on it either. Hopefully next week will be more productive to make up for this one.
Beyond that, I've mostly slept instead of working on this mod, and this weekend won't see a lot of progress on it either. Hopefully next week will be more productive to make up for this one.
Re: Middle-Earth By Night - [Old World of Darkness]
I managed to do a basic port of PlayerDisplay.lua from ToME. I'll need to customize it a little more to match my PCs. It also reminded me that I need to fix my resource-type talents, and get back to messing with activated talents.
-
- Reaper
- Posts: 1535
- Joined: Mon Jan 22, 2007 6:31 pm
- Location: East of the sun, west of the moon
Re: Middle-Earth By Night - [Old World of Darkness]
one of the things I would like to do for my mod (which has (or will have) no real talents) is to make the talent display bar at the bottom into a list of viewable monsters, which will be fun doing considering it will have to be done mostly from scratch unlike the PlayerDisplay.
right now though my combat system is broken, meaning that you cant hit the hostiles and they cant attack you, which is why I have 1 talent in game right now.
good luck with your mod
and no (just in case you were wondering), my module isnt really public right now, still being worked on and tweaked.
right now though my combat system is broken, meaning that you cant hit the hostiles and they cant attack you, which is why I have 1 talent in game right now.
good luck with your mod

and no (just in case you were wondering), my module isnt really public right now, still being worked on and tweaked.
Oliphant am I, and I never lie.
Re: Middle-Earth By Night - [Old World of Darkness]
That sounds not too terribly difficult. There should be a table of monsters in the floor/level/zone/etc, and you can probably refer to that for your display.Shoob wrote:one of the things I would like to do for my mod (which has (or will have) no real talents) is to make the talent display bar at the bottom into a list of viewable monsters, which will be fun doing considering it will have to be done mostly from scratch unlike the PlayerDisplay.
I had that happen to me, read back earlier in this thread. The issue is probably your factions. ToME has some way of redefining the generic 'enemies' faction, but I couldn't duplicate it right, so you may need to make your own replacement enemy faction as well. You'll also want to make sure they refer to the other factions properly, I found that keeping them all lower-case names works better.right now though my combat system is broken, meaning that you cant hit the hostiles and they cant attack you, which is why I have 1 talent in game right now.
Thank you. Mine's public, despite being so early in development, because I think it'll help motivate me and get other people talking about modding.good luck with your mod
and no (just in case you were wondering), my module isnt really public right now, still being worked on and tweaked.
-
- Reaper
- Posts: 1535
- Joined: Mon Jan 22, 2007 6:31 pm
- Location: East of the sun, west of the moon
Re: Middle-Earth By Night - [Old World of Darkness]
actually, they are hostile, they just havent been coded yet to attack. I have been focusing on appearance and the main (and only) town, so once I get down to it, adjusting them shouldnt be that hard (I probably shouldnt say that yet ')
the nice thing about it, is that the module loads about 100x as fast as tome
if you want to have a look see at what I have, I could pm you a version that is online
actually, I was thinking about using the same stuff that the targetting display uses, only put the monster down instead of highlighting it/drawing a path, etc... but yeah, I dont think it will be that hard.FACM wrote:That sounds not too terribly difficult. There should be a table of monsters in the floor/level/zone/etc, and you can probably refer to that for your display.
yeah, I have had my module idea I am working on now for several years, but T3 never got to the place where I think it could handle my ideas (it might, but t4 looks better right now). And right now the main hindrance to my project is that I dont really know lua, and I am working on stuff that isnt documented (besides inline comments) and I did not help write the code for (well, monsters are a different story, but that is a minimal part of this project).FACM wrote:Thank you. Mine's public, despite being so early in development, because I think it'll help motivate me and get other people talking about modding.
the nice thing about it, is that the module loads about 100x as fast as tome

if you want to have a look see at what I have, I could pm you a version that is online

Oliphant am I, and I never lie.