Search found 31 matches

by wanjia1
06 Jan 2024, 04:38
Forum: Scripting
Topic: js function synchronizer
Replies: 3
Views: 1525

Re: js function synchronizer

screenshot:
by wanjia1
06 Jan 2024, 04:37
Forum: Scripting
Topic: js function synchronizer
Replies: 3
Views: 1525

js function synchronizer

some js function,like addDroid,is not synchronized. if it not called at all clients at the same tick,it will cause desync. although the function syncRequest(req_id, x, y, object, object2) products a synchronized eventSyncRequest(from,req_id, x, y, obj_id, obj_id2) it can only carry arguments of fixe...
by wanjia1
24 Dec 2023, 17:24
Forum: Ideas and suggestions
Topic: Challenges
Replies: 1
Views: 1835

Re: Challenges

there is a way to enable it: find the noplace.json (challenge "No Place To Hide"), it locates in [software install directiory]/warzone2100/mp.wz/challenges/. replace the option in json "locked": { "position": "true" }, with "locked":{ "ai":...
by wanjia1
24 Dec 2023, 09:59
Forum: Scripting
Topic: js type hints for AI scripting
Replies: 5
Views: 2023

Re: js type hints for AI scripting

bugfix: fixed return type of special cases fixed markdown document of eventSyncRequest: at version 4.4.2, if player 0 calls syncRequest(1,2,3) the expected event is eventSyncRequest(1,2,3,null,null) but, in fact it is eventSyncRequest(0,1,256,384,null,null), different to document. argument 0 is &quo...
by wanjia1
21 Dec 2023, 18:21
Forum: Addon discussions
Topic: dumb.js: a simple PSO based AI that stronger than bonecrusher
Replies: 9
Views: 4576

Re: dumb.js: a simple PSO based AI that stronger than bonecrusher

bugfix: now the AI can build VTOL and oil derricks. its performance in ntw Nobase | Lowbase 1v1 game is above hard bonecrusher and below hard cobra. also,it will build modules for structures. it still fails on low oil map (even weaker than nexus). because all truck will move to a structure that bein...
by wanjia1
19 Dec 2023, 08:43
Forum: Scripting
Topic: js type hints for AI scripting
Replies: 5
Views: 2023

Re: js type hints for AI scripting

a sample of jsdoc, in the pylint.js, reads as follow: /** Start factory production of new droid with the given name, body, propulsion and turrets. The reserved parameter should be passed **null** for now. The components can be passed as ordinary strings, or as a list of strings. If passed as a list,...
by wanjia1
19 Dec 2023, 08:37
Forum: Scripting
Topic: js type hints for AI scripting
Replies: 5
Views: 2023

Re: js type hints for AI scripting

bugfix:
remove attribute names of classes from constant hints
now every function have type hinting for arguments, in jsdoc format.
by wanjia1
17 Dec 2023, 14:45
Forum: Scripting
Topic: js type hints for AI scripting
Replies: 5
Views: 2023

Re: js type hints for AI scripting

bugfix:
fix some type hints that hint a wrong type.
type hinting for global constants.
by wanjia1
16 Dec 2023, 04:14
Forum: Scripting
Topic: js type hints for AI scripting
Replies: 5
Views: 2023

Re: js type hints for AI scripting

a fragment of the pylint.js reads as follow: var object=class { constructor() { this.type=0, this.id=0, this.x=0, this.y=0, this.z=0, this.player=0, this.selected=false, this.name="object", this.health=100, this.armour=1, this.thermal=1, this.born=0 }} var object0=new object() ... /**Retur...
by wanjia1
16 Dec 2023, 04:12
Forum: Scripting
Topic: js type hints for AI scripting
Replies: 5
Views: 2023

js type hints for AI scripting

I turned the Markdown Document of JavaScript Scripting API into a .js file: pylint.js When you open both your AI script and pylint.js in IDE like vscode, the type hinting will be enabled and you can see each function's document, type of arguments, type of return, like it is TypeScript. it also conta...
by wanjia1
02 Dec 2023, 08:35
Forum: Addon discussions
Topic: dumb.js: a simple PSO based AI that stronger than bonecrusher
Replies: 9
Views: 4576

Re: dumb.js: a simple PSO based AI that stronger than bonecrusher

bugfix:
now the AI can build defense structure,laser satellite and AAs.This make it competent for T4 games.
it can defeat any hard AI in 45 minutes,in any NTW Fullbase game.
by wanjia1
02 Dec 2023, 04:49
Forum: Addon discussions
Topic: dumb.js: a simple PSO based AI that stronger than bonecrusher
Replies: 9
Views: 4576

Re: dumb.js: a simple PSO based AI that stronger than bonecrusher

license:CC0
screenshot (AI attached player vs insane bonecrusher):
by wanjia1
02 Dec 2023, 04:44
Forum: Addon discussions
Topic: dumb.js: a simple PSO based AI that stronger than bonecrusher
Replies: 9
Views: 4576

dumb.js: a simple PSO based AI that stronger than bonecrusher

It a AI based on PSO algorithm,and it can defeat any insane AI in 15 minutes,only in NTW T1 Fullbase. It can also defeat 3 insane nullbot or 5 insane nexus in NTW maps. It only have 255 lines of code. It have no explicit tactic code,but simply cluster droids when attacked. It have no memory.everythi...
by wanjia1
01 Nov 2023, 18:16
Forum: Addon discussions
Topic: Modded map:2c-TinySoloNeedles
Replies: 2
Views: 1990

Re: Modded map:2c-TinySoloNeedles

screenshot:
by wanjia1
01 Nov 2023, 18:12
Forum: Addon discussions
Topic: Modded map:2c-TinySoloNeedles
Replies: 2
Views: 1990

Re: Modded map:2c-TinySoloNeedles

screenshot: