Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

DoItForMe (Eclipse Source Patcher)


mrmiguu
 Share

Recommended Posts

**doItForMe** (or **dIFM**, for short) is a small program I whipped up that allows users to open up a script file, execute it, and have their game's source edited/modified for them.

User's Instructions

* Place the updater (**dIFM.exe**) in the base folder so it has access to both the client's and server's source files (in the same folder where the client/server folders are located).
* Run the program and search for the script file you want to run/execute/install.
* Press the "Execute" button to run the script and it will patch your server's/client's source instantly (well… almost instantly).

Hmm… three steps. Seems easy enough, right? I'm sure there will still exist morons that manage to get confused by this, though.

Developer's Instructions
When making your own script file so that the program can read it and apply it universally, the format is vital to your script's success.

There are a few rules you developers need to be aware of:

* Script files should be saved in a readable format (e.g. _examplescript**.txt**_).
* Always designate _action commands_ (_remove_, _add_, etc.) with a hash character in front of them (e.g. _**#**remove_).
* Encase all _code sections_ with the opening and closing square brackets (e.g. _**[[/b] insert code here **]**). Also, remember that _code sections_ do not require a starting hash character (e.g. _**[[/b] correct **]**, _**#[[/b] incorrect **]**).**_**_**_
* __**_**Lastly, always finish off _action code_ sections (containing both an _action command_ and a _code section_) with a file directory line, contained in quotation marks (e.g. _**#"**insertfiledirectoryhere**\**insertdeeperfiledirectoryhere**"**_).**_**__
_**_**If none of the above makes sense to you, just read over and try your best to understand this example script:
```
#remove
[
If Not InMapEditor Then PlaySound Sound_Jump
]
#"client\src\modInput.bas"

#below
[
If CanInert Then
]
#add
[
If Not Jumped Then
If OnGround Then
If Not InMapEditor Then PlaySound Sound_Jump
End If
End If
]
#"client\src\modGameLogic.bas"

```
Scripting Commands
There are a total of **6** commands, some accepting varieties of the word (synonyms).

The six commands are:

* _remove_.
* _below_, _find_, _under_, and _beneath_.
* _add_, _insert_, _write_, and _type_.
* _above_.
* _replace_, _change_, and _swap_.
* _with_.

The _remove_ action command is by itself.
After every _below_ and/or _above_ action command, there must be an _add_ action command.
After every _replace_ action command, there must be a _with_ command.

dIFM Download
[dIFM.exe](http://173.51.208.104:8000/dIFM.exe)

Side Notes
This was obviously inspired by Soul's _Eclipse Automata_ program, which accomplishes the same thing. This program, however, is much more user friendly (I'd like to think so), because of its graphical interface.**_**_
Link to comment
Share on other sites

@Scrooge:

> These are only as popular as the systems which use it.
>
> I suggest you go around and convert over the more popular tutorials yourself.

I was considering doing that.

It works with key words, but doesn't like reading tabs/newlines/etc.

I'm trying to rework how it reads specific code pieces. It doesn't like me at this point.

**:EDIT:**
I found out that the stream reader doesn't like VB6's tab/spacing format. I refuses to read its tabs. It'll read regular text files just fine. Any assist on this one?
Link to comment
Share on other sites

@Scrooge:

> Try streaming it to a .txt file first to see if it's a file type issue?

Just tried what you recommended.

It's not a file type issue because it can modify _.bas_ files the very same way it can modify _.txt_ files.

It doesn't seem to like the tabs in between the code lines (the grey area in front of the code):
![](http://i2.photobucket.com/albums/y23/Alexanderthegreat91/dIFM_string_reading_bug.png)
Link to comment
Share on other sites

You should actually use spaces instead of tabs, because spaces are always consistent between editors. That's why there are spaces, your editor is configured to be consistent.

**Addendum**: what if my source file contained "If CanInsert Then" more than once?

Yours faithfully,
  Stephan.
Link to comment
Share on other sites

@S.J.R.:

> You should actually use spaces instead of tabs, because spaces are always consistent between editors. That's why there are spaces, your editor is configured to be consistent.

I will check if the reader is checking for either spaces of tabs from the script reference. Thank you for bringing that up.

@S.J.R.:

> **Addendum**: what if my source file contained "If CanInsert Then" more than once?

Usually those that make Eclipse Source tutorials will make sure that keywords that their users will be searching for will only come up with one result. If you're referring to a line of code that should only be found in a specific submodule/function, I plan on adding that in next.

Thank you for reminding me.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...