[3.2+] NullBot 3 ‘Reloaded’
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
Still trying to compile a list of what's needed, but currently swamped in bugs.
One thing that would be of great use is knowing whether eventGroupLoss() gets called before or after eventDestroyed() if a grouped droid/structure/feature is destroyed. I want to make sure I trigger events in the same order as they are in 3.2.
Also, if a droid gets transferred to/from another player (by nexus link or donateObject()) does it get removed from group? (If not, AIs will need to handle that)
One thing that would be of great use is knowing whether eventGroupLoss() gets called before or after eventDestroyed() if a grouped droid/structure/feature is destroyed. I want to make sure I trigger events in the same order as they are in 3.2.
Also, if a droid gets transferred to/from another player (by nexus link or donateObject()) does it get removed from group? (If not, AIs will need to handle that)
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
eventGroupLoss is triggered before eventDestroyed, every time a droid belonging to the group is destroyed (bug?).
If a droid gets transfered to another player via donateObject() or nexus link, or even transfered manually due to player being temporarily controlled by human via cheat more, it does get removed from its group.
If a droid gets transfered to another player via donateObject() or nexus link, or even transfered manually due to player being temporarily controlled by human via cheat more, it does get removed from its group.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
I wouldn't class that as a bug, as it can only pass in a single droid object to the event handler per invocation. I'm glad it happens before eventDestroyed()!NoQ wrote:eventGroupLoss is triggered before eventDestroyed, every time a droid belonging to the group is destroyed (bug?).
So, basically if owner changes the object is removed from whatever group the previous owner had it in? (just want to be super sure before finalising that big of code).NoQ wrote:If a droid gets transfered to another player via donateObject() or nexus link, or even transfered manually due to player being temporarily controlled by human via cheat more, it does get removed from its group.
Also, in case of a transfer, does eventGroupLoss() happen before or after eventObjectTransfer()? And what is the .player of the object passed in to eventGroupLoss() -- the new owner or original owner?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
Got carried away, will reply soon!
v3.0_alpha2 released.
I'm not ready to provide a complete changelog yet (too long). It now includes a Turtle AI with two subpersonalities (mg/cannons and mg/rockets). The AI also now has EASY difficulty implemented that doesn't concentrate research by choosing a subpersonality. Early game build order and micromanagement was improved, including picking up oil drums with early harass tanks. The AI now micromanages his tanks differently, depending on their weapon type (for instance, it doesn't fall back flamers behind when they're attacked, for they need to stay close to the enemy to make damage, but it does so with machineguns). Several new forms of adaptation were implemented, including more attention on separate consideration of offensive and defensive forces.
Requires the snapshot of at least 2013-02-05 (d07ea7). Will probably work on some earlier snapshots.
Has problems with saved games! Alpha1 too, actually. See #3927
v3.0_alpha2 released.
I'm not ready to provide a complete changelog yet (too long). It now includes a Turtle AI with two subpersonalities (mg/cannons and mg/rockets). The AI also now has EASY difficulty implemented that doesn't concentrate research by choosing a subpersonality. Early game build order and micromanagement was improved, including picking up oil drums with early harass tanks. The AI now micromanages his tanks differently, depending on their weapon type (for instance, it doesn't fall back flamers behind when they're attacked, for they need to stay close to the enemy to make damage, but it does so with machineguns). Several new forms of adaptation were implemented, including more attention on separate consideration of offensive and defensive forces.
Requires the snapshot of at least 2013-02-05 (d07ea7). Will probably work on some earlier snapshots.
Has problems with saved games! Alpha1 too, actually. See #3927
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
aubergine: When transferring via donateObject() or GUI, .player is equal to the old owner in eventGroupLoss, but equal to its new owner in eventObjectTransfer which occurs later (even when the AI receives object, not gives it, hence "from" is given as the second parameter). But when transfered via Nexus Link, eventDestroyed is also triggered after these two, and in it the .player is once again equal to the old owner.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
Urg, so eventDestroyed is being triggered due to Nexus link even though the droid isn't destroyed?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
Yeah, seems so.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
Ick, that's a bug IMHO - if droid not destroyed, why call eventDestroyed?
Anyway - anyone know what the body is for cyborg transport or super transport? I'm working on backporting buildDroid()'s auto-droidType from WZ 3.2 to 3.1.
Anyway - anyone know what the body is for cyborg transport or super transport? I'm working on backporting buildDroid()'s auto-droidType from WZ 3.2 to 3.1.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
The 3.1 backport uses enhanced game objects (they have a customisable prototype chain) -- should that effect be retained if the script is run on 3.2? Using the enhanced game objects allows custom properties and methods to be added to all game objects (or specific .type of game object) with very low overheads.
Status report of backport:
Progressing steadily, but taking much longer than I expected.
Status report of backport:
Progressing steadily, but taking much longer than I expected.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
Probably backporting throughout 3.2 minor releases would also be necessary (?)
Just do whatever is easier so far. If both is trivial to implement and easy to turn on or off, we can compare productivity benchmarks later.
Just do whatever is easier so far. If both is trivial to implement and easy to turn on or off, we can compare productivity benchmarks later.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
Yes, when 3.2 goes in to beta I'll do my best to smooth over changes in the betas so that the latest stuff can always be used wherever possible.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
Does eventDroidBuilt() get called if you addDroid()? And, if so, does the event occur during the addDroid() call or some time later?
Would true or false get output to the console? Anyone got time to find out?
Code: Select all
var foo = false;
function eventDroidBuilt(...) {
console(foo);
}
foo = true;
addDroid(....);
foo = false;
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
Droid doesn't get created, silently, never whether it's an AI script or rules.js.aubergine wrote:addDroid
Even tried the following:
Code: Select all
diff --git a/data/mp/multiplay/skirmish/rules.js b/data/mp/multiplay/skirmish/rules.js
index 246aa77..c9ac8cb 100644
--- a/data/mp/multiplay/skirmish/rules.js
+++ b/data/mp/multiplay/skirmish/rules.js
@@ -61,6 +61,8 @@ function eventGameInit()
setStructureLimits("A0ComDroidControl", 1, playnum);
setStructureLimits("A0CyborgFactory", 5, playnum);
setStructureLimits("A0VTolFactory1", 5, playnum);
+
+ makeComponentAvailable("MG1Mk1", playnum);
}
applyLimitSet(); // set limit options
@@ -183,6 +185,14 @@ function eventGameInit()
setTimer("checkEndConditions", 3000);
}
+function eventStartLevel() {
+ hackNetOff();
+ for (var playnum = 0; playnum < maxPlayers; ++playnum) {
+ debug(playnum, startPositions[playnum].x, startPositions[playnum].y, addDroid(playnum, startPositions[playnum].x, startPositions[playnum].y, "test", "Body1REC", "wheeled01", "", "", "MG1Mk1").id);
+ }
+ hackNetOn();
+}
+
// /////////////////////////////////////////////////////////////////
// END CONDITIONS
function checkEndConditions()
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: [3.2+] NullBot 3 ‘Reloaded’ ~beta~
beta1 released. I'm calling it beta because it now has most of the features of the original NullBot; i'm not sure i want to, at all, implement the rest the way they used to be.
This beta includes support for mobile sensor tanks and "!nb help" chat command. It also has some of the adaptation mechanisms reworked: for instance, it "understands" things like "MRAs are better than bunker busters against cyborgs, even though they're still mainly an anti-structure weapon".
This beta includes support for mobile sensor tanks and "!nb help" chat command. It also has some of the adaptation mechanisms reworked: for instance, it "understands" things like "MRAs are better than bunker busters against cyborgs, even though they're still mainly an anti-structure weapon".
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~
Try this for debug:NoQ wrote:Code: Select all
debug(playnum, startPositions[playnum].x, startPositions[playnum].y, addDroid(playnum, startPositions[playnum].x, startPositions[playnum].y, "test", "Body1REC", "wheeled01", "", "", "MG1Mk1").id);
https://developer.mozilla.org/en-US/doc ... /stringify
http://addons.wz2100.net/ developer