A few questions !

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Sasha
Journeyman
Posts: 79
Joined: Sat Jul 23, 2011 10:16 pm
Location: On every street

A few questions !

Post by Sasha »

Hello everyone !
I currently have some free time, and somehow craving for creative activities . This coincides with my "yearly Dungeon Master nostalgic period", so i considered doing a bit of dungeon crafting.
A few years ago, i had the opportunity to play around with the RTC editor, which i found really intuitive. However, i understood that RTC isn't updated anymore, with serious bugs remaining ; i wouldn't want those to discourage any "ambitious" idea (i'm quite an "all or nothing" guy... :? ).
Now for the questions : i had a look at DSB some time ago, but, to be honest, didn't take the time to experiment the possibilities of both the software and its editor (although it seems to me that a great work's been done here). So :
1) Does DSB editor require some specific skill ? I have an "all around" computer knowledge, so i can get familiar with simple things quite quickly, but really lack advanced coding notions (i suppose this will depend on how complex i'll want my dungeon to be).
2)Is DSB the way to go for such a project ? Is it functionnal? (well, it should have been my first question, but i feel i already know the answer :wink: )
3)Is the dm.com community still interested by new "classic" dungeons, despite the release of new games such as LoG, and the fact that existing custom dungeons (thinking of Conflux here) are *** i'll probably have learnt enough english superlatives in 8-9 years, to express my amazement for what looks to me like a lifetime work*** ?
4)Any suggestion/tip for me ?

Thanks !

Note : I guess that most of the answers could be found in the forums, or in the DSB FAQ/guides, but i felt that, somehow, leaving a message here could encourage me not to drop the project after a night or two. It pleases me a lot to see that these forums are still running .
(Again, as i'm not a native english speaker, please forgive my probably awkward sentences)
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: A few questions !

Post by Sophia »

Sasha wrote:Does DSB editor require some specific skill ? I have an "all around" computer knowledge, so i can get familiar with simple things quite quickly, but really lacking of advanced coding notions (i suppose this will depend on how complex i'll want my dungeon to be).
No, not terribly. Of course, if you want to hack around in the internals, you'll have to learn the commands and how to use Lua. For building basic dungeons, though, you shouldn't need to do a lot.
Sasha wrote:Is DSB the way to go for such a project ? Is it functionnal? (well, it should have been my first question, but i feel i already know the answer :wink: )
Yes, it's quite functional. Of course, I'm always improving it!
Sasha wrote:Is the dm.com community still interested by new "classic" dungeons
I definitely think so. :D
Sasha wrote:Any suggestion/tip for me ?
Don't give up and feel free to ask questions.
User avatar
Sasha
Journeyman
Posts: 79
Joined: Sat Jul 23, 2011 10:16 pm
Location: On every street

Re: A few questions !

Post by Sasha »

Hello Sophia, thanks for your quick reply :) .

I spent a few hours tonight (well maybe more than a few...) on ESB ; indeed, the basic functions are rather simple to understand, and i think i'll be able to do most of the things i want to, with the ExVars (the test dungeon greatly helped me to understand those, although the GUI is quite intuitive). However, i began to understand the possibilities offered by this tool ; i'll probably struggle a long time with some features, but i feel that could be worth the investment !
Sophia wrote:Don't give up and feel free to ask questions.
Well if you insist... :lol: (you'll regret it someday !)

1) The "delay" variable does not seem to apply when used directly in a "floortext" object's var : should i put a trigger, linked to a floortext, with the delay applyied to trigger ? or am i missing something ?

2)Another thing i couldn't figure out : i think that i've understood the interests of events functions, but couldn't figure how to make them work. For example, i'd have liked that an inactive floortext would get activated by the action of reading a scroll (ideally with a small delay :lol: but let's not burn steps ...) . Is the "on look" function the solution here ? If so, do i have to use the "function caller" tool ? It became a bit less intuitive for me here, i'm sorry if i'm mixing concepts and/or terms, it remains quite new for me.

3)Lastly, i absolutely couldn't figure out a way to trigger a specific experience bonus to a party character (i mean a rough bonus, like getting from novice to apprentice, or getting x experience point in a specific class). Basically, an "exp quest reward" thing, like you can see in some other RPGs, although i'd mostly use such a feature for plots purposes , i love the original DM leveling system.

I apologize, as i suppose that you've already gave such explanations before, but if i fully understand those kinds of mechanics, i feel that i'd be able to deal a lot more easily with my next problems !

PS: is there a way to use italic, bold, or underlined for ingame text (apart from scrolls which do not seem to even support punctuations marks -not a big deal though) ? I would like to emphasize the narrative part of my dungeon, to make it a bit more immersive, as i'm not really confident with my riddle-crafting skills ...

PS2 : I saw that a conversion of dm/csb for DSB was once available, but the links seem to be dead ; i'd be extremely interested to get a copy of these ; as i know those games from A to Z (well only to Y, CSB is still serious business, even after all these years), it would be a lot easier for me to find specific working things, to help me with my crafting process.

Thanks again Sophia, i'd be curious to see a handmade dungeon from you, given the talent and investment that emanates from your work (not to mention an obvious mastery of the tool you created)
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: A few questions !

Post by Sophia »

Sasha wrote:The "delay" variable does not seem to apply when used directly in a "floortext" object's var : should i put a trigger, linked to a floortext, with the delay applyied to trigger ? or am i missing something ?
No, it doesn't work like that. It's designed to just show a message when you step on it.

However, you can very easily extend it to allow the text to be shown when sent a message. We'll use the "Next Tick" message so as not to interfere with the role of activate and deactivate in turning the floor text on and off.

In your own dungeon's objects.lua (which you'll have to create if you haven't defined any custom objects yet), add the following code:

Code: Select all

obj.floortext.msg_handler = {
  [M_NEXTTICK] = function (id)
     show_floortext(dsb_find_arch(id), id)
  end
}
Now, any time you send a floortext a "Next Tick" message, it will display the text as though it had gotten stepped on.
Sasha wrote:i think that i've understood the interests of events functions, but couldn't figure how to make them work. For example, i'd have liked that an inactive floortext would get activated by the action of reading a scroll (ideally with a small delay :lol: but let's not burn steps ...) . Is the "on look" function the solution here ? If so, do i have to use the "function caller" tool ? It became a bit less intuitive for me here, i'm sorry if i'm mixing concepts and/or terms, it remains quite new for me.
With the above code, it should probably become easier. All you have to do is send the appropriate message in your on_look. Otherwise, you can use dsb_write to print text directly. You don't need a function_caller. That's designed to directly call Lua code from dungeon mechanics. Instead, you're already writing Lua code, so you don't need it.
Sasha wrote:Lastly, i absolutely couldn't figure out a way to trigger a specific experience bonus to a party character (i mean a rough bonus, like getting from novice to apprentice, or getting x experience point in a specific class). Basically, an "exp quest reward" thing, like you can see in some other RPGs, although i'd mostly use such a feature for plots purposes , i love the original DM leveling system.
You can use the xp_up function to give a certain experience reward and have DSB automatically handle leveling up and such. The syntax is:

Code: Select all

xp_up(who, class, subskill, bonus_amount)
Sasha wrote:is there a way to use italic, bold, or underlined for ingame text (apart from scrolls which do not seem to even support punctuations marks -not a big deal though) ?
This is just a limitation of what the original DM fonts supported. So, no, there's nothing beyond that, including no bold or italic or such things.
Sasha wrote:I saw that a conversion of dm/csb for DSB was once available, but the links seem to be dead
I'll try to track it down.
Sasha wrote:i'd be curious to see a handmade dungeon from you, given the talent and investment that emanates from your work (not to mention an obvious mastery of the tool you created)
Thank you!
Maybe one of these days I'll actually finish my own work... :mrgreen:
User avatar
Sasha
Journeyman
Posts: 79
Joined: Sat Jul 23, 2011 10:16 pm
Location: On every street

Re: A few questions !

Post by Sasha »

