[SPLIT] Discussion About MODEditor

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Andareed
Registered User
Posts: 124
Joined: Mon Apr 22, 2002 11:20 pm
Location: Canada
Contact:

Post by Andareed »

Hello! I would like to propose a new file format for MODs. The problem with the current format is that it is difficult to write a parser for it. This would affect the EasyMOD installer considerably. Also, there are many inconsistancies with the current format. Take for example, this code:

Code: Select all

#
#------------[ FIND ]------------
#
There is no standard amount of '-'s (dashes) which must be included before [ FIND ]. The header is also another problem. Take this for example:

Code: Select all

# Description: This mod will do lots of stuff,
# and it integrates into phpBB really well. It
# can add itself to the Admin control panel too.
In this example, how does the parser know when the Description part stops? It might think 'and' and 'can' are header keywords (like version, and author notes).

Another problem occured when the mod format was changed a bit (ex: SAVE/CLOSE/UPLOAD -> SAVE/CLOSE ALL FILES). The easy mod installer would have no way of knowing which file format they are dealing with.

I would like to propose and HTML tag style file format. It would eliminate all problems of inconsistency, and would make the EasyMOD installer's job much easier. It would also make adding new actions or header keywords much easier. Here is an example of an tag-based MOD:

Code: Select all

<MOD 2.0> //this is the file format version, not the mod version

<MOD Header Author> //Stuff after tags is ignored
Andareed
</MOD Header Author> this will be ignored

<MOD Header Version>
1.0.2
</MOD Header Version>

<MOD Header Description>
This mod will do lots of stuff, and it integrates into phpBB really well.
It can add itself to the Admin control panel too.
</MOD Header Description>

<MOD Header Author Notes>
Just read the description. It has everything you need to know.
</MOD Header Author Notes>

<MOD Header Files To Edit>
viewtopic.php
index.php
templates/subSilver/overall_header.tpl
</MOD Header Files To Edit>

<MOD Action Open>
viewtopic.php
</MOD Action Open>

<MOD Action Find>
if($result==3)
</MOD Action Find>

<MOD Action Replace With>
if($result==3 || $result==4)
</MOD Action Replace With>

<MOD Action In-Line Find>
&& $test==2)
</MOD Action In-Line Find>

<MOD Action In-Line Replace>
&& $test==3)
</MOD Action In-Line Replace>

</MOD 2.0> Remember to close everything :)
This new mod format would also make adding new action tags (like <Mod Action Delete>) and header tags (like <MOD Header Demo URL>). You could just change <MOD 2.0> to <MOD 2.1> or <MOD 2.0.1> or whatever. EasyMOD installer and mod editors would also be able to check this version to see it they can handle it.

If you are serious about this format, I can write a full documentaion of all the tags and what not. Also, this code might not be that human readable, but I it would be very easy to write a good EasyMOD installer and mod editor to work with this format...

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 »

Always glad to be getting fresh input! Let's address your concerns...
Andareed wrote: The problem with the current format is that it is difficult to write a parser for it.


Yeah, it was difficult to write a parser for it, but now that it is written, as far as I can tell it works great :P

Code: Select all

#
#------------[ FIND ]------------
#
There is no standard amount of '-'s (dashes) which must be included before [ FIND ].


EasyMod first looks to see if the line starts with a "#'. If it does, it knows that it is either looking at a comment (which are ignored b/c they are only for humans), or a command. If it is a command, there will be one of the known commands, listed in between [ and ]. If the [ and ] are not found, the line is ignored, and if a known command is not found, then the line is ignored. Dashes are not searched for at all. Therefore, EasyMod doesn't care if you use a million dashes or zero dashes ;)

The header is also another problem. Take this for example:

Code: Select all

# Description: This mod will do lots of stuff,
# and it integrates into phpBB really well. It
# can add itself to the Admin control panel too.
In this example, how does the parser know when the Description part stops? It might think 'and' and 'can' are header keywords (like version, and author notes).


Currently EasyMod doesn't do anything with the header, but I do plan on having it grab the author name, version, and stuff like that. When it does, there will be a specific format for it and I don't see it being a problem, especially since Mod validators make sure everything runs smoothly before they list it for download.
Another problem occured when the mod format was changed a bit (ex: SAVE/CLOSE/UPLOAD -> SAVE/CLOSE ALL FILES). The easy mod installer would have no way of knowing which file format they are dealing with.


Well, the thing of it is that for a parser, this really is an unneeded command any way. EasyMod parses until it hits the end of the file, not when it hits this command. Honestly, EasyMod just ignores this command any way ;)
I would like to propose and HTML/XML tag style file format.

