Search found 187 matches

by kaypy
Mon Apr 21, 2025 4:34 am
Forum: Dungeon Strikes Back (DSB)
Topic: [0.84] Graphics glitch with fireball holes?
Replies: 2
Views: 1204

[0.84] Graphics glitch with fireball holes?

At a certain distance, I get fireball holes overhanging the edge of their wall. Is this something that is just held over from the original? (I cant believe I haven't seen it before)


dsb_text2map(0, 5, 5, 100, 1, {
"00000",
"00000",
"11110",
"00010",
"00000"} )
dsb_level_wallset(0, wallset.default ...
by kaypy
Tue Mar 04, 2025 12:17 pm
Forum: Dungeon Strikes Back (DSB)
Topic: Tutorials: wallsets and custom monsters, objects, etc
Replies: 151
Views: 81638

Re: Tutorials: wallsets and custom monsters, objects, etc

I tested unallocating the object definitions but it wound up crashing things.

Code: Select all

-- dont do this
obj.screamer=nil
So I'm guessing your put-them-in-an-unused-category approach is probably the best option

Code: Select all

obj.screamer.class="UNUSED"
by kaypy
Sun Mar 02, 2025 8:38 am
Forum: Dungeon Strikes Back (DSB)
Topic: ESB Feature Requests
Replies: 3
Views: 1346

Re: ESB Feature Requests

If there's a thread here for it then could I add requests for:

* a find an inst by ID number. At the moment I do a bunch of: find I need to know about inst #51342, load up the dungeon in a text editor and look up inst 51342 to get the coordinates, go back to ESB and go to those coordinates

* would ...
by kaypy
Sun Feb 16, 2025 10:49 am
Forum: Dungeon Strikes Back (DSB)
Topic: ESB Stair Icon / ESB icons
Replies: 11
Views: 2962

Re: ESB Stair Icon / ESB icons

As an example, I have an extra row at the bottom of the cells.pcx like
https://i.ibb.co/Txd4GwYj/buttonkey.png

and modify the wallitem section of editor.lua


elseif (arch.type == "WALLITEM") then
if (arch.class ~= "DECO") then
if (arch.class == "ALCOVE") then
return (52+dir), 5
else ...
by kaypy
Tue Feb 11, 2025 3:03 pm
Forum: Dungeon Strikes Back (DSB)
Topic: Tutorials: wallsets and custom monsters, objects, etc
Replies: 151
Views: 81638

Re: Tutorials: wallsets and custom monsters, objects, etc

I put together a more concrete example:
startup.lua:

snd.doom = dsb_get_sound("sounds/doorslam")

function helmdarconpickup(self, id)
dsb_sound(snd.doom)
end

function helmdarctofrom(self, id, who)
dsb_sound(snd.doom)
end

objects.lua:

-- when picked up off ground
obj.helm_darc.on_click ...
by kaypy
Tue Feb 11, 2025 2:40 pm
Forum: Dungeon Strikes Back (DSB)
Topic: Tutorials: wallsets and custom monsters, objects, etc
Replies: 151
Views: 81638

Re: Tutorials: wallsets and custom monsters, objects, etc


Also, meant to ask one more, regarding sounds: is it possible to to play a sound when I put an object into the inventory or pick it up? Is there any example code as to do this?

I accidently replied to this without realizing that it was a page old. Then deleted the reply. Then realized I dont ...
by kaypy
Fri Feb 07, 2025 12:29 pm
Forum: Dungeon Strikes Back (DSB)
Topic: Tutorials: wallsets and custom monsters, objects, etc
Replies: 151
Views: 81638

Re: Tutorials: wallsets and custom monsters, objects, etc

Hmm. Played around a bit more, and now it seems to be working for me x_off and all?

Code: Select all

gfx.doorbutton = dsb_get_bitmap("gfx/testbutton")
gfx.doorbutton.x_off = 120
gfx.doorbutton.y_off = -110
where gfx/testbutton.pcx is a 12x12px test file
by kaypy
Fri Feb 07, 2025 12:12 pm
Forum: Dungeon Strikes Back (DSB)
Topic: Tutorials: wallsets and custom monsters, objects, etc
Replies: 151
Views: 81638

Re: Tutorials: wallsets and custom monsters, objects, etc

The doorbuttons use a custom draw method, you can see renderer_hack="DOORBUTTON" in the obj

I think part of that is ignoring the x offset

(But I'm guessing it also does a bunch of other stuff that you wont want to get rid of)
by kaypy
Fri Feb 07, 2025 11:30 am
Forum: Dungeon Strikes Back (DSB)
Topic: Tutorials: wallsets and custom monsters, objects, etc
Replies: 151
Views: 81638

Re: Tutorials: wallsets and custom monsters, objects, etc

Set
gfx.doorbutton.x_off = 0
gfx.doorbutton.y_off = 0
initially

Rig up a test dungeon with a door and button and take a screenshot standing in right front of it
Measure how far you need to move the button image up and across.

Set
gfx.doorbutton.y_off
to -(how far you need to move the button up ...
by kaypy
Fri Feb 07, 2025 11:04 am
Forum: Dungeon Strikes Back (DSB)
Topic: Tutorials: wallsets and custom monsters, objects, etc
Replies: 151
Views: 81638

Re: Tutorials: wallsets and custom monsters, objects, etc

Wouldnt you just put

gfx.doorbutton = dsb_get_bitmap("my_version_of_the_front_doorbutton_bitmap")
and
gfx.doorbutton_side = dsb_get_bitmap("my_version_of_the_side_doorbutton_bitmap")

in your gfx code?
by kaypy
Fri Jan 10, 2025 2:39 pm
Forum: Dungeon Strikes Back (DSB)
Topic: Food and consume_effect
Replies: 1
Views: 1064

Food and consume_effect

Between system/sys_click_mouth, util/eatdrink and the consume_effect on a given object, there is a bit of a mismatch.

The consume_effect is called with the id of the object being consumed. But because food has an animation and thus a delay, the object is no longer valid by the time its consume ...
by kaypy
Tue Dec 10, 2024 12:41 pm
Forum: Dungeon Strikes Back (DSB)
Topic: (fixed) Crash on monster boss code [0.82]
Replies: 5
Views: 1755

Re: (fixed) Crash on monster boss code [0.82]

Thanks. I'll give it a try

Yeah it probably doesn't make too much sense to instruct monsters to head to a stairway when they aren't actually in the dungeon 8-)

...

Works for me now. Of course, only processing the monsters in the dungeon would also bypass the error anyway, so first I tried the dsb ...
by kaypy
Sun Dec 08, 2024 8:10 am
Forum: Dungeon Strikes Back (DSB)
Topic: (fixed) Crash on monster boss code [0.82]
Replies: 5
Views: 1755

Re: Crash on monster boss code [0.82]

Lua: 9425 @ 1 22 28 2
Lua: 9426 @ 1 22 28 1
Lua: 9427 @ 1 5 3 0
Lua: 9428 @ 1 25 5 0
Lua: 9430 @ -5 0 0 0
PROGRAM CRASH!
Yeah I'm thinking something doesn't work if the monster is in limbo?

edit It sometimes works in limbo too though, and I cant get my minimal version to crash by piling monsters ...
by kaypy
Sun Dec 08, 2024 8:02 am
Forum: Dungeon Strikes Back (DSB)
Topic: (fixed) Crash on monster boss code [0.82]
Replies: 5
Views: 1755

Re: Crash on monster boss code [0.82]

Tweaking my use_stairs code to

...
__log("ust")
local pz,px,py,pf = dsb_party_coords()
for monid in dsb_insts() do
local arch = dsb_find_arch(monid)
if (arch.type == "MONSTER") then
__log(tostring(monid))
end
if (arch.type == "MONSTER" and
dsb_ai_boss(monid) == monid) then
end
if ...
by kaypy
Sun Dec 08, 2024 7:40 am
Forum: Dungeon Strikes Back (DSB)
Topic: (fixed) Crash on monster boss code [0.82]
Replies: 5
Views: 1755

Re: Crash on monster boss code [0.82]

So I tried to make a simplified reproduction, but I'm not getting the same result. I'll see if I can reproduce it in the original dungeon next.

The following does **not** crash

dungeon.lua

---DSB ESB---
--[[ Autogenerated by ESB.
Trying to edit this file by hand may not give you
particularly ...
by kaypy
Sun Dec 08, 2024 7:17 am
Forum: Dungeon Strikes Back (DSB)
Topic: (fixed) Crash on monster boss code [0.82]
Replies: 5
Views: 1755

(fixed) Crash on monster boss code [0.82]

This was tweaked in the new version, so likely a regression there?

Reason: Segmentation Fault
Stack Dump:
DSBmain
DSBgameloop
dungeon_move
party_moveto
to_tile(on_trigger)
lua_call.member_func
lua.stairsdown.on_trigger
lua.dsb_ai_boss
monster_groupup

Oddly, the stairsdown.on_trigger I have doesn't ...
by kaypy
Mon Mar 18, 2024 4:40 pm
Forum: Dungeon Strikes Back (DSB)
Topic: (fixed) Why sabres seem to suck in DSB
Replies: 1
Views: 2312

Re: (fixed) Why sabres seem to suck in DSB

Thankyou again

(of course, I can tweak the base files in my own install, but better to have an upsteam fix for everyone)
by kaypy
Sun Mar 17, 2024 9:01 am
Forum: Dungeon Strikes Back (DSB)
Topic: (fixed) Why sabres seem to suck in DSB
Replies: 1
Views: 2312

(fixed) Why sabres seem to suck in DSB

Code: Select all

obj.sabre = {
    name="SABRE",
...
	base_tpower=42,
	base_tpower=1,
...
}
by kaypy
Tue Mar 12, 2024 11:00 am
Forum: Dungeon Strikes Back (DSB)
Topic: (fixed?) crash to desktop
Replies: 6
Views: 3358

Re: (fixed?) crash to desktop

Nice!

I had a minimal level where I was smooshing groups of critters together with dsb_move, but I hadn't been able to reproduce the issue...
by kaypy
Mon Mar 11, 2024 12:26 pm
Forum: Dungeon Strikes Back (DSB)
Topic: (fixed?) crash to desktop
Replies: 6
Views: 3358

Re: crash to desktop

Grasping at straws here:
What happens if we have monster group A+B and monster group C+D.
Then A+B split, where one of them moves to a new tile and onto a teleporter dropping them instantly into C+D.
Could A+B still be considered a group and one of them a boss long enough to cause some mishap? Or ...
by kaypy
Mon Mar 11, 2024 11:46 am
Forum: Dungeon Strikes Back (DSB)
Topic: (fixed?) crash to desktop
Replies: 6
Views: 3358

Re: crash to desktop

Unfortunately, I cant see reproducing it as any more than random chance. There's nothing I can see that makes it likely here. The critters in question aren't particularly close to start with, and my last save was annoyingly old by the time it happened.
by kaypy
Sun Mar 10, 2024 11:31 am
Forum: Dungeon Strikes Back (DSB)
Topic: (fixed?) crash to desktop
Replies: 6
Views: 3358

Re: crash to desktop

(0.81 for the record. I do a bit of AI tweaking for my stairs stuff, but I don't think anything that should be causing problems in the engine-side code...)

10165 is a level transition, several teleporters and a bunch of walking away from 10095 but its not impossible for them to have grouped up.
by kaypy
Sun Mar 10, 2024 10:44 am
Forum: Dungeon Strikes Back (DSB)
Topic: (fixed?) crash to desktop
Replies: 6
Views: 3358

(fixed?) crash to desktop

"Monsters cant agree who is boss
This is more than likely a bug in DSB"

log.txt:
AI: Boss 10165 thinks 10095 is boss!
AI: 10095 thinks 10095 is boss
Error: Monsters can't agree who is boss.
This is more than likely a bug in DSB.

uh, is that actually a disagreement?
by kaypy
Fri Mar 08, 2024 5:04 am
Forum: Dungeon Strikes Back (DSB)
Topic: Aargh! Wrong start button!
Replies: 0
Views: 5332

Aargh! Wrong start button!

It is now official: I have clicked the wrong start button too many times.


local front_door_noclick=3
function front_door_click(x, y, b)
if (b == 1) then
if (x > 488 and x < 512) then
if (y > 114 and y < 138) then
dsb_sound(snd.click)
-- dont start a new game unless we really mean it
if (gt ...
by kaypy
Sun Jan 07, 2024 1:17 pm
Forum: Dungeon Strikes Back (DSB)
Topic: Subrenderer frequency?
Replies: 5
Views: 22735

Re: Subrenderer frequency?

After one too many "this was technically solvable but there was a key under a trash pile about 5 levels ago you missed so now you're stuck", the overall plan is I'm looking at implementing an Oracle for that random dungeon generator I have.

My concept is a small permanent hit to a given character's ...
by kaypy
Sun Jan 07, 2024 1:19 am
Forum: Dungeon Strikes Back (DSB)
Topic: Subrenderer frequency?
Replies: 5
Views: 22735

Re: Subrenderer frequency?

I knew messages were the proper way to do it, and I got things working pretty quickly once I stopped being lazy 8-)

But I figured I should find out the way it should behave and update the wiki. Now I get to be lazy there instead 8-)
by kaypy
Sat Jan 06, 2024 1:27 am
Forum: Dungeon Strikes Back (DSB)
Topic: Subrenderer frequency?
Replies: 5
Views: 22735

Subrenderer frequency?

The docs on the wiki imply a subrenderer would be called 6 times a second.

In actual use, it seems that a subrenderer will be called much faster for an item looked at via the eye than if put in the hand. Is this intended?

(I had thought I could use that 6 times a second for some idle activity, but ...
by kaypy
Sat Jan 06, 2024 1:21 am
Forum: Dungeon Strikes Back (DSB)
Topic: dsb_textformat seems wierd?
Replies: 4
Views: 16441

Re: dsb_textformat seems wierd?

Cool. Like I implied I wasn't planning on using it but it having that side effect was wierd and unsettling...
by kaypy
Fri Jan 05, 2024 5:17 pm
Forum: Dungeon Strikes Back (DSB)
Topic: dsb_textformat seems wierd?
Replies: 4
Views: 16441

Re: dsb_textformat seems wierd?

Had another look around. What I had missed was that it only affects dsb_bitmap_textout with the MULTILINE flag set.

It still also breaks the main message area if you actually try to use it. But it wont affect most instances of dsb_bitmap_textout.

Oh, and if you try to use it to format the main ...
by kaypy
Fri Jan 05, 2024 8:17 am
Forum: Dungeon Strikes Back (DSB)
Topic: dsb_textformat seems wierd?
Replies: 4
Views: 16441

dsb_textformat seems wierd?

The way this works seems wierd?

It looks like it has global effects, so if I ever use it for formatting my own text, then the main system UI goes wonky?

dsb_bitmap_textout is used all over the system UI, but dsb_textformat is only used in the default subrenderer, so everything in the system is ...