Map object naming problem [FIXED]

Heya mappers/scripters,
Been a while, have a crap connection to play so I figured I'd poke around with the map/mission editor. After several UEs and re-reading what info I have on the subject, I almost completed one side of a balanced CTF map. Everything was working fine with this map untill I went into notepad with the file and correct some spelling errors and add mission info for the load page. Deleted a string of info that was left over from player spawn (some pj perfs) and saved the file. I also deleated some files related to a couple test maps. Now the mission hangs when loading. The mission info and load pic come up, but the map refused to load...
That was last night, a couple of beers and buds and 3 am later. Which explains the SNAFU

This morning I fixed the Map load problem, deleted and renamed the wrong terrain files, but now objects aren't loading and the game UE when I attempt to join a team.
Double checked the file structure (using Tribal IDE for script editing) as best I could against another mission file. All the }; look correct. I could have missed/botched something. Still reviewing.

Question: Should T2 be shut down and restarted every time an out of mission editor edit is made or can the mission be relaunched without restarting T2?

I collected as much info about T2 mapping (back in the day) from websites that don't exist now. ...and my eyes are bloodshot from reading too much... NecroBones had/has a nice mapping tutorial and there are a few others that I reference, however, I think I need someone to help trouble shoot the problem. I'd hate to have to start over.

Once sorted out, I'll post a couple of screen shots.

Comments

  • edited April 2009
    Fixed it.
    Tracked it down by opening the console ("~" key) and watching the info as the map attmped to load. Saw "Syntax Error line 140". Looked at line 140 of the .mis file highlighted in white, with Tribes IDE.

    new SimGroup(Base0) {
    powerCount = "3";

    new InteriorInstance(Flag Stand) {
    position = "-337.601 -376.675 101.128";
    rotation = "1 0 0 0";
    scale = "1 1 1";
    interiorFile = "bplat6.dif";
    showTerrainInside = "0";
    team = "1";
    };


    The info between the () had been entered from with in the T2 Editor. I removed the info between the () on line 140, saved the file and reloaded it. Loaded past 140 and stalled on 149. Removed info between the () on line 149, resaved, loaded again. Went to line 158... I noticed a pattern developing here. I procceded to delete all the object names that were enterd from the T2 editor, saved the file and SHAZAM! Objects restored.

    MapBuild01_sm.jpg
    http://www.rcfreas.com/tribes2/files/MapBuild01.jpg
  • If you name objects through the mission editor: don't use spaces, or manually quote the names after you're done...
  • Somethin' funky...

    I name the object in notepad and save file: Teal color shows the edits.

    new Turret(DEFENSIVEtwo) {
    nameTag = "DEFENSIVEtwo";
    position = "-304.734 -508.318 151.505";
    rotation = "0 0 1 90.5273";
    scale = "1 1 1";
    dataBlock = "TurretBaseLarge";
    lockCount = "0";
    homingCount = "0";
    initialBarrel = "MissileBarrelLarge";

    lastProjectile = "14127";
    Target = "40";
    team = "1";
    originalBarrel = "MissleBarrelLarge";
    };


    Start T2, load map, objects appear on hud and CC as named. I then enter T2 editor, adjusted parameters in the SKY simgroup, save and exit editor, exit map and game. Load file back into note pad. The name in nameTag has changed?

    new Turret(DEFENSIVEtwo) {
    position = "-304.734 -508.318 151.505";
    rotation = "0 0 1 90.5273";
    scale = "1 1 1";
    nameTag = "\x01858";
    dataBlock = "TurretBaseLarge";
    lockCount = "0";
    homingCount = "0";
    initialBarrel = "MissileBarrelLarge";

    Target = "40";
    originalBarrel = "MissleBarrelLarge";
    lastProjectile = "14127";
    team = "1";
    };


    The name of object in the next game load appears as a number, such as 740 Turret
    I assume then the very last thing to edit before releasing the map is to manually edit the object names and then not edit the map inside the T2 editor after that. ???
  • The name of object in the next game load appears as a number, such as 740 Turret
    I assume then the very last thing to edit before releasing the map is to manually edit the object names and then not edit the map inside the T2 editor after that.

    There is a fix for that, Red Shifter made the fix, here you can DL/Read about the fix.

    Equipment Name Corruption Bug [FIX]
    http://www.tribaloutpost.com/forums/showthread.php?t=7093

    If you want to make a cs file and copy & paste it, here is the code:
    package MappingHelper {
    
    function EditorSaveMission()
    {
       // just save the mission without renaming it
    
       // first check for dirty and read-only files:
       %missionFile = "missions/" @ $CurrentMission @ ".mis";
       %terrainFile = "terrains/" @ Terrain.terrainFile;
    
       if((EWorldEditor.isDirty || ETerrainEditor.isMissionDirty) && !isWriteableFileName(%missionFile))
       {
          MessageBoxOK("Error", "Mission file \""@ %missionFile @ "\" is read-only.");
          return false;
       }
       if(ETerrainEditor.isDirty && !isWriteableFileName(%terrainFile))
       {
          MessageBoxOK("Error", "Terrain file \""@ %terrainFile @ "\" is read-only.");
          return false;
       }
    
       // MAPPING HELPER: RENAME ITEMS THAT HAVE BEEN OVERWRITTEN BY TAGGED STRINGS
       unbreakMyNames();
      
       // now write the terrain and mission files out:
    
       if(EWorldEditor.isDirty || ETerrainEditor.isMissionDirty)
          MissionGroup.save(%missionFile);
       if(ETerrainEditor.isDirty)
          Terrain.save(Terrain.terrainFile);
       if(EWorldEditor.isGraphDirty && isObject(NavGraph))
          NavGraph.saveGraph();
       EWorldEditor.isDirty = false;
       EWorldEditor.isGraphDirty = false;
       ETerrainEditor.isDirty = false;
       ETerrainEditor.isMissionDirty = false;
       EditorGui.saveAs = false;
    
       return true;
    }
    
    function unbreakMyNames(%this) {
    	if(%this $= "")
    		%this = MissionGroup;
    	for (%i = 0; %i < %this.getCount(); %i++){
    		%obj = %this.getObject(%i);
    		if (%obj.getClassName() $= SimGroup)
    		{
    			unbreakMyNames(%obj);
    		}
    		else 
    		{
    			%nameTag = getTaggedString(%obj.nameTag);
    			if(%nameTag !$= "")
    				%obj.nameTag = %nameTag;
    	        }
       	}
    }
    
    };
    
    activatePackage(MappingHelper);
    

    vgra :)
  • Awesome. Seems to be working properly now. All object names are displayed properly and saved correctly. Thanks for the link |AcId-BuRn|. More info to read and absorb.
Sign In or Register to comment.