When I first started the project, we had about 2 weeks of discussion on how to format it. The current template ended up winning b/c people were familiar with it and their mods would be easier to change to work with EasyMod. XML is great, but in this application you don't really get a lot of benefit. Let's look at what you've got....

Code: Select all

<MOD 2.0> this is the fileformat version not the mod version

...

</MOD Header Files To Edit>
[/quote] 

All of these header things are easily addressed with the current template format.  A parser doesn't care about the files to edit section, especially when it comes to templates b/c the parser is going to need to be smart enough to edit ALL of your themes, and not just subSilver ;)  I do plan to make that happen in the next alpha release.

[quote]
<MOD Action Open>
<MOD Action Find>
<MOD Action Replace With>
<MOD Action In-Line Find>
<MOD Action In-Line Replace>
[/quote] 

If you look at your headers here, they are no different from the mod template!  The only difference is that they have a close tag really.  And for EasyMod, the parser knows to stop parsing after either reading one line or after reaching the next line starting with a "#".  So really this is any different.  What would be different if you had something like <FIND=2nd>the</FIND> which would mean find the second the "the" encountered or something like that.  But this kind of power is not really needed either.

So, this is pretty much the same thought process we went through when we decided to go with the mod template instead of XML.  It's always good to take a fresh look at things, so feel free to point out things you think I'm missing ;)

Thanks!
-Nuttzy :cool:
Last edited by Nuttzy99 on Fri Jul 12, 2002 3:29 pm, edited 2 times in total.
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

Andareed
Registered User
Posts: 124
Joined: Mon Apr 22, 2002 11:20 pm
Location: Canada
Contact:

Post by Andareed »

I am currently writing a MOD Editor, and simply find the current MOD file format to be more difficult and complicated than it needs to be. I also must be able to read the header, so that people can change info in it.

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 »

If you have started a thread about your proposed Mod Editor, I'll be happy to take a look. I bet I can help you get passed some of the difficulties of working with the mod template. Just send me a PM with the thread URL.

Also, I believe Davidls has released a Mod editor, but I've not checked it out yet. Ironically, he was also the person most in favor of using XML for EasyMod when the discussion first came up!! :lol:

And again, I only want to encourage your spending time thinking about the best way to do things! Keep the ideas coming :D

Thanks,
-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

AbelaJohnB
Former Team Member
Posts: 5674
Joined: Fri Jul 06, 2001 11:56 pm

Post by AbelaJohnB »

I suppose as the MOD-Team Leader I should poke my head in here and address this most interresting conversation.


Having just read this whole idea of using an XML style for the MOD-Template does not, I must admit, appeal to me much.... at this very moment.


The -primary- purpose of the MOD-Template is human readablity.

Human being both a 12 year old american kid that doesn't know the difference between 'that' and 'dat', as well as the 65 year old german grampa that can hardly read English.

My point being... the MOD-Template is about one thing and really only that one thing....

Easy Installation of MOD's.

That -has- to be our focus here folks.

You see, at some point, for all the great work that you guys put into the "tools", they will fail. They will fail in their ability to properly updated, they will fail in their abiltiy to document correctly, or a dozen other thinkable methods... but it's the reasons we haven't thought of that we have to keep a 'human readable MOD-Template'.

For, until mankind adapts *cough* evolves to the point where we no longer need our eyes, the MOD-Template has to remain our primary method of MOD installation.


While I understand that a different method might be -easier- for the tools, my primary responsiblity (at the leader of all this) is to ensure global-wide easibility (if you'll allow me to make up that word)


However, as a few of you know... just because I do not agree with something does not mean I won't sit and 'chew' on something while thinking it through.... so, let me think about this awhile and I'll get back with you'all.

Acyd Burn
Consultant
Consultant
Posts: 5830
Joined: Wed Dec 05, 2001 8:31 pm
Location: Behind You
Name: Meik Sievertsen

Post by Acyd Burn »

My Words. :) no kidding, i think the same about this.

The main concern should be the easability in reading and performing the actions. And that users find all relevant information very fast. Every additional Information is confusing. ;)

And if special notations are needed or helpful for a good parser (it's always helpful if you have a normed format for your parser) the Mod-Authors can do the 'Conversion' by Hand. :)

Greets Acyd Burn.

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 »

1) My thinking too

2) Holy crap! Acyd Burn I thought you had left!!! Could just be me not checking the board lately, though ;)

But since you are here, I hope to be working on the standards for performing schema changes though EasyMod and I know this is something you can help me with ;) Don't be surprised if I flood your PM inbox this weekend with questions!!! :lol:

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

