Pages: 1 [2] 3 4 ... 9
  Print  
Author Topic: The Spelunky Community Update Project  (Read 110981 times)
halibabica
Bossy
Mossy
*
Posts: 2118


old guard


View Profile Email
« Reply #15 on: August 01, 2010, 06:27:46 AM »

Making underwater levels is also impossible without it. Layers+Drag Box=Win. Tab dialog box=More Win. +Extra traps, customizable miniboss drops and Category 6 items=Epic Win.

I really think that defeats the purpose of having editor plus.  Yeah, all those things are nice, but perhaps we should convince/help hyperme include them in that instead.  Don't forget, this is just supposed to be a bug fix!  Making the editor handier is just a potential bonus!
Logged

Sometimes I wonder if I like Spelunky too much.
ManTrap mod - Tastes Like Spelunky
Hand-drawn comic - Spelunkying
Moloch
Mosskid
*
Posts: 565


View Profile WWW
« Reply #16 on: August 01, 2010, 11:29:57 AM »

I also wouldn't mind seeing the TLS editor usability features included, I don't think anything that changes the original level format (new tiles, layers) should be added.


(Sorry the line numbers below refer to the original source, but they probably still match up.)

Bug: When playing as the tunnel man, when player meets the NPC tunnel man in the transition room, player sprite reverts to main dude sprite after talking to the NPC tunnel man.

Location:
oTunnelMan > Step Event, line 35

Old:
Code:
with oPDummy
{
status = TRANSITION;
if (global.isDamsel) sprite_index = sDamselRunL;
else sprite_index = sRunLeft;
}

New:
Code:
with oPDummy
{
status = TRANSITION;
if (global.isDamsel) sprite_index = sDamselRunL;
else if (global.isTunnelMan) sprite_index = sTunnelRunL;
else sprite_index = sRunLeft;
}



Damsel behaviour bugs:
(Grouped together because location overlaps)
- When damsel is in idle state, she will not react to being hit with the machete, even when her HP is reduced to 0.
- Dead damsel makes sounds when her corpse is thrown or attacked with machete or bullets.

Location 1 and 2:
oDamsel > Collision with oWhip Event, and Collision with oWhipPre Event (replace the code in both these events with the code below)
Code:
if (other.type == "Machete" and hit == 0)
{
     if hp > 0 playSound(global.sndDamsel);
     hp -= other.damage;
     hit = 10;
     yVel = -2
     playSound(global.sndHit);
     if (bloodLeft > 0)
     {
        scrCreateBlood(x+sprite_width/2, y+sprite_height/2, 1);
        if (hp < 0) bloodLeft -= 1;
     }
     if (forSale)
     {
        scrShopkeeperAnger(3);
     }
     if hp > 0 status = THROWN;
}
else if (status != THROWN and (status < EXIT or status == SLAVE or status == KISS) and hit == 0)
{
    yVel = -2;
    hit = 10;
    playSound(global.sndHit);
    if hp > 0 playSound(global.sndDamsel);
    if (forSale)
    {
        scrShopkeeperAnger(3);
    }
}

Location 3:
scrUseItem, line 602

Old:
Code:
playSound(global.sndDamsel);

New:
Code:
if holdItem.hp > 0 playSound(global.sndDamsel);

Location 4:
oBullet > Collision with oDamsel Event, line 21

Old:
Code:
playSound(global.sndDamsel);

New:
Code:
if other.hp > 0 playSound(global.sndDamsel);



Bug: Some objects trapped in lava will remain floating in air when the lava is destroyed.

Locations:
oJar > Step Event, line 81
oTreasure > Step Event, line 69
oSkull > Step Event, line 79
oDice > Step Event, line 96

Add "else myGrav = 0.6;" to the end of the lava collision check statement in all three locations so it looks like this:
Code:
if (collision_rectangle(x-3, y-3, x+3, y+3, oLava, 0, 0))
{
myGrav = 0;
xVel = 0;
yVel = 0;
y += 0.05;
}
else myGrav = 0.6


   
Bug: If the player is stunned and falling, landing at the very edge of a ledge means that he may continue as soon as he wakes up because the stunned sprite collision mask is wider than the standing sprite collision mask.

