Sorry, didn't see your response; I was stuck on the last page.In babe world wrestling I want to reduce the chance of whatever opponent your facing of breaking out of a hold. I may have chosen the most complex game to try modifying the code lol.
Okay let's look at the script for a submission hold.
First step is looking for the animation.
Under the last tab (scripts), click the + to expand.
Click each DefineSprite and it'll play through the frames so you can find the animation you want.
In this case DefineSprite (chid: 1841) seems to have a lot of the moves.
Click on the + to expand it, the frames are named for convenience.
I'm going to pick frame 1054 (name: nipplebite) cause I love this move.
There are scripts playing from frame 1054, 1055, 1059, and 1065, click to expand each one.
Under 1054, you see:
_root.grounded = true;
_root.girlonropes = 0;
_root.bite.start();
_root.titpain();
Under 1055:
_root.hurtbreasts();
_root.badfatigue = _root.badfatigue + 1;
_root.goodfatigue--;
_root.sexypoints--;
if(_root.sexypoints <= 0)
{
_root.ref_mc.gotoAndPlay("call");
_root.specialBTN.gotoAndStop(1);
_root.dots_mc.gotoAndStop(1);
}
Under 1059:
_root.ebreakout();
Under 1065:
gotoAndStop("nipplebite");
play();
Let's dissect each one so that I can guide you through the logic:
_root.grounded = true;
This is what we call a "boolean" - it is either true or false. I'm assuming based on how this game plays, it determines what moves are available depending on the state of the fighter.
_root.girlonropes = 0;
This value should be used in a similar fashion as the booleans (true/false), except it's probably used because there are more than 1 state of being on the ropes, and can be defined as values 0, 1, or 2. You could probably use the search function to dig them all out in the script (Tools -> text search)
_root.bite.start();
This plays the bite sound.
_root.titpain();
This function is defined at the very bottom of the script, under "frame 2" -> "DoAction".
titpain = function()
{
titsore++;
painroll = random(50);
if(painroll < titsore)
{
if(painroll > 25)
{
badfatigue += 3;
zsigh2.start();
ref_mc.gotoAndPlay("red");
}
else
{
badfatigue++;
}
}
};
titsore++; means it adds +1 to the titsore value, which is also defined in Frame 2's DoAction defined as a variable (var titsore = 0;)
painroll here is defined as a random value between 0-50. Since its maximum value is 50, it means a titsore value of 50 or greater has a 100% chance of triggering the next effect.
if(painroll > 25) basically means there's a 50% chance of causing this effect, since painroll is a random value between 0 and 50.
badfatigue += 3; adds 3 to the fatigue score.
zsigh2.start(); plays a sound.
ref_mc.gotoAndPlay("red"); plays an animation.
badfatigue++; as you might guess, adds 1 to the fatigue score.
_root.hurtbreasts(); is defined under frame 2 as well.
hurtbreasts = function()
{
combopoints += random(3);
zxpains();
badfatigue += gStrbonus;
moneyroll = random(100);
if(unlockedGold == false)
{
if(moneyroll == 0)
{
extrabonus_mc.gotoAndPlay("coin");
}
}
else if(moneyroll < 2)
{
extrabonus_mc.gotoAndPlay("coin");
}
};
Probably don't have to go over each one as it should be self explanatory (ask me if you need the explanations).
This function calculates how many points you get per animation cycle, adds the moaning sounds, calculates how much fatigue the opponent gets per animation cycle, and randomly gives you sexy coins. Note that "badfatigue" refers to the opponent, while "goodfatigue" refers to the player. You get coins at a 1% chance (rolling a 0 out of 100) without the buff and a 2% chance (rolling 0, 1) with the buff. You can change to moneyroll=random(1) if you want a 100% chance with the buff, or elseif( moneyroll<101), both will do the same thing. Or you know, just delete the if/then statement and just leave extrabonus_mc.gotoAndPlay("coin"); so that it's no longer needs to meet a condition.
zxpains(); is defined under frame 2, use the search function.
_root.badfatigue = _root.badfatigue + 1;
_root.goodfatigue--;
_root.sexypoints--;
Adds 1 to the opponent's fatigue score, reduces your fatigue by 1, and reduces your sexypoints by 1.
Note that the fatigue is also calculated in the _root.hurtbreasts(); function, but this one specifically increases it by 1 more.
The syntax is also different - when used in the animation, it is defined as _root.badfatigue = _root.badfatigue + 1, but under frame 2 DoAction, only badfatigue++. I don't really know why, but just keep this in mind. Back to the note - I'm assuming that most of the tit attacks will all use the _root.hurtbreasts() function, which guarantees a base level damage. This one only adds something on top of that damage.
if(_root.sexypoints <= 0)
{
_root.ref_mc.gotoAndPlay("call");
_root.specialBTN.gotoAndStop(1);
_root.dots_mc.gotoAndStop(1);
}
Since in the previous function, we see there is a _root.sexypoints--; which decreases your sexypoints by 1 every cycle, this tells us that when sexypoints reaches 0, it will automatically play the "call" animation, which we can assume breaks the submission hold. This is only one of two ways a submission can be interrupted, as you'll see later. If you want the animation to go on longer:
1) We can delete the _root.sexypoints--; so that it can't end when you run out of sexy points.
2) Remove this script so that even if you do run out of sexypoints, the ref won't call. Multiple ways to get it done!
Also remember that it is impractical (but possible!) to go through every single submission and change the values. Since most of the commands refer to the DoAction script for instructions, it is far more practical to change values there. But if you want the character to be weaker to some moves and resistant to others, feel free to change things at the animation level!
_root.ebreakout();
This function is defined under Frame 2 DoAction.
ebreakout = function()
{
if(freestyle == false)
{
breakroll = 55;
breakroll -= enemySpeed;
rollout = random(breakroll);
if(rollout < 4)
{
dots_mc.gotoAndStop(1);
specialBTN.gotoAndStop(1);
moveslideon3 = false;
moveslideon = true;
movetripped = true;
if(grounded == false)
{
fight2_mc.gotoAndPlay("badreverse");
}
else
{
grounded = false;
fight2_mc.gotoAndPlay("badreverseg");
}
}
}
};
Here you can see that turning on freestyle completely breaks this function. (FYI - = = is for comparing values, = is reserved for assigning values)
The default value of breakroll is 55, and the value decreases the greater the enemy's Speed (this was actually hard to find, I had to use the search function in Tools -> Text Search, then typed in enemySpeed). It turns out enemySpeed is defined when you press the button for what match you want (see DefineButton2 1925, 1926, 1932, 1933, 1943, 1946). Not quite sure why there are so many but you can see two of them are enemy mode, one is freestyle, etc. Usually variables have their values defined in Frame2 DoAction, but in this game, they are in the buttons.
Anyhow, the higher the enemySpeed, the lower the breakroll number.
Rollout generates a random number from 0 to the breakroll number, and if it is lower than 4, produces the next effect in the brackets, which basically is the enemy "breaking out" of the hold. Therefore, to reduce the chance of a breakout, we can change a multitude of parameters to prevent it from triggering.
We can:
1) Increase the default value of breakout greater than 55 by increasing breakroll = 55;
2) Remove the enemy's speed buff by deleting breakroll -= enemySpeed;
3) Change the enemySpeed value in DefineButton2 so that they start out with less speed.
4) Reduce the value required to break out by changing if(rollout < 4) to something like if(rollout < 1)
Keep in mind rollout<4 includes four values - 0, 1, 2, 3. And rollout<1 is one value - 0.
5) Or you know, just delete the whole section that allows the enemy to kick out!
dots_mc.gotoAndStop(1);
specialBTN.gotoAndStop(1);
I assume these restore the buttons to the left side so you can click on another move?
moveslideon3 = false;
moveslideon = true;
movetripped = true;
Not sure what these are but I assume they define what moves you can make.
if(grounded == false)
{
fight2_mc.gotoAndPlay("badreverse");
}
else
{
grounded = false;
fight2_mc.gotoAndPlay("badreverseg");
}
This just defines what animation will play, based on if the characters are on the ground or not. You can see the animations under DefineSprite (chid: 549). Obviously, there is going to be a lot more code under each of those animations and those can all be modified.
gotoAndStop("nipplebite");
play();
This is what loops the animation over and over again.
After changing values, try to save the swf under a new name so you don't mess up the original copy.
Hopefully this gives you a good understanding of how the code works and you can feel confident exploring around. Best of luck!
Last edited: