A brief question about mod crashes

I changed it back, I tell you!

This morning while working on a mod purely for my own enjoyment, I made a mistake and added two light sources I decided that I did not want. Since there is no in-editor way to delete them (that I know of), I quit Darwinia and went into the map_garden.txt file (my first level is Garden, not the normal game level of the same name). I deleted the two light sources from the file, making sure to first copy them into another file (just in case). I also changed the landscape_default.bmp to another file, then saved map_garden.txt. I opened Darwinia, only to have it crash before showing the world screen. The error message I recieved read, more or less, as follows:

Application Darwinia has unexpectedly quit. (gives some irrelevant Finder info and the location of blackbox.txt)
Darwinia has recieved a fatal error (10). ScriptTrigger UniqueId in map_garden.txt is not unique.

At the moment, I forget what else it said, but that was the important part. Slightly confused about what it meant, I checked the file and, finding nothing wrong, tried again. Darwinia gave me the same message. I remembered the changes I had made and, just to be sure, undid them, copying the filename and light source data back in. I restarted Darwinia, but to no avail. Same error message again. I was starting to get a little worried that I may have permanently screwed something up, as this made the second false-alarm Darwinia glitch in under three days (the first one was just my own stupidity).

I then removed the entire mod folder from the Application Support folder (but did not delete it) and restarted the game. It opened, showing me only the blinking Garden level from the normal game. I checked the mod settings, and learned that it still thought I was in my mod. I unloaded it and checked the profile settings. It had set my profile to "none." No surprise there, it does that pretty much every time I change something major.

I changed back to my profile and everything appears to be working more or less right. I started rebuilding what little I had in the mod from scratch, and so far I have had no tremendous problems with it. Still, however, I would like to know if anyone has any insight as to what happened and how to fix it, just in case I (or anyone else) encounter this problem again in the future. Thank you.

EDIT: Oh yeah, and I'm also having a really stupid problem with my trees. It's doubtless a user error (or an eye-dee-ten-tee problem), but for some reason the tree branches I tried to set to a nice deep green came out a vibrant, rather eye-paining shade of purple. Note that in the Tree Editor window the color appears fine, but in testing the aforementioned color glitch takes effect. Any ideas?

DOUBLE EDIT/FLAME DETERRENT: By the way, I already went back to day 1 of this forum looking for similar problems and could not see any that matched the description. However, I have not looked at any of the other Darwinia sites or forums for the problem as yet. So don't flame me.

This post has been edited by mrxak : 15 February 2007 - 03:18 AM

@q-lok, on Jul 3 2006, 08:21 PM, said in A brief question about mod crashes:

Application Darwinia has unexpectedly quit. (gives some irrelevant Finder info and the location of blackbox.txt)
Darwinia has recieved a fatal error (10). ScriptTrigger UniqueId in map_garden.txt is not unique.

This means that you have two buildings with the same ID number. You will have to track down the offending building, and change its number. I would suggest looking in both your map file, and your mission file for the duplicated building ID. Remember, each ID must be unique. If you are having trouble, post your mission and map files here, and I will have a look. Also, check all of your maps and missions, as when you copied things around, you may have added some extra file that is confusing Darwinia.

Quote

EDIT: Oh yeah, and I'm also having a really stupid problem with my trees. It's doubtless a user error (or an eye-dee-ten-tee problem), but for some reason the tree branches I tried to set to a nice deep green came out a vibrant, rather eye-paining shade of purple. Note that in the Tree Editor window the color appears fine, but in testing the aforementioned color glitch takes effect. Any ideas?

The tree editor displays the wrong values. When you change the red value, you are not changing red, but the alpha value. Watch the tree that you are editing, not the sample box.

red == alpha
green == blue
blue == green
alpha == red

Quote

DOUBLE EDIT/FLAME DETERRENT: By the way, I already went back to day 1 of this forum looking for similar problems and could not see any that matched the description. However, I have not looked at any of the other Darwinia sites or forums for the problem as yet. So don't flame me.

No flames. However, the game was created by Introversion Software. A good place to look for modding help would be the Introversion Darwinia Forums. There is a subforum dedicated to modding.

