Page 1 of 2
RNDDB, ConfEdit and CE scripting (from Moving Colour Column)
Posted: Fri Jul 07, 2006 12:40 pm
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?
Posted: Fri Jul 07, 2006 3:44 pm
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)
Posted: Fri Jul 07, 2006 6:02 pm
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...

Posted: Fri Jul 07, 2006 7:33 pm
by Alan
I'm focusing on RNDDB instead
So will RNDDB be able to manipulate CEs? (I hope so)
Posted: Fri Jul 07, 2006 7:50 pm
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.)
Posted: Fri Jul 07, 2006 9:51 pm
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
Unfortunately, the problem for me now is lack of time (what else?

). 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.
Posted: Fri Jul 07, 2006 10:56 pm
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 ...

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 ...
Btw: If you can't decide between Lua and Pascal Scripting, what about Python?

Posted: Sat Jul 08, 2006 8:52 am
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;
Posted: Tue Jul 11, 2006 5:41 pm
by Holger
These scripting ideas are cool indeed! I'm just afraid that only very few people will use it... :-/
Posted: Tue Jul 11, 2006 10:22 pm
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...

An idea can be sooo great, but if no one uses it then it's no use...
(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)
Posted: Wed Jul 12, 2006 12:17 pm
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.
Posted: Wed Jul 12, 2006 8:35 pm
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... :)
Posted: Wed Jul 12, 2006 9:38 pm
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...
Posted: Thu Jul 13, 2006 11:50 am
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)

Posted: Sat Jul 15, 2006 2:36 pm
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...
Btw: some posts here should be splitted (to off topic)