Fix:
sStunL, sDamselStunL and sTunnelStunL > Modify Mask
   - set Bounding Box to Manual
   - set Left to 2
   - set Right to 13
   - make sure these settings are the same for all frames
   
Logged

Moloch
Mosskid
*
Posts: 565


View Profile WWW
« Reply #17 on: August 01, 2010, 11:36:48 AM »

Bug: When dead or stunned, held items do not fly out of player's hands as (I beleive) Derek intended due to duplicate code in the same step.

Location 1:
oPlayer1 > Step Event, first 'Execute a piece of code' block, line 330

Old:
Code:
if (holdItem)
{
if (holdItem.type == "Bow" and bowArmed)
{
scrFireBow();
}
holdItem.visible = true;
holdItem.held = false;
if (holdItem.type == pickupItemType)
{
holdItem = 0;
pickupItemType = "";
}
else scrHoldItem(pickupItemType);
//holdItem = 0;
//pickupItemType = "";
}

New:
Code:
if (holdItem)
{
if (holdItem.type == "Bow" and bowArmed)
{
scrFireBow();
}

holdItem.visible = true;
holdItem.held = false;

if (holdItem.type == "Arrow")
{
holdItem.safe = true;
holdItem.alarm[2] = 30;
}     

holdItem.xVel = xVel;   
holdItem.yVel = -3;

if (holdItem.type == "Damsel")
{
holdItem.status = 2;
holdItem.counter = 120;
}   

if (holdItem.type == pickupItemType)
{
holdItem = 0;
pickupItemType = "";
}
else scrHoldItem(pickupItemType);
}
   

Location 2:
oPlayer1 > Step Event, first 'Execute a piece of code' block under the 'Hurt' section
Comment out or delete the following code (lines 233-255):
Code:
if ((dead or stunned) and holdItem != 0)
{
    holdItem.held = false;
   
    holdItem.xVel = xVel;
    holdItem.yVel = -6;
    holdItem.armed = true;
    if (holdItem.type == "Damsel")
    {
        holdItem.status = 2;
    }
    else if (holdItem.type == "Bow")
    {
        scrFireBow();
    }
   
    if (holdItem.type == pickupItemType)
    {
        holdItem = 0;
        pickupItemType = "";
    }
    else scrHoldItem(pickupItemType);
}

Comments: This includes the fix listed previously for the bug where player takes damage from the arrow he is was holding when hit by another arrow.



Bug: When playing as the damsel and climbing the rope to exit on the title screen, sprite reverts back to main dude.

Location:
oPDummy5 > Create Event, line 5

Old:
Code:
if (global.isTunnelMan) sprite_index = sTunnelClimb2;

New:
Code:
else if (global.isTunnelMan) sprite_index = sTunnelClimb2;



Bug: If you launch a rope up with the rope hotkey while holding a damsel and falling downwards, it will damage her.

Location:
oRopeThrow > Create Event

Add the following lines:
Code:
safe = true;
alarm[2] = 30;



Bug: Kapala continues to collect blood when player is dead.

Location:
oPlayer1 > Collision with oBlood Event, line 1

Old:
Code:
if (global.hasKapala and other.collectible)

New:
Code:
if (global.hasKapala and other.collectible and not dead)

Comment: Has no effect on gameplay since you are already dead, but doesn't make much sense. To see this in action, die on spikes with the kapala, and you will endlessly collect your own blood, generating hearts.



Bug: Breaking jars with the whip produces double amount of contents.

Location:
oJar > Collision with Whip Event

Delete all the code and replace it with:
Code:
instance_destroy();

Comment: Duplicate code. Jar contents are generated in the Destroy event.



Bug: Compass doesn't work in custom levels.

Location:
scrLoadLevel

Insert the following after line 104:
Code:
if (obj)
{
global.exitX = obj.x;
global.exitY = obj.y;
}



Bug: Stunned shopkeeper wakes up when whipped.

Locations:
oShopkeeper > Collision with oWhip Event, and Collision with oWhipPre Event

Change line 18 in both events to:
Code:
if status < STUNNED status = ATTACK;



Bug: Arrows on the ground always face right.

Location:
oArrow > Step Event, line 18

Old:
Code:
else if (not stuck) direction = 0;