xander

@darwinian, on Jul 4 2006, 08:28 AM, said in A brief question about mod crashes:

This means that you have two buildings with the same ID number. You will have to track down the offending building, and change its number. I would suggest looking in both your map file, and your mission file for the duplicated building ID. Remember, each ID must be unique. If you are having trouble, post your mission and map files here, and I will have a look. Also, check all of your maps and missions, as when you copied things around, you may have added some extra file that is confusing Darwinia.

I feel sure that's not the problem, as I have thoroughly checked all of the files for my mod, tested them, and located the problematic buildings:

ControlTower (id 0)
RadarDish (id 4)
ControlTower (id 5)

I have looked at locations.txt, game.txt, map_garden.txt, mission_garden.txt, map_hub.txt, mission_hub.txt, and strings_default.txt -- the sum total of my mod's files as of this moment -- and still have been unable to find any problems. I am quite certain that mission_hub.txt/map_hub.txt cannot be the problem as I have not added anything to that level at all. Ever. It remains 100% empty. Therefore, the problem must be in one of the others. I have determined that, to the best of my knowledge, it exists only in map_garden.txt, as there are no other buildings defined anywhere in the mod.

Here is a screencap of the map_garden.txt file:
Attached File gardenmap.png (25.65K)
Number of downloads: 48

And the error (just for your information):
Attached File hatefulerror.png (27.63K)
Number of downloads: 49

@darwinian, on Jul 4 2006, 08:28 AM, said in A brief question about mod crashes:

The tree editor displays the wrong values. When you change the red value, you are not changing red, but the alpha value. Watch the tree that you are editing, not the sample box.

red == alpha
green == blue
blue == green
alpha == red

Again, I'm sure that it's just my error/stubbornness, but the color that appears in the editor is, for all intents and purposes, the one I want. Does the Tree Editor display the result of the numbers as labeled before it reverses the coloring and renders the actual tree, or have I encountered something new? By the way, the trunk color is exactly what the editor says it shoud be; the only problem is with inconsistent leaf coloring.

@darwinian, on Jul 4 2006, 08:28 AM, said in A brief question about mod crashes:

No flames. However, the game was created by Introversion Software. A good place to look for modding help would be the Introversion Darwinia Forums. There is a subforum dedicated to modding.

I am already aware of that, I'm just much too lazy to actually be active on another forum besides the ones I'm already part of. In fact, I already looked at that forum -- for about five seconds. Then I decided that it wasn't worth wading through more old topics and closed the window.

This post has been edited by Q-Lok : 04 July 2006 - 07:47 PM

@q-lok, on Jul 4 2006, 06:36 PM, said in A brief question about mod crashes:

I'm sure that's not the problem, as I have thoroughly checked all of the files for my mod, tested them, and located the problematic buildings:

Try changing the name of your map. It is possible that the mod is conflicting with the original files. Your map does have the same name as a map from the original scenerio, so it is possible that there is an ID conflict.

Quote

Again, I'm sure that it's just my error/stubbornness, but the color that appears in the editor is, for all intents and purposes, the one I want. Does the Tree Editor display the result of the numbers as labeled before it reverses the coloring and renders the actual tree, or have I encountered something new? By the way, the trunk color is exactly what the editor says it shoud be; the only problem is with inconsistent leaf coloring.

Again, watch the actual tree. The color in the sample box responds as you would expect. The color of the tree responds as I outlined above. This is a known bug in the Mac version (at least, I think that John is aware of it). It has been discussed in some detail on the IV boards. As you edit the colors, watch what happens to the tree.

xander

@darwinian, on Jul 4 2006, 12:10 PM, said in A brief question about mod crashes:

Try changing the name of your map. It is possible that the mod is conflicting with the original files. Your map does have the same name as a map from the original scenerio, so it is possible that there is an ID conflict.

Good idea. I'll try that. It actually never occurred to me that Darwinia might have a conflict with itself, in reference to an internal level. However, this possibility leaves me to wonder why only those three buildings had conflicts, as opposed to the three ID numbers in between (I don't know, as I've not yet actually extracted the main.dat, sounds.dat, and (whatever the third file was).dat to look at the game's innards). I guess it could be due to the IV developers changing things around in the middle of development. I'll attempt your solution, but I'd appreciate you just thinking about other solutions, just in case. It may be a bit before I get back to you on this, as I'm not on my Darwinia-comp right now.

@darwinian, on Jul 4 2006, 12:10 PM, said in A brief question about mod crashes:

Again, watch the actual tree. The color in the sample box responds as you would expect. The color of the tree responds as I outlined above. This is a known bug in the Mac version (at least, I think that John is aware of it). It has been discussed in some detail on the IV boards. As you edit the colors, watch what happens to the tree.

Thank you. I wonder why the variables get swapped during rendering...?

This post has been edited by Q-Lok : 05 July 2006 - 12:29 AM

i just updated from 1.2.2 to 1.4.2 (current version).
now i try to start and get that same error. screen goes black, then comes back to the dektop again and the message pops up.

my game was in a mod. 1.4.2 seems to have problems with older mods.
it’s in /.../Darwinia/full/mods/EnemyWithinPart2/levels/map_assembler.txt

the full-directory makes me think: any problems with upgrading a full version?
or did i do something wrong?

edit: just checked. 1.2.2 still runs!

This post has been edited by atze : 05 July 2006 - 07:17 AM

@atze, on Jul 5 2006, 05:14 AM, said in A brief question about mod crashes:

i just updated from 1.2.2 to 1.4.2 (current version).
now i try to start and get that same error. screen goes black, then comes back to the dektop again and the message pops up.

my game was in a mod. 1.4.2 seems to have problems with older mods.
it’s in /.../Darwinia/full/mods/EnemyWithinPart2/levels/map_assembler.txt

the full-directory makes me think: any problems with upgrading a full version?
or did i do something wrong?

edit: just checked. 1.2.2 still runs!

I also just recently updated, but I am certain that simply upgrading the program cannot be the only cause of the problem -- at least, not the way mine was caused. This assumption of mine is mostly based on the fact that my error started popping up on me about two days before I updated. However, I am curious to see what caused yours. Did you name Darwinia 1.4.2 something different than Darwinia 1.2.2, or are the filenames identical?

EDIT: Just FYI, I may not be able (as in, physically incapable) to find out whether xander's solution solves my problem or not, as I'm going to be with relatives pretty much all day.

This post has been edited by Q-Lok : 05 July 2006 - 09:17 AM

@q-lok, on Jul 5 2006, 04:14 PM, said in A brief question about mod crashes:

Did you name Darwinia 1.4.2 something different than Darwinia 1.2.2, or are the filenames identical?

what filenames?

i renamed the old Darwinia directory to Darwinia.1.2.2. but that has nothing to do with the app. if i start the old one it runs. if i start the new one it errors.

Ah. And does the new version have any of its preferences changed yet, or did it ever run?

no. i copied the new version from the dmg to my hd and double-clicked it. starts, screen black, back to desktop, error-panel. i dont see an intro or something else. just black.

1.2.2 still works.

@atze, on Jul 5 2006, 03:10 PM, said in A brief question about mod crashes:

no. i copied the new version from the dmg to my hd and double-clicked it. starts, screen black, back to desktop, error-panel. i dont see an intro or something else. just black.

1.2.2 still works.

Would you post a blackbox file, please? That file should be in ~/ .

xander

@darwinian, on Jul 6 2006, 03:20 AM, said in A brief question about mod crashes:

Would you post a blackbox file, please? That file should be in ~/ .

xander

i had to remove the users and mod directories to make 1.4.4 start. but i really would like to just continue my old games....

good luck on your mission:

=========================
DARWINIA BLACK BOX REPORT

VERSION : macosx-ppc-full-1.4.2
ERROR : 'Invalid map file specified'

=========================
====== STACKTRACE =======

retAddress = 0x3d994
retAddress = 0x3d750
retAddress = 0x33b64
retAddress = 0x36480
retAddress = 0x1edc8
retAddress = 0x8c64
retAddress = 0x8658
retAddress = 0x64e38
retAddress = 0x64fc0
retAddress = 0x56d60
retAddress = 0x568c
retAddress = 0x92943ad8
retAddress = 0x90803010
retAddress = 0x907fb0ec
retAddress = 0x9292dee0
retAddress = 0x936f0f98
retAddress = 0x936f0e84
retAddress = 0x936f09cc
retAddress = 0x936f0574
retAddress = 0x92944ae4
retAddress = 0x92944944
retAddress = 0x914f9960
retAddress = 0x914f97fc
retAddress = 0x914f9654
retAddress = 0x931edeb0
retAddress = 0x936eecbc
retAddress = 0x936ee7a8
retAddress = 0x936eacec
retAddress = 0x937db87c
retAddress = 0x5968
retAddress = 0x295c
retAddress = 0x27dc
retAddress = 0x0

@atze, on Jul 6 2006, 09:01 AM, said in A brief question about mod crashes:

i had to remove the users and mod directories to make 1.4.4 start. but i really would like to just continue my old games....

good luck on your mission:

=========================
DARWINIA BLACK BOX REPORT

VERSION : macosx-ppc-full-1.4.2
ERROR : 'Invalid map file specified'

I hope you backed-up your mods and users direcotories... The problem that you are having is that game.txt is trying to load a map that does not exist. This indicates that main.dat is corrupt, or that you are pointing Darwinia to a mod that does not exist. Please change the following lines of preferences.txt:

UserProfile = NewProfileName
Mod = none

See if Darwinia will start up if you do that.

This post has been edited by darwinian : 06 July 2006 - 11:56 AM

Thank you, xander. Your idea about the level file being a duplicate was correct. As of yesterday morning, my copy of Darwinia works better than ever, as does my mod. Incedentally, the reason that only the three buildings caused problems is that there were three dynamic ScriptTrigger buildings in the mission file that I had not overwritten.

@q-lok, on Jul 6 2006, 08:40 PM, said in A brief question about mod crashes:

Incedentally, the reason that only the three buildings caused problems is that there were three dynamic ScriptTrigger buildings in the mission file that I had not overwritten.

Ah! That makes sense. I wonder why I didn't think of that. And, one more thing. It is possible to have the location's name on the world map differ from the name of the map file. For instance, if you have a location called "Map001", but you want that location to be called "Revolution" on the world map, you would add the following string to strings_default.txt:

location_Map001		  Revolution

The location should then be named "Revolution" on the world map. This is a neat little trick that is poorly documented -- I wish I had figured it out before I finished Insurrection. It would have made the Receiver hack work much better 🙂

xander

@darwinian, on Jul 6 2006, 03:55 PM, said in A brief question about mod crashes:

It is possible to have the location's name on the world map differ from the name of the map file. For instance, if you have a location called "Map001", but you want that location to be called "Revolution" on the world map, you would add the following string to strings_default.txt:

location_Map001		  Revolution

The location should then be named "Revolution" on the world map.

Yeah. Since then I've figured out how that works. I'll definitely be contacting Icepick and TheNextGame about this mod, as well as keeping you updated in exchange/thanks for your help with this ever-so-stupid problem. I guess the reason my mission_garden.txt wasn't overwriting the three ScriptTriggers was because of the game using mission_garden_liberate.txt instead.

By the way, here's a screencap of the original Garden mission file, from the main.dat archive.
Attached File gardentxtpic.png (27.58K)
Number of downloads: 45

(suckup)Also, I really enjoyed playing Insurrection; its graphical work and... really everything else about it were utterly incredible. I especially like the alternate storyline paths right after secondary_core. All in all, a great mod.(/suckup)

@q-lok, on Jul 10 2006, 07:31 PM, said in A brief question about mod crashes:

(suckup)Also, I really enjoyed playing Insurrection; its graphical work and... really everything else about it were utterly incredible. I especially like the alternate storyline paths right after secondary_core. All in all, a great mod.(/suckup)

Well, thank you very much.

xander