Acyd Burn
Consultant
Consultant
Posts: 5830
Joined: Wed Dec 05, 2001 8:31 pm
Location: Behind You
Name: Meik Sievertsen

Post by Acyd Burn »

Hi Nuttzy,

nice to read you. :D

Yeah Baby, flood me. :) I wanted to ask you anyway if i can help you with the mod, i would be happy to contribute to the Mod. I hope now i have more time, and i hope you need a programmer. :)

But to not let the thread come out of control... let discuss this via PM. :)

Greets Acyd Burn.

AbelaJohnB
Former Team Member
Posts: 5674
Joined: Fri Jul 06, 2001 11:56 pm

Post by AbelaJohnB »

Oh, man.... you two are making me wish I didn't have to leave for a week-long vacation tomorrow!!!! :evil:

Andareed
Registered User
Posts: 124
Joined: Mon Apr 22, 2002 11:20 pm
Location: Canada
Contact:

Post by Andareed »

You talk about easy reading. The MOD Editor I would like to implement does just this. It basically could parse the HTML tags, and print out easily understood code. Basically, it is like the mySQL database. The raw format of the database is difficult (impossible?) for the average user to understand. But something like phpBB makes it easily read. I can post a screenshot of the MOD Editor I am working on if you want.

An even better example would be normal HTML. If you open file.htm in notepad, it doesn't really look nice and understandable. But open file.htm, in an HTML viewer (web browser), it looks human readable. The same would be true for MODML (XML based mod file). You would just need a MODML viewer, something I would not mind developing.

In fact, I could print out a current Mod template file based on the MODML file format . I really think that this MODML has some prospects. You could release a MOD Reader, which would just make understanding a mod file easier.

BTW, I am working with David but developing a C/C++ extended version of David's Mod Maker. I have also created a simple MODML parser. I will send it if you are interested...

Ca5ey
Registered User
Posts: 518
Joined: Mon Aug 27, 2001 8:08 pm
Location: Class M Planet

Post by Ca5ey »

@Andareed

No offense, but I think you make things too complicated. A C++ program would be OS dependent and practically useless for linux or mac users.

The main target is - like it has been said - to make the installation easy for humans and not for machines.

I think there is no need to parse a mod installation description to HTML or whatever because it's quite easy to understand if it's just like in the

---[ FIND AND DO SOMETHING ]

style.

2 cents
phpBB Fetch All 2.0.15 · http://www.phpbbfetchall.com/

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 »

Being in management, one thing I have learned is to never stop someone that is trying to be productive. Make them aware of your opinions, maybe try to refocus them on something else, but never stop them. At any given time, you never know who is going to be run over by a bus and not be around again. Maybe EasyMod will end up being a dead-end, but Andareed will come up with something even better. Of course I'm banking on EasyMod being the way to go :D

I'd say Andareed is aware of the issues. I'd perfer to see him produce something based on the mod template. However, if he works on something else, who knows what his alternate route may uncover. Maybe his XML thing is a huge success. Maybe it goes no where, but he comes up with a slick GUI, that we all start using. Who knows. Andareed, I say spend a bit of time considering where you think things are headed, and with that in mind, just code something that you enjoy coding ;)

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

Ca5ey
Registered User
Posts: 518
Joined: Mon Aug 27, 2001 8:08 pm
Location: Class M Planet

Post by Ca5ey »

Noone wants to stop anyone from doing something here. This is a discussion and we are talking about pros and cons.

If you can make a C++ program work on a webserver installing mods via shell access -- well, splendid... I have my doubts and that's what I wanted to give in the discussion.
phpBB Fetch All 2.0.15 · http://www.phpbbfetchall.com/

Andareed
Registered User
Posts: 124
Joined: Mon Apr 22, 2002 11:20 pm
Location: Canada
Contact:

Post by Andareed »

@Nuttzy99: Thanks for the encouragement!

I think what I will do i finish coding my GUI. I will also maybe make a php prog that can create the MODML format too. Maybe I will even make some kind of converter. Even if it isn't a success, I will still have fun coding something.

hehe. Maybe i will go underground for a bit, and surface with a php gui. Already, I have changed my path on where I want to go with MODML. Thank you very much Nuttzy99!

Nuttzy99
Former Team Member
Posts: 4917
Joined: Fri Aug 03, 2001 7:09 am
Location: the 11th dimension
Contact:

Post by Nuttzy99 »

Ca5ey wrote: Noone wants to stop anyone from doing something here.


Doh! I didn't mean to imply that, but that's definitely how my message reads. Sorry. Any way we are OT here, so let's get back to discussing the mod template!!

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
No Support via PM please!

Post Reply

Return to “[2.0.x] MODs in Development”