Page 1 of 1

Need help with my map

Posted: Fri May 27, 2016 9:14 pm
by Swaffy
http://swaffysmod.heliohost.org/extra/Battlebox.rfa

This is a map I made a long time ago for my mod. It's a simple/small map which I made to get better at building maps from scratch, it's basically a small arena type map to be played with bots. But I ran into some issues which I could never figure out:

- German flag is invisible, uncapturable, and shows up on the map differently than the other 3 flags (Co-Op)

Is there anyone who can help me figure out the German flag issue? You can download the map in the link above, just drop it in the vanilla BF 1942 to test it.

Re: Need help with my map

Posted: Sat Jun 04, 2016 5:14 am
by duffman
Could be a bug with tags & names being similar.. didnt have time to analyze
much more, but this seemed to fix it: (there are other issues that I did not look into!)

ControlPoints.con:
------------------
Object.create british_flag
Object.absolutePosition 1392.00/32.99/928.00

Object.create western_flag
Object.absolutePosition 1380.00/35.89/964.00

Object.create eastern_flag
Object.absolutePosition 1404.00/35.89/964.00

Object.create german_flag
Object.absolutePosition 1392.00/32.99/996.00


ControlPointTemplates.con
-------------------------
NetworkableInfo.createNewInfo ControlPointInfo
NetworkableInfo.setPredictionMode PMNone
NetworkableInfo.setBasePriority c_NIGhostAlways

ObjectTemplate.create ControlPoint british_flag
ObjectTemplate.networkableInfo ControlPointInfo
ObjectTemplate.setControlPointName BritishFlag
....
ObjectTemplate.create ControlPoint german_flag
ObjectTemplate.networkableInfo ControlPointInfo
ObjectTemplate.setControlPointName GermanFlag
...
ObjectTemplate.create ControlPoint western_flag
ObjectTemplate.networkableInfo ControlPointInfo
ObjectTemplate.setControlPointName WesternFlag
...
ObjectTemplate.create ControlPoint eastern_flag
ObjectTemplate.networkableInfo ControlPointInfo
ObjectTemplate.setControlPointName EasternFlag
...


IN BATTLECRAFT 1942
--------------------

"Edit Control Point"
Name = british_flag
controlPointName = BritishFlag


TECHNICAL
-------------
ControlPoints.con
Object.create british_flag <--- use "definition called british_flag" in ControlPointTemplates.con
Object.absolutePosition 1392.00/32.99/928.00
...

ControlPointTemplates.con
ObjectTemplate.create ControlPoint western_flag <--- name of definition
ObjectTemplate.networkableInfo ControlPointInfo
ObjectTemplate.setControlPointName WesternFlag <--- display name
ObjectTemplate.radius 8
ObjectTemplate.team 0
...

(note on the display name: I didnt get to test this, but reasonable sure on it..)

Re: Need help with my map

Posted: Sat Jun 04, 2016 6:25 pm
by Swaffy
I appreciate the input, but I see other maps that have the same names for the technical name and the setControlPointName and those work perfectly (maps made by other people).

The German flag is there (the icon is on the map) but there is no visual flag pole and it cannot be captured.

Code: Select all

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 flaguk_m1

Code: Select all

rem ----------------------------------------- 
rem ---  GermanFlag  ---
rem ----------------------------------------- 
Object.create GermanFlag
Object.absolutePosition 1392.00/32.98/996.00
[edit] Should these two lines have different IDs?
ObjectTemplate.spawnGroupId 3
ObjectTemplate.objectSpawnerId 3

Re: Need help with my map

Posted: Sun Jun 05, 2016 1:35 am
by duffman
I remembered having the same issue a while back, but I was not able to find out exactly what was wrong then either.
Changing the name of the object and displayname (setControlPointName) seemed to fix it so I dismissed it as a "bug" somewhere at the time.

The changes I did in the snippets above makes the flag appear properly when I tested it yesterday, but for some reason the game crashed when I tried to join.

Re: Need help with my map

Posted: Sun Jun 05, 2016 2:41 pm
by Swaffy
duffman wrote:but for some reason the game crashed when I tried to join.
Just to be sure, I just tried this, renamed the flag points setControlPointName and the German flag is still messed up

[edit] Ah! I renamed GermanFlag to GermanFlagz (the technical name) and changed StrategicAreas to match. This seemed to work. I guess now I'll make unique IDs for all the flags. I wonder if vanilla BF 1942 has some hidden settings for a flag named GermanFlag becuase this was an odd bug.

Wow, and it seemed to fix some AI issues I was having too...

Re: Need help with my map

Posted: Sun May 13, 2018 6:54 pm
by freddy
Swaffy wrote: I wonder if vanilla BF 1942 has some hidden settings for a flag named GermanFlag becuase this was an odd bug.
The German flag was shifted after the release

https://www.google.com/search?client=fi ... za1Kg_n060