Dear returning Carmageddon fans Image

These last years, the CWA Board assimilated what was archived from many old Carmageddon forums, including the whole of the Official Carmageddon.com Forums.
If you wish to merge any previous account you might have had with your new or existing CWA account, don't hesitate to reach out to us !

Can you 'fake' a line break in the textfiles?

The greatest unfinished sequel ever!
Post Reply
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Can you 'fake' a line break in the textfiles?

Post by C2 Scientist »

Hello all,

This is a bit of an uncommon question I suppose, but I'm wondering if there's any special character or a combination of characters which could be used to fake a line break in the C2 textfiles, instead of, you know, simply pressing "Enter".

It's not really hugely important, I was just thinking of compacting some of the often used large textfiles by combining multiple settings on single lines. The game of course expects line breaks, and if you just go on and combine multiple settings on a single line anyway, the game will crash (surprise!).

Cheers. :)
User avatar
Razor
Stomping-on-Kittens
Posts: 3425
Joined: Sat Dec 01, 2007 6:38 pm
Location: Beaver City
Contact:

Can you 'fake' a line break in the textfiles?

Post by Razor »

Alt-0160 maybe? It's the Alt code for a space.
[ Razor @ Carmageddon Webmasters Alliance Network ] [ My Downloads ] [ My Carma Items ] [ Conversion lists ]
To download the BETA Mod and more information on my other work, visit me @ https://razor.cwaboard.co.uk
User avatar
Fireman
motorised death
Posts: 784
Joined: Thu May 28, 2009 8:06 am

Can you 'fake' a line break in the textfiles?

Post by Fireman »

Alt-0160 maybe? It's the Alt code for a space.

Heh that was the first thing I tried as well, doesn't work though.
User avatar
Razor
Stomping-on-Kittens
Posts: 3425
Joined: Sat Dec 01, 2007 6:38 pm
Location: Beaver City
Contact:

Can you 'fake' a line break in the textfiles?

Post by Razor »

Alt-0160 maybe? It's the Alt code for a space.

Heh that was the first thing I tried as well, doesn't work though.
Damn :(
User avatar
Fireman
motorised death
Posts: 784
Joined: Thu May 28, 2009 8:06 am

Can you 'fake' a line break in the textfiles?

Post by Fireman »

Internet tells us this:

Notepad has lots of limitations as an editor, and this is one of them. You can't do it. You need an editor that supports regular expressions. You want to replace the comma with a \r\n (carriage return,linefeed) (Unless you install Linux, then you only want the \n).

Use a different editor. If you have Word, that will work. Notepad++ is another alternative, and it's free.
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Can you 'fake' a line break in the textfiles?

Post by C2 Scientist »

Using Notepad++, I can view the special characters Notepad doesn't show, such as the character at the end of each line. I can copy these characters to clipboard and paste where I want them, but for now, Notepad++ still creates a new line after those characters, so I can't insert any text to the right side of them, on the same line.

I think what I'm after is sort of a 'special' editing mode in Notepad++, which would let me insert text after a character when editing the textfile, but which would translate into an actual line break in the saved textfile. For example:


A line like this when editing in Notepad++...
A B C D


... would save as this:
A
B
C
D

Or something similar to that effect. :)

The hunt continues...
User avatar
Fireman
motorised death
Posts: 784
Joined: Thu May 28, 2009 8:06 am

Can you 'fake' a line break in the textfiles?

Post by Fireman »

What info I can get from what that guy on the internet said is that you replace the comma to be /r/n (I've never used Notepad++, so I have no idea what this means) and then use the comma to create the "hard enters".\

So it would be like:

A , B , C , D

And then , would stand for /r/n


But like I said, I have no idea how it works :P

EDIT, some more internet infos:

You can search and replace by CR in Notepad (works for CSV purposes) by:

- Firing up Excel, and typing Alt-Enter in a cell to enter a CR
- Saving this file as CSV
- Opening this CSV in Notepad - the CR will be shown as a blank square
- Copy this square and paste it into Replace
- When replace is done, CR will be there, and can be interpreted (though not with Notepad - but Wordpad will do it, so will Excel...)

EDIT, and another person said this:

Notepad++ insert carriage return

In notepad++ you can easily find a carriage return by copying a section of text with a carriage return in it and doing ctrl+f or ctrl+h to replace, but you cannot copy that block and paste into the replace box. I found the answer for this here: http://bytes.com/topic/net/answers/7676 ... -character

In the replace area, type

\1\r\n\2 -- \1 is the first group, \r\n is a carriage return and a new
line, \2 is the second group.
Post Reply

Check who’s online

Users browsing this forum: No registered users and 7 guests