Flags not changeable in serverside mod

Ask questions, discuss ideas, get answers
User avatar
MegaloDon
Posts: 18
Joined: Sat Sep 08, 2012 7:52 am

Flags not changeable in serverside mod

Post by MegaloDon »

In some maps in DC Final, certain flags are not changeable, for example Tobruk axis base. I have tried changing this several different ways and none seem to work. Is this something that is not possible SSM?
Diamondback
Posts: 617
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

Re: Flags not changeable in serverside mod

Post by Diamondback »

Tell us exactly how you want to change them and we might help you from there.
See my Strasbourg map project here.
User avatar
MegaloDon
Posts: 18
Joined: Sat Sep 08, 2012 7:52 am

Re: Flags not changeable in serverside mod

Post by MegaloDon »

Perhaps I didn't word that correctly. The Axis flag in Tobruk is owned by Axis and is not "takeable". When playing the game you cannot change the flag to Allied (US flag). I want the flag to be "capturable" or whatever is the correct term.
User avatar
MegaloDon
Posts: 18
Joined: Sat Sep 08, 2012 7:52 am

Re: Flags not changeable in serverside mod

Post by MegaloDon »

Anybody?
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Flags not changeable in serverside mod

Post by Swaffy »

MegaloDon wrote:Anybody?
Sorry, I don't do SSM. Just CSM.


But I can take a guess, perhaps it will work.

Suppose the flag's name is "AxisMainBase". So you can try using this code in the "ControlPointTemplates.con" file:

ObjectTemplate.Active AxisMainBase
rem ObjectTemplate.timeToGetControl 9999
rem ObjectTemplate.timeToLoseControl 9999
ObjectTemplate.timeToGetControl 15
ObjectTemplate.timeToLoseControl 15

Notice how I added "rem" to the GetControl and LoseControl lines that have 9999 as the time. That's because the 9999 makes the time infinite, meaning the base can't be captured. You can just delete the "remmed out" lines.

Also, make sure you put the lines in the directory of the correct game mode.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Diamondback
Posts: 617
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

Re: Flags not changeable in serverside mod

Post by Diamondback »

Which game play mode is this being modded for? TDM or Conquest? In either modes, you will not be able to change flag ownership or it's capacity of being captured without making a client-side patch.

Sorry Swaffy, don't think your method works if you ment it as being a SSM. ;)
See my Strasbourg map project here.
User avatar
MegaloDon
Posts: 18
Joined: Sat Sep 08, 2012 7:52 am

Re: Flags not changeable in serverside mod

Post by MegaloDon »

Ok this is for a coop server.
Here is the original code:

Code: Select all

ObjectTemplate.create ControlPoint AXIS_BASE
ObjectTemplate.networkableInfo ControlPointInfo
ObjectTemplate.setControlPointName German_Base
ObjectTemplate.radius 5
ObjectTemplate.team 1
ObjectTemplate.spawnGroupId 1
ObjectTemplate.objectSpawnerId 11
ObjectTemplate.areaValue 0
ObjectTemplate.timeToGetControl 9999
ObjectTemplate.timeToLoseControl 9999
ObjectTemplate.disableIfEnemyInsideRadius 0
ObjectTemplate.disableWhenLosingControl 0
ObjectTemplate.loseControlWhenEnemyClose 1
ObjectTemplate.loseControlWhenNotClose 0
ObjectTemplate.geometry flagbase_m1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.unableToChangeTeam 1
ObjectTemplate.addTemplate AnimatedFlag
ObjectTemplate.setPosition 0/8.2/0
ObjectTemplate.setTeamGeometry 1 flagge_m1
ObjectTemplate.setTeamGeometry 2 flagus_m1
This is what I changed it to:

Code: Select all

