CTF (1 and 2 flag) tutorial -- part 1 (FAQ)
Moderator: Moderators
- Teancum
- Jedi Admin
- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
RE: CTF (1 and 2 flag) tutorial -- part 1
Common to both modes:
1-Open ZeroEdit, load your map
2-Hit 'change' under layers
3-Add a new layer. Name it ctf_common
*NOTE* region sizes should be 2,5,1 (at the bottom left change 10,10,10 to this)
4-Select regions, add a new regtion called team1_capture - name the property the same way. This goes wherever your Team 1 CP will be.
5-Add another region called team2_capture - again name the property the same way. This goes wherever your Team 2 CP will be.
6-Add a third region called homeregion - name the property the same way. This goes wherever your flag for 1-Flag CTF will be.
7-Before anything else, make sure they are named exactly as said before, or CTF won't work
8-Place ctf_spawn1 and ctf_spawn2 paths on this layer. It doesn't matter what you name these, they just need to be put in your SpawnPath section of your CP properties later.
9-Place your CP's -- you only need two -- one for each team. Add your spawn paths to them.
1-Flag specific:
1-Create a new layer, name it 1flag.
2-Add a flag where the homeregion is, make sure you seat the team value to zero.
2-Flag specific:
1-Creat a new layer, name it ctf or 2flag.
2-Place a flag near your CPs, assign it to that team's number.
Still to do in the tutorial:
-Add the objects that show where your flag should be captured (they create a glow and they pulsate). These aren't hard, I just can't remember the name of the file to add.
-Teach integrating these into actual modes
-Make sure I have the order of 1-Flag right as to where you actually capture the flag.
1-Open ZeroEdit, load your map
2-Hit 'change' under layers
3-Add a new layer. Name it ctf_common
*NOTE* region sizes should be 2,5,1 (at the bottom left change 10,10,10 to this)
4-Select regions, add a new regtion called team1_capture - name the property the same way. This goes wherever your Team 1 CP will be.
5-Add another region called team2_capture - again name the property the same way. This goes wherever your Team 2 CP will be.
6-Add a third region called homeregion - name the property the same way. This goes wherever your flag for 1-Flag CTF will be.
7-Before anything else, make sure they are named exactly as said before, or CTF won't work
8-Place ctf_spawn1 and ctf_spawn2 paths on this layer. It doesn't matter what you name these, they just need to be put in your SpawnPath section of your CP properties later.
9-Place your CP's -- you only need two -- one for each team. Add your spawn paths to them.
1-Flag specific:
1-Create a new layer, name it 1flag.
2-Add a flag where the homeregion is, make sure you seat the team value to zero.
2-Flag specific:
1-Creat a new layer, name it ctf or 2flag.
2-Place a flag near your CPs, assign it to that team's number.
Still to do in the tutorial:
-Add the objects that show where your flag should be captured (they create a glow and they pulsate). These aren't hard, I just can't remember the name of the file to add.
-Teach integrating these into actual modes
-Make sure I have the order of 1-Flag right as to where you actually capture the flag.
RE: CTF (1 and 2 flag) tutorial -- part 1
i know but i didnt know that until not long ago and now there stuck there, but i want ctf in my geo lvl
- Teancum
- Jedi Admin
- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
RE: CTF (1 and 2 flag) tutorial -- part 1
Not much you can do. You can merge the base layer and Conqest, then create a new conquest layer and move all of that stuff back, but other than that....
RE: CTF (1 and 2 flag) tutorial -- part 1
Tean or someone from Pandemic, would you be able to tell me exactly which files need to be modified if I DID NOT check the boxes for all modes during initial munge?
I'm having issues trying to add the new game modes, as they are there in Zeroeditor and complete, but they don't seem to munge properly ATM. I've already edited mission.req to include them, as well as add the new LUA's and REQ's for each game mode. Possibly there is another step?
I'm having issues trying to add the new game modes, as they are there in Zeroeditor and complete, but they don't seem to munge properly ATM. I've already edited mission.req to include them, as well as add the new LUA's and REQ's for each game mode. Possibly there is another step?
- Teancum
- Jedi Admin
- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
RE: CTF (1 and 2 flag) tutorial -- part 1
What exactly isn't working? No Spawn points? A crash?
RE: CTF (1 and 2 flag) tutorial -- part 1
The game modes do not come up in SWBF II as an option...that's basically all that I think is wrong ATM.
RE: CTF (1 and 2 flag) tutorial -- part 1
Does anyone know if there is a way in space ctf to allow the flag to be carried out of a vehicle without spazzing out like it usually does?
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
RE: CTF (1 and 2 flag) tutorial -- part 1
I think the message is generated in the ObjectiveCTF.lua file. Look for the following section:
--
-- message generator
--
I can't run the game at the moment, so I can't narrow it done any more. If you can't understand the code, comment out all the ShowMessageText line. To comment out a line, place '--' in front of in without the '. If the message goes away, remove the comments ( -- ) one at a time to see which code line puts it back in the game. This will disable that message.
--
-- message generator
--
I can't run the game at the moment, so I can't narrow it done any more. If you can't understand the code, comment out all the ShowMessageText line. To comment out a line, place '--' in front of in without the '. If the message goes away, remove the comments ( -- ) one at a time to see which code line puts it back in the game. This will disable that message.
- squipple
- 1st Lieutenant
- Posts: 420
- Joined: Tue Jun 28, 2005 7:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Contact:
RE: CTF (1 and 2 flag) tutorial -- part 1
Gunjak, this is a little late, but if you add things to layers they're not supped to be in, you can just select them, open up your layers box, and click move data into layer, and then select the layer you want to move it to.
-
- Command Sergeant Major
- Posts: 282
- Joined: Sun Mar 01, 2009 4:34 am
- Projects :: AotC DoW+++Boonta Eve Classic
- xbox live or psn: No gamertag set
- Contact:
Re: CTF (1 and 2 flag) tutorial -- part 1 (FAQ)
I know I saw on here somewhere that someone was wondering how to change how many units stand around guarding the flag (in 2 flag ctf)...and I found out how just recently but I can't find the post back, so I'll just put it here:
go into data_***/common/scripts and open gametype_capture and ObjectiveCTF.
Each of these LUA files will have a section containing the numbers 70 and 30. In gametype_capture it's
go into data_***/common/scripts and open gametype_capture and ObjectiveCTF.
Each of these LUA files will have a section containing the numbers 70 and 30. In gametype_capture it's
and in ObjectiveCTF its-- set AI goal
ClearAIGoals(self.team)
AddAIGoal(self.team, "CTFOffense", 70, GetRegionName(self.capture))
AddAIGoal(self.team, "CTFDefense", 30)
These numbers apparently serve as percentage values, for how many stay and how many go. So if you want fewer AI guarding the flags, just increase the offense number (e.g., to 90) and decrease the defense number accordingly (e.g., to 10).--Add AI Goals
if self.AIGoalWeight > 0.0 then
table.insert(self.AIGoals, AddAIGoal(GetOpposingTeam( flagTeam ), "CTFOffense", 70*self.AIGoalWeight, flag.captureRegion, flagPtr))
if flag.homeRegion then
table.insert(self.AIGoals, AddAIGoal(flagTeam, "CTFDefense", 30*self.AIGoalWeight, flagPtr))
else
--if a flag has no home region, we can't put it in traditional CTFDefense mode, but we can put
--it in generic "Defend this object" mode, so they'll put up a parameter around the flag
--and shoot anyone who gets near
table.insert(self.AIGoals, AddAIGoal(flagTeam, "Defend", 30*self.AIGoalWeight, flag.name))
end
- Maveritchell
- Jedi Admin
- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: CTF (1 and 2 flag) tutorial -- part 1 (FAQ)
and in ObjectiveCTF itsJaspo wrote:Hidden/Spoiler:
These numbers apparently serve as percentage values, for how many stay and how many go. So if you want fewer AI guarding the flags, just increase the offense number (e.g., to 90) and decrease the defense number accordingly (e.g., to 10).[/hide][/quote]--Add AI Goals
if self.AIGoalWeight > 0.0 then
table.insert(self.AIGoals, AddAIGoal(GetOpposingTeam( flagTeam ), "CTFOffense", 70*self.AIGoalWeight, flag.captureRegion, flagPtr))
if flag.homeRegion then
table.insert(self.AIGoals, AddAIGoal(flagTeam, "CTFDefense", 30*self.AIGoalWeight, flagPtr))
else
--if a flag has no home region, we can't put it in traditional CTFDefense mode, but we can put
--it in generic "Defend this object" mode, so they'll put up a parameter around the flag
--and shoot anyone who gets near
table.insert(self.AIGoals, AddAIGoal(flagTeam, "Defend", 30*self.AIGoalWeight, flag.name))
end
It's worth mentioning that this is covered in greater detail (and not just as it pertains to CTF) in psych0fred's AI Goals document:
http://www.secretsociety.com/forum/down ... IGoals.txt