Author Topic: Java Exception when stepping into a trap  (Read 3127 times)

0 Members and 1 Guest are viewing this topic.

Offline Ron_Stard

  • Posts: 312
    • View Profile
Java Exception when stepping into a trap
« on: April 30, 2020, 07:11:08 PM »
I am converting the Sega Master System unique levels, which were adapted first for Lemmix by namida in this thread:

https://www.lemmingsforums.net/index.php?topic=1806.0

to SuperLemmini.

After converting the Ground/VGAGR to a SuperLemmini style (via GSTool), and mass-converting the *.lvl levels to .ini with NeoLemmixEditor V1.43-nC, i tested one of the Sega One levels in SuperLemmini 0.104. After stepping intentionally into a water drop trap, I got the exception of the attached capture.

Any ideas of what could have happened?

Offline LanaAndCo

  • Posts: 57
  • V2.0 Update : Online reactivation
    • View Profile
Re: Java Exception when stepping into a trap
« Reply #1 on: May 04, 2020, 12:36:51 PM »
Hello Ron!

After a lot of trial and error, I finally solved your problem. I'm still not sure how I did it, but I guess SuperLemmini doesn't support traps with more than 15 animation frames. Again, I could be wrong, but since I deleted the last frame from the tap trap, which was the same as the first, it works.

Here is the zip file you attached but with the correction I made.

Offline Ron_Stard

  • Posts: 312
    • View Profile
Re: Java Exception when stepping into a trap
« Reply #2 on: May 04, 2020, 12:59:10 PM »
Hello Ron!

After a lot of trial and error, I finally solved your problem. I'm still not sure how I did it, but I guess SuperLemmini doesn't support traps with more than 15 animation frames. Again, I could be wrong, but since I deleted the last frame from the tap trap, which was the same as the first, it works.

Here is the zip file you attached but with the correction I made.

Thank you! The trap works now, but its animation is pretty weird! The lemmings seems to travel up on a kind of elevator, shaped like the bottom of the faucet, and go up to the encounter of the water drop! :D

Offline LanaAndCo

  • Posts: 57
  • V2.0 Update : Online reactivation
    • View Profile
Re: Java Exception when stepping into a trap
« Reply #3 on: May 04, 2020, 01:20:46 PM »
How weird, the animation works just fine on my version... ???

Offline Ron_Stard

  • Posts: 312
    • View Profile
Re: Java Exception when stepping into a trap
« Reply #4 on: May 04, 2020, 02:17:05 PM »
My fault. Ok, I replaced everything, and not only sega.ini, and yeah, now it works fine. Thank you very much!

Oh, by the way, I also have to reduce the maxFallDistance from 252 to 126 in every level. In Master System Lemmings, they die without umbrella if they fall to the ground from the top of the "S" of Sega.
« Last Edit: May 04, 2020, 02:47:34 PM by Ron_Stard »

Offline LanaAndCo

  • Posts: 57
  • V2.0 Update : Online reactivation
    • View Profile
Re: Java Exception when stepping into a trap
« Reply #5 on: May 04, 2020, 02:29:36 PM »
No problem! Glad to help! :cute:

Offline ericderkovits

  • Posts: 912
    • View Profile
Re: Java Exception when stepping into a trap
« Reply #6 on: May 04, 2020, 03:21:38 PM »
The only thing is at those deadly water drops, it's supposed to show dripping water all the time(as a warning). play those in neolemmix extra levels(sega). you will see the dripping water.

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Java Exception when stepping into a trap
« Reply #7 on: May 04, 2020, 08:24:11 PM »
The only thing is at those deadly water drops, it's supposed to show dripping water all the time(as a warning). play those in neolemmix extra levels(sega). you will see the dripping water.

That's specifically a NeoLemmix thing. If you play the actual SEGA version, this does not happen. Likewise, if you play levels in the other official graphic sets on NeoLemmix, you'll also notice they have animated parts to the traps that aren't there on DOS / etc.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline ericderkovits

  • Posts: 912
    • View Profile
Re: Java Exception when stepping into a trap
« Reply #8 on: May 05, 2020, 01:32:45 AM »
Please note there are 2 of each of the sega levels one, two, three, four and five. In the superlemmi.ini files you have to distinguish the levels. you have ie sega one twice. so when I play back the replay it picked the second one and crashed the java level. I just went into each .ini file and for the easier ones I put ie sega one(1) and for the other one I put sega one(2) that way now when I do a replay it picks the correct one.

Offline Tsyu

  • Moderator
  • Posts: 350
    • View Profile
Re: Java Exception when stepping into a trap
« Reply #9 on: June 13, 2020, 07:49:20 AM »
I figured out what the problem is. It happens if the object's animation type is "triggered" (which is usually true for traps) and object's sound_x field (where x is the object index) is a single number rather than multiple numbers (which the included styles use to specify sound effects for specific frames--and something that I know I haven't documented yet!). This has been fixed for the next release.

In the meantime, you can add ",1" (without the quotes and with the comma) to the end of the object's sound field. (This just says to play the sound on the first animation frame after the object is triggered.)

Offline ericderkovits

  • Posts: 912
    • View Profile
Re: Java Exception when stepping into a trap
« Reply #10 on: July 25, 2020, 12:56:03 AM »
Thanks Tsyu for this bit of info. I'm converting Ichotolots lemmings Reunion from Lemmini to Superlemmi. and in the Shadow one when the lemming stepped into the squasher trap a java exception occured. but I put the ,1 into shadows .ini file for the squasher
 trap and now the trap works in Superlemmini. I'm glad in the next release this will be fixed.

noticed another in brick. the stamper one. so put ,1 in the brick.ini for the stamper.

I will be testing all traps as well as exits.
« Last Edit: July 25, 2020, 05:00:25 AM by ericderkovits »

Offline ericderkovits

  • Posts: 912
    • View Profile
Re: Java Exception when stepping into a trap
« Reply #11 on: July 25, 2020, 06:39:28 AM »
it seems its doing this for most traps.so I'm going to add the ,1 to the sound .ini files for each styles ahead of time so I won't waste time finding out after doing like half the level. i've finished 25 of 30 of the first rank also.