[SOLVED]Editing CP's without ZeroEditor

Started by Snake, March 04, 2013, 06:06:01 PM

Previous topic - Next topic
March 04, 2013, 06:06:01 PM Last Edit: March 06, 2013, 05:35:53 PM by Snake
Well, my map that has tons of hours into it and in the near finish stages, now causes Zeroeditor to crash upon startup. All my tries at a workaround have failed and it has made me want to quit modding and SWBF forever, because I put so much work in that map. I forgot to back it up (ofcourse the one time i forget). Anyway, I was updating the map, and I think all I did was try to fix some CP Regions. Well after that ZE started crashing. So I munged and played the edited map and it worked fine, except one CP registers as an enemy CP by both sides. So I can only assume that it is what is causing ZE to crash. I would be perfectly happen to simply remove all the CP's and redo them but I don't know how without ZeroEditor.

So here's the known:
-I edited CP's
-ZE started crashing
-Map still works except one CP is messed up

Unknowns:
-Why would a CP crash ZeroEditor?
-How could I fix it without being able to open ZE?
-Why are my mod tools cursed?

If anyone has anything helpful to put in, please try. I really really do not want this map to be scrapped.
=AaTc= Forever

SALLY....

-Retired Modder

March 04, 2013, 06:14:26 PM #1 Last Edit: March 04, 2013, 06:17:13 PM by Phobos
Quote from: Snake on March 04, 2013, 06:06:01 PM
Well, my map that has tons of hours into it and in the near finish stages, now causes Zeroeditor to crash upon startup. All my tries at a workaround have failed and it has made me want to quit modding and SWBF forever, because I put so much work in that map. I forgot to back it up (ofcourse the one time i forget). Anyway, I was updating the map, and I think all I did was try to fix some CP Regions. Well after that ZE started crashing. So I munged and played the edited map and it worked fine, except one CP registers as an enemy CP by both sides. So I can only assume that it is what is causing ZE to crash. I would be perfectly happen to simply remove all the CP's and redo them but I don't know how without ZeroEditor.

So here's the known:
-I edited CP's
-ZE started crashing
-Map still works except one CP is messed up

Unknowns:
-Why would a CP crash ZeroEditor?
-How could I fix it without being able to open ZE?
-Why are my mod tools cursed?

If anyone has anything helpful to put in, please try. I really really do not want this map to be scrapped.

There are source files in your data\WLD folder which control the cps and regions (lyr, rgn, wld). You can usually alter these with note-pad and it will make the changes to the map without needing to use zeroeditor, depending on what exactly you are trying to change. Many things could be causing a crash, it's hard to tell without more information. CP ownership can also be changed through hex-editing

Idea: Try deleting the *.LLL file in your world1 folder, it seems to be a file zeroeditor creates every time its launched.

March 04, 2013, 06:59:50 PM #2 Last Edit: March 04, 2013, 07:10:31 PM by Snake
I don't see any file with an .LLL ending.. What exactly should I do to just completely take out all CP's, Spawn Paths, & Regions. I can hex edit but I just need to know exactly what to change and what to change it to.

I just corrected everything in the .rgn file but it still crashes.. UGH! What could it possibly be?
=AaTc= Forever

SALLY....

-Retired Modder

March 04, 2013, 07:52:03 PM #3 Last Edit: March 04, 2013, 07:54:48 PM by -RepublicCommando-
Quote from: Snake on March 04, 2013, 06:06:01 PM
Well, my map that has tons of hours into it and in the near finish stages, now causes Zeroeditor to crash upon startup. All my tries at a workaround have failed and it has made me want to quit modding and SWBF forever, because I put so much work in that map.
Now you have a slight glimpse at what I've had to go threw for at least half a year..

I've made several incredibly awesome (imo anyways) maps, but they all crashed, so I gave up and deleted all project files... After I finally found SK's  BFbuilder1_1, I got everything to work, but sadly all those projects are gone..
----
It is hard to tell exactly what is wrong, there isn't much information to go by, but whatever you do, DO NOT DELETE IT AND GIVEUP!
Try to think of anything else you might have done to alter the map before you munged, then maybe we can get an idea what's wrong.

