Cleaning up a RTC file to work in DSB/ESB

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
Gambit37
Should eat more pies
Posts: 13773
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Cleaning up a RTC file to work in DSB/ESB

Post by Gambit37 »

I used RTSB to do a quick-and-dirty conversion on my RTC file. I didn't create the object mappings for my custom objects. I was hoping I'd at least be able to open the layout in ESB without doing that...? But I get this error:

Code: Select all

"LUA_dungeon.lua:591: dsb_spawn requires int in param 3"
The code on that line says:

Code: Select all

RTC_part01_0357_2=dsb_spawn("scroll",IN_OBJ,RTC_part01_0357_1,-1,0)
Clearly this tells DSB what item the scroll is inside. But that item has been commented out, presumably because it's a custom chest that I didn't define during the conversion process. I guess ESB is choking as it can't find the commented out item?

So does this mean I have to do the object conversion list, or is there a way of getting the basic layout/triggers into ESB quickly without problems, and without the object conversion list (It's a huge list! I don't relish that job just yet ;-))
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Cleaning up a RTC file to work in DSB/ESB

Post by Sophia »

You could make a quick and dirty object conversion list that contains only standard objects. That would be one way to get it in quickly... unless you have a whole bunch of custom objects.

I'm not sure what the best approach is, then. :(
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: Cleaning up a RTC file to work in DSB/ESB

Post by Joramun »

The line is commented because the item wasn't present in the object_list.txt in the RTSB folder.

Simply add this to the list:

Code: Select all

(RTC CUSTOM ITEM NAME) [i]TAB[/i] (DSB REPLACEMENT)
Here it would look like:

Code: Select all

CUSTOM_RTC_CHEST        chest
where their is no spaces inside the custom object name, and the rtc and dsb names are separated by any number of spaces or tabulations.
If the dsb replacement item exists, DSB / ESB will load fine.
However, DO NOT ADD anything else. A simple space anywhere or lone letter on one line COMPLETELY upsets RTSB.

If you don't want to go through the whole RTSB process again, just open your dungeon.lua in a text editor, open the REPLACE option, and replace the RTC custom names by DSB item names (a "replace all" should do the trick).
Then remove the comments: '--'
What Is Your Quest ?
User avatar
Gambit37
Should eat more pies
Posts: 13773
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Cleaning up a RTC file to work in DSB/ESB

Post by Gambit37 »

Based on Sophia's comments elsewhere, the problem is that my converted identifiers are not integers.

Shit.

There are hundreds here. So I have to go through the entire file and by hand change them all to INTS, making sure that I don't re-use one by mistake and making sure that all links between objects and exvars are correctly maintained. OK, if that's what has to be done, it has to be done. Looks like a long day's work with some tea, music and chocolate cookies to hand.
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: Cleaning up a RTC file to work in DSB/ESB

Post by Joramun »

I think there is a misunderstanding here. The identifiers ARE integers:

Code: Select all

Rtc_whatever_trevor = dsb_spawn("chest",coordinates)
Then Rtc_whatever_trevor holds an integer, generated automatically by DSB/ESB.

EDIT 1: The problem may come from:
- The same name is used twice.
- You spawn an item inside another item that is created LATER in the file.
- There is a spelling mistake.

EDIT 2: The correct spelling for your case would be:

Code: Select all

RTC_part01_0357_1=dsb_spawn("chest",Z,X,Y,T) --(where T is a corner, from 0 to 3 or NE to SW)
RTC_part01_0357_2=dsb_spawn("scroll",IN_OBJ,RTC_part01_0357_1,-1,0)
What Is Your Quest ?
User avatar
Gambit37
Should eat more pies
Posts: 13773
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Cleaning up a RTC file to work in DSB/ESB

Post by Gambit37 »

Ah, right, OK. So I can keep all the "Rtc_whatever_trevor" labels -- great! :-) Yes, as I previously mentioned, the error I got was because a reference is made to an object that has been commented out so it's not available:

Code: Select all

--RTC_part01_0357_1=dsb_spawn("MISC_ZMOZ_WOODENBOX_1",4,3,57,SOUTHEAST)
RTC_part01_0357_2=dsb_spawn("scroll",IN_OBJ,RTC_part01_0357_1,-1,0)
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: Cleaning up a RTC file to work in DSB/ESB

Post by Joramun »

See, the -- mean that the line was not executed (not even read by ESB), so the first item doesn't exist. :wink:

Remove the '--' and replace "MISC_STUFF" by "chest" (zum beispiel)
What Is Your Quest ?
User avatar
Gambit37
Should eat more pies
Posts: 13773
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Cleaning up a RTC file to work in DSB/ESB

Post by Gambit37 »

Yes, I realise that. What I was hoping to be able to do was at least get the layout and basic mech of the dungeon converted from RTC to DSB without having to do the object conversion list. But obviously that is not possible, at least not in any quick fashion.

I will have to do that conversion list before I can get my dungeon into ESB. Good job I have a dual monitor setup ;)
Post Reply