Points of Required Attention™
Smaghetti, a new Super Mario Advance 4 editor, is currently in development! Check out the thread HERE!

Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,314,969
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 03-29-24 02:55 AM
Guest: Register | Login

0 users currently in Secret of Mana Hacking | 2 guests

Main - Secret of Mana Hacking - System.ArgumentOutOfRangeException Error (SOMedit) New thread | New reply


blitzlunar
Posted on 02-10-15 04:44 PM Link | Quote | ID: 159470

Newcomer
Level: 5

Posts: 1/4
EXP: 461
Next: 68

Since: 02-10-15
From: UK

Last post: 3322 days
Last view: 3319 days
Hi guys! I've been following the progress with SOM Edit for a while, terribly excited as I am about it.

I was hesitant about doing any of my own edits knowing that the software was still very much a work-in-progress and somewhat unpredictable. But I couldn't wait any longer, so I went ahead and spent a few hours today tweaking most of the enemies (my idea being to ramp up the difficulty a little + generally throw in a few surprises.) Well, sure enough, I'm having problems!

I get these messages when saving the project (in fact, I don't think saving the project does anything):

15:25:45 - System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Someditc.FullMapEditorControl.SaveMapsToProject(ProjectFile project)
at Someditc.Form1.SaveProject()


And these messages when exporting to a ROM:

15:07:11 - System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at Someditc.FullMapEditorControl.SaveAllMaps(BinaryWriter romFile)
at Someditc.Form1.saveStuffToRom(BinaryWriter writer)


Of course, I have no idea what any of this means. There may have been other errors while I was working on it, but I didn't notice. The ROM export is successful, but of course does not work/crashes Zsnes (could share it if anyone is interested, though I doubt it'd be any use.)

If anyone has any clues as to what could be wrong / a way of fixing or getting around this problem, I'd be interested. I did update probably half the enemies so I wouldn't be surprised if that broke something. I've closed the program and lost all the progress now I guess, but it isn't a huge problem, I can remember most of what I did and would probably do a better job next time around anyway.

Finally I'd also just like to say I'm looking forward to any hacks anyone else makes, or has made.

____________________
http://iridescentaudio.co.uk

animeloverxX93
Posted on 02-10-15 11:58 PM Link | Quote | ID: 159472

Newcomer
Level: 7

Posts: 4/7
EXP: 1070
Next: 378

Since: 02-03-15

Last post: 2108 days
Last view: 2108 days
I'm not entirely sure myself, but I believe Mop stated in one of his updates, that the editor won't put the changes into the ROM just yet, if I understood ir correctly.
It will save everything in a project file, that's it.

Like I said, I'm not entirely sure about this myself, but I believe I read somewhere that changes in the editor won't yet be able to get applied to a ROM, and that Mop was thinking about doing this step by step by allowing certain things to be importable over time (for example, maps first, then after a while once everything is stable, music, then custom stuff etc..).

Maybe, someone else could give you a more accurate explanation or act as a support person here, I might misunderstood some things in Mop's updates.

blitzlunar
Posted on 02-11-15 10:01 AM (rev. 2 of 02-11-15 10:07 AM) Link | Quote | ID: 159475

Newcomer
Level: 5

Posts: 2/4
EXP: 461
Next: 68

Since: 02-10-15
From: UK

Last post: 3322 days
Last view: 3319 days
I can confirm that I have had success with exporting ROMs on a couple previous occasions (around a year ago, when I first discovered SOM Edit.) Case in point:





In that instance I only edited a single enemy, so of course there's significantly less to go wrong. But even back then I can remember running into some problems with exported ROMs being unplayable, if I remember correctly. (don't remember the details)

Would be content just to work in a project file, but as you can see, it wasn't even saving ~ the file's modified date hadn't changed since not long after I started editing.

Thanks for the reply anyway. It would be cool to have a definitive answer!

____________________
http://iridescentaudio.co.uk

..RetroHelix
Posted on 02-11-15 07:33 PM Link | Quote | ID: 159476


Micro-Goomba
Level: 11

Posts: 16/18
EXP: 4627
Next: 1358

Since: 03-09-14

Last post: 2673 days
Last view: 2830 days
I think Mop made significant changes to the ROM when he rewrote the code for the map triggers. He stated that this has not been tested thoroughly. Maybe this causes some errors now. But this should not affect the editor itself.

blitzlunar
Posted on 02-12-15 04:59 PM (rev. 2 of 02-12-15 04:59 PM) Link | Quote | ID: 159479

Newcomer
Level: 5

Posts: 3/4
EXP: 461
Next: 68

Since: 02-10-15
From: UK

Last post: 3322 days
Last view: 3319 days
Yeah I think you're right. I edited one enemy using v.0210, and project saving was fine. Using v.0213 however, editing the same enemy+saving produced the same error mentioned in the OP.

This update in v.0211 appears to be responsible, afaik:


- Change method of output to project file and external files for
composite maps. Now stored as human-readable/modifiable properties
file. Old file type still supported for compatibility. Similar
changes to come for other data types.


Guess I'll wait it out for a new, more stable version.

____________________
http://iridescentaudio.co.uk

Main - Secret of Mana Hacking - System.ArgumentOutOfRangeException Error (SOMedit) New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.020 seconds. (323KB of memory used)
MySQL - queries: 57, rows: 70/71, time: 0.015 seconds.