Edit: I remember doing this once;
Editing either LYR, or WLD and find CP1 with notepad search utility (can't remember exactly what file it is, I'll double check when I get on my DeskTop with the mod tools) and edit the propertys of it to change it's team.

Then you can see if it is CPs making it crash  (although this seems like a very odd reason for it to crash..)

Quote from: Snake on March 04, 2013, 06:06:01 PM
So here's the known:
-I edited CP's
-ZE started crashing
-Map still works except one CP is messed up

Unknowns:
-Why would a CP crash ZeroEditor?

Seems, you already know, about the reason:
edited CP is broken. You need to loose it.

Quote from: Snake on March 04, 2013, 06:06:01 PM-How could I fix it without being able to open ZE?

Just open your .wld file, and delete "buggy" CP's lines.
They should look's like this:
[spoiler]Object("CP3", "com_bldg_controlzone", 1640685616)
{
ChildRotation(1.000, 0.000, 0.000, 0.000);
ChildPosition(202.697, 0.081, 252.271);
SeqNo(1640685616);
Team(6);
NetworkId(-1);
Label("CP3Label");
CaptureRegion("CP3Capture");
ControlRegion("CP3Control");
SpawnPath("CP3Spawn");
AllyPath("Guys3");
AllyCount("65536");
Radius("0.0");
ValueBleed("10");
Value_ATK_Alliance("10");
Value_ATK_CIS("10");
Value_ATK_Empire("10");
Value_ATK_Republic("10");
Value_ATK_Locals("10");
Value_DEF_Alliance("10");
Value_DEF_CIS("10");
Value_DEF_Empire("10");
Value_DEF_Republic("10");
Value_DEF_Locals("10");
VO_All_AllCapture("all_off_com_report_captured_commandpost");
VO_All_AllLost("all_off_com_report_lost_commandpost3");
VO_All_AllInDispute("");
VO_All_AllSaved("");
VO_All_AllInfo("");
VO_All_ImpCapture("all_off_com_report_lost_commandpost");
VO_All_ImpLost("");
VO_All_ImpInDispute("");
VO_All_ImpSaved("");
VO_All_ImpInfo("");
VO_Imp_AllCapture("imp_off_com_report_lost_commandpost");
VO_Imp_AllLost("");
VO_Imp_AllInDispute("");
VO_Imp_AllSaved("");
VO_Imp_AllInfo("");
VO_Imp_ImpCapture("imp_off_com_report_captured_commandpost");
VO_Imp_ImpLost("imp_off_com_report_lost_commandpost3");
VO_Imp_ImpInDispute("");
VO_Imp_ImpSaved("");
VO_Imp_ImpInfo("");
VO_Rep_RepCapture("rep_off_com_report_captured_commandpost");
VO_Rep_RepLost("rep_off_com_report_lost_commandpost3");
VO_Rep_RepInDispute("");
VO_Rep_RepSaved("");
VO_Rep_RepInfo("");
VO_Rep_CISCapture("rep_off_com_report_lost_commandpost");
VO_Rep_CISLost("");
VO_Rep_CISInDispute("");
VO_Rep_CISSaved("");
VO_Rep_CISInfo("");
VO_CIS_RepCapture("cis_off_com_report_lost_commandpost");
VO_CIS_RepLost("");
VO_CIS_RepInDispute("");
VO_CIS_RepSaved("");
VO_CIS_RepInfo("");
VO_CIS_CISCapture("cis_off_com_chatter_goodjob2");
VO_CIS_CISLost("cis_off_com_report_lost_commandpost3");
VO_CIS_CISInDispute("");
VO_CIS_CISSaved("");
VO_CIS_CISInfo("");
SoldierBan("");
HoverBan("");
SmallBan("");
MediumBan("");
HugeBan("");
FlyerBan("");
}
[/spoiler]
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

I deleted all the regions and CP's. It still crashes right as it starts to load. I'm not sure what the fist thing ZE starts to load is but the loading bar only moves about a half inch then it crashes. *sigh.
=AaTc= Forever

SALLY....

-Retired Modder

Quote from: Snake on March 05, 2013, 01:15:15 PM
I deleted all the regions and CP's. It still crashes right as it starts to load. I'm not sure what the fist thing ZE starts to load is but the loading bar only moves about a half inch then it crashes. *sigh.
I think removing spawn paths would cause a crash but not sure.