New:
Code:
else if (not stuck)
{
    if direction > 90 and direction < 270 direction = 180
    else direction = 0;
}



Annoyance: Accidentally picking up the die that has already been rolled (especially when they overlap) in the craps game angers the shopkeeper. Avoiding overlap by cautiously dropping the dice instead of flinging them around the room is no fun. This fix prevents the first rolled die from being able to be picked up until you finish the craps game by rolling the second die.

Location 1:
oDice > Step Event, line 219

Old:
Code:
if (rolling and yVel == 0)
{
if (rolled) scrShopkeeperAnger(0); // NO CHEATING!
rolled = true;
rolling = false;
}

New:
Code:
if (rolling and yVel == 0)
{
if (rolled) scrShopkeeperAnger(0); // NO CHEATING!
rolled = true;
canPickUp = false;
rolling = false;
}


Location 2:
oShopkeeper > Step Event, line 160

Old:
Code:
if (not rolled) global.diceRolled = false;

New:
Code:
if (not rolled) { global.diceRolled = false; canPickUp = true; }

Location 3:
oShopkeeper > Step Event, line 220

Old:
Code:
with oDice { rolled = false; }

New:
Code:
with oDice { rolled = false; canPickUp = true;}
   
Logged

TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« Reply #18 on: August 01, 2010, 12:13:56 PM »

I'm not really sure whether to add the craps fix.  Its one of those rougelike touches that you can anger the shopkeeper by cheating, accidentally or not, and it was probably intended that a new player could attempt to cheat.

Instead, I think maybe the code should be changed to where the player is only cheating if they throw the dice causing it to roll again, and have it to where doing the crouched down gently dropping the dice doesn't count as cheating.

Edit: Actually yeh, I'll code a change that causes the dice only to be rolled if you actually throw it, and make it to where the shopkeeper's ire is not drawn simply by picking up an all ready rolled die.
« Last Edit: August 01, 2010, 12:17:04 PM by TyrannicalOverlordC » Logged

halibabica
Bossy
Mossy
*
Posts: 2118


old guard


View Profile Email
« Reply #19 on: August 01, 2010, 12:38:34 PM »

Why does nobody seem to realize that it's impossible to cheat in Spelunky craps.  You roll one die.  You roll the other.  The end result is random every time.  Even if you reroll one die, it has no bearing on the outcome of the other.

That said, I really think it should be made so that a rolled die cannot be rolled again.  There's no point in angering the shopkeep over 'cheating' when no such thing can be accomplished in the first place.
Logged

Sometimes I wonder if I like Spelunky too much.
ManTrap mod - Tastes Like Spelunky
Hand-drawn comic - Spelunkying
TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« Reply #20 on: August 01, 2010, 01:07:19 PM »

According to the bell curve you can cheat.  What number is rolled on one die effects the probability of what the outcome will be, and using the formula you can accurately predict what the outcome will be.


Anyway though, I guess we could go ahead and make it to where it can't be rolled again.  I still like the idea of being able to anger the shopkeeper though (but making it more forgiving by letting you set the accidentally picked up die down).
« Last Edit: August 01, 2010, 01:15:22 PM by TyrannicalOverlordC » Logged

halibabica
Bossy
Mossy
*
Posts: 2118


old guard


View Profile Email
« Reply #21 on: August 01, 2010, 01:12:23 PM »

No, wait, hold on a sec.  I'll be completely honest; this never occurred to me until just today.  While it is impossible to cheat in trying to get the item on display at the craps house, it is very much possible to cheat for more money.  Rolling something low first would tempt the player to roll again so they can potentially come out on top.

In light of that, I think your previous proposed method is a better idea.  If they pick up the wrong die by accident, setting it down gently will not reroll it.  If they try to reroll it with a normal throw, they get BULLETS.
Logged

Sometimes I wonder if I like Spelunky too much.
ManTrap mod - Tastes Like Spelunky
Hand-drawn comic - Spelunkying
TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« Reply #22 on: August 01, 2010, 01:49:31 PM »

