Scriptile development thread

Page 1/2
| 2

By wolf_

Ambassador_ (10109)

wolf_'s picture

14-01-2023, 08:29

Right, so, this will be the development thread for Scriptile. Kind of like that long SymbOS thread elsewhere in the forum. So, in this thread you can show scripts, try out scripts that have been posted, request and discuss commands, report flaws/bugs 'n such.

If you request commands, you should foremost think about small parts. It's like LEGO; Even the most complex LEGO castle is built out of simple bricks and scriptile is mostly about these simple bricks. So, don't ask for commands that draw the whole Princess Maker game for ya. You can however think along how to bring down high-level artwork to simple math and procedures. It should be noted however that if you want to draw human figures, then you probably are a designer already, and you probably are using tools like Photoshop already. Scriptile is not really made for you then. One could ask for high-level things, but in its core, Scriptile was made for tiles, like those with which we make games.

It will be a living piece o' kit, with new versions appearing frequently. And keep in mind: because it's all script, a new command is not much more than adding a class function and linking it to the right editor.

And before you ask: the initial release still requires a number of fundamental additions. I know! But one can code forever and never release these kinds of tools, as they're never finished. This whole Scriptile project already took the better part of the last three years anyway. And some might argue I should do more music instead. Smile Before anything else I'm mostly interested in community response.

So, disclaimer: there are working commands that probably haven't been documented yet. There are commands that work for tiles that could also work for maps, but haven't been linked to maps. The manual and command reference may not be 100% complete. All in good time!

So, off you go, let's script something!

The latest one can always be downloaded here.
Video tutorials will be added to this playlist.

Login or register to post comments

By konamiman

Paragon (1198)

konamiman's picture

14-01-2023, 11:41

I'm curious about the guts of the tool itself. What language is it developed in? Is there a GitHub repo or something to look at?

By wolf_

Ambassador_ (10109)

wolf_'s picture

14-01-2023, 12:01

Blitzmax 1.41 (which is a dated old version).

No Github, nor are there opensource intentions.

By wolf_

Ambassador_ (10109)

wolf_'s picture

14-01-2023, 12:09

Either way, the actual core is rather small and is mainly about the parsers and the way editors and units are initialized. By far the biggest part of the source is the actual effects. So, imagine you have a 2d array, how would you fill that with a rect, a line, a circle, a gradient? How would you rotate that unit, how would you fill it with noise? As pointed out by the LEGO bricks reference: the basics are really simple, anyone can do that.

There are only few somewhat larger functions, usually these are commands that have several sub methods within a large switch statement. Most commands are just a few lines of code, really.

By Bengalack

Paladin (747)

Bengalack's picture

14-01-2023, 17:40

Very, very impressive tool Wolf! So many possibilities Smile

By wolf_

Ambassador_ (10109)

wolf_'s picture

15-01-2023, 12:00

Killing some time during tv for an hour.... add code, add music, done!

palette##class pal;palettes 1;presetpalette vdp;changes 1 2 3 4\.npf 7 0 7\.n{p\.n0 0 0\.n3 1 0\.n5 2 0\.n7 4 0\.n7 6 2\.n7 7 5\.n\.n1 1 1\.n3 3 3\.n5 5 5\.n7 7 7\.n\.n0 0 3\.n0 0 6\.n1 1 7\.n2 2 7\.n}@@graphics##class tile;tiles 64 16 16 2 2;changes 2 3 4\.nseed 666 ' <- choose your wood grain here!\.n\.ntile 32\.n<16\.nnoise 0 15\.nblur 8\.nallcolors add 2 1\.nallcolors div 2\.nlimit 3 4\.ninctile\.n>\.n\.n<16\.nnoise 0 15\.nblur 0 8\.nallcolors add 2 1\.nallcolors div 3\.ninctile\.n>\.n\.ntile 16\.nrtile 64 64\.nfull 10\.nrect 8 8 48 48 3\.nstroke3 8 5 3 1\.nstroke3 9 4 3 2\.nstroke3 14 2 3 4\.nstroke3 15 1 3 5\.n\.nsplit 8 9 9 10 11 12 12 12 13 13 13 13 13 14 14 15\.ngtile\.n\.ntile 6\.ncircle 7 7 6 9 1\.nreflect 1 1\.nblur 1 1\.nlimit 6 9\.nreplace 6\.noutline back 6\.n\.ncni\.nreplace 6 2\.nreplace 7 2\.nreplace 8 1\.nreplace 9 6\.n\.ntile 5\.nrtile 64 64\.ngradient 0 .25 2\.ncdiffuse 16\.nallcolors div 4\.nallcolors add 10\.nsplit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31\.ngtile@@board##class map;tiles 1;rooms 1;makeroom 16 12\.nchanges 4\.n\.n{setmacro b\.n8 9 9 9 9 9 9 9 9 9 9 10 n\.n11 1 2 1 2 1 2 1 2 1 2 12 n\.n11 2 1 2 1 2 1 2 1 2 1 12 n\.n11 1 2 1 2 1 2 1 2 1 2 12 n\.n11 2 1 2 1 2 1 2 1 2 1 12 n\.n11 1 2 1 2 1 2 1 2 1 2 12 n\.n11 2 1 2 1 2 1 2 1 2 1 12 n\.n11 1 2 1 2 1 2 1 2 1 2 12 n\.n11 2 1 2 1 2 1 2 1 2 1 12 n\.n11 1 2 1 2 1 2 1 2 1 2 12 n\.n11 2 1 2 1 2 1 2 1 2 1 12 n\.n13 14 14 14 14 14 14 14 14 14 14 15\.n}\.n\.ndrawmacro b\.nmakediffuse 16 16 20 24 28\.nmakediffuse 17 17 21 25 29\.nmakediffuse 18 18 22 26 30\.nmakediffuse 19 19 23 27 31\.nmakediffuse 1 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47\.nmakediffuse 2 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63\.n\.nvar x 12; var t 16;<4\.nrect #x 0 1 12 #t\.nincvar x; incvar t\.n>\.ndiffusemap@@stones##class map;tiles 1;rooms 1;makeroom 16 12; changes 4\.n\.n{setmacro stones\.n0 7 0 7 0 7 0 7 0 7 n\.n7 0 7 0 7 0 7 0 7 0 n\.n0 7 0 7 0 7 0 7 0 7 n\.n7 0 7 0 7 0 7 0 7 0 n n n\.n0 6 0 6 0 6 0 6 0 6 n\.n6 0 6 0 6 0 6 0 6 0 n\.n0 6 0 6 0 6 0 6 0 6 n\.n6 0 6 0 6 0 6 0 6\.n}\.ndrawmacro stones 1 1@@game##class list; lists 1; makelist 2 2\.n' press [2] on the output canvas to see\.n\.n' value x y 1 = tile set\.nvalue 0 0 1\.nvalue 0 1 1\.n\.n' value x y 2,3 = map\.nvalue 1 0 2\.nvalue 1 1 3

By Bengalack

Paladin (747)

Bengalack's picture

15-01-2023, 20:25

Cool.

Not Chess... Go?

By pizzapower

Master (165)

pizzapower's picture

15-01-2023, 21:51

Does it work on Linux using Wine?

By wolf_

Ambassador_ (10109)

wolf_'s picture

15-01-2023, 22:00

No idea. Wink How about trying?

By pizzapower

Master (165)

pizzapower's picture

15-01-2023, 23:31

It opens on Wine after I installed the 32bit mesa-dri drivers on Fedora, but it is unstable and crashes frequently. I couldn't get past TXT import every time.

By wolf_

Ambassador_ (10109)

wolf_'s picture

15-01-2023, 23:44

Then there's your answer.

Page 1/2
| 2