The Hero of Eastcliff


#1

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.

I will be updating this as my progress continues.


More transgender options in the cog/hosted games?
CSIDE Pre-Release Livestream (Released 15/06/2017)
#2

I’m not sure about the problem with disable reuse, but for the ranger/rogue, you might be looking for a boolean if variable.


#3

Tying it now. Thanks for the link. Will update this if I have further issues.


#4

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.


#5

So far the only time I have used *disable_reuse is on the .txt file it isn’t working on.


#6

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)


#7

This is the coding for the choices.


#8

And this is what I want to insert. Not sure how to get it to work the way I need it to.


#9

Hmm…
I wonder if I should be using this one instead?

*choice

*if not (var)

#This option to be displayed

  *goto next

#10

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?


#11

That should work if you implement it properly.


#12

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


#13
*disable_reuse
*label start
Don't like the idea of playing one of the standard class setups? Well okey-doke then. Go ahead and spend your points the way you want them. Just make sure to let me know when you are done!
*choice
  #Strength
    *set stat_play 1
    *goto stats
  #Dexterity
    *set stat_play 2
    *goto stats
  #Constitution
    *set stat_play 3
    *goto stats
  #Intelligence
    *set stat_play 4
    *goto stats
  #Wisdom
    *set stat_play 5
    *goto stats
  #Charisma
    *set stat_play 6
    *goto stats

*label stats
*choice
  #8
    *if stat_play = 1
      *set strength 8
      *goto start
    *elseif stat_play = 2
      *set dexterity 8
      *goto start
    *elseif stat_play = 3
      *set constitution 8
      *goto start
    *elseif stat_play = 4
      *set intelligence 8
      *goto start
    *elseif stat_play = 5
      *set wisdom 8
      *goto start
    *elseif stat_play = 6
      *set charisma 8
      *goto start
  #10
    *if stat_play = 1
      *set strength 10
      *goto start
    *elseif stat_play = 2
      *set dexterity 10
      *goto start
    *elseif stat_play = 3
      *set constitution 10
      *goto start
    *elseif stat_play = 4
      *set intelligence 10
      *goto start
    *elseif stat_play = 5
      *set wisdom 10
    *elseif stat_play = 6
      *set charisma 10
      *goto start
  #12
    *if stat_play = 1
      *set strength 12
      *goto start
    *elseif stat_play = 2
      *set dexterity 12
      *goto start
    *elseif stat_play = 3
      *set constitution 12
      *goto start
    *elseif stat_play = 4
      *set intelligence 12
      *goto start
    *elseif stat_play = 5
      *set wisdom 12
      *goto start
    *elseif stat_play = 6
      *set charisma 12
      *goto start
  #14
    *if stat_play = 1
      *set strength 14
      *goto start
    *elseif stat_play = 2
      *set dexterity 14
      *goto start
    *elseif stat_play = 3
      *set constitution 14
      *goto start
    *elseif stat_play = 4
      *set intelligence 14
      *goto start
    *elseif stat_play = 5
      *set wisdom 14
      *goto start
    *elseif stat_play = 6
      *set charisma 14
      *goto start
  #16
    *if stat_play = 1
      *set strength 16
      *goto start
    *elseif stat_play = 2
      *set dexterity 16
      *goto start
    *elseif stat_play = 3
      *set constitution 16
      *goto start
    *elseif stat_play = 4
      *set intelligence 16
      *goto start
    *elseif stat_play = 5
      *set wisdom 16
      *goto start
    *elseif stat_play = 6
      *set charisma 16
      *goto start
  #18
    *if stat_play = 1
      *set strength 18
      *goto start
    *elseif stat_play = 2
      *set dexterity 18
      *goto start
    *elseif stat_play = 3
      *set constitution 18
      *goto start
    *elseif stat_play = 4
      *set intelligence 18
      *goto start
    *elseif stat_play = 5
      *set wisdom 18
      *goto start
    *elseif stat_play = 6
      *set charisma 18
      *goto start

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.


#14

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:

*choice
  *disable_reuse #Strength
    *set stat_play 1
    *goto stats

etc.


#15

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.


#16

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.


#17

For now, yes. I wanted to make sure the system worked first before doing anything else, like I have with everything else I have coded so far.


#18

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.


#19

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


#20

Now I feel slightly offended, kind sir (or madam or… whatever not gender specific alternative there might be)

(nah, just kidding :stuck_out_tongue_winking_eye: Good luck trying to get that to work the way you want it to :+1: )