Of course, to safe game launch, there is should be at least 2 CP's but for ZE, it's usualy not important.
Anyway, here the my "Die Hard" method, I think, it may resurect many of abandoned projects:
Make reserv copy of your .wld file, and delete about half of it's content. Be sure, to left undeleted main topic lines (about .sky, .ter files etc.), and this simbol at at the bottom of scroll: )
Now, try, if ZE loads. If not, delete enother half of lines, and again, and again, till you will find the reason of the crash after all.
When ZE, stop crash, just copy back all valid lines, from your reserv .wld file.
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

Im not expert on zero editor, but try to see if you have any previous versions of the file on hand, (right click folder, then select properties, and then previous versions)
Remember,

Quote from: Ltin on March 05, 2013, 01:56:04 PM
"To err is human, to miss is stormtrooper"
:rofl:
Peace is a lie, there is only passion          -Fear leads to anger
Through passion, I gain strength              -Anger leads to hate
Through strength, I gain power                -Hate leads to suffering
Through power, I gain victory
Through victory, my chains are broken
The Force shall free me

Geez, how off topic can you get...

Any luck Snake?

March 06, 2013, 01:22:56 PM #11 Last Edit: March 06, 2013, 01:53:15 PM by Snake
Well I just tried Sereja's method and it still crashed but it sort of hesitated this time.. It was weird. Normally it crashes at about a half inch of loading, this time it went about an inch and then still crashed. I will try a few more times..

-Edit
This is the weirdest thing I've ever seen. The more I delete, the further it loads. So maybe its a single object that I've placed a lot of? But why would it suddenly cause ZE to crash.. I hate ZE so much.. Continuing tests..

-Edit2
I deleted chunks of the wld file but still it crashes. I got down to where I deleted everything. This is all that's left:
[spoiler]Version(3);
SaveType(0);

Camera("camera")
{
   Rotation(0.916, 0.176, 0.354, -0.068);
   Position(235.803, 85.903, 417.412);
   FieldOfView(55.400);
   NearPlane(1.000);
   FarPlane(1100.000);
   ZoomFactor(1.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
}
TerrainName("hyp1.ter");
SkyName("hyp1.sky");
ScriptName("DummyScript.dll");
ControllerManager("StandardCtrlMgr");

WorldExtents()
{
   Min(0.000000, 0.000000, 0.000000);
   Max(0.000000, 0.000000, 0.000000);
}

NextSequence(-17886802);[/spoiler]

But it still crashes.. So now more questions are raised. If it wasn't an object, why did it load farther and farther the more I deleted? If it was an object, why does it still crash with no objects in the map?

-Edit3
Actually, it dawned on me that maybe it loaded farther as I deleted more because there was less to load so it seemed to go farther. Therefore, it's not an object that is crashing the map. But I deleted all regions and CP's. What could it possibly be? I did edit the sky file but I don't see how that would affect ZeroEditor..

-Edit4
But the crash occurs when the loading bar says "loading hyp1.wld"

-Edit5
Wow, lot's of edits.. Anyway, I am possibly the happiest person in the world.  :happy: I have to re-do all the AI Planning, CP's, and sky. (I might be able to salvage some of that later though) but I saved the map, much thanks to everyone here who helped.  :D In case this happens for anyone else, here's what I did:

1. I made a new world and copied all the files from the old map into this new one.
2. Then I took all the CP's out of the world file [spoiler]("CP3Label");
   CaptureRegion("CP3Capture");
   ControlRegion("CP3Control");
   SpawnPath("CP3Spawn");
   AllyPath("");
   AllyCount("65536");
   Radius("0.0");
   ValueBleed("10");
   Value_ATK_Alliance("10");
   Value_ATK_CIS("10");
   Value_ATK_Empire("10");
   Value_ATK_Republic("10");
   Value_ATK_Locals("10");
   Value_DEF_Alliance("10");
   Value_DEF_CIS("10");
   Value_DEF_Empire("10");
   Value_DEF_Republic("10");
   Value_DEF_Locals("10");
   VO_All_AllCapture("all_off_com_report_captured_commandpost");
   VO_All_AllLost("all_off_com_report_lost_commandpost3");
   VO_All_AllInDispute("");
   VO_All_AllSaved("");
   VO_All_AllInfo("");
   VO_All_ImpCapture("all_off_com_report_lost_commandpost");
   VO_All_ImpLost("");
   VO_All_ImpInDispute("");
   VO_All_ImpSaved("");
   VO_All_ImpInfo("");
   VO_Imp_AllCapture("imp_off_com_report_lost_commandpost");
   VO_Imp_AllLost("");
   VO_Imp_AllInDispute("");
   VO_Imp_AllSaved("");
   VO_Imp_AllInfo("");
   VO_Imp_ImpCapture("imp_off_com_report_captured_commandpost");
   VO_Imp_ImpLost("imp_off_com_report_lost_commandpost3");
   VO_Imp_ImpInDispute("");
   VO_Imp_ImpSaved("");
   VO_Imp_ImpInfo("");
   VO_Rep_RepCapture("rep_off_com_report_captured_commandpost");
   VO_Rep_RepLost("rep_off_com_report_lost_commandpost3");
   VO_Rep_RepInDispute("");
   VO_Rep_RepSaved("");
   VO_Rep_RepInfo("");
   VO_Rep_CISCapture("rep_off_com_report_lost_commandpost");
   VO_Rep_CISLost("");
   VO_Rep_CISInDispute("");
   VO_Rep_CISSaved("");
   VO_Rep_CISInfo("");
   VO_CIS_RepCapture("cis_off_com_report_lost_commandpost");
   VO_CIS_RepLost("");
   VO_CIS_RepInDispute("");
   VO_CIS_RepSaved("");
   VO_CIS_RepInfo("");
   VO_CIS_CISCapture("cis_off_com_chatter_goodjob2");
   VO_CIS_CISLost("cis_off_com_report_lost_commandpost3");
   VO_CIS_CISInDispute("");
   VO_CIS_CISSaved("");
   VO_CIS_CISInfo("");
   SoldierBan("");
   HoverBan("");
   SmallBan("");
   MediumBan("");
   HugeBan("");
   FlyerBan("");
}[/spoiler]

