[RMXP] Addictions (solved)

Started by Jakal, August 29, 2011, 04:13:03 pm

Previous topic - Next topic

Jakal

August 29, 2011, 04:13:03 pm Last Edit: September 06, 2011, 07:34:23 pm by Jakal
How could I make an addiction script? Like, if you drink too much you become addicted. Or if you smoke a cigarette. Etc.

EDIT: Or could someone make one for me?

Ryex

you could actually make this fairly easily with common events. It all depends on what kind of an effect you want an adiction to have on the game play. What would happen if the player became addicted?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Jakal

Well, I'm kind of thinking Fallout. You know how you could be addicted in that game and your stats would slowly decrease and eventually, you would lose health, and die? That's kind of what I want to do.

G_G


Jakal


Ryex

August 29, 2011, 07:46:54 pm #5 Last Edit: August 29, 2011, 07:49:11 pm by Ryex
use a parallel process event that checks a variable. if the value of the variable is high enough for the character to be addicted add some sort of status effect to do what you want it to do. and if the variable drop below the threshold remove the effect.

then make another common event that isn't parallel process and have the item that caused the addiction call the event. have the even increase the variable that the parallel process event is checking. each time the item is used the event will be run and add the the variable which will represent the number of uses of that item.

you can even make it more complicated and have the parallel process event reduce the variable after a certain amount of time has passed if the character isn't already addicted so that if you string out the uses of the item you won't get addicted.

you could add a second variable that increases over time when the player is addicted and the higher the value the greater the effects of withdrawal. usage of the item while addicted would decrease the withdrawal variable.

removal of the addiction is as simple as creating an item with a connected common event or another situation like a doctor event that reduces the usage variable provided you've set up the parallel process event to remove the addiction when the usage variable drops below the addiction threshold like I said earlier.

you can also set it up so that the addiction wears off if the withdrawal variable gets too high if you want.


This is just a general overview of the principles behind creating the event system. it's fairly easy but if you need help on specific parts ask and we'll help. most of use really don't have the time to make it for you. so expect to do most of the work yourself.


also If i don't get leveled up for providing such a good process description for you I'll be very disappointed, you won;t like me when I'm disappointed :V:

I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Jakal

August 29, 2011, 09:28:05 pm #6 Last Edit: August 29, 2011, 10:32:22 pm by Jakal
I set everything up. But, the item that should be removing it isn't doing its job. Any suggestions?

EDIT1: Actually, nevermind. I just made a doctor who does everything the common event would have done and initially eliminated the common event.

EDIT2: Now, this might sound noobish, but I only want the doctor to do what you want if you have the money for it.

ForeverZer0

Make a conditional branch if party has so much gold, go ahead with it, then remove gold.  If not, the doctor tells them something like, "Sorry, you don't seem to have enough money", or some other similar RPG cliché.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Ryex

*notices that he hasn't been leveled up*
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Ryex

that's exactly what I told him to do.

also I'm moving this to event systems seeing as you no longer seem to want a script.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Jakal

I'm kind of new to this site Ryex. Are you telling me to level you up? How?

Ryex

August 30, 2011, 03:49:53 pm #11 Last Edit: August 30, 2011, 04:46:51 pm by Ryex
Quote from: JanraeMendoza on August 30, 2011, 03:31:07 pm
which reminds me of something, uhm this might not be the right post for this one but, may i ask if Silent Hill 1 "like" or a simple shooting like the SH have possible in RMXP? I tried experimenting that on XAS 3.9 but...sad to say this (all XAS games i've started so far) are for old ages. lol. just asking if Blizz-ABS supports this and or sprites providing a simple shoot the zombies up game?


go make a new new topic for this question

Quote from: Jakal on August 30, 2011, 03:38:51 pm
I'm kind of new to this site Ryex. Are you telling me to level you up? How?


well I'm being sarcastic, you should only level people up if you think they deserve it not because they tell you too. as for how, under their avatar on the left it shows their level, if you have 10 posts you can level them up or down with the level++ and level-- links

Quote from: JanraeMendoza on August 30, 2011, 03:44:49 pm
uh, so to answer in a shortcut manner (for Ryex-sama [japanese term for Sir/Ma'am Ryex =)] ), make an event, conditional branch, make any variable and name it Addiction. Set it to any constant you want. Uh...its a simple logical math actually:

Let: 150 constant value = Addiction State
Set: Addiction = any constant you desire. for example your character drinks wine / beer, make a common event for it that would ADD Variable Addiction to any constant you desire again, (e.g. 50).

Make an event that IF: Variable Addiction > = 150: your character goes addicted. Make some spice.


yep you got the idea right, that's what I was telling him to do, and from the sound of his responses he already has.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Ryex

that demo is entirely unnecessary, he had already succeeded in making the system before you even posted in this topic...
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

*levels Ryex up for being so supportive and helpful* Good mod. Have a cookie. *stops spamming and leaves topic*
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Jakal

*finally levels Ryex* there ya go.

MindOnFire

Oh, hell yes. I was wanting to employ a concept like the addictions in Fallout 3 into the game I'm working on now. It's okay for me to use this concept, right? And that demo will probably go to use because I seem to suck at following directions. :^_^':
Then.
Now.
Forever.