Page 5 of 5

Re: How to... ?

Posted: Wed Feb 23, 2011 9:29 pm
by zoom
--maybe sharing graphics at this stage /moment is too early, because the surprise (due to new graphics) will be diminished ?
At least this is the only argument against sharing that I can think of right now. In the long run, a graphic collection only makes sense.

Re: How to... ?

Posted: Tue Apr 26, 2011 8:21 pm
by Gambit37
@Mon Ful IR: Your downloads have been removed from Media Fire. Can you upload them again please?

Re: How to... ?

Posted: Fri Apr 29, 2011 5:24 pm
by Mon Ful Ir
I have the most recent version and I'll re-upload. Bear with me for a little while so I can organise it all a bit better, please.

Re: How to... ?

Posted: Fri Apr 29, 2011 6:00 pm
by Mon Ful Ir

Re: How to... ?

Posted: Wed May 11, 2011 8:48 pm
by Mon Ful Ir
Version 0.2's done. Get it here.

Changes:-
  • 2 new monsters
  • 1 new champion (prisoner-release version rather than a mirror)
  • 3 new statues
  • 1 new ceiling-hanging-thing
  • Assorted minor code fixes

Re: How to... ?

Posted: Fri May 13, 2011 7:32 pm
by Mon Ful Ir
Hmm. When someone clicks on one of the "prisoners" in this dungeon, they can release the prisoner, adding a character to the party. This is just called "resurrection" at the moment.

What I want to do is change where it says "resurrect" to "release". But this seems to mean replacing some code in dsb_offer_champion and I don't have the faintest idea how to do that. Help please?

Also, the prisoner object (the cloned mirror) ought to disappear when the relevant champion's added and I'm afraid I can't see how to make that happen either. Can I use qswapper to delete an object?

Re: How to... ?

Posted: Fri May 13, 2011 8:00 pm
by Sophia
Mon Ful Ir wrote:What I want to do is change where it says "resurrect" to "release".
If you mean the thing you click when the champion is being offered, you have to replace the image itself. It's a 232x146 image that must be called option_res.png (or .bmp or .pcx or whatever else) The bottom 26 pixels are the cancel button; the rest are the resurrection image. The image is in the extracted DSB graphics that you can download here, I think.
Mon Ful Ir wrote:Also, the prisoner object (the cloned mirror) ought to disappear when the relevant champion's added and I'm afraid I can't see how to make that happen either. Can I use qswapper to delete an object?
No, but you can send it a "destroy" message. A better option might be to do it automatically in the prisoner's take function, i.e., the function called when the party member is taken.
Here's some code:

Code: Select all

function obj.prisoner:on_click(id, clicked_with)
    if (clicked_with == nil and exvar[id]) then
        local inside = exvar[id].champion
        if (inside) then
            local offer_mode = 3
            if (exvar[id].offer_mode) then
                offer_mode = exvar[id].offer_mode
            end
            dsb_offer_champion(inside, offer_mode, function ()
                exvar[id].champion = nil
                got_triggered(id, nil)
                dsb_msg(1, id, M_DESTROY, 0) -- Added this line. Makes the prisoner disappear when taken.
            end)
        end
    end
end

Re: How to... ?

Posted: Fri May 13, 2011 9:54 pm
by Mon Ful Ir
Thank you, Amber. I've created a new option_res.png, and I've added it into my graphics.lua in the usual way:

Code: Select all

gfx.option_res = dsb_get_bitmap("option_res", "mfi_graphics/misc/option_res.png")
This doesn't seem to have changed anything. Have I missed a step?

Thanks

Re: How to... ?

Posted: Sat May 14, 2011 5:33 am
by Sophia
You know, you stumbled on something that I didn't even think of. The problem is that this all was done before DSB was particularly mindful of file paths, so option_res.png has to be in your dungeon's root directory. At that point you don't even have to actually add it to gfx at all; the DSB core pulls it in directly.

This is sort of ugly, so I'll probably make it work like your way in future versions.

Re: How to... ?

Posted: Sat May 14, 2011 10:49 am
by Mon Ful Ir
Thank you very much, that's working as intended now. :)

Re: How to... ?

Posted: Sat May 14, 2011 2:26 pm
by Mon Ful Ir
Hmm... when I release a prisoner it still says, "%NAME RESURRECTED" at the bottom of the screen. Can I make it say, "%NAME RELEASED"?

Re: How to... ?

Posted: Sat May 14, 2011 6:36 pm
by Sophia
Yes. It's in base/global.lua.

Code: Select all

msg_resurrected = " RELEASED."
Don't forget the leading space, because the name is prepended directly to whatever is in that string.

Re: How to... ?

Posted: Sat May 14, 2011 7:05 pm
by Mon Ful Ir
Okay, thanks. Is there a way to do it without editing base/global.lua? A custom dungeon really shouldn't change the base code.

Re: How to... ?

Posted: Sat May 14, 2011 8:11 pm
by Sophia
It's a variable! You can change that variable's value and the output will change. :)
So in your custom dungeon's scripts just do

Code: Select all

msg_resurrected = " RELEASED."
The only reason I mentioned it was in base/global.lua was so you could see where it was and what other variables you could override to change other aspects of DSB's behavior.

Re: How to... ?

Posted: Sat May 14, 2011 8:45 pm
by Mon Ful Ir
Ah! Everything becomes clear. Thank you!

Re: How to... ?

Posted: Sun Mar 31, 2013 2:44 pm
by Lord_BoNes
Sorry to bump this thread... but... MonFulIr, do you happen to have a more recent version of this? I mainly ask because the last available download is several posts up, and you've discussed new changes that wouldn't be in that download. That, and I'm also curious to see your progress on this.

Re: How to... ?

Posted: Wed Apr 03, 2013 7:58 pm
by Mon Ful Ir
Yes, I have a more up to date version on my computer at home, but it'll be a few more days before I can post it I'm afraid.

Re: How to... ?

Posted: Wed Apr 03, 2013 8:28 pm
by Lord_BoNes
No problems. The previous download was May 12th 2011... so a few more days won't hurt :P

Re: How to... ?

Posted: Thu Apr 04, 2013 7:07 pm
by Mon Ful Ir
No, I'm sorry: I'm afraid I've misinformed you. Apparently I no longer have that file. :(

Re: How to... ?

Posted: Thu Apr 04, 2013 8:04 pm
by terkio
Off topic.
@Mon Ful Ir
While you are here...
Is there a chance for a deeper dungeon to continue your excellent RTC "Escape 3.0" ? http://www.dungeon-master.com/forum/vie ... 31&t=28120

Re: How to... ?

Posted: Thu Apr 04, 2013 10:01 pm
by Mon Ful Ir
I'll reply in that thread. :)

Re: How to... ?

Posted: Fri Apr 05, 2013 7:12 pm
by Lord_BoNes
Mon Ful Ir wrote:No, I'm sorry: I'm afraid I've misinformed you. Apparently I no longer have that file. :(
Damn :(

Any other DSB dungeons you feel like throwing my way (I'm learning how to do stuff in DSB, and you seem to have interesting ideas)?