EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
Scripting Engine Discussion (split from Updates Announcement. AP)
Post new topic Reply to topic Goto page Previous  1, 2
View previous topic :: View next topic
Author Message
MegaJohnny





Joined: 04 Jun 2008
Posts: 1717 on topic
Location: Manchester, UK
Thank you for registering your game
PostPosted: Tue, 10. Jan 17, 18:26    Post subject: Reply with quote Print

Ketraar wrote:
I already have a job, not having a sensible way to mod the games will only result in me playing more EU4 instead. Razz

MFG

Ketraar

Let me know if I'm getting out of scope for the thread. But I'm wondering what your favourite things are in the XML vs. standard scripting languages? I've not used the XML too much, but it seems to have similar principles as other languages, but much more verbose and with some syntactic quirks. Does it have some good features to appeal to non-programmers?


_________________
My Steam profile
Back to top
View user's profile Send private message
Ketraar
Moderator (Português)
Moderator (Português)

MEDALMEDAL

Joined: 21 May 2004
Posts: 8387 on topic
Location: Guimarães (Portugal)
Thank you for registering your game
PostPosted: Tue, 10. Jan 17, 18:54    Post subject: Reply with quote Print

Well I can only speak for the MD way of using XML and after having tried for ages getting in SE in previous games, it was so convoluted that it always put me off. Where the MD just makes sense, check this, do that, wait here, do that x number of times, etc.

Now this is possibly more related to how the MD is structured and the schema is put then anything else, which I couldn't say as I'm no programmer by a long shot. It can also just be that it clicked for me and SE did not, much like with people, some you just dont like and you cant even tell really why... Rolling Eyes

MFG

Ketraar

Back to top
View user's profile Send private message Send e-mail
CBJ
EGOSOFT
EGOSOFT



Joined: 29 Apr 2003
Posts: 35507 on topic

Thank you for registering your game
PostPosted: Tue, 10. Jan 17, 18:56    Post subject: Reply with quote Print

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.

Back to top
View user's profile Send private message
MegaJohnny





Joined: 04 Jun 2008
Posts: 1717 on topic
Location: Manchester, UK
Thank you for registering your game
PostPosted: Wed, 11. Jan 17, 00:58    Post subject: Reply with quote Print

Ketraar wrote:
Well I can only speak for the MD way of using XML and after having tried for ages getting in SE in previous games, it was so convoluted that it always put me off. Where the MD just makes sense, check this, do that, wait here, do that x number of times, etc.

Now this is possibly more related to how the MD is structured and the schema is put then anything else, which I couldn't say as I'm no programmer by a long shot. It can also just be that it clicked for me and SE did not, much like with people, some you just dont like and you cant even tell really why... Rolling Eyes

MFG

Ketraar

Ah, right, I think I get it.

I don't mean to dispute the choice of XML or bash it, just that having been brought up on very procedural languages I was interested in another perspective.


_________________
My Steam profile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page Previous  1, 2
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Control Panel
Login Data
The time now is Mon, 22. May 17, 21:12

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.21183 seconds, sql queries = 18