edit: Joramun's ESB ramblings

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. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

edit: Joramun's ESB ramblings

Post by Joramun »

Hey, for once, THIS IS NOT A BUG REPORT !

I noticed that, playing around with ESB and my "randomizer", some functions like "dsb_qswap" do not change (at least not immediately) the "hard-coded archetype" in ESB...
I know that because I've been using (if...elseif...end) on things like an instance's archetype in order to generate "circumstantial" content in my dungeon...
Which is ugly on my part, but cool because I can visualize the dungeon in ESB !

Anyway, I found various tricks around those "problems", and I'm implementing the last missing features to have playable dungeons.
It will be all about FIGHT and KEYS for now !

:mrgreen: :twisted: :evil: :mrgreen:
Last edited by Joramun on Wed Dec 01, 2010 8:13 pm, edited 1 time in total.
What Is Your Quest ?
User avatar
Sophia
Concise and Honest
Posts: 4306
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Fun ESB facts...

Post by Sophia »

What do you mean the "hard coded archetype"?
I'm having a hard time figuring out what you're trying to do... :shock: :mrgreen:
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: Fun ESB facts...

Post by Joramun »

It was a problem in my algorithm, not in archetypes.

I'm going through a list of instances of some "arch" and when some operation is done, I qswap them into another "arch" in order to prevent a second execution.
For some reason, the loop that goes through instances sometime goes twice over the same instance AND operations that should not happen twice, do.

I think it's because I've been using dsb_spawn(arch,...) instead of dsb_spawn(id,arch,...) so that when I did some manipulation on my list (notably, deleting instances)
I would then free the id's and therefore the next created object would get it... weird stuff.

Anyway, I'm investigated the whole mess.

The problem of a random dungeon, is that errors are random :mrgreen:
What Is Your Quest ?
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: Fun ESB facts...

Post by Joramun »

Code: Select all

OBJ: 405 system archs
OBJ: 405 total archs
OBJ: 405 system archs
OBJ: 405 total archs
PROGRAM CRASH!
Location: 0 2 0
Reason: No free insts
Stack Dump:
ESBmain
ESBwproc
ed_menucommand
editor_load_dungeon
src_lua_file
lua.dsb_spawn(doorframe)
create_instance
next_object_inst
:mrgreen:
What Is Your Quest ?
User avatar
Gambit37
Should eat more pies
Posts: 13768
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Fun ESB facts...

Post by Gambit37 »

At some point indeterminate, the above discourse might make sense to me. But for now... *whoooooooooooosh*.
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: Fun ESB facts...

Post by Joramun »

It's just my random dungeon code getting too complex for esb and me to handle. (However, I'm catching up)
What Is Your Quest ?
User avatar
Jan
Mighty Pirate
Posts: 2760
Joined: Tue Sep 23, 2008 4:55 pm
Location: Scumm Bar, Czech Republic

Re: Fun ESB facts...

Post by Jan »

Well, the truth is that these facts are a very specific kind of "fun". :wink:
Finally playing and immensely enjoying the awesome Thimbleweed Park-a-reno!
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: Fun ESB facts...

Post by Joramun »

Yeah I should probably rename that thread into "Joramun rambles with himself about things he doesn't even understand".
What Is Your Quest ?
User avatar
Sophia
Concise and Honest
Posts: 4306
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: edit: Joramun's ESB ramblings

Post by Sophia »

If this is creating an actual problem for you, I can probably raise the maximum number of allowed instances. :shock:
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: edit: Joramun's ESB ramblings

Post by Joramun »

It's not really a problem. It happens when I make a big random dungeon. I'm trying to find a way around this, by removing some "intermediate instances" that I use only for visual convenience in ESB to see where are "rooms" etc. It was also the origin of the above problem: I was freeing some room by removing instances, but that would result in unexpected side effects when creating final objects (like doors etc.) (eg. an "intermediate instance" confused with a door or wallitem, and resulting in some awkward instance placement, like monsters inside walls or on doors...)
What Is Your Quest ?
Post Reply