萌新练手-搓个简单的小blockly-选择

这个好玩,选择困难症患者福音

3 个赞


关于列表功能的练习
输入“列表”输出“13”
希望它以后能用来实现跑团骰子里的.st的效果

发现一个有点妙的功能:虽然这些块不能实现插件间的复制粘贴,但只要复制一份丢到垃圾桶里,就可以在别的插件里捞出来了

7 个赞


列表功能练习2,将输入的文字转换为临时的列表
输入“设置 力量70,智力60”
输出“力量70,智力60”
并且中英逗号友好。

3 个赞

来了来了,顶上去让更多人看到

3 个赞

很棒的例子示范!

我觉得复用写好的块是很有意义的需求,这一点可以向 blockly 作者提出,@TimeBather

4 个赞

更新:1. 【选择】从二选一进化成了多选多!2. 列表功能的进一步使用。3. 增加了简单的循环功能练习。4. 一些关于debug的技巧。


当输入“套餐 3 麦乐鸡,薯条,鸡肉卷,牛肉堡,可乐,甜筒”时,套餐被激活,从给定的选项中随机选择3个选项,输出“套餐: 可乐; 薯条; 甜筒;”
这个模块使我们可以从多个待选项中选择多个目标。进一步解决温饱问题。
一些很笨但有效的debug办法:
因为即使插件出问题,日志后台也看不到具体问题出在哪一步,所以我在调试时每一步都建了个”发送指定的参数消息“,根据收到的消息来判断在问题出在哪一步。
举例:

可以看见我测试时多加了很多发送消息块。五步一岗,十步一哨
调试完毕最后再把它们丢出去。

下一个目标:合并选择与套餐,并让它接上疯狂星期四之类的接口

3 个赞

更新:将【套餐】合并进了【选择】


输入:“选择 2 可乐,炸鸡,薯条,汉堡”
输出:“可乐; 汉堡;”

注:这里把左边指令里的参数中的[整数类型]参数设置成了不必要的,这样如果发送者没有指定要选多少项内容,则默认提取一项

2 个赞


重新搓了rd,不写数值就默认返回1-100,不写名称就只返回数值

2 个赞

现在可以使用分享功能了,升级最新版然后把每个文档的Blockly代码导出出来贴到论坛里来吧!

5 个赞

更新:有分享功能了!分享昨天重写的【选择】和【rd】

摘要

插件名称: 选择
导出时间: 2023/2/12 00:34:05
-=-=-=-=–=-=-=-=- BEGIN KOISHI BLOCKLY BLOCK V1 -=-=–=-=-=–=-=–=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JYyOgps3KuyFeTTJP8pi04GP3INmfQ1x
doZt828x2rwNgmXe94mSv83l790d+yqXnW4dvsXlW76BHOQWQiqyaX2AEjo9+BOp
ZxrutxvacHLh43eQJ52MYK/EuvTifeLilVxy0ACSR28A/XO0+dlLfD90he7qlaMY
aiYHij6VytY2kQKHd7A2tOx6bsjx+5dJ7v8c7sUe0lbWCFeuBF+b1q1s6OUlXzNF
eN7DUAXRMFARI98f3lpD89ARdn4xlJCAZXY9HV23dJIZO0zSwWXf/wF7dZU+5i0A
AA==
-=-=–=-=-=–=-=-=-=- END KOISHI BLOCKLY BLOCK V1 -=-=–=-=-=–=-=–=-=-=-

摘要

插件名称: rd
导出时间: 2023/2/12 00:38:54
-=-=-=-=–=-=-=-=- BEGIN KOISHI BLOCKLY BLOCK V1 -=-=–=-=-=–=-=–=-=-=-
H4sIAAAAAAAAA9VYaXOiShT9LSmlKlFUQBFwyooLmLivYxK/UKgIKIthMZoP+e3v
trtEjG8m86ZelZXQTXef0+fcvnQ3xhQwilrItqNZJjxlSBz+Dq3xChWw9duhbo1m
zqGsS6biSYrcP/Qi8NN2dGHT1F3N5XUFRY0sw5DMMTyhttp4W91Qp1iaeIhYZuFu
0qnnYz9fY2R222qJGsVoDj2vCVEkg57lpWtLXVdy5QOruWRLhuwCpxMGJlRuoTCB
xtgSxsJDGuNorECgGo7AWB4TGCzPoJoNsC2/epotr0lOJN2R8dPJOK6tmYq4x0Sj
Mzz+JyE10/XjYTS/RqWoiSbr4yOLjijY4x05NMbcc4+aSSN3a+CR04fiETq8kHRx
LI90oIA6iQ6S35BN1+9o6Qaj6BV564AHOttPx0NdZ9QehLbtfN4Bt2TR8Fxpw4RY
GrrpZDG6CG9U151nEom3t7f4WzJu2UqC5DgusVRdQ9+0wJICdF+T20yZQP+23ZHC
XAHLC0j8PGjOHHdKHHptynsSUNxQ9avaz3eIvbGfxg5UmReKNeIakRXZFSVb8c6p
ymG0kJqTZKssGAQLzvefoCZZTNMBZDc9CRQmzC5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thYlUOD3oXwj1o7X2K8q2RXr6wkRHaiNUX72MIa7nVLl9QjGZ3lNkuGsZ
HkzY3TCcpXjhYJG01ce88dGFgOv36FC5++H1vMcTZsSeWCyVPMfsLKYvqYnap1un
3JvWAO9e2s92rB+BfC9E0KWFUFwew1M0s8dnqavhr3Gl0m956JIqXxHeyZrDV4d9
luePwRnicO1FwgnnX9ty4QDxmfOF7HAXyuS6r+OSK5ILNUuwduGmcqISyx7u586a
dCGFEEGEHFlBp2JR+iSdiM7FpbL18KHzzfuHBGJMN2Ynq45hqAMngg0i5U/onrOe
/tfJdBdhqMOZ8GKfmmVK7ReW40GUVNhqSsgPtm3ORNCFnBOswlLN3E647lPbqOBz
FTpHwnLpsLXcqJA+CiEmMPf8KRVQqllQhfQwCgaNY9mXPBlulY2bK5TY3Gxuvyxn
LjP/AbpCPHW3FgAA
-=-=–=-=-=–=-=-=-=- END KOISHI BLOCKLY BLOCK V1 -=-=–=-=-=–=-=–=-=-=-

3 个赞

喜报:找到识别文本中关键词的办法了
悲报:更新后经常亮蓝灯并且出现问题,于是决定少设参数


之前很想要的插件:是 不是
输入“是xx还是yy"
输出”xx“/”yy“

复制码:

摘要

