Hey guys, name is Damon, but you can just call me J3loodT4lon (bloodtalon), Blood, or J3 (this is the most common lol) I also accept “Our Lord and Savior”, “Your Majesty”, and “Brotato”.
I started playing with the ChoiseScript a couple days ago with the desire of creating a game (duh!). The title (displayed above) is The Hero of Eastcliff and will be about an individual (the player) thrust into a quest to save the Realm. I wont go into too many details, but here are a few things to expect:
Classes: Warrior, Paladin, Ranger, Rogue, Mage.
Ability stats, like those from D&D/Pathfinder.
Mana/Rage system (Rage for Warrior, Mana for everyone else)
Magic weapons and armor.
I have worked out most of the character creation steps, though there are a few things that are providing me some difficulties:
When allocating the players skills, you can choose to allocate them based upon the standard for your class, or do it yourself. The trouble I am having is getting the choices to listen to my *disable_reuse.
I am trying to set up a choice in the equipment setup process that the player cannot choose unless they are a Ranger or a Rogue. I understand how the ‘reuse’ codes work, but I want it to be disabled unless the player meets one of the two requirements and I am unsure how to do this. EDIT: I fixed the problem and it is no longer an issue. My thanks to those that helped.
If anyone can help me out with some pointers or something that would be great. Right now I’m just pushing through it and getting the rest coded, and plan on tinkering with it when I need to.
Just going by this information it could be a number of things, but I guess the most likely one is that you jump from one .txt file to the other somewhere in the process. ChoiceScript only remembers *disable_reuse and *hide_reuse as long as you remain in the same .txt file. As soon as you go to a different one it forgets them.
Could you post the relevant bit of code? It’d make it easier to track down the problem than by just taking wild guesses. (in case you didn’t know yet, you can make code show up properly by selecting it and pressing the </> button)
Ehm, this bit of code doesn’t use the *disable_reuse command anywhere? Not that it matters much, since it probably wouldn’t do what you wanted it to do. I assume that the variable weap_value is the thing that tells you what weapons you have?
ROFL OMFG
I feel stupid now… I was working on the other one when you posted that, so that’s why I posted the wrong code xD
But yeah, the one I posted is where I am trying to disable/hide an option if the player doesn’t meet the class requirements. The weap_value correlates with the damage the weapon does, that way I can easily increase or decrease the players total damage when changing weapons without having to effect their base damage.
Don’t ask why I named it weap_value instead of dmg_value… I have no idea xD
This is the code I am using with the *disable_reuse. I originally had the last line in each section as *else instead of *elseif, but when I tested it I encountered and error. Then when I changed it, the *disable_reuse code stopped working.
I don’t thing *disable_reuse can be used in such a way. I’m quite certain I’ve never seen it used in this way, at least. For as far as I’m aware it can only be used to disable single options in choices if you encounter the same *choice command again. Basically, like this:
You can make all options non-reusable, by adding *hide_reuse or *disable_reuse to the top of your ChoiceScript file. Then you can use the *allow_reuse command to allow certain options to be reused.
Well the Advanced guide shows that it should, and it worked perfectly until I got to the last option where it gave me an error for using *else. So I switched it to *elseif and now it just doesn’t work.
And it does. Never noticed that one before. That could be useful from time to time…
Anyway, I don’t really use *elseif, so I’m not sure about it, but you could try to make it all *if aside from the last one. If you make that *else it should catch everything that somehow isn’t caught by the functions before it. Not sure if it’ll help, but it might be worth a shot.
Edit:
And besides, it looks like the code as it is throws you into an endless loop with limited options, which might also be the thing that causes it to act up.
In this situation that might (ironically enough) actually be the thing that prevents it from working. Try adding an option that allows you to go out of the loop and see what the code does after you’ve done that.
Yeah I was just thinking that. I’ll have to play with it later since I have to work in 20 minutes.
But before I go, let me toss you children a teaser of my totally generic and unexciting stat chart!
EDIT: LOLOL Okay I feel even dumber now xD
You were right. The fact that I haden’t set up an ‘exit route’ from the loop is what caused the error. Thanks again for the help @Cecilia_Rosewood