Charas-Project

Game Creation => Requests => RPG Maker Programming => Topic started by: Yuffit on January 03, 2012, 02:40:41 AM

Title: Linked items.. i think.
Post by: Yuffit on January 03, 2012, 02:40:41 AM
I am clueless as to how to make this properly work.
Example
You have 3 items:
Savage Helmet
Savage Armor
Savage Gauntlets
Each of the 3 reasonably raises your attack power, and slightly lowers your defence.
I would like to know how you could make the character's attack power DOUBLE, in the event that all three of these are equipped, and if you take them off, your attack power goes back to normal.
Title: Re: Linked items.. i think.
Post by: Moosetroop11 on January 03, 2012, 08:39:56 AM
Geez, I just realised I don't even have rm2k3 installed on this computer... That's depressing!

Okay, so I don't remember too well, but you'll be using a common event that's parrallel... I think.  Inside you want conditional branches like this:

conditional branch [hero1] has equipped [Savage Helmet]
{
     conditional branch [hero1] has equipped [Savage Armour]
     {
          conditional branch [hero1] has equipped [Savage Gauntlets]
          {
               [var 2] = [var 1]x2
               conditional branch if [hero1 ATK] equals [var2]
               {

               }
               else
               {
                    conditional branch if switch 001 [hero1Savage] = OFF
                    {
                         set [var 1] to [hero1 ATK]
                         change stats [hero1 ATK] add [var 1]
                         switch hero1Savage = ON
                    }
                    else
                    {
                         change stats [hero1 ATK] minus var 1
                         set [var 1] to [hero1 ATK]
                         change stats [hero1 ATK] add [var 1]
                    }
               }
          }
          Else
          {
               go to label 1
          }
     }
     Else
     {
          go to label 1
     }

}
Else
{
     label 1
     conditional branch if switch hero1Savage = ON
     {
          [var1]=[hero1] ATK
          var1 / 2
          change stats [hero 1] ATK - [var1]
          turn switch 001 [hero1Savage] OFF
     }
    
}


...maybe.  I haven't used rm2k3 for ages, so there's a good chance none of that'll work...  0_o

Oh, and you need to do that for every hero.  Different switches and variables for each.
Title: Re: Linked items.. i think.
Post by: ellie-is on January 03, 2012, 03:50:41 PM
But wait, that only works if they have the full set.
He wants each item to have that effect. Which should follow the same basic idea but result in a longer, but simple code.
Title: Re: Linked items.. i think.
Post by: Prpl_Mage on January 03, 2012, 05:17:23 PM
I would like to know how you could make the character's attack power DOUBLE, in the event that all three of these are equipped, and if you take them off, your attack power goes back to normal.

Pretty much what moose said.

Store the hero's atk stat(it's in the list) to a variable so you can reset the value.
Create a variable for the new value.
Set the hero atk to the value of the new variable.
But only if all items are equipped.
If the "all items equipped" conditional branch is false - set the hero atk to the value of the first variable.
Title: Re: Linked items.. i think.
Post by: Yuffit on January 03, 2012, 09:41:53 PM
Yeah that seems to be working just right :D (too bad it only displays a maximum of 999 of any stat in the menu, even if you have it at extremely high values.)
Title: Re: Linked items.. i think.
Post by: Yuffit on January 03, 2012, 09:59:35 PM
Wait... scratch that. A few things are missing from the conditional branch menu and whatnot.
1. There doesnt seem to be a feature for like.. "[Var1] = [Var2]*2
2. There doesnt seem to be a conditional branch for a party member having desired stats, apart from HP and MP
But i do appreciate the helps. there probably is a way around it
Title: Re: Linked items.. i think.
Post by: Prpl_Mage on January 04, 2012, 05:29:22 PM
1. There doesnt seem to be a feature for like.. "[Var1] = [Var2]*2
Two ways of doing this.
A. You set a temp variable equal to var2 and then in another variable operation you take it times 2. Then set var1 = the temp var
B. You set var1 equal to var2, then in another var operation you take it times 2.

Quote
2. There doesnt seem to be a conditional branch for a party member having desired stats, apart from HP and MP

That's true, but you can set a variable equal to a stat and then check the value of said variable. It's basically the same thing.
aka. Var3 = Hero1 Attack and then you check the value of var3 instead of hero 1 attack
Title: Re: Linked items.. i think.
Post by: Yuffit on January 04, 2012, 09:11:44 PM
woah you guys are so smart :3 tyvm
Title: Re: Linked items.. i think.
Post by: Yuffit on January 04, 2012, 10:29:01 PM
Please dont kill me, but im stuck -_-
(http://i1196.photobucket.com/albums/aa404/Yuffit/Halp.png)
i really hate this scripting business
Title: Re: Linked items.. i think.
Post by: Yuffit on January 05, 2012, 03:04:43 AM
ALSO
i am trying to make this little script work out.. but he seems to only hit around 2500-4000 when in use..
(http://i1196.photobucket.com/albums/aa404/Yuffit/Thisisascreenshot.png)
is something missing?
(basically, its a cursed item, and once you put it on it turns your attack to 99999 permenantly pretty much.. but it doesnt seem to be having a 99999 attack effect :/)
Title: Re: Linked items.. i think.
Post by: A Forgotten Legend on January 05, 2012, 03:37:44 AM
Please dont kill me, but im stuck -_-
(http://i1196.photobucket.com/albums/aa404/Yuffit/Halp.png)
i really hate this scripting business

You're label isn't going anywhere.  You have Go to Label 1, but there isn't a label one to go to.

ALSO
i am trying to make this little script work out.. but he seems to only hit around 2500-4000 when in use..
(http://i1196.photobucket.com/albums/aa404/Yuffit/Thisisascreenshot.png)
is something missing?
(basically, its a cursed item, and once you put it on it turns your attack to 99999 permenantly pretty much.. but it doesnt seem to be having a 99999 attack effect :/)

You might want to check the weapon's attributes.  If the weapon isn't set at max, then maybe that could be causing the issue.


Also, make sure to use the edit button when making two posts in a row.  If you are bumping your own topic, then a nice little "Bump" at the beginning of your post works well.
Title: Re: Linked items.. i think.
Post by: Yuffit on January 05, 2012, 04:15:18 AM
Sowwi about the double posting.. i just randomly think of something then i end up posting it :/
And idk about the whole label thing i was just following moose's idea.
(i may remind everyone i am a verrrry amateur at using this XD
Here is the info on the Hellfist:
(http://i1196.photobucket.com/albums/aa404/Yuffit/ThisPicture.jpg)
I think it's safe to say weapons and common events is NOT my strongsuit.