插件名称: 是 还是
导出时间: 2023/2/13 00:41:33
-=-=-=-=–=-=-=-=- BEGIN KOISHI BLOCKLY BLOCK V1 -=-=–=-=-=–=-=–=-=-=-
H4sIAAAAAAAAA9VZaXOqShD9LSmlSo0LSxCXsgwIGBfUC7jdL9YoGDEsCmgkH/zt
b3BJjBFDcpf3XpVFGJiZPtNzuk8PQSgGwfG1ajuaZcK7ApaE17GleH4D2b0d69bk
yXlr68B8XIFHtfc2Ck2+70cy+66ut1B3D3Dc0BRFV5+B7T/wu2vK4U0Rwclix0tN
6imAZNEioyEkV1ZKK+bQc+N3TOWzlN/YAcPQ3b1mLlbuCbIJ0PUxmDydYX9rnuCZ
WKZrW7oz0qbngDTJYeES7hY2QrJc6hbv1jFSzsaO/c6s1ng0jEHdetQmI2uh2sDd
u+2d0R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HzjYStcsipNNIy9ouhw0kL
QGcraovww1ilzco8f3M8vXyqQnsMeGgMwNbcmaG62uQcx3jUde7L1FN14Vbh2MoG
o+qDUgCO1+Qu1FpdKXgrTvL797Icpo8ddEBk5nUqMZ6U+bZLbK/7BgtbtwQVjFBC
yvdwhh/PtTtFQKNFOLqwNeH1ZRhg+q+XjXRis2U3RFqL1choR+/Va9oG+X+XjcPS
wEs/xDu3P287nNDLL9D5zxAGv1Uwfo+Lz/1WjdN46J2GLWiJSFeK44t2KDaG/PkT
cU0pJEM+l78cmvbZ3HyaA1ZecA8PQ1KyjmefPyF9bgI06ytXINFhy47d+BIIqwCm
h/xXpA+O6DOep/gfICh2Q7MUQrLRZr+Z77uXQX5ZAL/9pSKcAjbpawnmt2mfWYgz
0Vy3HB3oXvaljiaduYB8V/mCVYeY6un+AK3PfsJ9yMYXyyzkS0HrBvjp7UMaG+5D
2vcivQw7m/cinD4/NnUlOfSPYXADSAEeMIL28HfpT3pJp0cwrZCxXr1t9nwUeDqS
WQaY/evaw8NTBlOC8uCgo+ZajFYjPQ62tN4S+X8rkCXGFAas7/iC3je664Kd8Dc7
G3TA/ZdUiNApSqv3RVgWzRy0EMNjWJBOhvhm8YUfeVzCGoYzGOvq+/8emMC46tz+
NsNiXo1t3MAhdqTP1vhS6eCm16lPJjlxJRrk338AreS4yxEZAAA=
-=-=–=-=-=–=-=-=-=- END KOISHI BLOCKLY BLOCK V1 -=-=–=-=-=–=-=–=-=-=-

4 个赞

小贴士,可以使用下面的方法来折叠

<details>
折叠内容
<details/>
折叠内容
4 个赞

另外,如果是代码块的话右上角会有复制按钮,也可以考虑使用

3 个赞

好的谢谢!学到了!等我等级升到能编辑帖子的时候就把它们折叠起来

2 个赞

更新近期进展:重新跟着视频学习了blockly的安装和开发,在这里更新一些自己踩的坑。

由于我个人的进度是前三集顺利,主要在第四集开发插件01出现困难,因此内容也会比较集中在开发问题上,可能有遗漏缺失的地方请务必去视频中确认,一切以视频和官方手册为准。

祭出第四集的思维导图:


血泪教训:请跟着视频一点一点一步一步走,千万别跳

问题1:创建插件不成功,安装git一路next但是失败,没有done而是报错,账户没设置。

详情