ObjectTemplate.create ControlPoint AXIS_BASE
ObjectTemplate.networkableInfo ControlPointInfo
ObjectTemplate.setControlPointName German_Base
ObjectTemplate.radius 20
ObjectTemplate.team 1
ObjectTemplate.spawnGroupId 1
ObjectTemplate.objectSpawnerId 11
ObjectTemplate.areaValue 18
ObjectTemplate.timeToGetControl 15
ObjectTemplate.timeToLoseControl 15
ObjectTemplate.disableIfEnemyInsideRadius 0
ObjectTemplate.disableWhenLosingControl 0
ObjectTemplate.loseControlWhenEnemyClose 1
ObjectTemplate.loseControlWhenNotClose 0
ObjectTemplate.geometry flagbase_m1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.unableToChangeTeam 0
ObjectTemplate.addTemplate AnimatedFlag
ObjectTemplate.setPosition 0/8.2/0
ObjectTemplate.setTeamGeometry 1 flagge_m1
ObjectTemplate.setTeamGeometry 2 flagus_m1
Notice I changed "ObjectTemplate.unableToChangeTeam 1" to 0 among other things.
After making the changes, when you go near the flag the enemy bots do not spawn there as long as you stand there, but the flag does not change.
It appears as though it may not be possible unless someone knows a trick to get around it.
The problem is that after you capture all the other flags, everyone just hangs out at the enemy base and spawn camps until the tickets finally drop. It's like shooting fish in a barrell and gets kinda boring.

I appreciate the response though.
User avatar
MegaloDon
Posts: 18
Joined: Sat Sep 08, 2012 7:52 am

Re: Flags not changeable in serverside mod

Post by MegaloDon »

Ok I figured it out. Unfortunately I had to sacrifice another flag (controlpoint) to do it. I disabled the axis control point and then moved another control point to where the axis control point was. I also had to change the spawnpoints associated to that control point to the axis base. If anyone is interested in the code I can post it. Also if anyone knows a better way that doesn't involve sacrificing an existing control point that would be nice. I don't think it's possible to create new control points SSM.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Flags not changeable in serverside mod

Post by Swaffy »

MegaloDon wrote:Ok I figured it out. Unfortunately I had to sacrifice another flag (controlpoint) to do it. I disabled the axis control point and then moved another control point to where the axis control point was. I also had to change the spawnpoints associated to that control point to the axis base. If anyone is interested in the code I can post it. Also if anyone knows a better way that doesn't involve sacrificing an existing control point that would be nice. I don't think it's possible to create new control points SSM.
I have this same problem, but CSM! It is a completely redone version of BATTLEAXE, which I now call Battlebox. I made a small, handguns-only map with bot suport. The weirdest thing is that I can't get the FLAGPOLE for the Axis base to simply show! The American/British side is there and is capturable, but not the Axis main flag. What is this black magic?

So, instead of making a new thread, I'll ask for help here.

First off, I used the main flag for the Axis and British main bases to make this map. Reason I did that was because I didn't know anything about map-making and AI at that time. This was my first map, and it acted as my "guinea pig" for map-making related experiments. But this is its final form. What might be my problem?

Look for "GermanFlag" when comparing code.

SinglePlayer/ControlPointTemplates.con

Code: Select all

