mrmiguu Posted January 6, 2012 Author Share Posted January 6, 2012 **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 InstructionsWhen 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 CommandsThere 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 NotesThis 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 More sharing options...
Joyce Posted January 6, 2012 Share Posted January 6, 2012 This is interesting, I've got a few pieces of code laying around I may use this for.. Reminds me of SVN scripts. :]Let's see if I can whip something nice 'n easy up with this. Link to comment Share on other sites More sharing options...
kibbelz Posted January 6, 2012 Share Posted January 6, 2012 i am intrigued, i am going to test this out. Link to comment Share on other sites More sharing options...
Robin Posted January 6, 2012 Share Posted January 6, 2012 These are only as popular as the systems which use it.I suggest you go around and convert over the more popular tutorials yourself. Link to comment Share on other sites More sharing options...
mrmiguu Posted January 6, 2012 Author Share Posted January 6, 2012 @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 More sharing options...
Robin Posted January 6, 2012 Share Posted January 6, 2012 VB6's source _is_ plain text. Try streaming it to a .txt file first to see if it's a file type issue? Link to comment Share on other sites More sharing options...
mrmiguu Posted January 6, 2012 Author Share Posted January 6, 2012 @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 More sharing options...
Robin Posted January 6, 2012 Share Posted January 6, 2012 Open it with a hex editor. See what's actually there then do a find on that instead. Link to comment Share on other sites More sharing options...
mrmiguu Posted January 6, 2012 Author Share Posted January 6, 2012 It seems to show a normal carriage-return, a line-feed, and 16 spaces:![](http://i2.photobucket.com/albums/y23/Alexanderthegreat91/bas_file_hex.png)This is very strange… Link to comment Share on other sites More sharing options...
Godlord Posted January 7, 2012 Share Posted January 7, 2012 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 More sharing options...
mrmiguu Posted January 7, 2012 Author Share Posted January 7, 2012 @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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now