Ambrosia Garden Archive
    • Problem with EVNEW and destroyable spobs


      I can get it to work.... once....

      So here's the problem, I want a few of my stellar objects to be destroyable. I made a planetary weapon, and I gave the selected spobs various levels of 'strength'. Everything works beautifully. You shoot the planet and it goes up in flames. There is one problem...

      Everytime I reopen the system.rez file, all of the strengths of the planets revert to zero. I thought perhaps that my given planet strength of 20,000 was just too high. So I have a bunch of different planets different numbers of strengths (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048) and they all still reverted to zero the next time I opened the .rez file. So it appears it has nothing to do with how high you set the strength.

      Here's how it happens: When you change a planetary strength from zero to a positive number and then save the document it works great. As long as you keep that document open in EVNEW you can continue to make changes and then save them and it still works great. You can even reopen the spob you just modified and it will still show a positive value for the strength of the spob. You can close the EVNEW application (after saving the changes you've made) and everything still works great. You can even reopen the system.rez file with EVNEW and everything still works great. But once you modify it, after reopening the document, even if you just change a desc file, then ALL of the strengths revert to zero.

      I remember when I used an older version something like this would happen to my shan and desc files. Though on this current version I don't have the problem with those two types of resources. I am using EVNEW 1.0.4 right now. Is what I am describing simply a flaw of EVNEW? Or is there something inherent about stellar object strengths I'm not understanding? Has anyone encountered this or figured out a work around for this?

    • That's definitely a bug. MissionComputer has something similar, more annoying but less frequent, where the resource you just closed, saved or not, flashes an error. Trying to write again gives you null values. IDK exactly what went wrong, because I'm a Mac user, but that definitely is a bug if it happened like you said. My best guess for working around it is getting a new EVNEW, or hacking the program's execution code (you better be good).

    • hacking execution code? Not only does that not really mean anything, but EVNEW is open source anyway.

      Have you tried saving as a text file? You cant run nova from it obviously, but if you saved your work in text files, it is reloaded with different code, so the bug probably wont exibit itself. Then export it to a plugin when you want to test.

    • Incidentally, I think I found the bug anyway.

      (from "int CSpobResource::Load(char *pInput, int iSize)" from CSpobRescource from EVNEW source)
      
      m_iLandingFee      = *(short *)pInput; pInput += sizeof(int);
      m_iGravity         = *(short *)pInput; pInput += sizeof(short);
      m_iWeapon          = *(short *)pInput; pInput += sizeof(short);
      m_iStrength        = *(short *)pInput; pInput += sizeof(int);
      

      all of the types on the left match the types on the right, (there are pages more than this) except for landing fee and strength, when it loads up. The "short *" on the left of both of those should be ints, i think. If the bug also messes up landing fee, this would prove that this is the cause for the bug, and it would make sense that it went unnoticed so long (has anyone used landing fee?)

      I should mail the author... Unless he frequents these boards.

      (one last thing: the bug definately has nothing to do with loading from text, so my original work around should work, unless I missed something)

      (one laster thing: aprosenf@aol.com returns me a mailer daemon error. Anyone know how to get into contact with t3h cr34t0r?)

      This post has been edited by NebuchadnezzaR : 15 February 2005 - 06:28 PM

    • I don't know how to get in touch with him, but I really appreciate all of your help! I don't suppose you would be able to compile a 'fixed' version of EVNEW and either post it, or email it to me (seattlelightning@aol.com). Or is it bad form to mess with another guy's work without his consent?

    • Its open source, so it would be fine so long as I didnt pretend it was mine. The only problem is I dont have all the libraries I need to compile this.. so for now the only option is the save to text thing, as far as I can tell.

      Does anyone else know what a more current email for him is?

    • As far as I know (i.e. according to docs I saw somewhere, on Az's site or with the source or something, don't remember), the only external libraries are the Quicktime for Windows libraries. You can find them here (QuickTime 6 SDK Windows). You can compile it with DevC++. In fact, I'll try this out later.