Maincfg help

Status
Not open for further replies.

Yacker

Metallic
I was just preparing the last bits of an oldc submission me and someone else have been working on, but we can't seem to figure out what's wrong with the maincfg. It crashes, and the log.txt gives no insight as to why. Removing the maincfg works fine. Here it is:
MainCfg
GameData = unchartedterritory.dat

Clear Unlockables
Clear Emblems
Clear ExtraEmblems
Clear ConditionSets

Emblem 1
Hint = censored
Type = Global
X = -240
Y = 3872
Z = 8
MapNum = 1
Sprite = A
Color = SKINCOLOR_WHITE
Emblem 2
Hint = censored
Type = Global
X = 176
Y = -20256
Z = -1118
MapNum = 1
Sprite = B
Color = SKINCOLOR_WHITE
Emblem 3
Hint = censored
Type = Global
X = 17936
Y = 1408
Z = 368
MapNum = 1
Sprite = C
Color = SKINCOLOR_WHITE
Emblem 4
Hint = censored
Type = Global
X = 4944
Y = 3584
Z = 1008
MapNum = 1
Sprite = D
Color = SKINCOLOR_WHITE
Emblem 5
Hint = censored
Type = Global
X = 2496
Y = -23104
Z = -638
MapNum = 1
Sprite = E
Color = SKINCOLOR_WHITE
ExtraEmblem 1
Name = Gotta Go Fast.
Objective = Get to the goal in under 4 minutes.
ConditionSet = 1
ExtraEmblem 2
Name = Score
Objective = Collect 50,000 Points.
ConditionSet = 2
Unlockable 1
Name = Emblem Hints
Objective = Collect one emblem
Height = 10
ConditionSet = 3
Type = EmblemHints

ConditionSet 1
Condition1 = MapTime 1 6300
ConditionSet 2
Condition1 = MapScore 1 50000
ConditionSet 3
Condition1 = TotalEmblems 1

Level 01
levelname = Shadow Castle
musicslot = 70
skynum = 103
weather = 3
RecordAttack = true
typeoflevel = Singleplayer,Co-op
LevelSelect = 1
 
Try separating the emblem data.

Code:
Emblem 1
Blah Blah Blah

Emblem 2
Blah Blah Blah
 
When I meant by separating the emblem data, I really meant to say break it into paragraphs because SRB2 is recognizing it as one big thing. I will save you the trouble on doing it because I had literally just did this myself moments ago.

Code:
MainCfg
GameData = unchartedterritory.dat

Clear Unlockables
Clear Emblems
Clear ExtraEmblems
Clear ConditionSets

Emblem 1
Hint = censored
Type = Global
X = -240 
Y = 3872 
Z = 8
MapNum = 1
Sprite = A
Color = SKINCOLOR_WHITE

Emblem 2
Hint = censored
Type = Global
X = 176 
Y = -20256
Z = -1118
MapNum = 1
Sprite = B
Color = SKINCOLOR_WHITE

Emblem 3
Hint = censored
Type = Global
X = 17936 
Y = 1408 
Z = 368
MapNum = 1
Sprite = C
Color = SKINCOLOR_WHITE

Emblem 4
Hint = censored
Type = Global
X = 4944 
Y = 3584 
Z = 1008
MapNum = 1
Sprite = D
Color = SKINCOLOR_WHITE

Emblem 5
Hint = censored
Type = Global
X = 2496 
Y = -23104
Z = -638
MapNum = 1
Sprite = E
Color = SKINCOLOR_WHITE

ExtraEmblem 1
Name = Gotta Go Fast.
Objective = Get to the goal in under 4 minutes.
ConditionSet = 1

ExtraEmblem 2
Name = Score
Objective = Collect 50,000 Points.
ConditionSet = 2

Unlockable 1
Name = Emblem Hints
Objective = Collect one emblem
Height = 10
ConditionSet = 3
Type = EmblemHints

ConditionSet 1
Condition1 = MapTime 1 6300

ConditionSet 2
Condition1 = MapScore 1 50000

ConditionSet 3
Condition1 = TotalEmblems 1

Level 01
levelname = Shadow Castle
musicslot = 70
skynum = 103
weather = 3
RecordAttack = true
typeoflevel = Singleplayer,Co-op
LevelSelect = 1

Tested it and it works. Good luck in the upcoming OLDC.
 
Strange, that's what I did...but when I copy and paste it from yours it works. Egh, what ever, it works now. Thanks.
 
Strange, that's what I did...but when I copy and paste it from yours it works. Egh, what ever, it works now. Thanks.
Just going to throw this out there, but not all characters which can be put in a text file are "printable"; which is to say, there are characters that will not appear on screen. Many of these non-printable characters, including one which also acts as a line break, will crash SRB2 immediately on load just from being in MainCFG.

This isn't a common problem, but every once in a blue moon it crops up and you just have to cut out large swaths of the SOC at a time until you find the part that's crashing it. It's either that or looking through the thing in a hex editor.

I don't know if that's the problem you were dealing with or not, but I figured I would give it a mention.
 
Prime, why are some characters not printable? I mean, computers aren't rocket science exactly, but i don't get that.
 
Last edited:
Essentially, when text is stored, it's stored with extra formatting characters. A line break is a special character that starts a new line of text instead of having a bunch of blank space in the storage of the text.

If for some reason the text editor you're using sucks, it could do things like put line breaks in via a non-standard method, and then when you load up the file in another editor, there aren't any line breaks and every word is on a single line.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top