Sophia wrote:Now, any time you send a floortext a "Next Tick" message, it will display the text as though it had gotten stepped on.
Thanks, it works as intended, and allows me to put the floortext anywhere in the dungeon, making the whole thing clearer. The thing is, i just wrote down the code you gave me, and does not understand most of the syntax behind it , making it hard for me to adapt this for other purposes. I guess i'd need some LUA knowledge.
I'll try my best to understand those basic mechanics, so i don't have to bother you too much. (For the experience bonus, i still can't understand how to associate this function with a concrete event in game :( ) .
Thanks for the time taken to answer, it helped ; after a good night (or two) of experimenting it should be clearer to me !
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: A few questions !

Post by Sophia »

I'm glad it worked.

Yes, some knowledge of Lua is necessary for getting good with DSB. The good news is that Lua is not a terribly difficult language, and, within the structure of DSB, you can accomplish quite a bit by writing relatively small amounts of code.

Associating a function with a concrete event in game is the job of events (like on_look) or triggers linked to function_caller objects. For example, writing a function that calls xp_up, associating that function with a function_caller, and then making a button you can push send the appropriate message to the function_caller to call the function.

I'll try to walk you through a simple example. :)

Create a file called startup.lua if you haven't already, and write this code in it:

Code: Select all

function give_leader_xp(id)
   local leader_ppos = dsb_get_leader()
   local who = dsb_ppos_char(leader_ppos)
   xp_up(who, CLASS_FIGHTER, 0, 500)
end
Now, add a function_caller and set its Activate function to "give_leader_xp" and create a button that sends an activate message to that function_caller. Depending on what your level already is, it might take a few clicks, but the party leader will eventually gain a fighter level. You can also access exvars, so, for example, you could store the class and amount of xp to give in an exvar associated with that function_caller instead, and access the data in that function call.

Code: Select all

xp_up(who, exvar[id].class, 0, exvar[id].xp_amount)
User avatar
Sasha
Journeyman
Posts: 79
Joined: Sat Jul 23, 2011 10:16 pm
Location: On every street

Re: A few questions !

Post by Sasha »

Thank you ! This is helping me a lot.
Just to make you smile, i have to tell you this : I spent about an hour trying to make the experience bonus work, with the code you provided, with no result (nor game crash...). I tried just about everything, when i eventually remembered that i had set up the XP multiplier of the first dungeon level to 0, to prevent early training. I also remembered (tell me if i'm wrong), that the xp_up function takes into account the xp multiplier factor of the level you're in.

Well this works perfectly now, and i think i'm understanding more and more the possibilities of ESB thanks to you. I'll try to go on with the dungeon crafting.

PS : In order to keep the first dungeon level XP rate to 0, i replaced xp_up by dsb_give_xp, in the startup code ; it works but does not display the "level up" message. So i thought about sticking with the xp_up function, with a low (0.1) experience multiplier, and give an accordingly (x10) experience bonus with the xp_up function. The GUI does not seem to accept that, though. Anyway, this issue is rather pointless, and i think i'll just limit the "training material" (flasks, mobs, starting mana...) for the first dungeon level.

Thanks again Sophia !
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: A few questions !

Post by Sophia »

Well, it doesn't really make me smile, because I'm sorry it was difficult for you!

Anyway, I should have pointed out that xp_up can take an optional extra parameter, specifying an xp multiplier. So, it will still give experience on a level with a multiplier of 0 if you do:

Code: Select all

xp_up(who, class, subskill, xp, 1)
(Or whatever number, but a multiplier of 1 is the most intuitive if you're just typing in a number yourself, of course)
User avatar
Sasha
Journeyman
Posts: 79
Joined: Sat Jul 23, 2011 10:16 pm
Location: On every street

Re: A few questions !

Post by Sasha »

Sophia wrote:Well, it doesn't really make me smile
Well i really did, i spent a hour thinking i didn't understand anything, even when someone wrote the full code for me. What a relief, i'm just an ultra-scatterbrain :lol: .
Thanks for the extra parameter in the xp_up function, i , indeed, wasn't aware of that ; i'll try it out and tell you if it fits what i had i mind (it should).
Post Reply