Packing AIs into maps as map-mods
Packing AIs into maps as map-mods
Suppose i want to make a map with challenges with custom AIs.
The easiest way is to pack both the challenge .ini file and the AI script file(s) inside the map.
But packing AIs doesn't seem to be map-mod-safe in the following sense: you are able to select the custom AI for any map in any skirmish or multiplayer game, instead of being able to select this AI on this map only.
Now suppose human X has my map-mod with custom AIs, while human Y doesn't.
Situation 1: Humans X and Y try to play a multiplayer game on a completely different map with no AIs involved at all. What will happen? Will one of the players get kicked for incompatible data? If not, is it a bug or a feature? That is, will it stay that way?
Situation 2: Human X hosts a game on a totally different map and sets a few custom AI that is only found inside my map-mod. Human Y joins the game; he downloads the different map, but he doesn't acquire the source code of the AI from player X. What will happen when the game starts? Will player Y get kicked for incompatible data? If not, will there appear a desync because of incompatible AI behavior, or AI will run only on player X's machine and sync properly? If everything will work fine, is it a bug or a feature? I mean, will it stay that way?
The easiest way is to pack both the challenge .ini file and the AI script file(s) inside the map.
But packing AIs doesn't seem to be map-mod-safe in the following sense: you are able to select the custom AI for any map in any skirmish or multiplayer game, instead of being able to select this AI on this map only.
Now suppose human X has my map-mod with custom AIs, while human Y doesn't.
Situation 1: Humans X and Y try to play a multiplayer game on a completely different map with no AIs involved at all. What will happen? Will one of the players get kicked for incompatible data? If not, is it a bug or a feature? That is, will it stay that way?
Situation 2: Human X hosts a game on a totally different map and sets a few custom AI that is only found inside my map-mod. Human Y joins the game; he downloads the different map, but he doesn't acquire the source code of the AI from player X. What will happen when the game starts? Will player Y get kicked for incompatible data? If not, will there appear a desync because of incompatible AI behavior, or AI will run only on player X's machine and sync properly? If everything will work fine, is it a bug or a feature? I mean, will it stay that way?
Last edited by NoQ on 08 Feb 2012, 15:04, edited 1 time in total.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Packing AIs into maps as map-mods
If I understand correctly, by that you mean..NoQ wrote: But packing AIs doesn't seem to be map-mod-safe in the following sense: you are able to select the custom AI for any map in any skirmish or multiplayer game, instead of being able to select this AI on this map only.
"I have an AI designed for a specific map when played in campaign challenge mode. That AI should not be available on normal skirmish or MP games, it should only ever get used on the defined campaign challenge."
Is that correct?
Last edited by aubergine on 08 Feb 2012, 15:08, edited 1 time in total.
"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: Packing AIs into maps as map-mods
This is a good point, but i'd also add the opposite: "I've made a super duper AI suitable for all maps, so i want it to be easily shared in online games within map-mods, since maps are auto-downloaded".
Also, rather not "campaign" but "challenge". Challenge is a sort of skirmish rather that campaign.
Obviously, those two statements are contradictory. I'd prefer to resolve the contradiction by limiting the AIs to the maps they are packed into.
Also, rather not "campaign" but "challenge". Challenge is a sort of skirmish rather that campaign.
Obviously, those two statements are contradictory. I'd prefer to resolve the contradiction by limiting the AIs to the maps they are packed into.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Packing AIs into maps as map-mods
sorry - i made a typo, I meant challenge.
"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: Packing AIs into maps as map-mods
Hmm. I think packaging an AI with a map is very short-sighted and wrong. Unless that map is a total conversion of sorts (like a customized challenge), and then you want to replace everything and only for that map. Still thinking about good ways to make such big mods easier to run for players.
I am also thinking about adding an "AI" directory to the user write directory, where players can drop in AI files (maybe even not .wz, just .ai and .js files?), and then make them available without needing any command line magic.
If all players do not have the same AI files, this does not matter. Only the host runs AIs, and sends the results to everyone else. Note that 'rules.js' operates differently - it is run simultaneously on all clients and must be the same.
I am also thinking about adding an "AI" directory to the user write directory, where players can drop in AI files (maybe even not .wz, just .ai and .js files?), and then make them available without needing any command line magic.
If all players do not have the same AI files, this does not matter. Only the host runs AIs, and sends the results to everyone else. Note that 'rules.js' operates differently - it is run simultaneously on all clients and must be the same.
Re: Packing AIs into maps as map-mods
Hmm, so how exactly are we supposed to use custom AIs in challenges if we can't bundle them with maps these challenges are bundled with?Hmm. I think packaging an AI with a map is very short-sighted and wrong. Unless that map is a total conversion of sorts (like a customized challenge), and then you want to replace everything and only for that map. Still thinking about good ways to make such big mods easier to run for players.
Upd: What about restricting AIs to a certain map via a special directive inside the .ai file?
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Packing AIs into maps as map-mods
Oh, bundling custom AIs with custom maps for challenges is quite right. Bundling custom AIs with ordinary skirmish maps would be a bad idea. You put the AI in the same directory ("challenges/") as the challenge, to avoid it being made available for skirmish.
Re: Packing AIs into maps as map-mods
In 2.3.x Challenge maps show up in the map chooser for normal skirmish and MP. This has changed for 3.1.x?
Also, FWIW, when I had the map with nullbot I was able to host with nullbot filling a slot. The only issue I detected was that my joiners saw an empty slot (the AI name was not transmitted to the player list in the lobby).
Also, FWIW, when I had the map with nullbot I was able to host with nullbot filling a slot. The only issue I detected was that my joiners saw an empty slot (the AI name was not transmitted to the player list in the lobby).
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
Re: Packing AIs into maps as map-mods
Yep! That's exactly what i've been looking for (:You put the AI in the same directory ("challenges/") as the challenge, to avoid it being made available for skirmish.
No, i don't think so. Though it sounds like a good thing to implementIn 2.3.x Challenge maps show up in the map chooser for normal skirmish and MP. This has changed for 3.1.x?
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Packing AIs into maps as map-mods
Oops.
Saved games don't work when the map is packed this way (even though they work fine when they are regular skirmish games with JS AIs loaded as a mod)
AI just stop doing things at loading, and the stderr says
(that's for this challenge)
Saved games don't work when the map is packed this way (even though they work fine when they are regular skirmish games with JS AIs loaded as a mod)
AI just stop doing things at loading, and the stderr says
Code: Select all
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 2 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 3 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 4 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
info |11:06:28: [findEngineForPlayer] Script context for player 1 not found
info |11:06:28: [findEngineForPlayer] Assert in Warzone: qtscript.cpp:490 (false), last script event: '<none>'
Last edited by NoQ on 11 Feb 2012, 09:20, edited 1 time in total.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Packing AIs into maps as map-mods
I think packing AI in maps is fine as long as it does not modify the game balance and or show player info to the maker of the AI .Using them in a challenge or a campaign scenario great!
However packing mods into maps is out of line.
I have had to clean out maps I receive while playing multi player as they have cheat mods inside.
If these maps end up in my map folder with cheats in them thats not good who ever is doing it should stop.
However packing mods into maps is out of line.
I have had to clean out maps I receive while playing multi player as they have cheat mods inside.
If these maps end up in my map folder with cheats in them thats not good who ever is doing it should stop.
Re: Packing AIs into maps as map-mods
That used to be thousands of years ago. Map-mod support was finally fixed in 2.3.8 (and in fact was fixed around 2.3.6 i think), so now different map's extra data doesn't interfere with games on other maps.I have had to clean out maps I receive while playing multi player as they have cheat mods inside.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Packing AIs into maps as map-mods
I found a way to go around in 2.3.6 I think and used it mainly in 2.3.7 in my "X-T1-" maps. But it was fixed and SO MUCH EASIER to do in 2.3.8 yeah
.
Sooner or later, we'll need to be able to select mods as we select maps. With the same GUI and the same download system, I don't believe it will be so hard. This will allow to load AI and other set of rules.
Sooner or later, we'll need to be able to select mods as we select maps. With the same GUI and the same download system, I don't believe it will be so hard. This will allow to load AI and other set of rules.
Heretic 2.3 improver and proud of it.
- Rman Virgil
- Professional

- Posts: 3812
- Joined: 25 Sep 2006, 01:06
- Location: USA
Re: Packing AIs into maps as map-mods
One of the first things NEWST did was make exactly all that possible for v.1.10 begining in Dec. '99 & upgraded through '04. It was last called "WZS" for "WZ Starter" and it was a joy to use.Iluvalar wrote:......
Sooner or later, we'll need to be able to select mods as we select maps. With the same GUI and the same download system, I don't believe it will be so hard. This will allow to load AI and other set of rules.
No doubt it would be great to have such for the current WZ.
.
.
Impact = C x (R + E + A + T + E)
Contrast
Reach
Exposure
Articulation
Trust
Echo
.
Impact = C x (R + E + A + T + E)
Contrast
Reach
Exposure
Articulation
Trust
Echo
.
Re: Packing AIs into maps as map-mods
Ekhm. 
In game addons manager idea topic.
Current plan is to replace current widgets with something SDL / OpenGL based (not dependent on Qt for now) and then we can go with things like that...
In game addons manager idea topic.
Current plan is to replace current widgets with something SDL / OpenGL based (not dependent on Qt for now) and then we can go with things like that...
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.
Beware! Mad Qt Evangelist.
The time has come, the high time, to destroy hatred in oneself.
Beware! Mad Qt Evangelist.


