CE Scripter BETA 2 for Windows/Linux Released!

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

Moderators: Flumminator, Zomis

Post Reply
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

CE Scripter BETA 2 for Windows/Linux Released!

Post by Zomis »

After a few days of massive working on the CE Scripter for RnD, it's now time to release a BETA-version.
It feels like I've forgot to mention something here, but hopefully I haven't.

Current limitations:
- Editing descriptions and name/author descriptions
- Modifying Group Elements
- Linux executable is quite big, I will try to shrink it later using UPX.

CE Scripter uses Pascal Language.
You can get some information about the Pascal Language here:
http://en.wikipedia.org/wiki/Pascal_%28 ... anguage%29

I will try to write a better documentation about CE Scripter later. Remember that many things that's possible in the Pascal language isn't possible in CE Scripter. Suggest something and I'll see what I can do to implement it in the scripter.

10 (more) things to remember
1. I am not responsible for the scripts you create, neither for the scripts you run.
2. Make Backups, backups, backups! In case things goes wrong
3. Don't try to access or change element_info[359] and below or element_info[655] and above, those might result in errors in your level, in the program, or elsewhere on your computers memory.
4. Handling custom element's change conditions and change page actions can be difficult. Even though you set the CE action parameter in RnD to 1000, doesn't mean that you can set it to 1000 in a script and expect the same result.
5. If you feel insecure, start without actually changing anything, try write a script which just gets tons of information from a level.
6. Variables and constants do not define themselves. level and element_info are already defined, use them to manipulate levels.
7. The string '1000' is not equal to the integer 1000. Use typecasting - StrToInt and IntToStr are useful functions.
8. Repetition is the mother of all knowledge.
9. Repetition is the mother of all knowledge.
10. Feel free to contact me for any kind of support or chatting.

Contact information for author of RnD Scripter, Simon Forsberg:
E-mail: zomis2k@hotmail.com
Website: http://www.zomis.net/rnd
Discussion forum for Rocks'n'Diamonds: http://www.artsoft.org/forum


What you cannot do with scripts:
- Interact directly with the Rocks'n'Diamonds executable
- Use Dynamic-Link Libraries (DLL's)
- Use pointers and pointer types

Some basic functions and procedures you can use in scripts include:
procedure Mess(const S: string); - Outputs a line of text to the log
function Its(const i: integer): String; - Short version of IntToStr, convert an integer to string
procedure Messi(const S: String; const i: array of integer); - Instead of typing Mess('text' + IntToStr(int) + ', ' + IntToStr(int2)...., use this procedure to show the string contained in S and all integers of the array i.
function CE(const cenumber: integer): integer; - Get the element number of a Custom Element, CE(1) = 360.

And last but not least,
Download CE Scripter for Linux: http://www.zomis.net/rnd/download.php?id=476
Download CE Scripter for Windows: http://www.zomis.net/rnd/download.php?id=597
Here is a list of stuff you can use in CE Scripter: http://www.zomis.net/rnd/download.php?id=599

As an example, you can use this level: http://www.zomis.net/rnd/download.php?id=595
And this script: http://www.zomis.net/rnd/download.php?id=598
The script will, the first time you run it, output all the rooms to the playfield for easier modification. When you run the script again, it sets the playfield to the custom element targets.
Last edited by Zomis on Sun Dec 17, 2006 2:30 pm, edited 2 times in total.
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Just updated the doctypes document and world script.
doctypes document converted to DOS format (with both Carriage Return and Line feed)
world script converted to DOS format and changed 'EL_CUSTOM_START' to '360' which is the real value for EL_CUSTOM_START

(EL_CUSTOM_START is a constant in the RnD source, that constant and a couple of other constants will be avalible soon in a script)

Tip of the day, rotating content:

Code: Select all

procedure RotateContent(var content: TContent; steps: integer);
var
  a: TContent;// temporary array for elements
  i, x, y: integer;
begin
  for i:=1 to steps mod 4 do// 4 steps = total turnaround
  begin
    for x:=0 to 2 do for y:=0 to 2 do a.e[x][y]:=content.e[x][y];
    for x:=0 to 2 do for y:=0 to 2 do content.e[x][y]:=a.e[y][2-x];
  end;
end;
Call like this:
RotateConent(element_info[360].content, 1);
to rotate explosion content of CE1 90 degrees right.
HerzAusGold
Posts: 362
Joined: Sun Sep 25, 2005 4:41 pm
Location: Germany

Post by HerzAusGold »

Download or Info don't work.
This message appear:
Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /var/www/zomis/rnd/download.php on line 15
id parameter not set
And the answer is ... 42 !
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

HerzAusGold wrote:Download or Info don't work.
This message appear:
Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /var/www/zomis/rnd/download.php on line 15
id parameter not set
That's because someone changed the register_globals value to off on the server. It's now set to on again and everything should be working as normal. (I'm working on building safer code, but I think the code is already quite safe...)

Has anyone used RnD Scripter yet? I can see that some people have downloaded it, but I don't know if anyone has used it.
Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Post by Tomi »

I tried to Run the script (immediately after starting the program), and got this error message window:
./rndce wrote:Unable to open file "types2.zce".

Press OK to ignore and risk data corruption.
Press Cancel to kill the program.
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Crap crap crap crap...
I thought I tested the program enough, but apparently I didn't...:oops:

I thought that error would never show up. I thought about that problem a while ago, but it didn't happen for myself without a typesa.zce so...:oops:

But oh well...
I will fix that problem (but I think that simply pressing "Ok" should work... did you try that?) and also add some few things.. I think a new version will be released tomorrow (I've had a pretty hard day today...)
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

RnD Scripter BETA 2 is now released!

If no more bugs are found, this release will be identical to RnD Scripter 1.0

Fixes:
- types2.zce is no longer included by default (Preventing the 'Unable to open file "types2.zce".' message)
- Editing descriptions of CEs and GEs and editing name/author is now possible
- Group Elements can now be modified (Added a GE(x) function to convert GE number x to real element number to use for the element_info array)
- Linux executable is now smaller

Download RnD Scripter BETA 2 for Linux: http://www.zomis.net/rnd/download.php?id=476
Download RnD Scripter BETA 2 for Windows: http://www.zomis.net/rnd/download.php?id=597

And here is the list of stuff you can use in CE Scripter: http://www.zomis.net/rnd/download.php?id=599

There's still no better documentation than this though :(
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

RnD CE Scripter now has a little better documentation:
http://www.zomis.net/rnd/rndce

PLEASE let me know if you are using or have tried RnD CE Scripter! Feedback will give me more motivation to develop RnD utilities.

There will probably be a BETA 3 before the 1.0 version (however, the program is "finished" already, I just come up with more features which are really good to have in the program, and also found a minor bug to fix).

If you'd like help to make scripts, just contact me, I'd be happy to make them for you! (I really enjoyed making the World Making Script! :D).
Post Reply