Sins Editor v1.0.2

Easy editing of entity files!

http://sinseditor.blacklotushq.com/Releases/SinsEditor102.rar

 

Download link: http://sinseditor.blacklotushq.com/Releases/SinsEditor102.rar

 

Thank you for using Sins Editor. This program is intended to assist with the editing of entity files.

 

As of v1.0.2, Sins Editor provides the following features:

 

  • Opening of one or more entity.
  • Create a new empty entity.
  • Drag and drop one or more entity files directly into the SinsEditor.exe or Sins Editor GUI and they will be automatically converted (if in binary format) and opened.
  • Save a file as either text or binary.
  • Save a file with a new name as either text or binary.
  • Save all files as their default format.

 

Basic editing operations catering to the entity and constants file structure. These operations include:

  • Cut, Copy, Paste, Delete one or more lines in the editor.
  • Insert a new blank line.
  • Edit a line.
  • Undo/Redo an unlimited number of actions.

 

Advantages over basic text editors:

 

  • Automatic conversion between text/binary.
  • Automatic completion of entries and their associated values.
  • Line numbers.
  • Tree structure, providing a more intuitive way to edit an entity file. You can hide structures you do not need to edit, thus reducing search time.
  • Manage multiple files at once. The entire entity file content of Sins of a Solar Empire can be loaded in 6-10 seconds depending on the processor speed and memory speed of the computer. Although, I do not suggest trying to mess with nearly 900 files at once.
  • Extreme usability. Whether you use keyboard shortcuts, drag/drop, or menus, nearly any action can be achieved through the use of 2 out of the 3. You can also preview a line by putting the mouse cursor over it and holding down space.
  • Speed: Using the most up to date functions provided by the newest version of the .NET framework and sporting only datastructures that are instant access, editing files of any size and in any number is instant.
  • Safety: Accidently tabbing one too many times or forgetting to insert a space will not happen with Sins Editor.
  • Small footprint: Due to its specific target, many unneeded editing features can be cut out and thus a the editor has only a ~1.5 MB install footprint.
  • Extras programs: Tools not provided by standard text editors such as ConvertData GUI and ConvertXSI GUI by Zanyth0x42 can be automatically launched from Sins Editor. Also, my own definition file editor.

 

Future release v1.1.0 promises the following features:

 

  • The editor will automatically discover abilities and buffs and add them to an auto complete list for easier editing.
  • The editor will allow you to refresh the current file or all files from the hard disk.
  • The editor will allow you to find and replace entries, values, or both.
  • The editor will allow you to use basic file templates. You can use the provided ones as well as add your own.
  • *The editor will provide a major feature upgrade, which will be disclosed when release is closer.


 

291,339 views 102 replies
Reply #1 Top

Ok so jjz obviously got a little lazy on this one.. but basically it's an editor that opens your entity files, allows to automatic conversion between binaries/text (you just have to point it to convertdata.exe) and it does a good job in formatting the files and makes them easy to edit. You can open/close the various text "blocks" (like when you define a targetFilter for an ability, or the weapons list) so it saves you time trying to find stuff.

It's a pretty cool tool so far, and if you haven't been following the other thread there's still more stuff planned for it.

Reply #2 Top

For some reason the Delete shortcut (Del) only works sometimes. If it doesn't work, just use the right-click menu or the menu strip at the top.

This is a bug with .NET key press events on the custom control I use. I will look into a different implementation for v1.1.0.

v1.1.0 will allow basic templates, choosing from ability/buff values, find/replace, file refresh from disk, and one very large feature that I will keep a secret until release time ;).

 

-Ian

 

 

 

 

Reply #4 Top

Make sure to give feedback :).

Reply #5 Top

yeah this helps a bunch cause i dont gotta ask for help on the forum to figure out how to convert files

