Are you a fluent coder of XML ?

General discussions about X Rebirth.

Moderator: Moderators for English X Forum

User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER » Fri, 7. Oct 11, 11:00

I have already tried and failed to get a working MD file going.
Yes, I understand that. But I claim, that you didn't fail learning MD because of XML, but because of the different programming model.

The new AI language seems to be a lot like MSCI, with the only difference being that you have to put <> around commands and ="" around parameters.

So, don't become fixated on the syntax so much.

Greetings,
ScRaT

User avatar
perkint
Posts: 5191
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by perkint » Fri, 7. Oct 11, 14:32

Not sure how much time I'll have, but I've written XML parsers in the past and use XML fairly often. May be around to play with scripting and if so, will certainly be open to requests :)

Tim
Struggling to find something from the forums - Google it!!! :D

User avatar
eldyranx3
Posts: 2178
Joined: Sat, 14. Jan 06, 21:29
xr

Post by eldyranx3 » Fri, 7. Oct 11, 21:56

I think the biggest reason that more scripters haven't moved over to the MD is because Egosoft gave very little documentation.

Yes, there was the MD handbook.

From X3R.

Inadequate for the tons of new commands in the X3TC 3.1 MD schema. Only through the generous help of others did I realize that more than one pending cue has a noticeable impact on game performance.

Where was this documented?

XR needs to change this. We need officially supported modding tools. We need well documented tutorials.

Yes, Egosoft has a small crew. But I'm willing to devote some of my valuable free time to improve and expand these great sandbox games. Isn't in their best interest to give me the screwdriver and a schema?

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sat, 8. Oct 11, 08:38

perkint wrote:Not sure how much time I'll have, but I've written XML parsers in the past and use XML fairly often. May be around to play with scripting and if so, will certainly be open to requests
In theory, would it be possible to write a tool that takes existing TC scripts, and converts them into XR XML ?

Obviously a lot of things wont directly port, but if the existing scripts could be ported across, it would be less of a task to modify them for the new game if all the code doesnt have to be recreated from scratch.

And we never know, some things just might work after a direct port.

Possible in theory ?

User avatar
chew-ie
Posts: 5604
Joined: Mon, 5. May 08, 00:05
x4

Post by chew-ie » Sat, 8. Oct 11, 08:52

apricotslice wrote:
perkint wrote:Not sure how much time I'll have, but I've written XML parsers in the past and use XML fairly often. May be around to play with scripting and if so, will certainly be open to requests
In theory, would it be possible to write a tool that takes existing TC scripts, and converts them into XR XML ?

Obviously a lot of things wont directly port, but if the existing scripts could be ported across, it would be less of a task to modify them for the new game if all the code doesnt have to be recreated from scratch.

And we never know, some things just might work after a direct port.

Possible in theory ?
Normally it is possible - while not a trivial task, it is possible. But I´d say it´s not worth the hassle, mainly because of one point: the API and datastructures have changed. *

You can parse e.g. object calls from a X³ script and might be able to manipulate the raw data in a way to make it suitable for the new engine, but you have to deal with things like new arguments (which the new engine might need but the old scripts simply don´t have). While porting structures and basic logic is not a big deal, it becomes a huge task to sync API-specific things.

So, I highly doubt it that someone writes a tool like that.

* at least I think so as Bernd already mentioned that the technology has changed

Image

Spoiler
Show
BurnIt: Boron and leaks don't go well together...
Königinnenreich von Boron: Sprich mit deinem Flossenführer
Nila Ti: Folgt mir, ihr Kavalkade von neugierigen Kreaturen!

:idea: Pick your poison seed [for custom gamestarts]
:idea: Feature request: paint jobs on custom starts

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sat, 8. Oct 11, 09:09

I was thinking more of the simple scripts, than the big complex script packs.

So like porting over the site to site jump script, rather than CAG, for example. Might need to be tweaked of course.

We dont know so many things, but if claiming and containers in space and such like remain in the game, then a lot of the simple scripts that deal with these, could in theory by ported. Containers for example, if they dont get beamed in, then I'd want my cbeam script ported.

Drones for example. If the game has so many drones, then beaming drones back on board rather than waiting for them to dock would seem to be an obvious candidate for a script, and such scripts already exist. would just need tweaking. I cant see egosoft doing something like that, so a script will be wanted by someone at some point.

User avatar
chew-ie
Posts: 5604
Joined: Mon, 5. May 08, 00:05
x4

Post by chew-ie » Sat, 8. Oct 11, 09:20

The problem is that not only the API might have been changed, but all other things like the way coordinates work, how the playership is managed (object wise), how all other game entities are organized - and how the universe is structured.

Hell, even sectors are gone, so many calls which old scripts rely on simply have no application anymore. While you can write converters to e.g. change formats / rearrange arguments or calls, you don´t use them if too many changes have to be made. You simply wright new code with the old one in mind.

Who knows - maybe something like teleporting drones back to your ship is one line, where as the old scripting language needed dozens of lines.

Image

Spoiler
Show
BurnIt: Boron and leaks don't go well together...
Königinnenreich von Boron: Sprich mit deinem Flossenführer
Nila Ti: Folgt mir, ihr Kavalkade von neugierigen Kreaturen!

:idea: Pick your poison seed [for custom gamestarts]
:idea: Feature request: paint jobs on custom starts

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sat, 8. Oct 11, 09:26

From memory, beaming drones on board was a 6 line loop. Same with containers and pilots.

I guess we have to wait and see.

User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV » Sat, 8. Oct 11, 11:31

i'm certainly not a coder of xml but depending on it's structure i can usually read, understand and edit it.

Hopefully the newer format will allow this without the need for too much forcegripping and threatening of the code by me.

(I find talking to my code and calmly explaining what i will do if it doesn't work helps greatly in gaining compliance)
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses

User avatar
Roguey
Posts: 1438
Joined: Tue, 6. May 03, 17:31
x4

Post by Roguey » Sat, 8. Oct 11, 11:31

Im not a fan of XML either, I find it very unfriendly from a coding side. The nesting of statements can become very confusing, very quickly. Even the statements can seem like they come from thin air. I know normal code has nesting, but usually they only 1 or 2 deep.

XML is fine for static/simple stuff (like an RSS feed feed, text or a HTML page) however for me I am so used to writing running code in a traditional way, using normal coding practices, ie:

Code: Select all

$lastevadetime = 0 
NOT:

Code: Select all

<set_value name="$lastevadetime" exact="0" /> 
You may think this is odd from someone who hosts a webpage that uses this sorta design, however the actual code that runs the site is PHP - which is more like C than XML. PHP writes the HTML/RSS.

I personally I wont be writing any scripts for rebirth (not for public release), nor probably mods either. So far ive been kind-of disappointed about rebirth - even doubting making a rebirth site was a good idea now. I know ego doesnt really care. Im trying to keep an open mind..
Roguey's Site: X3TC, X3AP, X3FL, X4.

Kitty
Posts: 304
Joined: Mon, 5. Sep 05, 19:59
x3tc

Post by Kitty » Sat, 8. Oct 11, 12:25

Well, ....
First of all I'd like to say that XML is NOT a programming language. And Yes I can write XML (and I can read and write it using Java).

I never used the MD, so I don't know if I like it, but I will certainly mod X Rebirth as I did before for X2, X3R, X3TC...

Will I be available for help ? Depends on your need. You never risk your life asking, anyway.

Post Reply

Return to “X Rebirth Universe”