Why would you try to read things like that line when you can stick stuff in something like Notepad++?

Oh yes it shows the tree view for you. So why did you choose to xml it up in the first place like that? XML is like removing all Text formating and instead describing it with words, so the tools can then interpret your words as formating. Does that sound usefull to you? To me it seems like a giant waste of time and space.

<reply>
<sentence>
<question>
<string ="why do you need this bollocks when you format it eitherway and therefore context is given already without need for this bollocks"/>
</question>
<new line/>
<sentence>
<statement>
<string = "This is a waste of time to write and read and does not help comprehension one bit"/>
</statement>
</sentence>
</reply>

Ketraar wrote:The problem most people that are rather trained in programming forget that many modders (like myself) have ZERO programming skills and still would like to keep modding without having to turn it into a full time job or require degree to do it. So I for one am glad they switched to xml verbose, but somewhat "casual" structure and allow non programmers to do stuff.

MFG

Ketraar

That is a fair enough point, but I think you underestimate the ease of use that some mainstream programming languages have. Python is commonly used to introduce programming to high school students nowadays, but at the same time it is powerful enough to be used by almost every large tech company for some role or another.

1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.

Quite dissapointed with the responses here. XML scripting should be retained as a legacy scripting method. But scripting/modding should be done through a proper programming language like python or even better, C#.

See the most modded game on Steam, Space Engineers, for an example of how this works very well, even for people who don't yet know C# it can be picked up easily. It's not difficult at the outset and the tooling support for it is far and away better for a staticly typed language then for XML which speeds up learning.

There is a game called 'Empyrion Galatic Survival' which supports this style of modding, with it I managed to send the events generated by the game to a message bus (MSMQ) which is read by a webserver that hosts a single page application. Imagine a dashboard like this http://wrapbootstrap.com/preview/WB0R5L90S to get an idea of what I'm talking about. Keeping in mind this is accessible from any browser like your phone, the steam browser or your smart tv. Imagine it populated with data from your ships, stations and warehouses ... yeah.

Since all of it still applies, I will quote the answer I gave last time this discussion came up:

CBJ wrote:Some of the original reasons for choosing XML for the MD were:

- Domain-specific structure (it's laid out in the form of the conditions and actions required for mission progress) and syntax (many of the conditions and actions are directly mapped to mission activities rather than just being generic programming terms)
- Missions can be created with very limited programming knowledge (while it's possible to do programmer-y things like loops, it is also possible to create simple missions entirely without this, which helps with the learning curve)
- Editing comes with built-in self-documentation as well as syntax auto-completion (most self-respecting XML editors understand schemas, and the schemas can also be used to provide the documentation)
- Easy to parse and convert to internal format (it is loaded and parsed very simply using standard XML libraries, then converted into an internal form that is that is, like the raw syntax, closely tied to its purpose, rather than using a generic third party interpreter or JIT compiler)

Now, bearing in mind that we have been working with the MD, in one form or another, for nearly 10 years, the reason we continue to use it is very simple: we have it, it works, and it does what mission developers need it to. The AI scripting system shares some key elements, such as actions and conditions, with the MD, saving a lot of effort in maintenance and development, but is, again, tailored to the task in hand. It would be a very poor use of developer time to throw all that away in favour of something different, with all the issues and unknowns that would come with it, just because some people turn their noses up at it for being XML rather than a "proper" programming language.

XML/MD is fine by me; much better than the in-game scripting of previous X games. However, my worries concern:

1# The UI modability, which is atm not only tedious but utterly limited.
2# Limited features to trigger actions/events in mods. For example, no XML/MD commands that activate/trigger on key pressed.

But I'm still hoping some of the nice Devs will hear my prayers

Cheers Euclid

"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

Without becoming argumentative or trying to start a development debate about using XML for it's intended purposes, my view on it's use in XR is such:

As a developement/content designer tool I'm all for it, just not in the games runtime-environment.

if you added a middle step in the form of a binary encoder for modders so the game doesn't have to use a parser to load/save/manipulate data, it would be less of an issue. Humans still has the readability/tweakability of the XML and the game engine would load/save a lot quicker as it would be dealing compact binary instructions instead of longwinded data needing to be parsed.

Personally there are much better ways to allow for mod/script ability than XML. XML is for human readability when human intervention is required in data transfer between encoded states. Machines neither need nor particularly care for multi character instructions when a single/double character would suffice (ofc not referring to operands, that's a different story).

Killijaeden: did you ever open your much praised X2/X3 Scripts externally? they are also XML, and the actual Script Code is much less readable than XR Code because it baiscally abstracts all Script Commands with numerical ids.. [irony]yeah, much better than XR[/irony]

Just curious then why the numerical id's were dropped. It's at least more efficient encoding to machines and to be honest, a script/xml editor front-end that hides the underlying structures/method would have resolved the issue of syntax/readability and the debates around it.

Games have included editor front ends since the dawning of Win 95, if not earlier, which is a much more effective way to allow, not only users but the content designers especially, to modify game behavior and creating custom content with the added bonus of making it possible to store data in a more compact format.

I'm pretty sure though that were I a in-house content developer, I would have appreciated a abstraction layer, apart from generic XML schema editors as not only is it less key-mashing but also considerably less error prone, which is a pretty major concern when allowing your end user to prod and probe around the "inner workings" so to speak.

Granted, I completely understand the complexities when it comes to developer time, the mantra of "if it ain't broke don't fix it", pressures from management etc. I am still however baffled at some of the design, coding and game-play decisions made in this game by such a seasoned company. Still I can not judge as there are no "right" or "wrong" way in coding and things are never as simple as it seems from the outside. Yet, there is most certainly efficient and less-efficient ways.

With that said, I'm also amazed that during the lifespan of the game none of the modding community, and from the looks of it there's quite a few competent coders among them, has created a front-end for the XML Schema (or at least none willing to share it with the rest of the community). At bare bones level, it's not rocket science to a competent coder ... it's a XML Schema after all.

Serath, It's been answered by Devs there is XML parsing only upon loading to internal binary tree. The agent only executes this efficient binary tree, never needs to parse further the XML itself. To me it's all good.

In addition XML shines when you need to patch bits of code (add,delete,insert and match).

Assailar, I understand the reasoning for the use of it and that it doesn't impact during the runtime as such. It has however compromised the loading time of the game and savegames, which is still part of the run-time environment. It's a fundamental part of software design to not compromise on loading speed.

It's frustrating as heck when needing to reload a save game or even alt-tab (though the alt tabbing could be down to other factors). I won't go further into the subject though as it becomes a development debate but to me there is still a lot more effecient ways while even still retaining the XML as a patching/modding tool.

the Scripts dot take that long to load.. for me its 2.4s on a new Game and 3.5s total on a Savegame. (i dont think i have loaded a save yet, so these might be some default values)
if you are interested for the timings for you have a look in the progressbar.xml right next to your savegame folder.
The Time for the last new game startup / savegame loading is stored there to display a more accurate progress bar i guess.. here are my values:

EDIT: one more thing: using the debug command line command "reloadui" causes a short freeze of a few seconds, but using reloadai or reloadmd is only a barely noticeable hiccup. the former reloads the lua scripts for the ui, the latter the xml scripts.

UniTrader wrote:Killijaeden: did you ever open your much praised X2/X3 Scripts externally? they are also XML, and the actual Script Code is much less readable than XR Code because it baiscally abstracts all Script Commands with numerical ids.. [irony]yeah, much better than XR[/irony]

No and i can tell you why: i didnt have to, to achieve the things i wanted. I could care less if its all converted to traditional chinese first and then to Punjabi in the background. As long as i can write a script or mod without dealing with all that. So either a) use a proper programming language or b) provide the tools to make it seem like a proper programming language.

Just a sidenote and opinion:
I don't care if the scripts are XML or whatever.
I think that it is important that X4 can be modded by moderately educated people. In X2 and in X3 we can add scripts and ships without being an expert in programming and/or in 3D design. This is part of the pleasure of a sandbox. It would be very sad to loose that.
This aim is more important for me than the technical detail.