3. I copied everything except the top part of the .wld file (here's the top part: [spoiler]Version(3);
SaveType(0);

Camera("camera")
{
   Rotation(0.916, 0.176, 0.354, -0.068);
   Position(235.803, 85.903, 417.412);
   FieldOfView(55.400);
   NearPlane(1.000);
   FarPlane(1100.000);
   ZoomFactor(1.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
   Bookmark(0.000, 0.000, 0.000,  1.000, 0.000, 0.000, 0.000);
}
TerrainName("hyp1.ter");
SkyName("hyp1.sky");
ScriptName("DummyScript.dll");
ControllerManager("StandardCtrlMgr");

WorldExtents()
{
   Min(0.000000, 0.000000, 0.000000);
   Max(0.000000, 0.000000, 0.000000);
}

NextSequence(-17886802);

[/spoiler] ) and put it in the new map's .wld file.
4. Then I opened it and IT WORKS!! I might be able to copy over the sky and planning and junk but I'm not trying anything to risky.

The moral of the story is: Backup your world files after every successful test!!
=AaTc= Forever

SALLY....

-Retired Modder

you could post your sky file, its been known to crash ZE for me before.

This is all that I edited:

[spoiler]SkyInfo()
{
    ObjectVisibility(340.000000, 280.000000, 1900.000000);
    FogColor(252, 252, 252);
    FogRange(0.000000, 3000.000000);
    NearSceneRange(150.0, 250.0, 160.0, 330.0);
    FarSceneRange(750.000000, 1300.0);
    AmbientColor(120, 101, 76);
    TopDirectionalAmbientColor(120, 101, 76);
    BottomDirectionalAmbientColor(126, 70, 35);
    CharacterAmbientColor(209,156,73);
    VehicleAmbientColor(189, 136, 53);
    Enable(1559);
    FogRamp(3);
}

SunInfo()
{
    Angle(140.000005, -10.000011);
    Color(92 136 250 100);
    Texture("");
    Degree(90.000011);
    BackAngle(180.000022, 0.000000);
    BackColor(128, 128, 128);
    BackDegree(0.000000);
}[/spoiler]
=AaTc= Forever

SALLY....

-Retired Modder

That's some commendable tenacity Snake, good job and to all those you helped out... that's the true spirit of SWBFgamers!