RFIniEditor

Programming Reality Factory and Genesis3D.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

RFIniEditor

Post by Jay »

At the current time i am learning c# with .NET and i find it very easy for programming windows application. One of the experiments i made was a 'RFIniEditor' which helps with modifying the ini-files of RF. Here's an early screenshot which shows the working of the Pawn.ini features:

Image

This example is to add a pawn weapon named Sword to the Pawn.ini.

The left part is where you put all the information/data, the right part is where you see the effects on the ini files. The lower part shows you the generated ini-file-code, while the upper part shows the ini-file as it is. (Like in a normal text editor). The ini file is loaded in the beginning and to save it, you must press the 'Save Pawn.ini' button.

So far it works without problems. Haven't tested the workings in-game yet, though.

I will implement at least Player.ini modification and test those two before releasing something to you.

What do you think so far? Any wishes for this program?
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: RFIniEditor

Post by Juutis »

Nice work. I'm probably gonna stick to modifying the .ini files by hand, but for new users this is definitely a nice tool. Makes the .ini files easier to understand. :)
Pain is only psychological.
User avatar
bernie
RF Moderator
Posts: 1249
Joined: Tue Nov 15, 2005 10:07 am
Location: Ireland

Re: RFIniEditor

Post by bernie »

Yes it will be a very useful tool especially for noobs.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: RFIniEditor

Post by QuestOfDreams »

Nice work but this functionality should be merged with the already existing IniEditor. Also, I'm not really a fan of .NET applications as they require the users to have the NET framework installed on their system ... but that's just my personal opinion.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: RFIniEditor

Post by Jay »

Thanks for the replies! Yes i thought about merging it with the currently existing IniEditor. Then it would become a big tool for modifying all the ini files.
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Re: RFIniEditor

Post by darksmaster923 »

I love it!
Herp derp.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: RFIniEditor

Post by Jay »

The reason i am using the NET framework is because it makes all this windows programming stuff very easy and by this my productivity is multiplied. If i wouldn't use it this project would need much more time. And well, time is costy. :wink:

Ok. Got the Player.ini and Control.ini working today:

Image

The Player.ini is nothing spectacular, you fill out the template and then add the entry like with the Pawn.ini.

Image

The Control.ini is loaded at startup and by this it sets those CheckBoxes and you just have to tick them on/off, then use Apply changes and a new Control.ini is generated. (maybe i'll make it so that it changes it immeadiatly, may make the working progress even faster) That was kind of a milestone, because i needed a way to load-in those Ini-Files. I can then use the same method for the RealityFactory.ini when i come to the point of merging the two programs.

I also made a preferences tab and a file in which RFIniEditor stores the preferences. Oh, and warnings are shown when you didn't give a name to the entries so that you make fewer mistakes. :wink:
Everyone can see the difficult, but only the wise can see the simple.
-----
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: RFIniEditor

Post by Jay »

Sorry for doubleposting, but i have now completed basic modification of the RealityFactory.ini. By this time it's not as comfortable as IniEditor.exe, but it's a start.

Image

The newest version is here:
http://www.mediafire.com/?sharekey=4860 ... f6e8ebb871
(The file is really just 19kb it's no fake ;) )

To use it, you must be have the NET framework installed on your computer. You must unzip it into the tools folder so that it works.

PLEASE BACKUP ALL YOUR INI FILES, ESPECIALLY REALITYFACTORY.INI, BEFORE USING THE TOOL, AS IT IS REALLY NEW AND THERE CAN STILL BE BUGS I'VE OVERLOOKED.

Critics would be nice - what is good, and also what can be made better.

Edit: Btw, i am not using any portion of the Genesis API or any portion of RF's code so i don't have to display a logo. At least i hope so...
Everyone can see the difficult, but only the wise can see the simple.
-----
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: RFIniEditor

Post by Jay »

Did somebody actually use this?

I am not sure if it really works, because there is some strange thing: I write newlines to the files ('\r\n') and in the view of the editor everything is ok, but when i then try to load the files in the standard text editor, the newlines are gone. I am not sure what this means, as i never had encountered such an error...

Scite again has no problems with it.
Everyone can see the difficult, but only the wise can see the simple.
-----
Allanon
Posts: 493
Joined: Mon Aug 29, 2005 8:23 am

Re: RFIniEditor

Post by Allanon »

Jay wrote:I write newlines to the files ('\r\n') and in the view of the editor everything is ok, but when i then try to load the files in the standard text editor, the newlines are gone.
Try using ("\n\r") the order sometimes makes a difference.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Re: RFIniEditor

Post by darksmaster923 »

Jay wrote:Did somebody actually use this?

I am not sure if it really works, because there is some strange thing: I write newlines to the files ('\r\n') and in the view of the editor everything is ok, but when i then try to load the files in the standard text editor, the newlines are gone. I am not sure what this means, as i never had encountered such an error...

Scite again has no problems with it.
I can't download it, mediafire just goes to its home page
Herp derp.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: RFIniEditor

Post by Jay »

Ok. A new upload and a slightly newer version. The generated files seem to work so far (I tested at least the control.ini), even if they look a bit strange in the windows txt editor (it writes it all into a single line). Scite (=RFScriptEdit), as i said, gets my interpretation of the newlines, as does RF (which is the most important)

Pawn.ini and Player.ini let you add a new block (you must first click on "Add ...", the current block can be seen in the field in the bottom right), while in Control.ini and RealityFactory.ini the changes to the code window are immeadiate. You still have to save. When you changed a ini file, RFIniEditor will ask you if you want to save it when you close it.

You can also edit the code directly. (You would have to do this if you wanted to delete a newly added Pawn definiton, for example) To allow this, you must untick the checkbox 'Lock File Editing' in the Preferences Tab. The IniEditor also puts out basic warnings, like "You didn't enter a name for the pawn definition" if you try to add a pawn definition without a name.

http://www.mediafire.com/file/zqijj2jj2 ... r_V32a.rar
To run it you need to have the Net framework installed on your computer. A quick search in google should send you to where it is. The newer operating systems (Vista and Windows 7) have it already installed, as i've read.
You should unzip it into the tools folder, other folders cause problems at the time being.

As i said, it is best to make a backup of your ini files before. I think i am going to add a 'backup the ini files' feature in later versions.

Critics would be nice if you use it, darksmaster.


@Allanon: I ended up just using '\n' which represents a newline. The problem is not exactly solved, but the files work, so at the moment this issue is only a cosmetic one - never change a running system. :D
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Re: RFIniEditor

Post by darksmaster923 »

Hm, I already have net framework installed but its giving me an error and crashing.
Herp derp.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: RFIniEditor

Post by Jay »

What kind of error?
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Re: RFIniEditor

Post by darksmaster923 »

EventType : clr20r3 P1 : rfinieditor.exe P2 : 1.0.0.0 P3 : 4af3fe4a
P4 : mscorlib P5 : 2.0.0.0 P6 : 4889dc80 P7 : 343f P8 : d8
P9 : system.io.filenotfoundexception

I'm assuming I'm missing a file
Herp derp.
Post Reply