[CSIDE] The ChoiceScript IDE (v1.3.3 Now Available — 05/09/2022)

Calling all Brave and Curious Souls!

Perhaps a little bit prematurely, as I’m not quite there yet. But I’d like to start collecting a list of volunteers for testing features in the upcoming v1.4 patch. The problem is that, at this rate, v1.4 will contain so many changes, that’ll it’ll be truly chaotic to test all at once (and very likely to fall over).

The plan then is to instead test it in the following stages:

Stage 1: Editor Port, Like for Like
Largely a feature-to-feature conversion (although the editor itself adds some enhancements). So besides an enhanced editor experience there will be little to no shiny new features/tabs/functions.
At this stage I’ll be primarily looking for:

  • Feedback on the ‘editing experience’
  • Identification of any bugs or features that missed the port
  • Feedback/suggestions on editor configuration options (defaults, customization etc.)
  • Necessary differences in hotkeys/shortcuts
  • Documentation discrepancies or shortcomings due to the above changes

Stage 2: Editor Port, Enhancements
Once it’s obvious that the editor port is relatively stable, and is considered an improvement, we’ll move on to enabling some extra layers of functionality atop it, including:

  • Advanced syntax validation
  • Ability to find/jump to variable definitions/references
  • Enhanced autosuggest (variable names, label names, scene names)
  • Overhaul of the Issues Tab in relation to the above

At this stage I’ll be looking for feedback on these enhancements’ usefulness/intrusiveness, reliability, and their breadth of configuration options (can you turn stuff off/tweak to the right level).

Stages 3+: Additional Features
Once we’re happy with the state of the editor port (and the enhancements it offers), I’ll move on to adding all the new features I’ve been working on outside of the new editor, including:

  • Project Wide Find and Replace
  • Custom Project Stylesheets
  • Breakpoints
  • Automated test enhancements
  • Docs overhaul (with a search bar)
  • etc.

This isn’t an exhaustive list, and of course, things may change or get the cut, but it should give you a rough idea. There’s no timeline on when each of these stages will arrive (as that’ll depend on feedback), but rest assured I’d like to start getting them into your hands ASAP.

Interested? Great, then please shoot me a PM, but before you do, please also consider that you…

  • Need to be active, and able to give detailed regular feedback (weekly is ideal, though more often is welcome!)
  • Must be willing to face bugs, quirks and other nasties in all their glory (i.e. don’t volunteer if you’re on a tight deadline with your latest release)
  • Have some prior experience with CSIDE (so you can draw comparisons/compare changes)
  • Should be willing to mess around a little more than you would with a regular CSIDE install: e.g. install/uninstall several times, or make minor modifications to computer settings to help troubleshoot etc.

Thank you!

CJW

14 Likes

Happy to help.

3 Likes

@rinzygreye
https://github.com/ChoicescriptIDE/main/issues/96 might help with this.

Although you probably don’t even need CSIDE/the console. Just create a new scene called “test” make sure it sets all your variables to appropriate values for chapter9, and then do *goto_scene chapter9.

3 Likes

I remember bookmarking this one:

3 Likes

Thank you

I started my project a couple months ago. A couple weeks ago, I discovered CSIDE. I’ve since imported my project and have been happily working on it… until today.

It’s worth noting that before CSIDE, I used double spaces as my indents.

I’ve started having these issues pop up about “illegal mixing of spaces and tabs” and “tabs and spaces appear on the same line”. It takes me about 5 minutes to fix this each time it pops up because it’s often incredibly annoying to figure out and fix the problem.

Today, I finally got fed up and used the “Convert all spaces to tabs” option. Seems like it would fix it, right? Wrong. Here’s a snippet of the original code (from the character setup section):

*choice
  #(Choose from traditionally female names.)
    [i]First Name:[/i]

    *choice
      #Amanda.
        *set first_name "Amanda"
        *goto last_name
      #Julia.
        *set first_name "Julia"
        *goto last_name
      #Sarah.
        *set first_name "Sarah"
        *goto last_name
      #Hope.
        *set first_name "Hope"
        *goto last_name
      #June.
        *set first_name "June"
        *goto last_name
      #Viola.
        *set first_name "Viola"
        *goto last_name
      #(Look at other names.)
        *goto name

Here’s the same part, post-conversion:

*choice
	#(Choose from traditionally female names.)
	[i]First Name:[/i]

	*choice
		#Amanda.
		*set first_name "Amanda"
		*goto last_name
		#Julia.
		*set first_name "Julia"
		*goto last_name
		#Sarah.
		*set first_name "Sarah"
		*goto last_name
		#Hope.
		*set first_name "Hope"
		*goto last_name
		#June.
		*set first_name "June"
		*goto last_name
		#Viola.
		*set first_name "Viola"
		*goto last_name
		#(Look at other names.)
		*goto name

