RNDDB, ConfEdit and CE scripting (from Moving Colour Column)

Discussion about Rocks'n'Diamonds, Boulder Dash, Supaplex, Emerald Mine and any other BD hybrid.

Moderators: Flumminator, Zomis

Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

RNDDB, ConfEdit and CE scripting (from Moving Colour Column)

Post by Tomi »

(Thread splitted by Zomis, original thread: viewtopic.php?p=6966)
Francesco wrote:Reading these last posts, seems like ConfEdit had never been released... to be sincere I still didn't try it, but it should help in the above tasks... am I wrong, Alan?

Edit: Sorry, didn't took in account that ConfEdit is only for Windows... I know that MacOs has an emulator, what about Unix?
There is a Windows emulator for Linux called "wine" (recursive acronym "Wine Is Not Emulator"), but it doesn't work everytime - for example, I wasn't able to run RNDDB with it.

About ConfEdit: AFAIK it can modify playfield data (BODY), but can't modify CE settings (CUS4). Am I wrong?
User avatar
Alan
Posts: 661
Joined: Fri Jun 18, 2004 7:48 pm

Post by Alan »

but can't modify CE settings (CUS4). Am I wrong?
No you are right here. Since RNDTool has all these functions I didn't put them in. Its also lot of work.
to be sincere I still didn't try it, but it should help in the above tasks... am I wrong, Alan?
Not really, but you could write a script that changed a level at certain points (the CEs)

This doesn't mean you can't fiddle around with a hex editor to save some time. I recently did this with a level that has a CE with all 32 change pages used, each page changes to itself. I needed 100 of these CEs and there was now way I was going to do it by hand. I just copied the CE in RND editor 100 times then in a hex editor changed the 'self' value in each element chage page.

So that's 3200 change pages in about 10 minutes.

If there was some kind of token in RND called "self" you could use that in a change page, then you could copy this CE without having to edit it. (not a bad idea, but I'm wandering off topic)
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Alan wrote:No you are right here. Since RNDTool has all these functions I didn't put them in. Its also lot of work.
Well... RNDT doesn't have all the functions needed to modify every piece of CEs... it just can import and export CEs and fix the links between them (if it's not buggy...) and create some counter CEs... that's all unfortunately :(
Indeed it's a lot of work... that's why RNDT hasn't been updated, and won't be updated any more either :( I'm focusing on RNDDB instead :)

Indeed HEX-editing can save a lot of time! HEX-editing could also have saved the time it took to copy one CE into 100 CEs... but maybe it's a little late to say this now... :roll:
User avatar
Alan
Posts: 661
Joined: Fri Jun 18, 2004 7:48 pm

Post by Alan »

I'm focusing on RNDDB instead
So will RNDDB be able to manipulate CEs? (I hope so)
Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Post by Tomi »

As I am big Lua fan, I'll try to advertise it on this occasion too: Zomis, if you're going to add some sort of scripting language in RNDDB, consider using Lua (http://www.lua.org) (http://www.lua.org/pil/ - "Programming in Lua") (http://en.wikipedia.org/wiki/Lua_programming_language) for it. Lua is really very nice, and can do a ton of things (including object-oriented programming), and was already used in several famous projects (World of Warcraft, Fish Fillets Next Generation), *but*... I'm not sure if there's a port for Delphi.
(After checking on their website, it seems that it *maybe* did: download -> user contributed addons.)
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Alan wrote:So will RNDDB be able to manipulate CEs? (I hope so)
Yep. Manipulation using CE scripting.
The only question is whether to use Lua or another scripting language (probably Pascal Script, since I've been using it before and know it's power).
I'll see if I can try out Lua in Delphi or something, and then evaluate how good it is to use... maybe it will be both Lua and Pascal Script support :P

Unfortunately, the problem for me now is lack of time (what else? :P). I'm working this summer (as always) and when I'm not working I don't want to sit for just a couple of hours working a little on RNDDB and then closing it... so there's not much time for me to work on RNDDB.
User avatar
Jannik
Posts: 135
Joined: Fri Jan 27, 2006 2:55 pm
Location: Germany

Post by Jannik »

I'd like to see a scripting language in RnD for the custom elements, instead of the config screens and change pages ... that would really be cool and powerful ... 8)
You could use variables instead of CE values and maybe coordinates ...

Code: Select all

if (self.SmashedBy(rock))
{
   if (IsDesctructable(self.x-1, self.y-1) Element(self.x-1, self.y-1) = emerald;
   if (IsDesctructable(self.x, self.y-1) Element(self.x, self.y-1) = emerald;
   if (IsDesctructable(self.x+1, self.y-1) Element(self.x+1, self.y-1) = emerald;
   if (IsDesctructable(self.x-1, self.y) Element(self.x-1, self.y) = emerald;
   if (IsDesctructable(self.x, self.y) Element(self.x, self.y) = diamond;
   if (IsDesctructable(self.x+1, self.y) Element(self.x+1, self.y) = emerald;
   if (IsDesctructable(self.x-1, self.y+1) Element(self.x-1, self.y+1) = emerald;
   if (IsDesctructable(self.x, self.y+1) Element(self.x, self.y+1) = emerald;
   if (IsDesctructable(self.x+1, self.y+1) Element(self.x+1, self.y+1) = emerald;
}
Just dreaming ... :roll:

Btw: If you can't decide between Lua and Pascal Scripting, what about Python? :wink:
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Remember that a third party program can't interact with the RND engine in realtime (well... at least not my third party programs), the code you wrote above would in RNDDB (if using Pascal Script, I don't know the Lua syntax yet) become:

Code: Select all

CE[1].change_page[1].changecond:=smashed_by;
CE[1].change_page[1].conditionelement:=EL_ROCK;
CE[1].change_page[1].changetarget:=Fill(EL_EMERALD);
CE[1].change_page[1].changetarget[1, 1]:=EL_DIAMOND;
CE[1].change_page[1].changestyle:=CHANGE_WHEN_DESTRUCTIBLE;
(The names of the different stuff here may not be correct, but that's the code style...)
For, while, and repeat loops will also be possible. Although the for loop style is not the same as the C style with the 3 parameters (initial action, condition, after action) but if you want a C style for-loop you could just do a work around with while.

Code: Select all

initial_action;
while (condition) do
begin
...
after_action;
end;
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

These scripting ideas are cool indeed! I'm just afraid that only very few people will use it... :-/
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Holger wrote:These scripting ideas are cool indeed! I'm just afraid that only very few people will use it... :-/
Yep... I'm afraid of the same thing. When thinking about the feedback I've got so far from RNDDB, I'm afraid not so many more people will use many future versions of it... :roll: An idea can be sooo great, but if no one uses it then it's no use... :roll:

(No, I won't stop developing RNDDB - at least not yet. I'll try to fix some bugs found in 0.9 and then continue working on 1.0 when I have the time... but if I won't get much feedback then either, then there's a possibility that it will be stopped)
User avatar
Alan
Posts: 661
Joined: Fri Jun 18, 2004 7:48 pm

Post by Alan »

(No, I won't stop developing RNDDB - at least not yet. I'll try to fix some bugs found in 0.9 and then continue working on 1.0 when I have the time... but if I won't get much feedback then either, then there's a possibility that it will be stopped)
Don't let that put you off. Do it for yourself first! But then again.....

Count yourself lucky you don't get the kind of feedback I do (mainly from Sascha). It is "feedback" like his that kills any incentive to fix a problem. As for Confedit2, well what's the point? :(

This unfortunately this is starting to apply to levels and demos to.
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

I strongly agree with Alan here.

Getting such "It does not work" style feedback is really bad. Especially if you take the time to ask a lot of questions ("What are the exact symptoms of 'It does not work'?", "What is written in 'debug.txt", "stderr.txt" etc.?", Which operating system are you using?" and so on), and the only answer you get is something like "It still does not work!!! HELP ME!!!". You then start asking yourself why the heck you spend your precious time trying to help those users. (This rant is *not* directed to any specific person or forum user, although I really thought about posting to that thread Alan is referring to, and only refused to write anything because it seemed that the problem was already solved somehow...)

So, please: Think about the time people spend to help you, and also spend some time yourself when asking for help. And maybe even think about the time some people put into software you use for free...

Zomis, feel free to split these posts away from your main thread if you think that it's too much off-topic... :)
HerzAusGold
Posts: 362
Joined: Sun Sep 25, 2005 4:41 pm
Location: Germany

Post by HerzAusGold »

This unfortunately this is starting to apply to levels and demos to.
But a response is better as NO response.

Up to now I don't know if someone use my "learn mode" or find my website usefull...

@Zomis: Can you share/send your source for RNDDB to me. So I can took a deeper look on it? (Delphi should be no problem)

@Alan: I'm not familiar with CE's at all. So I dont use your tool. Sorry.
May be a poll "Who use ConfEdit" is usefull.

@Holger: and of course, each answer helps...
And the answer is ... 42 !
User avatar
Alan
Posts: 661
Joined: Fri Jun 18, 2004 7:48 pm

Post by Alan »

You then start asking yourself why the heck you spend your precious time trying to help those users.
Yep.......that says it all.
And maybe even think about the time some people put into software you use for free...
I think this gets forgotten way too much, this goes for programs and levels to. I always try to test and comment as much as I can....but I can't multitask anymore because my "new" PC.....so it's a drag having to come off-line to play RND.
But a response is better as NO response.
That depends on the response IMO............ Silence or flames?
May be a poll "Who use ConfEdit" is usefull.
Maybe not ;-) , I think I'd like to forget about Confedit now......besides it has terrible memory leak in the PCX viewer! (a poor excuse I know) :shock: :oops:
HerzAusGold
Posts: 362
Joined: Sun Sep 25, 2005 4:41 pm
Location: Germany

Post by HerzAusGold »

That depends on the response IMO............
Yes of course. The response should be fit to the thread and should be usefull. IMO a pro *and* contra view to the things is usefull.
And it should be a little more as "Mostly harmless" like in H2G2... :wink:

Btw: some posts here should be splitted (to off topic)
And the answer is ... 42 !
Post Reply