How to... ?
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

Re: How to... ?
--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.
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.
- Gambit37
- Should eat more pies
- Posts: 13768
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: How to... ?
@Mon Ful IR: Your downloads have been removed from Media Fire. Can you upload them again please?
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
Re: How to... ?
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.
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
Re: How to... ?
Version 0.2's done. Get it here.
Changes:-
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
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
Re: How to... ?
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?
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?
- Sophia
- Concise and Honest
- Posts: 4306
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: How to... ?
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:What I want to do is change where it says "resurrect" to "release".
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.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?
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
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
Re: How to... ?
Thank you, Amber. I've created a new option_res.png, and I've added it into my graphics.lua in the usual way:
This doesn't seem to have changed anything. Have I missed a step?
Thanks
Code: Select all
gfx.option_res = dsb_get_bitmap("option_res", "mfi_graphics/misc/option_res.png")
Thanks
- Sophia
- Concise and Honest
- Posts: 4306
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: How to... ?
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.
This is sort of ugly, so I'll probably make it work like your way in future versions.
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
Re: How to... ?
Hmm... when I release a prisoner it still says, "%NAME RESURRECTED" at the bottom of the screen. Can I make it say, "%NAME RELEASED"?
- Sophia
- Concise and Honest
- Posts: 4306
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: How to... ?
Yes. It's in base/global.lua.
Don't forget the leading space, because the name is prepended directly to whatever is in that string.
Code: Select all
msg_resurrected = " RELEASED."
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
Re: How to... ?
Okay, thanks. Is there a way to do it without editing base/global.lua? A custom dungeon really shouldn't change the base code.
- Sophia
- Concise and Honest
- Posts: 4306
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: How to... ?
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
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.

So in your custom dungeon's scripts just do
Code: Select all
msg_resurrected = " RELEASED."
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
- Lord_BoNes
- Jack of all trades
- Posts: 1064
- Joined: Mon Dec 01, 2008 12:36 pm
- Location: Ararat, Australia.
Re: How to... ?
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.

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin
Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
Re: How to... ?
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.
- Lord_BoNes
- Jack of all trades
- Posts: 1064
- Joined: Mon Dec 01, 2008 12:36 pm
- Location: Ararat, Australia.
Re: How to... ?
No problems. The previous download was May 12th 2011... so a few more days won't hurt 


1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin
Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
Re: How to... ?
No, I'm sorry: I'm afraid I've misinformed you. Apparently I no longer have that file. 

Re: How to... ?
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
@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
"You can be on the right track and still get hit by a train!" Alfred E. Neuman
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
- Lord_BoNes
- Jack of all trades
- Posts: 1064
- Joined: Mon Dec 01, 2008 12:36 pm
- Location: Ararat, Australia.
Re: How to... ?
DamnMon Ful Ir wrote:No, I'm sorry: I'm afraid I've misinformed you. Apparently I no longer have that file.![]()

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

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin
Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone