EOSERV Forum > Programming > Tools for drops, shops, homes, ect.
Topic is locked.
Page: << 1 >>
Tools for drops, shops, homes, ect.
Author Message
Post #195619 Tools for drops, shops, homes, ect.

I want to make an all-in-one tool program. I am going to make it in C# but I need a little bit of help with it. I have a few questions that hopefully you guys can help me with.


1. Is it possible to read the pub files so I can use that information in the program and if so can I edit them too?

2. What would be the best method as for generating the text for the config files such as drops.


I want to make it so that it rights directly to the config files in the data folder. My biggest problem is reading and writing the files. I never worked with files before when using C# so I really don't know how to do it.

Can anyone help me with these questions? Thank you to anyone who helps me with this.

9 years, 49 weeks ago
Post #195620 Re: Tools for drops, shops, homes, ect.

A simple drop box writing the line values would be easy enough for the configs. I don't know if it would be worth the trouble to write such an editor for just those, but as far as the pub files go you can practically rip the code for reading them right out of EOSERV. There is going to be some conversion from C++ to C# but if you have worked enough with programming languages you should be able to figure it out. 

9 years, 49 weeks ago
Post #195622 Re: Tools for drops, shops, homes, ect.

I wrote something that did config files like 4 years ago. I still have it up here (because of a brilliant feature I put in, you'll need to provide a directory that contains the EO pub files or it won't launch). I'd offer to post my code but it's god awful and not even worth looking at. Except maybe the pub file parsing, that was alright. EDIT: pastebin is cool (this is pub parsing only - definitely not well designed but it does the trick)

I'll link you to some articles you can use to manipulate files in C#. From there it shouldn't be too hard to create a parser that follows the rules of each of the files. As my first project in C# it was an excellent learning tool for WinForms stuff and File I/O.

  • Pretty high level, not too in-depth, but a good starting point: http://www.dotnetperls.com/file
  • Detailed documentation from Microsoft about the System.IO namespace that you'll be using: http://msdn.microsoft.com/en-us/library/System.IO(v=vs.110).aspx
    • StreamReader/StreamWriter would be used to read and write text files
    • BinaryReader/BinaryWriter would be useful for manipulating pub files
  • Since you're using C# make use of the built-in intellisense feature of Visual Studio (and google any functions/classes you don't understand)

Be ready to take to google/stackoverflow too because pretty much everything you could possibly need to know about C# (not including EO specific things) for this project can be found using either stackoverflow or google.

---
class EOSERV {
Programmer | Oldbie
Open source EO Client: https://github.com/ethanmoffat/EndlessClient
};
9 years, 49 weeks ago
Post #195623 Re: Tools for drops, shops, homes, ect.
ethanmoffat posted: (28th May 2014, 12:18 am)

I wrote something that did config files like 4 years ago. I still have it up here (because of a brilliant feature I put in, you'll need to provide a directory that contains the EO pub files or it won't launch). I'd offer to post my code but it's god awful and not even worth looking at. Except maybe the pub file parsing, that was alright. EDIT: pastebin is cool (this is pub parsing only - definitely not well designed but it does the trick)

I'll link you to some articles you can use to manipulate files in C#. From there it shouldn't be too hard to create a parser that follows the rules of each of the files. As my first project in C# it was an excellent learning tool for WinForms stuff and File I/O.

  • Pretty high level, not too in-depth, but a good starting point: http://www.dotnetperls.com/file
  • Detailed documentation from Microsoft about the System.IO namespace that you'll be using: http://msdn.microsoft.com/en-us/library/System.IO(v=vs.110).aspx
    • StreamReader/StreamWriter would be used to read and write text files
    • BinaryReader/BinaryWriter would be useful for manipulating pub files
  • Since you're using C# make use of the built-in intellisense feature of Visual Studio (and google any functions/classes you don't understand)

Be ready to take to google/stackoverflow too because pretty much everything you could possibly need to know about C# (not including EO specific things) for this project can be found using either stackoverflow or google.


Wow thank you so much. I will take a look at it when I get home. I am going to make it very basic at first where it just makes the string and you copy and paste it to the file. Doing this will let me release it for people (I like making things to help people). Then after I have that I will start adding the more complicated things such as editing the pub files, using the pub files information to help with the the tools, and also making it write directly to the config files.

This is quite fun for me. I can't wait to finish it and see what people think.

9 years, 49 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > Programming > Tools for drops, shops, homes, ect.