块引用
x yarn run v1.22.19
$ koishi-scripts setup random
V description: …随机
Initialized empty Git repository in C:/dev/koishi - app/ external/random/ .git/
Author identity unknown
*** Please tell me who you are .
Run
git config – global user . email "you@example . com”
git config --global user .name "Your Name "
to set your account’s default identity .
Omit --global to set the identity only in this repository .
fatal: unable to auto-detect email address (got ’ 1@DESKTOP -N5TH19T. (none)‘)
C: \dev\koishi- app\node_ modules \execa\lib\error .js:60
error = new Error(message);
Error: Command failed with exit code 128: git commit -m initial commit
at makeError (C: \dev\koishi -app\node_ modules \execa\lib\error . js :60:11)
at module . exports . sync (C: \dev\koishi - app\node_ modules lexeca\index.js:194:17)
at Initiator . initGit (C: dev\koishi - app\node_ modules @koishijs \scripts\lib\bin. js:136:26
at async Initiator . write (C: \dev\koishi - app\node_ modules @koishijs\scripts\lib\bin.js:91
at async Initiator .init (C: \dev\koishi-app\node_ modules @koishijs\scripts \lib\bin. js:64:
at async Initiator . start (C: \dev\koishi一app\node_ modules @koishijs\scripts\lib\bin.js:42
shortMessage: ’ Command failed with exit code 128: git commit -m initial commit’ ,
command: ‘git commit -m initial commit’ ,
escapedCommand: ’ git commit -m “initial commit”',
exitCode: 128 ,
signal: undefined,
signalDescription: undefined ,
stdout: undefined ,
stderr: undefined,
failed: true ,
timedout: false ,
isCanceled: false,
killed: false
Node. js v18.14.0
error Command failed with exit code 1
info Visit https://yarnpkg. com/ en/ docs/ cli/run for documentation about this command .

解决:按照报错中提示的命令输入

git config – global user . email "you@example . com”
git config --global user .name "Your Name "

问题2:无法发布插件

详情

块引用
PS C: \dev\koishi-app> npm publish - -workspace koishi -plugin- random-number --access public - -registry
8 npm WARN invalid config registry=true set in command line options
npm WARN invalid config Must be full url with “http://”
npm notice
npm notice koishi - plugin-random- number@o .0.1
npm notice === Tarball Contents ===
npm notice 217B 1ib/ index.d.ts
npm notice 517B lib/index. js
npm notice 352B package . json
npm notice 192B readme . md
npm notice ===
Tarball Details ===
npm notice name:
koishi - plugin- random- number
npm notice version: 0.0.1
npm notice filename :
koishi-plugin-random-number-0.0.1. tgz
npm notice package size: 809 B
npm notice unpacked size: 1.3 kB
npm notice shasum:
1b966420ab13f3047795b14e290f93ad36e6f5ac
npm notice integrity: sha512-Vbu7C9Q12Fgk5[ …]Z/vcU2SLZUbfQ==
npm notice total files: 4
npm notice
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in to https ://registry . npmmirror. com/
npm ERR! need auth You need to authorize this machine using
npm adduser
npm ERR! A complete log of this run can be found in:
npm ERR!
C: \Users\1 \AppData\Local \npm-cache_ logs \2023-02-15T19_ 22 28_ 644Z-debug 0.1og
。PS C: \dev\koishi-app> npm publish - -workspace koishi -plugin- random-number --access public --registry ^C
。PS C: \dev\koishi -app>[

解决:原因:和已有插件重名了,改个名字再发布

问题3:koishi1里跟着视频找不到文件夹在哪?为什么后续的create new什么的我都看不懂跟不上?为什么我的文件夹是external没有plugin?
解决:1. 这……不算是坑,不过我也没找到解决办法,所以我卸了跟着视频教程和手册重新安装了。一回生二回熟,在反复重装七八遍后已经是安装小能手了!总能成功的!我在后面的每次重装,都会把yarn和node之类的安装流程也重新走一遍,以免出现奇怪的因为安装问题出现的报错。
重装前请妥善导出并保管好您写的blockly插件副本
2. koishi某次更新后把plugin换成了external,咱们就拿external当视频里的plugin用。

问题4:怎么换行
解决:群里佬给出的换行符:

&#10; &#13; &#xd;

三选一即可。感觉这个问题还蛮多人问的所以记录一下,以后在论坛里就可以直接搜到了,记得带上分号
ps: 这三个符本来打出来是空格,但是通过帖子编辑右上角的【齿轮-预先格式化的文本】在``里输入就可以显示出字符形态。

问题5:全局设置了。和.,结果只有。能用?

解决:H4M5TER佬和ilharp佬给出了非常详尽的回答。重点在于理解条件配置是什么。
以此问题可以延伸到koishi的各项功能,作为萌新,通常不理解各项的具体功能,找到一个“看起来好像差不多能用”的便拿来试试,于是踩一堆坑。跟着教程和手册一步一步走真的很重要。这些是我把这些无论大小的事都记录下来的目的,作为经验的积累。

6 个赞

wow,好详细的踩坑经验分享!很多需要注意的问题点都覆盖到了,很详细,很不错!

4 个赞

很详细的教程,学到很多新的知识!

3 个赞

感谢你的总结!这里缺失的步骤现已加入文档。

4 个赞

可以加上使用指令参数实现.st功能!


后面都是类似这样的重复

3 个赞

很棒! 有没有兴趣开个帖子把插件分享出来~~~

2 个赞