This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
crpl:overview [2019/05/04 17:43] – [Notepad++] karsten75 | crpl:overview [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
====== CRPL - The Language ====== | ====== CRPL - The Language ====== | ||
- | CRPL (**< | + | CRPL (**< |
- | CRPL programming is similar to programming a HP calculator or Forth language programming. If this is not something you have done, read on for a brief introduction to CRPL and stack-based programming. <note>For a more detailed CRPL explanation, | + | CRPL programming is similar to programming a HP calculator or Forth language programming. If this is not something you have done, read on for a brief introduction to CRPL and stack-based programming. <WRAP info>For a more detailed CRPL explanation, |
Each CRPL instruction (term) uses one or more arguments that are on a " | Each CRPL instruction (term) uses one or more arguments that are on a " | ||
Line 20: | Line 20: | ||
< | < | ||
- | <note> | + | <WRAP info>You can find more commands and detailed explanations of them in the [[crpl: |
- | You can find more commands and detailed explanations of them in the [[crpl: | + | |
- | </note> | + | |
===== Comments ===== | ===== Comments ===== | ||
Line 158: | Line 156: | ||
Any text editor can be used to edit CRPL files. However, syntax highlight and auto completion support files are provided for several available editors. | Any text editor can be used to edit CRPL files. However, syntax highlight and auto completion support files are provided for several available editors. | ||
- | <note>See how others created their maps! You can extract the CRPL scripts and custom images from any CW3 game file. The guide to [[examine map resources]] will show you how to retrieve these resources from other maps.</note> | + | <WRAP info>See how others created their maps! You can extract the CRPL scripts and custom images from any CW3 game file. The guide to [[examine map resources]] will show you how to retrieve these resources from other maps.</WRAP> |
==== Notepad++ ==== | ==== Notepad++ ==== | ||
- | Notepad++ can be obtained from here: [[http:// | + | Notepad++ can be obtained from here: [[https:// |
+ | < | ||
* Once Notepad++ is installed you can add **syntax highlight** for the CRPL language. Currently there are two sample thems, one for the " | * Once Notepad++ is installed you can add **syntax highlight** for the CRPL language. Currently there are two sample thems, one for the " | ||
* Light theme: [[crpl: | * Light theme: [[crpl: | ||
Line 172: | Line 170: | ||
*You can add **keyword auto completion** to Notepad++ by download this file [[CRPL.xml]] | *You can add **keyword auto completion** to Notepad++ by download this file [[CRPL.xml]] | ||
- | * To install into Notepad++ you need to copy CRPL.xml to your Notepad++ install | + | * To install into Notepad++ you need to copy CRPL.xml to the '' |
* Alternatively, | * Alternatively, | ||
* Use the same process to install as above. To see the description of the command, type the opening bracket " | * Use the same process to install as above. To see the description of the command, type the opening bracket " | ||
Line 210: | Line 208: | ||
* All files with the *.crpl extension should now use this package. | * All files with the *.crpl extension should now use this package. | ||
- | =====Translation Front-end ===== | + | =====Translation Front-ends ===== |
- | Forum user [[https:// | + | * Forum user [[https:// |
- | There is a [[https:// | + | * Discord user Redcrafter# |
Time permitting, this deserves a more complete treatment and probably a section of it's own. | Time permitting, this deserves a more complete treatment and probably a section of it's own. | ||
Line 220: | Line 218: | ||
\\ | \\ | ||
\\ | \\ | ||
- | FIXME / DELETEME | + | |
=====Syntax Highlighting in the Wiki ===== | =====Syntax Highlighting in the Wiki ===== | ||
Dokuwiki uses [[http:// | Dokuwiki uses [[http:// | ||
+ | |||
+ | Code examples can be highlighted using the `4rpl` code tag eg: | ||
+ | |||
+ | <code 4rpl> | ||
+ | # --Volcano-- 5/13/2020 12:58:29 PM | ||
+ | |||
+ | $$POSX:154 | ||
+ | $$POSZ:98 | ||
+ | $$AMT:100 | ||
+ | |||
+ | if (GetGameUpdateCount 3600 % eq0) | ||
+ | true -> | ||
+ | endif | ||
+ | |||
+ | if (< | ||
+ | @Erupt | ||
+ | endif | ||
+ | |||
+ | if (< | ||
+ | 240 -> | ||
+ | true -> | ||
+ | endif | ||
+ | |||
+ | if (< | ||
+ | @OrbsErupt | ||
+ | endif | ||
+ | |||
+ | :Erupt | ||
+ | if (< | ||
+ | do(2 -1) | ||
+ | do(2 -1) | ||
+ | AddCreeper(< | ||
+ | loop | ||
+ | loop | ||
+ | endif | ||
+ | < | ||
+ | if (< | ||
+ | false -> | ||
+ | 0 -> | ||
+ | endif | ||
+ | |||
+ | :OrbsErupt | ||
+ | V3(RandFloat 0.5 - 1 * 2 RandFloat 0.5 - 1 *) -> | ||
+ | CreateOrb(V3(154 randint(-1 2) + 15 98 randint(-1 2) +) < | ||
+ | < | ||
+ | |||
+ | :once | ||
+ | Table( " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | </ | ||
+ |