rem ControlPointTemplates.con created by Battlecraft 1942
rem (C:\Program Files (x86)\EA GAMES\Battlefield 1942\Mods\Swaffy'sMod\bf1942\levels\Battleaxe/conquest/ControlPointTemplates.con)

NetworkableInfo.createNewInfo ControlPointInfo
NetworkableInfo.setPredictionMode PMNone
NetworkableInfo.setBasePriority c_NIGhostAlways

rem ----------------------------------------- 
rem ---  BritishFlag  ---
rem ----------------------------------------- 
ObjectTemplate.create ControlPoint BritishFlag
ObjectTemplate.networkableInfo ControlPointInfo
ObjectTemplate.setControlPointName BritishFlag
ObjectTemplate.radius 15
ObjectTemplate.team 2
ObjectTemplate.spawnGroupId 7
ObjectTemplate.objectSpawnerId -1
ObjectTemplate.areaValue 30
ObjectTemplate.timeToGetControl 2
ObjectTemplate.timeToLoseControl 10
ObjectTemplate.disableIfEnemyInsideRadius 0
ObjectTemplate.disableWhenLosingControl 0
ObjectTemplate.loseControlWhenEnemyClose 1
ObjectTemplate.loseControlWhenNotClose 0
ObjectTemplate.geometry flagbase_m1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.addTemplate AnimatedFlag
ObjectTemplate.setPosition 0.000000/8.200000/0.000000
ObjectTemplate.setTeamGeometry 1 flagge_m1
ObjectTemplate.setTeamGeometry 2 flaguk_m1

rem ----------------------------------------- 
rem ---  WesternFlag  ---
rem ----------------------------------------- 
ObjectTemplate.create ControlPoint WesternFlag
ObjectTemplate.networkableInfo ControlPointInfo
ObjectTemplate.setControlPointName WesternFlag
ObjectTemplate.radius 8
ObjectTemplate.team 1
ObjectTemplate.spawnGroupId 1
ObjectTemplate.objectSpawnerId 1
ObjectTemplate.areaValue 20
ObjectTemplate.timeToGetControl 30
ObjectTemplate.timeToLoseControl 2
ObjectTemplate.disableIfEnemyInsideRadius 0
ObjectTemplate.disableWhenLosingControl 0
ObjectTemplate.loseControlWhenEnemyClose 1
ObjectTemplate.loseControlWhenNotClose 0
ObjectTemplate.geometry flagbase_m1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.addTemplate AnimatedFlag
ObjectTemplate.setPosition 0.000000/8.200000/0.000000
ObjectTemplate.setTeamGeometry 1 flagge_m1
ObjectTemplate.setTeamGeometry 2 flagus_m1

rem ----------------------------------------- 
rem ---  EasternFlag  ---
rem ----------------------------------------- 
ObjectTemplate.create ControlPoint EasternFlag
ObjectTemplate.networkableInfo ControlPointInfo
ObjectTemplate.setControlPointName EasternFlag
ObjectTemplate.radius 8
ObjectTemplate.team 1
ObjectTemplate.spawnGroupId 2
ObjectTemplate.objectSpawnerId 2
ObjectTemplate.areaValue 20
ObjectTemplate.timeToGetControl 30
ObjectTemplate.timeToLoseControl 2
ObjectTemplate.disableIfEnemyInsideRadius 0
ObjectTemplate.disableWhenLosingControl 0
ObjectTemplate.loseControlWhenEnemyClose 1
ObjectTemplate.loseControlWhenNotClose 0
ObjectTemplate.geometry flagbase_m1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.addTemplate AnimatedFlag
ObjectTemplate.setPosition 0.000000/8.200000/0.000000
ObjectTemplate.setTeamGeometry 1 flagge_m1
ObjectTemplate.setTeamGeometry 2 flagus_m1

rem ----------------------------------------- 
rem ---  GermanFlag  ---
rem ----------------------------------------- 
ObjectTemplate.create ControlPoint GermanFlag
ObjectTemplate.networkableInfo ControlPointInfo
ObjectTemplate.setControlPointName GermanFlag
ObjectTemplate.radius 15
ObjectTemplate.team 1
ObjectTemplate.spawnGroupId 3
ObjectTemplate.objectSpawnerId 3
ObjectTemplate.areaValue 30
ObjectTemplate.timeToGetControl 2
ObjectTemplate.timeToLoseControl 10
ObjectTemplate.disableIfEnemyInsideRadius 0
ObjectTemplate.disableWhenLosingControl 0
ObjectTemplate.loseControlWhenEnemyClose 1
ObjectTemplate.loseControlWhenNotClose 0
ObjectTemplate.geometry flagbase_m1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.addTemplate AnimatedFlag
ObjectTemplate.setPosition 0.000000/8.200000/0.000000
ObjectTemplate.setTeamGeometry 1 flagge_m1
ObjectTemplate.setTeamGeometry 2 flagus_m1

rem EndOfFile
AI/StrategicAreas

Code: Select all

rem *** Create vehicle groups ***

aiSettings.createVehicleGroup heavyVehicles
aiSettings.createVehicleGroup lightVehicles
aiSettings.createVehicleGroup airVehicles
aiSettings.createVehicleGroup seaVehicles
aiSettings.createVehicleGroup AmphibiusVehicles
aiSettings.createVehicleGroup common
aiSettings.createVehicleGroup Troops

rem * add vehicles to the groups *

aiSettings.addVehicleToVehicleGroup 0 heavyVehicles
aiSettings.addVehicleToVehicleGroup 1 airVehicles
aiSettings.addVehicleToVehicleGroup 2 seaVehicles
aiSettings.addVehicleToVehicleGroup 3 Troops
aiSettings.addVehicleToVehicleGroup 4 common
aiSettings.addVehicleToVehicleGroup 5 lightVehicles
aiSettings.addVehicleToVehicleGroup 6 heavyVehicles
aiSettings.addVehicleToVehicleGroup 7 seaVehicles
aiSettings.addVehicleToVehicleGroup 8 lightVehicles
aiSettings.addVehicleToVehicleGroup 9 seaVehicles
aiSettings.addVehicleToVehicleGroup 10 common
aiSettings.addVehicleToVehicleGroup 11 common
aiSettings.addVehicleToVehicleGroup 12 seaVehicles
aiSettings.addVehicleToVehicleGroup 13 common
aiSettings.addVehicleToVehicleGroup 14 heavyVehicles
aiSettings.addVehicleToVehicleGroup 15 airVehicles
aiSettings.addVehicleToVehicleGroup 16 AmphibiusVehicles
aiSettings.addVehicleToVehicleGroup 17 common
aiSettings.addVehicleToVehicleGroup 18 common

rem *** Create categories ***
aiStrategicArea.createNewCategory(land)
aiStrategicArea.create BritishFlag 1382/918 1402/938 60 land
aiStrategicArea.create GermanFlag 1382/986 1402/1006 60 land
aiStrategicArea.create WesternFlag 1370/954 1390/974 60 land
aiStrategicArea.create EasternFlag 1394/954 1414/974 60 land

aiStrategicArea.setActive BritishFlag
aiStrategicArea.addObjectTypeFlag Base
aiStrategicArea.addObjectTypeFlag ControlPoint
AIStrategicArea.addNeighbour GermanFlag
AIStrategicArea.addNeighbour WesternFlag
AIStrategicArea.addNeighbour EasternFlag
AIStrategicArea.addAllowedVehicleGroup common
AIStrategicArea.addAllowedVehicleGroup Troops
AIStrategicArea.addAllowedVehicleGroup lightVehicles
AIStrategicArea.addAllowedVehicleGroup heavyVehicles
AIStrategicArea.addAllowedVehicleGroup airVehicles
AIStrategicArea.addAllowedVehicleGroup AmphibiusVehicles
AIStrategicArea.addAllowedVehicleGroup seaVehicles
AIStrategicArea.setOrderPosition Infantry 1392/33
AIStrategicArea.setOrderPosition Tank 1392/33
AIStrategicArea.setOrderPosition Car 1392/33
AIStrategicArea.setOrderPosition Amphibius 1392/33
aiStrategicArea.setSide 1
aiStrategicArea.setTakeable 1 0
aiStrategicArea.vehicleSearchRadius 150.0
aiStrategicArea.playerSensitive 1
aiStrategicArea.playerSensitivity 5.0f

aiStrategicArea.setActive GermanFlag
aiStrategicArea.addObjectTypeFlag Base
aiStrategicArea.addObjectTypeFlag ControlPoint
AIStrategicArea.addNeighbour BritishFlag
AIStrategicArea.addNeighbour WesternFlag
AIStrategicArea.addNeighbour EasternFlag
AIStrategicArea.addAllowedVehicleGroup common
AIStrategicArea.addAllowedVehicleGroup Troops
AIStrategicArea.addAllowedVehicleGroup lightVehicles
AIStrategicArea.addAllowedVehicleGroup heavyVehicles
AIStrategicArea.addAllowedVehicleGroup airVehicles
AIStrategicArea.addAllowedVehicleGroup AmphibiusVehicles
AIStrategicArea.addAllowedVehicleGroup seaVehicles
AIStrategicArea.setOrderPosition Infantry 1392/33
AIStrategicArea.setOrderPosition Tank 1392/33
AIStrategicArea.setOrderPosition Car 1392/33
AIStrategicArea.setOrderPosition Amphibius 1392/33
aiStrategicArea.setSide 2
aiStrategicArea.setTakeable 1 0
aiStrategicArea.vehicleSearchRadius 150.0
aiStrategicArea.playerSensitive 1
aiStrategicArea.playerSensitivity 5.0f

aiStrategicArea.setActive WesternFlag
aiStrategicArea.addObjectTypeFlag Route
aiStrategicArea.addObjectTypeFlag ControlPoint
AIStrategicArea.addNeighbour BritishFlag
AIStrategicArea.addNeighbour GermanFlag
AIStrategicArea.addNeighbour EasternFlag
AIStrategicArea.addAllowedVehicleGroup common
AIStrategicArea.addAllowedVehicleGroup Troops
AIStrategicArea.addAllowedVehicleGroup lightVehicles
AIStrategicArea.addAllowedVehicleGroup heavyVehicles
AIStrategicArea.addAllowedVehicleGroup airVehicles
AIStrategicArea.addAllowedVehicleGroup AmphibiusVehicles
AIStrategicArea.addAllowedVehicleGroup seaVehicles
AIStrategicArea.setOrderPosition Infantry 1380/36
AIStrategicArea.setOrderPosition Tank 1380/36
AIStrategicArea.setOrderPosition Car 1380/36
AIStrategicArea.setOrderPosition Amphibius 1380/36
aiStrategicArea.setSide 2
aiStrategicArea.setTakeable 1 0
aiStrategicArea.vehicleSearchRadius 150.0
aiStrategicArea.playerSensitive 1
aiStrategicArea.playerSensitivity 5.0f

aiStrategicArea.setActive EasternFlag
aiStrategicArea.addObjectTypeFlag Route
aiStrategicArea.addObjectTypeFlag ControlPoint
AIStrategicArea.addNeighbour BritishFlag
AIStrategicArea.addNeighbour GermanFlag
AIStrategicArea.addNeighbour WesternFlag
AIStrategicArea.addAllowedVehicleGroup common
AIStrategicArea.addAllowedVehicleGroup Troops
AIStrategicArea.addAllowedVehicleGroup lightVehicles
AIStrategicArea.addAllowedVehicleGroup heavyVehicles
AIStrategicArea.addAllowedVehicleGroup airVehicles
AIStrategicArea.addAllowedVehicleGroup AmphibiusVehicles
AIStrategicArea.addAllowedVehicleGroup seaVehicles
AIStrategicArea.setOrderPosition Infantry 1404/36
AIStrategicArea.setOrderPosition Tank 1404/36
AIStrategicArea.setOrderPosition Car 1404/36
AIStrategicArea.setOrderPosition Amphibius 1404/36
aiStrategicArea.setSide 2
aiStrategicArea.setTakeable 1 0
aiStrategicArea.vehicleSearchRadius 150.0
aiStrategicArea.playerSensitive 1
aiStrategicArea.playerSensitivity 5.0f
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
MegaloDon
Posts: 18
Joined: Sat Sep 08, 2012 7:52 am

Re: Flags not changeable in serverside mod

Post by MegaloDon »

Is it in your ControlPoints.con?
Also you need to make sure SoldierSpawns.con, SoldierSpawnTemplates.con, and spawnPointManagerSettings.con are set up properly for that control point.

SoldierSpawnTemplates.con: "ObjectTemplate.setGroup 3" must match ControlPointTemplates.con: "ObjectTemplate.spawnGroupId 3".
Also ObjectSpawns.con: "object.setosid 3" must match ControlPointTemplates.con: "ObjectTemplate.objectSpawnerId 3" for vehicles.

If you want to post the code for the other files I can look at it.
Post Reply