Editor

I want my 15 rapid-fire quantum torpedo launchers Uber-Defiant now! - Get help from modders. Share your work. Discuss modifications.
posted on November 22nd, 2010, 11:37 pm
ok as some of you may know i'm currently making aneditor to help modify the text files in armada1/2/fo. now the current version is by no means complete but feedback would be welcome

Attachments

[The extension has been deactivated and can no longer be displayed.]

posted on November 22nd, 2010, 11:46 pm
very nice work :thumbsup:

the installer makes a desktop shortcut but no start menu item.

ctrl+a to select all text doesnt work.

excel by default blocks the macros the calculator uses. probably no way around that though.
posted on November 22nd, 2010, 11:55 pm
wot version of windows and excel do u have
posted on November 23rd, 2010, 12:17 am
Blade wrote:wot version of windows and excel do u have


windows 7, microsoft office 2010, i dont think i changed the macro settings on excel, so its probably default behaviour to block macros on files by default.
posted on November 23rd, 2010, 1:11 am
ah yh there are issues with office 2010 i think it requires a different filetype to improve compatability will have to look into and experiment with that
posted on November 23rd, 2010, 1:27 am
Awsome, it'd be great if we finaly got a .odf editor that worked, other than notepad
posted on November 23rd, 2010, 1:46 am
i wudda liked to have dne a better gui but dunno howso notepad interface is best i can do
posted on November 23rd, 2010, 4:12 am
Hmm, not bad. May I ask what language your working in? My guess is it's either C++, C#, or Visual Basic; and if you're using C++ are you using the MFC extensions?

In the calculator, if I say "No" to the save command I get a "Runtime error '1004'. Method 'SaveAs' of object '_Workbook' failed." I'm on Excel 2010. You probably need either some kind of if statement to check if the save was successful or a try-catch type thing. I'm not familiar with the MS Office macro syntax so I'm not sure what you need exactly.

I'm not sure forcing the save before adding code is necessarily the way to go. Probably better to keep the text in memory, even just storing it in the control would work.

The "Parse ..." commands on the File menu might be better called "Strip ...". Parse I usually take to mean something else. The code adding mechanism needs work. I don't mean it's broken, just awkward. I usually find that long menus like that are too awkward to use effectively. Either add more sub-groups or use a dialog system. If you use a dialog system, you could also have the user enter values into the dialog and have them translated to code immediately.

Undo only works for manual edits, but you may know that already.
posted on November 23rd, 2010, 3:05 pm
hi i've used Pascal to create the editor and since i've had no formal learning on programming I'm just figureing out what I can. The new version of the #editor has the parsers renamed to remove and remove sprite comments have been added.

there are known issues with getting the calcs to work with office 2010 i think it has sumthing to do with excel2010 requires a different file type for vb macros to work correctly. however the runtime issue is because it expects the file to be saved and if its not then it has an error i'll try fix that

Atm i aint sure how the info can be stored in memory and used in the editor but I will add more sub menus but user input dialogs are currently and unfortunatly a no until i can figure that out
posted on November 23rd, 2010, 4:29 pm
Last edited by Atlantisbase on November 23rd, 2010, 4:32 pm, edited 1 time in total.
Well without knowing anything about Pascal, I can say easily that a good way to store the text in memory would be to make any array of strings (assuming this is possible). Then for each line of text, you add the corresponding string to a new slot in the array. You then update the editor control from the array.

While I know nothing about Pascal, or whatever APIs may exist, I would recommend you switch to C# or Visual Basic, particularly C# (but I'm biased to C type languages). It's not hard to learn, the basics of most languages are the same, variables, conditionals, loops, etc and after that the rest is just syntax; though if you're coming from a non-object based language, there will be a few concepts to learn. You'll also get the benefits of object orientation and the .NET Framework which will solve your data in memory problem easily. There are certainly plenty of books available and if you get one which explains things in a straight forward way, with plenty of examples, it shouldn't be too difficult to learn. You'll also be able to design your GUI visually (with Visual Studio), both the main GUI and any dialogs. In fact Visual Studio makes almost all aspects of programming in C# quite easy as it will do quite a bit for you.
posted on November 23rd, 2010, 5:39 pm
i have learned some basic c language but still bit confussing. pascal is mainly non object but can do some object based coding. unfortuatly to store veriables first u need to get the values and since excel uses vb could be awkward. plus a store only lasts until the program closes then they need to be stored again. but like i said i'm self learning
posted on November 23rd, 2010, 7:36 pm
Blade wrote:plus a store only lasts until the program closes then they need to be stored again.

You would of course ask the user to save the data before they quit, and if they want to, the data is written to disk at that point or whenever the user ask for a save. But now instead of doing relativly costly disk writes, you're only writing when necessary.
posted on November 23rd, 2010, 9:04 pm
its still the matter of converting wots dne in excel to the editor which aint as easy as it sounds
Reply

Who is online

Users browsing this forum: Yandex [Bot] and 6 guests

cron