Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to add an AI to computer_only units on maps #136

Open
sanslash332 opened this issue Nov 12, 2021 · 6 comments
Open

allow to add an AI to computer_only units on maps #136

sanslash332 opened this issue Nov 12, 2021 · 6 comments

Comments

@sanslash332
Copy link

Currently when you want to add computer_only units on the maps for defend some area or other things, currently these units keep in place a don't do nothing until you reach their position and start a battle against them.

Will be awesome if you can add on the map settings a special AI that can control these units. Of course you've to create and set the configs for that AI for that map, but this will allow to create some things like respawning units, enemy that patrols some area, units that can defend treasures spauning skills and not only with brute force, etc.

This will be very awesome because create mods that are like a mova will be very easier :3

Thanks.

@MatejGolian
Copy link
Contributor

I second that = that would be great!

@soundmud
Copy link
Owner

I recently replied privately to a similar question:

Here are 3 triggers allowed in multiplayer mode too:

trigger computer1 (timer 0) (order (d1 10 dragon) ((patrol d9)))

Will order up to 10 dragons from d1 to patrol between d1 and d9.

timer_coefficient 60
trigger computer1 (timer 20) (order (e3 10 dragon) ((go b2)))

Will order up to 10 dragons from e3 to attack b2 after 20 minutes (normal speed).

trigger computer1 (timer 0) (ai easy)

Switch computer_only AI from "do nothing" mode to the usual "quiet computer" mode. By default it will send a dragon to explore "pacifically" all the map. The AI will retaliate massively to the first real encounter thought. Probably too much.

When I tested I noticed that the map didn't end when a player is eliminated. This is probably a bug when a trigger is added to a multiplayer map. I will fix this bug.

To spawn units, the "add" action is probably working too.

@soundmud
Copy link
Owner

Note: computer1 is the first computer_only "player"

@soundmud
Copy link
Owner

The bug is not actually a bug but I may add the following explanation to the map making manual:

If a multiplayer map defines at least one trigger, the default multiplayer triggers are ignored. The goal is to allow custom victory conditions.

To keep the default victory conditions, the following triggers must be explicitly added to the map (or the game won't stop automatically):

trigger players (no_enemy_player_left) (victory)
trigger players (no_building_left) (defeat)
trigger computers (no_unit_left) (defeat)

Note: the third trigger is not really needed.

@Ali-Bueno
Copy link

Actually tested that yesterday. So, I have an other question related to this. Is actually a trigger to for example, when only one unit dies, trigger sometting? Cause looking at campain examples I ave only seen triggers for constructing things or defeat all the enemy units

@Ali-Bueno
Copy link

Ali-Bueno commented Nov 13, 2021

But yea, will be great if that you can create map events to happen at some intervals or something. Like trigger a spell every 30 seconds, that makes meteorites fall to 10 seconds in some zones of the map. I think that can bring a lot of variety to the game, and people will manage to create very diferent game modes inside SoundRTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants