WatchNon-threaded

Forums » Advanced Editor Forum » Read Thread

Talk about it. Ask for help on it. Compliment it.

Specific effect of being retarded

5 months ago
Hi lovely people,

I am hoping what I am about to ask can be done however I am stuck but still wonder if it is possible.

Can you make an item in your inventory add a value to a variable until the item is dropped?

(maybe if I explain a bit better it may help.. so I am trying to add a weapon into the game which gets picked up and added into my inventory because I understand that it cant be added to an equipment page so it will need to stay in my inventory. This weapon will add 2 attack points to me characters attack and I have created a variable already, the attack is used to be made to have a higher chance of hit rate so later in the game a better weapon will be found with a better attack point rate. so the weaker weapon will be dropped and I would like the points that are added to the variable dropped off and the new weapon points to add to the variable instead).

I hope this made sense

Specific effect of a variable

5 months ago
I might have just answered my own question but I guess I could have the new weapon subtract the variable points of the old weapon and add the points of the new one.

Would I be right?

Specific effect of a variable

5 months ago

Yeah, sure, but items don't have passive effects if you don't create them.

Another option is just increase %ATTACK by 2 on the page you get the first sword, then increase it again by whatever the difference is when you get the improved one (so if the second sword is 4, increase it by another 2). This stops your code being reliant on items, and so it is easier to do.

If you have some puzzle where they need to drop the sword early, then I think you could use a global script.

Global scripts can be ran before every page/link (or was it on every page/link?), so you can check the state of items and modify variables based on that. I'm a little iffy on the timing for this stuff, so beware undesired defects!



Here is an article on items: https://chooseyourstory.com/help/articles/article.aspx?ArticleId=66

Of note is:
'The $ITEMSTATE variable can only be set to 0 or 1.
- 0 means that the item is not in your inventory.
- 1 means that the item is in your inventory.'

There are more articles under the Help & Info section.



Anyway, what I'd do is:

GLOBAL SCRIPT:
IF %FOUNDSWORD = 1 THEN IF $ITEMSTATE1 = 1 THEN %ATTACK := %ATTACK + 2
IF $ITEMSTATE1 = 1 THEN %FOUNDSWORD := 2

%FOUNDSWORD starts as 1, so when you find the ITEM with id 1 AND have it in inventory it's state ($ITEMSTATE1) will be 1. This means I modify the attack based on the sword.

The second line also changes %FOUNDSWORD to 2, so that I don't keep increasing attack every page (and this is also done if the item state is 1).

GLOBAL SCRIPT
IF %FOUNDSWORD = 2 THEN IF $ITEMSTATE1 = 0 THEN %ATTACK := %ATTACK - 2

Here IF you have found the sword already, and the sword is NOT in your inventory (the $ITEMSTATE1 = 0), then the attack needs to be reduced. If there is a way to get this sword again, you might want to reset the %FOUNDSWORD variable (so that attack can be increased again).


The issue with this system is that you'd need a extra variable for each sword, which could get annoying.

I'd just create these variables in scripts so their names can be longer than 10 letters (or so I hear), and have them be %FOUNDSWORD1 %FOUNDSWORD2 etc. This is kinda a bad implementation, but assuming it doesn't somehow cause lag, I wouldn't care.

The above seems to work for me, but I will note the timing for creating the variable in a script and having that noticed by global scripts is iffy, so I don't suggest having %FOUNDSWORD = 0 for the check (which is why I have it as %FOUNDSWORD = 1, since it stops my implementation from counting the attack boost twice).



ANYHOW, others might have a better way. I haven't really messed around with items much, so hopefully this gives you some ideas.



P.S. I don't recommend making an RPG, they tend to suck since just clicking a button to whittle down HP can be boring, but if you're determined, I won't stop you (as good storygame RPGs can exist, but it does seem to be a lot of work). This isn't what this thread is about tho, so I'll leave it at that. Good luck!

Specific effect of a variable

5 months ago
Hi Zake,

Thanks for that detailed explaination when I understand scripting more I think that is going to help me alot lol.

I think for the time being I will go with your first bit of advice and then look into scripting more but it does seem that would be the way to go really.

I don't suppose you know how to add pictures into the story do you? not as in pictures related to items, I mean like to show what the enemy might look like when you bump into it etc.

Specific effect of a variable

5 months ago

Specific effect of a variable

5 months ago
I have uploaded images to my account I just don't know how to put them into the page on the story unless its an item picture

Specific effect of a variable

5 months ago
If you are planning a system where the attack ALWAYS gets better, it might be simpler to let the player think it's the weapon, but the mechanics behind the scenes have nothing to do with it.

For example, you could have a global variable, BONUS. On the page where they find weapon 1, set it to 1. On the page where they find the next weapon, set it to 2, and so on. That would be the simplest way. If you wanted to get fancier, you could even run a script on drop of a weapon to reduce the bonus, but that could get complex with more than one weapon.

Good luck!

