Iāve not used it myself but from the advanced ChoiceScript page, thereās this:
Characters: You can extract the characters (letters/numerals) out of a variable, like this:
*temp word "xyzzy"
*temp first_letter word#1
*temp second_letter word#2
The first letter of the word "${word}" is ${first_letter} and the second letter of the word is ${second_letter}.
Thatās the base Iām working off. I vividly remember someone once posting a template for checking the last few letters of an input, but I cannot locate that again ;_;
The above would yield the last 3 characters of the string. Note that I subtracted 2 instead of 3, because the starting and ending points are inclusive.
Major thanks <3. Though I am not certain how applicable it is in my case as itās not just one suffix but several at once spread over several categories. The categories would be a simple if/elseif/else, but the different suffixes i think would be a problem like this?
Iād think you just need to run the subroutine for every suffix you want to check? Unless you mean there would be multiple suffixes in the same word in which case, yeah, it might need some tinkering.
I played around with the example code, and while that works great (major kudos again <3) , I am not too certain if it is applicable to my game in the end. Because thereās a total of 26 suffixes, spread over five possibilities, and I am not trusting myself with that much alteration to the code (as of now)
They can? Nothing would be stopping them from it?
The suffixes are just a suggestion and the check would be for flavortext.
What made you think Iād be restricting the name input (aside from npc names)?
Probably because of the string manipulation code. Suggesting lore-compatible names is great. I love it when games do that. I guess I just didnāt really understand why you would need to code that, instead of hard-coding your example names. Something about your example went over my head, I suppose.