Turns out that changing line 211 of oDice's step event from
Code:
if (abs(yVel) > 2 or abs(xVel) > 2)
to
Code:
if (abs(yVel) > 2 or abs(xVel) > 6)
does a wonderfully good job of only rolling the die if you actually throw it, not if you set it down.  I haven't tested it with a pitcher's mitt yet though, so I don't know if that would increase the horizontal velocity enough to trigger it when just set down.
Logged

TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« Reply #23 on: August 05, 2010, 06:08:24 PM »

Updated with the latest bug fixes.

I'll start going through that mess of a bug list at the Spelunky wiki when I get the time.
Logged

marsgreekgod
Big Bossy
Mossy
*
Posts: 9806


The will of the Galaxy.


View Profile WWW Email
« Reply #24 on: August 06, 2010, 10:30:53 AM »

Making underwater levels is also impossible without it. Layers+Drag Box=Win. Tab dialog box=More Win. +Extra traps, customizable miniboss drops and Category 6 items=Epic Win.

I really think that defeats the purpose of having editor plus.  Yeah, all those things are nice, but perhaps we should convince/help hyperme include them in that instead.  Don't forget, this is just supposed to be a bug fix!  Making the editor handier is just a potential bonus!
yes, yes it does. But it does make this more likely to be used.
Logged

Show your power, Gun Del Hell! Show them their fate! Yes! Yes! Yes! Yes! Yes! Here we go! Let's go, go, go, go, Django! Light and Dark! It comes down to this! Be afraid, Sun!
halibabica
Bossy
Mossy
*
Posts: 2118


old guard


View Profile Email
« Reply #25 on: August 07, 2010, 04:54:00 AM »

In the script scrInitLevel, it says at line 246:

if (global.murderer or global.thiefLevel > 0)
{
    with oExit
    {
        if (type == "Exit")
        {
            obj = instance_create(x, y, oShopkeeper);
            obj.status = 4;
        }
    }
    // global.thiefLevel -= 1;
}

Simply change it so it says:

if ((global.murderer or global.thiefLevel > 0) and isRealLevel())

This will stop Shopkeepers from spawning at exits in custom levels, because that is some seriously lame crap.

Also, I don't know if you would consider this a glitch or not, but jars generate two objects when whipped as opposed to when they're destroyed by other means.  This is because of repetitive data.  Jars are already set to generate something when they're destroyed, but in its collision event with the whip, it has the same data again.  Thus, one is created from the collision, and another created from the destruction.  Removing the extra data from the whip event and simply leaving it at 'instance_destroy();' should fix it.

Unless we don't want to fix this, because it is kinda nice getting multiple rewards from the same jar.  Alternatively, we could make it so the jar's destruction always results in two rewards by having it repeat its destruction event twice.  We'd still have to take out the whip data, though.
 And it turns out you already fixed that.

EDIT EDIT: Here are a couple more for you!

Zombies have no type: add a line to the Zombie's create code that says 'type = "Zombie";'.  Easy!

Yeti/Hawk/Shop throws don't count as kills for them: this one's a little trickier.  First, you need to add some code to the player's create event.  These three lines here:

shopThrow = false;
yetiThrow = false;
hawkThrow = false;

Next, in the player collision events of those three enemies, add a line in their throwing code that sets one of these variables to true.  You'll also have to set the others to false.  So, for example, under the shopkeeper's throw code, it should say somewhere:

with (other)
{
yetiThrow = false;
hawkThrow = false;
shopThrow = true;
}

Finally, in the player's step event (Hurt section, part 1, if (dead or stunned) code), find the line that says 'if (wallHurt > 0)' (lines 359 and 385 in TLS).  The code here says:

global.plife -= 1;
wallHurt -= 1;

Add this between those two lines:

if (global.plife <= 0)
{
if (shopThrow and isRealLevel()) global.enemyDeaths[19] += 1;
else if (yetiThrow and isRealLevel()) global.enemyDeaths[13] += 1;
else if (hawkThrow and isRealLevel()) global.enemyDeaths[18] += 1;
}

It must be added in both of those places.  This will register damage from being thrown as done by those enemies and count as a kill by them if it's fatal.  But there's one more thing you must add!

At the end of the 'if (dead or stunned)' code, add the following:

if (wallHurt = 0)
{
shopThrow = false;
yetiThrow = false;
hawkThrow = false;
}

This way, the variables turn off if the player survives the throw.  Whew, that one was complicated!

Crushed by boulder doesn't count as boulder death: another easy fix.  In the player's step event (Hurt section, collision x y solid code (line 12 in TLS)), there's a code that says:

if (isRealLevel())
{
if (isRoom("rOlmec")) global.enemyDeaths[22] += 1;
else global.miscDeaths[2] += 1;
}

Change it to this:

if (isRealLevel())
{
if (isRoom("rOlmec")) global.enemyDeaths[22] += 1;
else if collision_point(x, y, oBoulder, 0, 0) global.miscDeaths[5] += 1;
else global.miscDeaths[2] += 1;
}

~tada.

Also, TyrannicalOverlordC, were you able to fix the short fall damage glitch?  Did the yVel Approximately Zero thing work?  If not, I can detail all the horrible crap I had to do to fix it.
« Last Edit: August 07, 2010, 05:34:55 AM by halibabica » Logged

Sometimes I wonder if I like Spelunky too much.
ManTrap mod - Tastes Like Spelunky
Hand-drawn comic - Spelunkying
marsgreekgod
Big Bossy
Mossy
*
Posts: 9806


The will of the Galaxy.


View Profile WWW Email
« Reply #26 on: August 07, 2010, 12:05:50 PM »

Just poping in to say, this looks really well planed and ordered..

good job guys.
Logged

Show your power, Gun Del Hell! Show them their fate! Yes! Yes! Yes! Yes! Yes! Here we go! Let's go, go, go, go, Django! Light and Dark! It comes down to this! Be afraid, Sun!
halibabica
Bossy
Mossy
*
Posts: 2118


old guard


View Profile Email
« Reply #27 on: August 15, 2010, 06:29:49 AM »

Hey, I'm not sure if this is something we ever planned to change, but ManTraps don't eat Hawkmen, Yetis, or Vampires in editor levels.  It's kinda cool having them all be buddies, but it doesn't really make sense.  All the sprites we'd need are in TLS' source, and the script would be copy+paste for each one.

Also, should we employ the improved target tracking I gave piranhas?

Hey, also!  If you die with ankh too far away from the Moai in the regular game, it will fail to teleport you inside it.  I fixed it in TLS, but I think there might be a better way.  I'll put whatever I come up with here later.

EDIT: Jars, Skulls, and Rope Ends tend to fall through solids while off-screen.  If you add the code at the top of the step event script for oItem to jars and skulls, it will fix this.  Code being this:

if ((x > view_xview[0]-16 and x < view_xview[0] + view_wview[0]+16 and
    y > view_yview[0]-16 and y < view_yview[0] + view_hview[0]+16) or
    type == "Rope")

It's the x_view y_view requirements that are important for jars and skulls.  To fix rope ends, change the part that says 'or type == "Rope"' to 'or (type = "Rope" and armed)'.  This will stop them from falling through solids when dropped, but still allow them to activate in the frozen zone.  Don't forget to add the curly braces around the whole step event underneath!

We didn't forget about this project, did we?
« Last Edit: August 15, 2010, 08:36:23 AM by halibabica » Logged

Sometimes I wonder if I like Spelunky too much.
ManTrap mod - Tastes Like Spelunky
Hand-drawn comic - Spelunkying
TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« Reply #28 on: August 15, 2010, 08:34:32 AM »

Nope! I just got distracted.  I'll get on updating this tomorrow.
Logged

halibabica
Bossy
Mossy
*
Posts: 2118


old guard


View Profile Email
« Reply #29 on: August 17, 2010, 06:20:38 PM »

More broken stuff!

Getting killed by a Vampire doesn't register as such in the stats file.  Likewise, getting killed by a dead piranha doesn't count as anything.  The Vampire's easy to fix, but the piranha will require more work since it adds something new to the stats file.  I'll post about it again once I figure out a compatible way.

Also, TOC, have you made any significant changes to TLS' source lately?  Because there are a bunch of things I'd like to fix, and I don't want for either of us to do double work.
Logged

Sometimes I wonder if I like Spelunky too much.
ManTrap mod - Tastes Like Spelunky
Hand-drawn comic - Spelunkying
Pages: 1 [2] 3 4 ... 9
  Print  
 
Jump to: