Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Mon Mar 24, 2025 8:52 pm
All times are UTC + 0
Repeating Create Team problem
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Ousagi
Disk Thrower


Joined: 02 Nov 2022

PostPosted: Sun Oct 15, 2023 1:05 am    Post subject:  Repeating Create Team problem
Subject description: 3 rocketeers keep being created but 1 SEAL is only created once unless killed.
Reply with quote  Mark this post and the followings unread

I created a trigger for a team to be created. I created 3 Rocketeers to go on one spot. The rocketeers comes from another team: 5 GI, 5 Rocketeer, 5 Attack Dog. The repeating trigger keeps making 3 Rocketeers on the spot.
I tested it with preplaced SEALs with a repeating "Create Team" trigger and it only creates the team everytime the team dies. So if I made a trigger where 1 SEAL is the team. Unless I kill the SEAL, it won't recreate the team again

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sun Oct 15, 2023 2:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

Check Tag/Trigger for Persistence/repeat value 0 or 2 being used.

When creating team at a waypoint, teamtype's Waypoint= field can be left empty.

Why team is formed from another team's members is based on the teamtype's recruiment flags. Check here - https://ppmforums.com/topic-44884/unit-recruitment-in-maps-and-ai/

Max field shouldn't matter as you are using triggers, not AITriggers.

By looking at originl game missions, knowledge of how things are implemented can be gained.

Could seach here at PPM and can also search at ModEnc for terms - https://modenc.renegadeprojects.com/

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sun Oct 15, 2023 3:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well you should explain how you want it to repeatedly create the team first. Like if you wanted it created at intervals, then you'd want a looping trigger with a time based interval (random delay is best)...

If the point is to replace the destroyed team as needed, then you could do a trigger event based on the existence of the Seal.

IF you want to combine both effects, replace only if destroyed, but only at given intervals, then you could use a trigger to set a variable that the unit died as one of the event conditions for the creation trigger.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Ousagi
Disk Thrower


Joined: 02 Nov 2022

PostPosted: Mon Oct 16, 2023 5:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sorry for late response. But as for G-E, I wanted to create teams inside the base with the intention of recruiting them later. They are created first then gets used to create a different team to attack the base. This is so there are still reserves within the base to guard it but still recruitable.

Essentially I'm trying to use the recruitable units as the guard for the base. This is because I want the base to be guarded first before creating teams to attack the player. Why? It's because the money for the ai runs out and if the player attacks it won't be able to defend itself.

It is top priority to have the base guarded first before attacking the player. There are still pre-placed units in the base but they were meant to be destroyed and also they don't have as much variety in them as the team meant to attack the player.

As for E1 Elite, I was able to make the team that I wanted but it wasn't in what the post you made. I changed the Autocreate to Prebuild and that essentially stopped the team from being created if the team is complete unlike Autocreate where it just keeps making the team over and over again whenever the condition for the repeating trigger are met.

Hadn't tried checking the missions yet but I'm guessing that it first creates the team in a waypoint than that team attacks the player. At least that's what I assume is in most of the mission. Which doesn't really resolve my issues of having the team being created over and over again.

As for more details, here is a screenshot for my trigger:



Trigger for the Team.png
 Description:
 Filesize:  144.85 KB
 Viewed:  2242 Time(s)

Trigger for the Team.png



Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Mon Oct 16, 2023 6:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

As that recruitment tutorial is for a bit advanced mappers, you have to read it multiple times. Autocreate doesn't mean to create teams automatically, that term is carried over from RA1. In RA2 it is related to recruit from pre-placed units or to build from factory.

In general, a reserve/pool team should have AreTeamMembersRecruitable=yes and its Priority should be less than the team that will be recruiting.

When the trigger Type is set to 2, it will be triggered repeatedly.

Back to top
View user's profile Send private message
Ousagi
Disk Thrower


Joined: 02 Nov 2022

PostPosted: Mon Oct 16, 2023 7:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
As that recruitment tutorial is for a bit advanced mappers, you have to read it multiple times. Autocreate doesn't mean to create teams automatically, that term is carried over from RA1. In RA2 it is related to recruit from pre-placed units or to build from factory.


But why does it not recruit the ones that were already built? For example, the trigger creates "Recuitable Units". Instead of getting unit from those units(after these units already finished they're scripts making them recruitable regardless of AreTeamMembersRecruitable=yes or not) it creates a new batch of "Recruitable Units". In comparison to Prebuild, it does just get the units from the one that were already created from the factory and finished their scripts.

E1 Elite wrote:
In general, a reserve/pool team should have AreTeamMembersRecruitable=yes and its Priority should be less than the team that will be recruiting.


This probably wouldn't matter since the team would be recruitable regardless after their scripts are finished.
E1 Elite wrote:
When the trigger Type is set to 2, it will be triggered repeatedly.


Meaning it would keep creating new batches if Autocreate was set? I'm confused with what Autocreate does. You say reserve pools with AreTeamMembersRecruitable=yes as if Autocreate will recruit them. But say setting the Trigger type to 2 will create a new team with exact number units mostly from the factory since the old team was completed and not recruitable even with their scripts finished.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Oct 17, 2023 12:24 am    Post subject: Reply with quote  Mark this post and the followings unread

Autocreate= should be thought of as "build" as opposed to Reinforce= which just pops them into existence. Prebuild= is used for queuing a build before it gets triggered if there's nothing else going on, and will thus be ready for when the trigger fires, but is affected by other factors including other Prebuild teams.

Also worth noting that if you use script actions 11,x then they will be assigned a mission whereby they are no longer recruitable -- effectively they no longer follow the other rules you set for the team. So while "area guard" might be nice for your defensive teams, only the basic guard action 5,x will allow it, and guard is pretty ineffective as an actual "guard" if the units don't have OpportunityFire and related tags.

You may want to flip the UseMinDefenseRule in the map too.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Oct 17, 2023 4:39 am    Post subject: Reply with quote  Mark this post and the followings unread

When same teamtype is produced again, it will not recruit from an active previous team as those will have the same Priority value. If the previous team would have finished its script, then those units become free units and those can be recruited.

Forget Autocreate and Prebuild in your case and set those to no.

Typically, reserve/pool teams are created using same units but with different teamtype having lower Priority value and AreTeamMembersRecruitable=yes. Those are put on guard or area guard with new mission 11,5 or 11,11 script actions. When attack team is formed whose teamtype have higher Priority value, it will recruit units from the pooled teams.

New mission scripts like 11,5 or 11,11 of guard or area guard allow to be recruited. Missions like sleep or harmless don't allow recruitment because such missions have Recruitable=no defineed in rules.ini.

Back to top
View user's profile Send private message
Ousagi
Disk Thrower


Joined: 02 Nov 2022

PostPosted: Tue Oct 17, 2023 11:13 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Also worth noting that if you use script actions 11,x then they will be assigned a mission whereby they are no longer recruitable -- effectively they no longer follow the other rules you set for the team. So while "area guard" might be nice for your defensive teams, only the basic guard action 5,x will allow it, and guard is pretty ineffective as an actual "guard" if the units don't have OpportunityFire and related tags.


Seems similar to my IFV guards on tech structures but mine is using script action 6. But this is noted. Also better than script action 6.

G-E wrote:
You may want to flip the UseMinDefenseRule in the map too.


This seems complicated. I don't know what this does yet and I'm tired currently but I'll check it later.

E1 Elite wrote:
When same teamtype is produced again, it will not recruit from an active previous team as those will have the same Priority value. If the previous team would have finished its script, then those units become free units and those can be recruited.


I see, but this wasn't an issue for prebuild but...

E1 Elite wrote:
Forget Autocreate and Prebuild in your case and set those to no.


How would they be created from the factory?

E1 Elite wrote:
Typically, reserve/pool teams are created using same units but with different teamtype having lower Priority value and AreTeamMembersRecruitable=yes.


They aren't the same since I'm trying to compress them. The reason why I'm trying to compress them was because they don't get to complete their mission and also would look a little awkward having the same units just clumped in one area.

Them not being able to complete the mission is no longer a problem. But it would still look awkward if the player see a clump of the same units.

E1 Elite wrote:
When attack team is formed whose teamtype have higher Priority value, it will recruit units from the pooled teams.


The priority value wasn't an issue with Prebuild. It seems to recruit them just fine with attack teams. Also doesn't create overflow creating similar teams with repeating trigger.

I'm only mentioning Prebuild because Prebuild, Autocreate, as well as Reinforce are the only things I know that allows building from a factory. I don't really know what I should set for building a unit in a factory

Back to top
View user's profile Send private message
McPwny
Chem Warrior


Joined: 29 Jan 2018

PostPosted: Tue Oct 17, 2023 4:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

first of all i just want to mention that it is weird for you to be using manual triggers instead of the AI triggers for this

mindefenserule, and the related tags, force the AI to always create defense teams before normal teams. it is used
only in the ai trigger system, and if you dont have enough basedef teams the AI will bug out and create nothing but
harvesters.

i really really recommend using the devoted AI trigger system instead. for the recruitment issues, its a little complex
but read up on the documentation like the one e1 made or the one i made here and pay
special attention to how to use recruiter=/recruitable= and the priority= system

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
Ousagi
Disk Thrower


Joined: 02 Nov 2022

PostPosted: Tue Oct 17, 2023 6:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sorry, this is probably because I'm still learning more on triggers. AI triggers seems like its own section. I didn't know it my problem would be complicated enough to use AI Triggers.

I did know about AI Triggers. I was just trying to avoid it currently since:
1. It is new for me and I had to learn about it, which would pile up for other things I have to learn and overwhelm me and...
2. I assessed that Triggers are more important to understand since that is what gives the map more design.

If it is better to learn more about AI Triggers, then I'll put questions about Teams and stuff after I've gone through AI Triggers and still had issues with that.

I was always planning on using AI Triggers. I just didn't expect I would have to deal with it sooner than later.

I'll try and stick with asking questions about Triggers UNTIL I get to learning about AI Triggers. This is probably the end of the post. Thank you everyone for helping! And I'll get back to you if I have other question unrelated currently about Enemy base Teams.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Oct 17, 2023 8:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

The danger with fiddling with Priority= is that high priority triggers can halt lower priority production. Effectively in the process of making team 1, it will switch production to team 2 before completing it, which can cause the AI to appear to pause all activity.

I've found only in very rare cases, ideally with very small teams, should Priority= be higher than the average.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
McPwny
Chem Warrior


Joined: 29 Jan 2018

PostPosted: Tue Oct 17, 2023 8:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

AI triggers are basically the same as a trigger using trigger action 4, except its automatic and has a more intuitive weight-based system
for creating teams. just make sure to disable the global ai triggers if its a mission map under basic, and make sure that some basedef teams
are there or the AI gets confused.

does high priority cause the AI to prefer building one team over another? i thought it was used exclusively for recruiting. i never had problems
with it, but then again i do make heavy use of pool teams so that almost all attack teams are entirely recruited from a pool instead of built.

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Oct 18, 2023 3:46 am    Post subject: Reply with quote  Mark this post and the followings unread

Higher Priority doesn't mean it will have build preference over lower Priority team. It is recruitment Priority only, not production Priority.

Back to top
View user's profile Send private message
Ousagi
Disk Thrower


Joined: 02 Nov 2022

PostPosted: Wed Oct 18, 2023 4:15 am    Post subject: Reply with quote  Mark this post and the followings unread

McPwny wrote:
just make sure to disable the global ai triggers if its a mission map under basic, and make sure that some basedef teams
are there or the AI gets confused.

Ok thanks, I was about to create a new post about disabling global ai and I was messing with the AI triggers for a bit and it's pretty simple but I stopped when I couldn't stop the global ai/not getting my custom teams created as the AI is build GGIs. The global AI is giving me a headache and I kept changing things in AI Triggers

E1 Elite wrote:
Higher Priority doesn't mean it will have build preference over lower Priority team. It is recruitment Priority only, not production Priority.

Thanks for clarifying, I was thinking of mixing triggers and AI Triggers but it's good to know it doesn't bother production.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.2265s ][ Queries: 14 (0.0116s) ][ Debug on ]