I ended up going through and, by hand, forcing it to use smart indentation for every line, aka deleting the line break and all spaces/tabs before the line, then pressing return again. This took me about an hour just for startup.txt (I’ve started on my next scene just a little bit). Here’s what that part looked like after this:

*choice
    #(Choose from traditionally female names.)
        [i]First Name:[/i]
        
        *choice
            #Amanda.
                *set first_name "Amanda"
                *goto last_name
            #Julia.
                *set first_name "Julia"
                *goto last_name
            #Sarah.
                *set first_name "Sarah"
                *goto last_name
            #Hope.
                *set first_name "Hope"
                *goto last_name
            #June.
                *set first_name "June"
                *goto last_name
            #Viola.
                *set first_name "Viola"
                *goto last_name
            #(Look at other names.)
                *goto name

It looks totally fine, except… there are spaces and tabs on the same line. A lot of them. To emphasize: I did this using smart indentation. This is CSIDE, failing to convert correctly, and failing to intent correctly. I need help; I can’t keep having to fix these stupid issues every time they pop up. Any tips would help immensely. Thank you so much!

1 Like

If I understand the situation, you imported these files you are working on from another app?

Since this is the case (if I understand the situation) the only solution is to fix the alignment and indents by hand.

Once you do “fix” these issues and you use the same indentation consistently, there should be no more repeating errors.

The exception to this is copy-paste, which, if not done exactly correct will cause these types of errors almost every time you copy-paste.

4 Likes

@Pinmat135

This is the best advice you’ll get.


On a different note, I know that this is up to the individual, but, personally, I think tabs are better.

1 tab == 1 indentation level (always)

Spaces are a mixed bag of cats.

4 Likes

Hi @Pinmat135

Really appreciate you taking the to share this feedback, and I’m sorry CSIDE isn’t performing as expected.

In regards to the “Convert all” feature, yes, that looks like it’s bugged. I’m not hugely surprised, as it isn’t a widely used feature, but I’m sorry that it’s caused you some inconvenience. On the other hand, I imagine smart indent is working exactly as intended (this is on by default, and is used heavily by most CSIDE users). Smart indent does not ‘detect’ your indentation, it uses whatever you have configured in your settings panel. So if you were using double spaces, and you’ve got CSIDE set to tabs (and haven’t cleaned up the double spaces from before), you are indeed going to fall afoul of mixed indentation errors

The most important thing to do (before attempting to correct this) is make sure CSIDE is set to the indent unit (spaces or tabs) and indent size you want. Once that’s done, and you’ve got on top of the issues, things should be much better.

Incidentally, I’m currently running a test group for v1.4 of CSIDE, which should provide a much better experience in this area. Watch this space.

2 Likes

How do you change the indent unit? (nevermind, just figured this one out)

I ended up (mostly) manually copying over my project into a new file where I used tabs as the indents, and now it works fine. It didn’t take as long as you’d think, only probably about 3 hours total, considering how long my files are. We’ll see if I end up with more issues.

In other news… after realizing how to change the indent unit, and changing it to tabs, I realized that it was just using 4 spaces. Now it actually uses tabs, so I converted all, and it worked. Did that for all three files (choicescript_stats, startup, and chapter1). But when I run the game and click on Show Stats, it just freezes the game part… (The app works just fine, but I can’t interact with the “website” in the game window.) No errors, just frozen.

Have you got an infinite loop in your game code?
Whilst we’re at it, could you tell me which version you’re using? Windows? Mac? Web?

Mac, and what do you mean by infinite loop?

I’ve added nothing on since copying it over (aside from one *label line, a line of text outside any loops or control flow commands, and a *page_break), and the stats screen worked fine the last time I tested the old project.

Mind PMing me a zip of your game? Or posting the code here? Difficult to diagnose without being able to reproduce.

I think I’m doing something wrong. How do I allow for players to input the name for a MC and then have it show up later in game? As in conversations and stuff

2 Likes

In your startup, have:

*create name ""
*set name ""

When you want them to input the name:

*input_text name
Your name: ${name}

Then when you want it to show up:

"Hello ${name}."
1 Like

Ahhh okay. Thanks mate lol

You don’t need

*set name ""

in your startup, just the *create

2 Likes

I’m getting the error Non-Existent variable “name”

I wrote What’s your name
Set name “”
Input_text name

Edit: I discovered the error. I had to use create for some reason and all of my Creates have to be before the choices

You need to have

*create name ""

in your startup file, and

What is your name?
*input_text name

in your game text. The * is important, and all variables must be created in startup.
You don’t need to use *set name, it’s not actually doing anything in your example.

Also, I generally suggest not having your actual game text in the startup file, to avoid confusion.

1 Like