Specific effect of a variable

5 months ago
Hi Ogre,

Thank you for that information, it seems there are a few ways to do it, and some suggestions not to do it at all however, I am still learning alot of about what can and cant be done so playing around with all options is helping me.

Specific effect of a variable

5 months ago
I'm glad you got over your Tourette's and seem better at using sentences now, good luck with the rest.

Specific effect of a variable

5 months ago
im sorry?

Specific effect of a variable

5 months ago
....it's incredible to me how often we give a ban evader a free pass, only for them to look everyone right in the eye and say that we're stupid.

Specific effect of a variable

5 months ago
I am confused, am I missing something?

Specific effect of a variable

5 months ago
'Thanks' or literally nothing would've been much, MUCH better responses, playing dumb to annoy people because you think they're also dumb, around here is pretty much just taking off your belt and looking around to see if any of the ceiling fans will support your weight.

Specific effect of a variable

5 months ago
Better responces to what?

Specific effect of a variable

5 months ago
Sure, okay.

Specific effect of a variable

5 months ago
why did you ban me?? for what reason??

Specific effect of a variable

5 months ago
Just a note to Zake and Ogre, End banned this guy after it was reported to us he was plagiarizing another user.







Even though the victim in this case was an alt spamming hyperaggressive retard, and the stolen material was low quality trash that would be unlikely to pass minimum standards, this is still a writing site and we have a zero tolerance policy on this sort of thing.

I'm very sorry to have to inform you guys that that once again, trying to help a newbie turned out to be a mistake.

Specific effect of a variable

5 months ago
how was it a mistake? what material was stolen??

you dont explain anything??

Specific effect of a variable

5 months ago
You insisted for several posts that you weren't ban evading, and so that means if you're not that Cray guy that was spamming alts, you're copying his stories. I'm not sure how much more this can possibly be spelled out for you, you seem pretty incapable of reading and comprehending words. Do you think you can get your mom to read them out loud to you? Is it possible that will help?

Specific effect of a variable

5 months ago
"I'm very sorry to have to inform you guys that that once again, trying to help a newbie turned out to be a mistake."

We'll probably never learn, but thanks for pointing it out

Specific effect of a variable

5 months ago

For context, this is the private message I've been trying to send RPGStar.  I'm only posting it on a public forum so they can read it despite being banned.  Otherwise, you don't need to pay any attention to this post.

Here's a copy-paste of the message:

 

If you're not Craynsford, ignore this message, and sorry for wasting your time.  

If you are, I recommend just dropping the subject of the bans.  I don't know if you ever received my response to your message last week, as I sent it after the Craynsford account was banned, but here it is copy-pasted:

 

"I see you were banned shortly after posting this, so I'm not sure whether or not you will receive this message.  But I'll try and explain what's going on.

1) The culture of this site's forum is very different than most other places on the internet.  People have no problem being rude and insulting to each other, and you need to have very thick skin about your questions and creative works when posting on the forum; that's just how things are done here.  It's not meant in a personal way, it's just the culture of this site.  However, as someone who is new to the site, I can see where this would be very confusing for you, especially given how many other internet forums have strict rules about politeness.

2) I'm a little confused by your thread later on where you said your account was a joke and were rude to mizal, as you seemed in earnest earlier about wanting to learn how to code.  However, since you've been banned, I probably will never learn what was going on."

 

A couple points:

 

1) Admins can tell when the same person makes multiple accounts with the same computer, which is how mizal knew you were the same person.  This kind of behavior is usually highly frowned on on this site, but is sometimes allowed.

2) You can't report these people, because nothing anybody is doing is against site rules.  Many other internet sites have rules against this kind of behavior, but this one doesn't.  There's nothing wrong with that, it's just a different website culture than you're probably used to.

3) You're almost certainly going to get banned again.  I recommend coming back and making an alt account in a couple weeks after all this has died down.  The admins will know it's you, but will probably give you a second chance.  In the meantime, spend some time reading through the forums to get a good feel for what is considered acceptable behavior on this site.

 

Anyways, that's all I can think of for now.  I'm rushing to send this before you get banned, so there may be typos.

Specific effect of a variable

5 months ago
Admins can tell when the same person makes multiple accounts with the same computer, which is how mizal knew you were the same person.


Non admins were aware of it too. It was obvious enough for various reasons that did not require an IP. So it was doubly baffling he went this route when it appeared he wasn't even trying to hide, I acknowledged it and let him know it was fine to keep the account anyway.

Or at least it would've been if this kind of non comprehending retard behavior wasn't so frequent. Only really going into it now because these advanced editor threads will probably survive and maybe, just maybe someone will learn from them: if not for playing dumb and the subsequent alt and thread spamming meltdown (his second in a week) this thread would've been a great example of how to easily come back from a ban. But by now everyone is pretty sick of his repeated outbursts and complete lack of restraint, so he might have entered ban on sight status, I guess we'll see how long that lasts.

Otherwise, just another day in the office: