Packing AIs into maps as map-mods

For AI and campaign script related discussions and questions
Post Reply
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Packing AIs into maps as map-mods

Post by NoQ »

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?
Last edited by NoQ on 08 Feb 2012, 15:04, edited 1 time in total.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Packing AIs into maps as map-mods

Post by aubergine »

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.
If I understand correctly, by that you mean..

"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
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Packing AIs into maps as map-mods

Post by NoQ »

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.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Packing AIs into maps as map-mods

Post by aubergine »

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
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Packing AIs into maps as map-mods

Post by Per »

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.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Packing AIs into maps as map-mods

Post by NoQ »

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.
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?

Upd: What about restricting AIs to a certain map via a special directive inside the .ai file?
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Packing AIs into maps as map-mods

Post by Per »

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.
User avatar
effigy
Regular
Regular
Posts: 1217
Joined: 22 Jan 2010, 03:21
Contact:

Re: Packing AIs into maps as map-mods

Post by effigy »

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).
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Packing AIs into maps as map-mods

Post by NoQ »

You put the AI in the same directory ("challenges/") as the challenge, to avoid it being made available for skirmish.
Yep! That's exactly what i've been looking for (:
In 2.3.x Challenge maps show up in the map chooser for normal skirmish and MP. This has changed for 3.1.x?
No, i don't think so. Though it sounds like a good thing to implement :3
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Packing AIs into maps as map-mods

Post by NoQ »

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

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>'
(that's for this challenge)
Last edited by NoQ on 11 Feb 2012, 09:20, edited 1 time in total.
User avatar
Berg
Regular
Regular
Posts: 2204
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: Packing AIs into maps as map-mods

Post by Berg »

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.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Packing AIs into maps as map-mods

Post by NoQ »

I have had to clean out maps I receive while playing multi player as they have cheat mods inside.
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.
User avatar
Iluvalar
Regular
Regular
Posts: 1828
Joined: 02 Oct 2010, 18:44

Re: Packing AIs into maps as map-mods

Post by Iluvalar »

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.
Heretic 2.3 improver and proud of it.
User avatar
Rman Virgil
Professional
Professional
Posts: 3812
Joined: 25 Sep 2006, 01:06
Location: USA

Re: Packing AIs into maps as map-mods

Post by Rman Virgil »

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.
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. :)

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
.
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Packing AIs into maps as map-mods

Post by Emdek »

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...
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.
Post Reply