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?
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?
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.
Again, easily evented.
How?
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 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.
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é.
*notices that he hasn't been leveled up*
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'm kind of new to this site Ryex. Are you telling me to level you up? How?
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.
that demo is entirely unnecessary, he had already succeeded in making the system before you even posted in this topic...
*levels Ryex up for being so supportive and helpful* Good mod. Have a cookie. *stops spamming and leaves topic*
*finally levels Ryex* there ya go.
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. :^_^':