XML Newline
17 replies



23.11.20 10:15:25 pm
How does one create a new line in the XML serverinfo file?
I've tried Google, nothing works.
I've tried using the following:
And god knows what else...
I just want to have a bunch of text under the same <text> tag but I need newlines for that.
How to make this a reality?
I've tried Google, nothing works.
I've tried using the following:
Code:
1
2
3
2
3




And god knows what else...
I just want to have a bunch of text under the same <text> tag but I need newlines for that.
Code:
1
2
3
4
2
3
4
<text size = "15" color="#FFFFFF" align = "center">
Title
Line1
Line2</text>
Title
Line1
Line2</text>
How to make this a reality?
edited 2×, last 23.11.20 11:23:11 pm
It's hard being the best girl in the whole entire world
Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
<?xml version="1.0"?>
<serverinfo>
<text size = "15" color="#FFFFFF" align = "center">Title</text><br/>
<text size = "15" color="#FFFFFF" align = "center">Line1</text><br/>
<text size = "15" color="#FFFFFF" align = "center">Line2</text><br/>
</serverinfo>
<serverinfo>
<text size = "15" color="#FFFFFF" align = "center">Title</text><br/>
<text size = "15" color="#FFFFFF" align = "center">Line1</text><br/>
<text size = "15" color="#FFFFFF" align = "center">Line2</text><br/>
</serverinfo>
Same text tag seems not to work.
Muh
Also is there a fully explained article on how this XML stuff works?
I mean do I need to add the images that I use to the server transfer list file or is it automated like mods?
Also, why don't we have the word wrap feature like in the original server info?
And how to get XML errors to appear in the console?
May we turn this into an XML troubleshooting thread if there isn't already?
EDIT:
Can you have more than 1 color in 1 text tag?
Can you change the font somehow?
I mean do I need to add the images that I use to the server transfer list file or is it automated like mods?
Also, why don't we have the word wrap feature like in the original server info?
And how to get XML errors to appear in the console?
May we turn this into an XML troubleshooting thread if there isn't already?
EDIT:
Can you have more than 1 color in 1 text tag?
Can you change the font somehow?
edited 1×, last 24.11.20 10:12:47 am
It's hard being the best girl in the whole entire world
@
Gaios: It is quite clear that whatever CS2D is using is not identical to XML, would you mind reading and understanding the thread before you post anything?
Moving on... Here's a tl;dr of my questions thus far:
How does one vertically align text in the text tag?
Why is there no word wrap for the text tag?
Why don't newlines work in the text tag?
Can you have more than 1 color in 1 text tag?
Can you change the font somehow?
Do I need to add the images that I use to the server transfer list file or is it automated like mods?
And how to get XML errors to appear in the console?

Moving on... Here's a tl;dr of my questions thus far:
How does one vertically align text in the text tag?
Why is there no word wrap for the text tag?
Why don't newlines work in the text tag?
Can you have more than 1 color in 1 text tag?
Can you change the font somehow?
Do I need to add the images that I use to the server transfer list file or is it automated like mods?
And how to get XML errors to appear in the console?
It's hard being the best girl in the whole entire world
The serverinfo feature is not documented well. THIS might help.
Alot of questions that can only be answered by trying and/or asking
SQ.
Alot of questions that can only be answered by trying and/or asking

Muh
@
Mami Tomoe: If you mind reading too, HTML is built on top of XML. Pretty much basic HTML tags will work for you.

@
Gaios which they clearly haven't.
Have you not noticed that I've literally spent hours trying to find a solution online?
I've used both XML and HTML tags and neither work.
Do you even know the solution yourself?
EDIT:
Upon further inspection, when I connect to my server with another client I find out that the server info XML file that the client receives is not equal to the one that the server contains, it goes through some kind of line compression and breaks the XML file.
@
SQ, @
DC am I crazy or is this XML thing completely broken?

Have you not noticed that I've literally spent hours trying to find a solution online?
I've used both XML and HTML tags and neither work.
Do you even know the solution yourself?
EDIT:
Upon further inspection, when I connect to my server with another client I find out that the server info XML file that the client receives is not equal to the one that the server contains, it goes through some kind of line compression and breaks the XML file.
@


edited 1×, last 24.11.20 02:30:09 pm
It's hard being the best girl in the whole entire world
It is XML, not HTML. It's just a language to implement structure.
Everything else depends on implementation which is very simple at the moment.
You can still achieve more than with regular server info.
There are a few tags implemented.
It's image, break, and text.
A good sample of what you can achieve.
https://pastebin.com/3M12kKUY
also great implementation in brazil server

You can create a new line only via break command.
The main point of this XML feature was to make server info more extendable with images/colors and more properties for the objects in the description. (+ without braking existing features)
- More In-Depth
Tags:
text
atributes:
color
hover-color
align
url
size
image
atributes:
color
hover-color
align
url
width
height
source
webimage
br - simple break
Regarding the difference in client and server.
Yes, there is character limit per line because legacy server info transfer deletes characters if they are over certain limit. That's not intended for new server info, but it's not fixed.
However, it is still possible to get around it.
Everything else depends on implementation which is very simple at the moment.
You can still achieve more than with regular server info.
There are a few tags implemented.
It's image, break, and text.
A good sample of what you can achieve.
https://pastebin.com/3M12kKUY
also great implementation in brazil server

You can create a new line only via break command.
Code:
1
<br/>
The main point of this XML feature was to make server info more extendable with images/colors and more properties for the objects in the description. (+ without braking existing features)
- More In-Depth
Tags:

atributes:
color
hover-color
align
url
size

atributes:
color
hover-color
align
url
width
height
source
webimage

Regarding the difference in client and server.
Yes, there is character limit per line because legacy server info transfer deletes characters if they are over certain limit. That's not intended for new server info, but it's not fixed.
However, it is still possible to get around it.
edited 9×, last 24.11.20 03:28:01 pm
@
SQ: How would I get around the character limit?
Also will that be fixed in the next CS2D update?

Also will that be fixed in the next CS2D update?
It's hard being the best girl in the whole entire world
As you can see you can break a line in a file without "br" and it won't take affect.
I am working on too many things right now.
I might take a look at some point, but right now CS2D project and all BlitzMax setup is on old computer which I don't use daily right now.
It would be quite a bothersome task to implement a very solid HTML-like tags in BlitzMax.
For example whole text size and image handling system is almost entirely natively written.
It is simply too much of work for a feature no one uses.
is equal to
I am working on too many things right now.
I might take a look at some point, but right now CS2D project and all BlitzMax setup is on old computer which I don't use daily right now.
It would be quite a bothersome task to implement a very solid HTML-like tags in BlitzMax.
For example whole text size and image handling system is almost entirely natively written.
It is simply too much of work for a feature no one uses.
Code:
1
<br/><text size = "15" color="#aaaaaa" align = "left">Server info message.</text>
is equal to
Code:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
<br/>
<text size = "15"
color="#aaaaaa"
align = "left">
Server info message.
</text>
<text size = "15"
color="#aaaaaa"
align = "left">
Server info message.
</text>
edited 1×, last 24.11.20 03:40:54 pm
@
SQ: What is the character per line count limit?

It's hard being the best girl in the whole entire world
You can test that with old server info.
That is as many lines can be fit in one row.
It is simply server transfer for serverlist.
That is as many lines can be fit in one row.
It is simply server transfer for serverlist.
@
SQ: the limit is about 80 chars.
EDIT: Is having GIF's and embedded content out of the question for the F1 menu? Just a random question, you don't have to take it too seriously
I'm also hoping most of the bugs with XML will be fixed by the next update.
I can't seem to use the text highlight feature, it doesn't work for me, but I haven't put much attention to it, nor do I really care or understand what it is anyways.

EDIT: Is having GIF's and embedded content out of the question for the F1 menu? Just a random question, you don't have to take it too seriously

I'm also hoping most of the bugs with XML will be fixed by the next update.
I can't seem to use the text highlight feature, it doesn't work for me, but I haven't put much attention to it, nor do I really care or understand what it is anyways.
edited 1×, last 24.11.20 10:42:56 pm
It's hard being the best girl in the whole entire world
GIF is not supported by BlitzMax.
Text highlighting is pretty simple.
Text highlighting is pretty simple.
Code:
1
<br/><text size = "15" color="#ffffaa" hover-color="#ffffff" url = "www.cs2d.com">www.CS2D.com</text>
edited 1×, last 26.11.20 12:10:50 am
@
SQ: Well I've tried something:

I can't see white anywhere...

Code:
1
<br/><text size = "15" color="#FF0000" hovercolor="#ffffff" url = "www.cs2d.com">www.CS2D.com</text>

I can't see white anywhere...
It's hard being the best girl in the whole entire world