(still havent gotten an answer lol! :'( )

Reply #6 Top

ok i found a problem already it doesnt work on the constant files

maybe you should fix that

or is that outta your scope

Reply #7 Top

Not a problem. I made it recognize only .entity files on purpose.

 

However, I realize that i did not do the undo/redo functionality for editing values, just deleting/inserting. I will fix that as well as add one other feature and post it as Sins Editor v1.0.1 later.

 

There is also a very serious problem with parsing files that have more than 1-level depth of a tree, like:

 

effectInfo
    effectAttachInfo
        attachType "Center"

 

This is a very big problem. I will fix it today. I am going to disable the download links for now, because this problem can break files. Fixing that will also allow using the constants file, so I will include that. But, to save time, I will not include the extra feature I was going to include.

These fixes will be released later today in v1.0.1

 

-Ian

Reply #8 Top

take your time id rather it be right than be sorry and the more functions i get that work RIGHT

the happier im gonna be :drool:

Reply #9 Top

Well everything worked fine besides this and the one thing I forgot to put it. I have been out all day, but after dinner and a few other things, I will implement the fix and send it out. Should be painless to fix (famous last words).

To be honest, I am kind of annoyed that 6 people signed up to be beta testers and I only got feedback from two of them, and neither of those people caught this very huge bug. They volunteered their time though, so I guess I cannot really blame them. They certainly did help find some bugs and suggest some features that made it into the final release. Just makes me think that the next time I ask for someone to test something, I make sure that they really tested it completely :P.

Reply #10 Top

hehe i didnt even sign up but ive been searching for a program like this just got lucky i came back when i did

:beer:  :D   as im an avid modder and tester

i mod for another game while im doing this (cant play that game cause its so dang buggy LOL)

 

in space NO ONE can hear you SCREAM!

 

i found the bug but you had already posted it before i had a chance

wasnt fun i thought i broke the editor!

 

unhandled exception error is this what your working on?

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView._findFirstNode(TreeListNode aStartingNode, Int32 aStartingPoint)
   at WinControls.ListView.TreeListView.OnDrawRows(Graphics aGr, Rectangle Rect)
   at WinControls.ListView.ContainerListView.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at WinControls.ListView.ContainerListView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam

Reply #11 Top

To be honest, I am kind of annoyed that 6 people signed up to be beta testers and I only got feedback from two of them, and neither of those people caught this very huge bug.

So what exactly is the bug? The file I was messing with an launching the game with was an ability that had the effectInfo block, and it saved/loaded fine.

Reply #12 Top

obscured, I have no idea if that is caused by the bug. What actions did you take to make that happen?

 

Annatar, upon reviewing the bug, it actually isn't serious. Things are displayed wrong, basically.

effectInfo
    effectAttachInfo
        attachType "Ability"
        abilityIndex 0
    smallEffectName "CapitalAbility_AbilityGuidanceActivate"
    largeEffectName "CapitalAbility_AbilityGuidanceActivate"
    soundID "EFFECT_ABILITYGUIDANCE"

is displayed as

effectInfo
    effectAttachInfo
    attachType "Ability"
    abilityIndex 0
    smallEffectName "CapitalAbility_AbilityGuidanceActivate"
    largeEffectName "CapitalAbility_AbilityGuidanceActivate"
    soundID "EFFECT_ABILITYGUIDANCE"

in the editor, because I didn't think about parsing more than one tab for some reason. I guess I was in a rush when I was making the parser.

The reason no one noticed the bug actually makes sense to me, now that I think about it. I store values loaded from a file in their own application level class that does not directly interact with anything displayed at the UI level. So, displayed data, even though it is parsed incorrectly, does not affect the actual data stored in my file objects. They are still edited correctly and such. So, luckily, the bug isn't as big a deal as I thought. It is not a mod-breaker.

The bug is already fixed, I am just making sure I didnt miss anything, and I will release in it 20 minutes or something. Or I might release it tomorrow. I am getting tired.

As for the error obscured ran into... I am not sure what that is. I ran into no exceptions when doing my testing, nor did the other two testers for the final version.

If you can reproduce the error and tell me what you did, I can figure out if it is a problem with my program or not.

I can tell you this much:

My program assumes PERFECT formatting for the files. If a file starts off with the first line having a tab, my program will not handle that (neither will sins). You have to format files perfectly, or the program could very well crash. If it is crashing on a perfectly formatted, unmodified file, then tell me what you did to produce the exception, and I will try to reproduce it and debug it.

Thanks,

-Ian

Reply #13 Top

Anyway, I am going to release it tomorrow. I want to find out what obs did. And I want to add in one feature, as thanks for people who waited.

Reply #14 Top

i was going thru opening files and i hit one that caused a unhandled exception ive been trying to find the file and open it again to see which ones cause the error

i can tell you though its not from the standard files ive been opening files from mad scientist 1.0

seen this error 2 times post the exact one when i see it again

Reply #15 Top

Heh, between work and relatives, I didn't even see the thread 'til the download was disabled.

 

But I'm very good at breaking things. I'll make sure to try with 1.0.1.

I'll also try the sub-templates out to see if I can unintentionally break it.

 

:fox:

Reply #16 Top

im better at it kitkun haha 8(| :rofl:

more information

an item with the same key has been detected

ok i found out how to replicate it

first start up 1.0

then start opening files 8 at a time

click close all

reopen the same set of 8 files

itll throw this error

see if you can replicate it

i can replicate this so

Reply #17 Top

Alright, I will try to duplicate it. Thanks.

Kitkun... I am not sure how you are going to test templates, considering I said I won't be doing anything with them until v1.1 and v1.2... :). I do not know when I will start with v1.1.0, since I am getting tired of dealing with the program.

+1 Loading…
Reply #18 Top

Quoting obscureddeath, reply 16
im better at it kitkun haha
Pfft. My skill a breaking things is legendary. It's said that I can crash a computer just by walking into the room. :P

Quoting jjz-, reply 17
Kitkun... I am not sure how you are going to test templates, considering I said I won't be doing anything with them until v1.1 and v1.2...
Er... right. Then I certainly will break it, though it probably won't be your fault. I'll make sure to test it thoroughly first, and will make sure to test any errors on an unmodified version.

 

:fox:

Reply #19 Top

your funny kitkun

silly but funny *_*

i guarentee i can break it better lol i already found a bug LOL :P  

}:)

Reply #20 Top

It's said that I can crash a computer just by walking into the room.

Yeah, but that's just you being clumsy with your tail.

Reply #21 Top

:(  Sorry your getting tired of it, i can imagine all the work that goes into something like this, but imagine is all, im not a coder, but hey, this is fantastic work and i hope you know we all appreciate all you are doing. This is an awesome tool to have for us non-coders, and a boon to have someone as nice as you to do it for those of us that can't.

I tweak files, but im nowhere near this kind of work of course, but wanted you to know that i appreciate it, and all you are doing for the community. Thank You!!!!

:)

-Teal

 

Reply #22 Top

Heh, don't worry. I don't plan on stopping or anything. I'm not tired of dealing with the program because of the community. I just don't like coding when I don't have to. I only chose software engineering as a profession because it is the most interesting out of anything I looked into, but it is still not very interesting to me.

Rest assured, I will deliver what I have promised. I do not make empty promises.

Reply #23 Top

cool did you figure out if you could duplicate that bug

if its a bug

SQUASH IT  :omg: SQUISH IT 8|   SMASH IT o_O   BASH IT <_<

but basically you should just  KILL IT! :puke:  

 x_x :waaaa:

ok i have a bit too much time on my hands tonight i so enjoy picking apart  files

especially if its allowed (heck i do it anyway even if its not LOL)

i like to cheat

if i can make the game let me cheat without letting the game cheat

HEY ALL THE MORE FUN!

Reply #24 Top

I am at work. I will look at reproducing what you experienced later tonight. From how you explained it, it sounds like a bug.

Reply #25 Top

Well, technically it is finished. I fixed the bug, and I made it parse the files correctly... however, there is a dilemma I am facing.

Right now, I reload my entire set of file data for a specific file each time it is modified (not a line edited, but a line deleted/added). This works well, and is very fast, actually. It is far faster than the refresh rate of a high quality CRT, and is thus not noticeable. However, when you do insert a child or a sibling into the tree, it is refreshed and thus the expanded node is collapsed. This can get annoying. I will not accept this. It annoys me way too much.

The problem is, the other way, inserting into the tree using the functions provided by the tree control I use, is slow.  If you insert one child or sibling into a node that is not of level 0 (ie: not at the root level), you NOTICE the delay. It is about 1 second. Imagine if you have to copy and paste 50-60 items... This is not really acceptable, to me; however, neither is making a switch to a new component now. It took me forever to find a component I liked that combined the functionality of a treeview and listview. It just so happens that the people who coded the component, while being good at providing a feature rich component, completely fail at designing efficient algorithms for data structures.

 

So, basically, this shit is gay. I think #1 will be better because it has no delay at all and I MIGHT be able to get it set up so it restores the positions; however, this would be very hard, since there is nothing uniquely defining the values besides an index, and the index can change with the insertion and deletion of items. I can think of one way though... It will just be annoying. I am going to find a way to restore the positions. Hopefully tomorrow. If I cant by tomorrow, I will release the fixed version, and you will have to deal with the annoyance until I can fix it. I will have to find the way to do it within 30 minutes, because that is how long I am spending on this project. After that, I am not doing anything except starting up on v1.1.0, and that might not be for a while.

Of course, if there is some serious bug, I will fix that.

Sorry if I sound upset. I am. I wasted 40 minutes trying today on this project and only fixed a bug, improved performance, and some other miscellaneous things. I don't like dealing with nonsense that can be avoided. I especially don't like how I had to find a round about way of deleting selected nodes because of how this prick set events up. You know,if you fire a BEFORE SELECT event, you should not yet be modifying the list of selected items. That took up 10 minutes of my time to do something that should have taken 40-50 seconds.

Anyway, I will see what I can do about this.