sf1.15
版本发布时间: 2024-07-17 03:31:22
emicoto/DOLMods最新发布版本:sf1.15(2024-07-17 03:31:22)
latest updatelog
-
update longer combat to latest version
-
temporary fix latest i Candy Robot for SF 1.15.
-
fix nodes error when trying find valid node on applyzone (2024.7.24)
-
add new method
.randPop()
.randPopMany(number)
, can randomly pop an or some elements , both to array and string method. example:
function ABGame(length) {
const arr = [1,2,3,4,5,6,7,8,9]
let answer = arr.randPopMany(length)
}
let arr = [1,2,3,4,5]
// random delete an element
arr.randPop()
let str = 'abcde'
// random get an alphabet
let alphabet = str.randPop()
let str = '一个汉语名字常见文字表'
// random generate a chinese name
let name = str.randPopMany(2)
In this new version, the injection has been rewritten in dynamic modification, drastically reducing the dependency on the vanilla DOL. Whatever how the vanilla DOL updated in the future, it will no longer have any impact on the simple framework, and the mod based on framework. 在这个新的版本,重写了注入增加内容窗口的方式,改成动态修改,大幅减少了对游戏本体的依赖。无论日后DOL本体如何更新,都不会再对框架有任何影响,也难以影响以框架为基础编写的模组。
And at the 1.14 version I add new support for time and event handle. 另外再1.14版本时增加了增加支持时间与事件的处理。
how to regist your time event: 如何注册你的时间处理与事件:
new TimeEvent(timeType, eventId)
.Cond((arg)=>condition expression)
.Action(function(arg){ do something })
Use new TimeEvent this method to create a new instance to assign your time event object. 使用new TimeEvent这个方法来创建新实例来即时创建并注册你的时间事件。
then use chain function .Cond to add the trigger condition and .Action to create process function. 然后你可以使用链接函数.Cond设置事件触发的条件,以及使用.Action来制作时间处理。
The registration will be done at the same time when the instance be create. 注册会在你创建object的同时完成。
available timeType: 可用的所有事件类型:
onBefore -- the event before all time process, your event process function will receive passData as first argument. -- 在所有时间处理之前需要执行处理的事件,你的事件处理函数将会获得一个passData作为参数。
onThread -- the event on the main thread, this is async so only use when you really need to make your own time process thread. your event process function will recieve timeData as first argument. -- 主线程上的事件,这是异步的,因此只有在真正需要创建自己的时间进程线程时才会使用。 你的事件处理函数将会获得一个timeData作为参数。
onSec onMin onHour onDay onWeek onMonth -- the event on second/minute/hour/day/week/month process. your event process function will recieve timeData as first argument. -- 以秒/分/时/天/周/月为单位处理的事件。你的事件处理函数将会获得一个timeData作为参数。
onAfter -- the event on after all time process. your event process function will recive timeData as first argument. -- 在所有时间处理结束之后才会处理的事件,您的事件处理函数将获得一个 timeData 作为参数。
Add method to check is running the vanilla event or not.
But only for cases where eventpool is used and <<xxxxevent>>
(widgets names that includes 'event'). Not all events are detected.
If the DOL is using a very primitive way to trigger or write a events, there's no way to detect whether it's running some event situation or simply displaying a location unless you interfere with the source code directly.
I had strongly suggested that DOL develop team use the event framework I have provided to refine the procedural constructs that a simulation game should have.
But hopelessly, their technical skills clearly don't support them in doing so.
增加了是否正在进行事件的通用检测方法 eventCheck()。
但只针对使用了eventpool以及 <<xxxxevent>>
(名字里带有event的widget)的情况。不是所有事件都能检测出来。
如果DOL用了十分原始的方式来触发或书写事件,那么除非直接对源码进行干涉,没有任何方法可以检测出来它到底是在运行某个剧情事件,还是只是单纯地显示一个地点。
我曾经强烈建议DOL制作团队使用我提供的事件框架,完善一个模拟游戏应该有的程序构架。
但无奈的是,他们的技术能力明显不支持他们这么做。
Add new method and macro to add your header message. the message will appear on the effects text area. 增加新的方法与macro来添加通知文本。通过HeaderMsg会显示在上方效果文本区域。
HeaderMsg.add('any text content')
<<addHeaderMsg 'any text content'>>
When the HeaderMsg receives the text, it will not be displayed immediately, but will be feed back to the text area as the result of the player's operation after the operation is completed. The HeaderMsg is able to receive multiple texts at the same time and sort the queue, which will be cleared automatically when the display is finished. If you use HeaderMsg to make feedback text, you just need to throw the text into it, and you don't need to do any additional coding work.
当HeaderMsg这个处理器接收到文本后,不会立刻显示出来,而是会在玩家操作完成后作为操作结果反馈在文本区域。HeaderMsg处理器能同时接受多个文本并进行排序队列,当显示结束后会自动清除。 使用HeaderMsg来制作反馈文本的话,你只需要直接往里面扔你需要显示的文本,再也不需要做任何额外的处理了。
add htmlTools and parseXml. 增加了htmlTools工具集以及parseXml。
htmlTools provide some method to modify DOL text/link/element any thing showing on the web easily, and can insert your new element and content to any position you want. htmlTools 提供了一些方法,可以轻松修改 DOL 文本/链接/元素在网页上显示的任何内容,并可以将新元素和内容插入到您想要的任何位置。
Those method will need some js skill, please check the detail at js files. 详细请看js文件内部的说明。
And parseXml converts xml documents into objects that can be read in the js environment. PS, twee files can be write as xml files. 而parseXml则可以将xml文档转化为可以在js环境中读取的object。 顺带一提,twee是可以作为xml来录入的。
Adding xml is simple: 添加xml文件的方式很简单:
-
create a twee file and write a header in the same way you would write a passage 创建一个twee文件,并以写passage的方式写一个header
:: Your XmlObject Title [xml]
-
then start write your xml file in xml format. 剩下的直接按xml格式写你的xml档案。
-
use
SugarCube.Story.get('Your XmlObject Title').text
in js to get your xml source. 在JS中使用这个方法获取你的xml文件。 -
use
parseXml(source)
in js. 在JS中使用这个方法实例化你的xml档案。
Moving some of the asynchronous events to sugarcube's normal process dramatically reduces the probability of errors due to latency. 将部分异步事件移动到sugarcube的正常进程中,大幅减少了延迟导致的错误概率。
ATTENTION: !!! The new version of the Simple Frameworks does not support the old version of I Candy Robot !!! I Candy Robot still needs to update most of its code to the latest version of DOL and Simple Frameworks!
1、 i.Candy.and.Robot.ver2.4.5.1.fix.zip 211.59KB
2、 LongerCombat.ver1.2.0.build_1.zip 5.16KB
3、 Simple.Frameworks.ver1.15.3.build_5.zip 79.46KB