vinfamy / LifePlay

Free, Open-Source and Moddable Lifesim RPG (Link NSFW). I had to change my dev PC and couldn't set up Git correctly on the new PC so the full source code for the game will be available here: https://mega.nz/folder/1XYSXbRb#nFHZ1wdwTbL6rS1oUdMe0g
https://mega.nz/folder/1XYSXbRb#nFHZ1wdwTbL6rS1oUdMe0g
GNU Affero General Public License v3.0
71 stars 36 forks source link

Script-Engine: Choice broken if empty line is missing #183

Closed NickNo-dev closed 3 years ago

NickNo-dev commented 3 years ago

Following code will result in the choice being displayed and, after selecting something the script will just display another choice with the last item in a loop.

Only "Emergency" can get you out of that loop.

SceneStart() 0::"YES" 1::"NO" If 0 "YES" Else "NO" EndIf SceneEnd()

A current work around is adding an empty line after the last item of the choice. LP 3.17.

Rizean commented 3 years ago

It's a know issue per: docs/modding/LEAVE_EMPTY_LINE_AFTER_SCENE_OPTIONS.txt

NickNo-dev commented 3 years ago

Yeah I know. But it always takes me hours to find the problem if I happen to omit that damn empty line accidentally. I do not remember this every time.

Rizean commented 3 years ago

I'm just getting started with LifePlay. I'm in the process of setting up a build system for scripts and will be doing some sort of error checking on the scripts. Think checking for tabs vs spaces, missing line breaks, and copying the files from where you are editing them and into where every you have LifePlay installed. Another item I'm going to look at is generating script files. Think along the lines of Random($chanceOfEventA, $chanceOfEventB) where this would generate a stat that would let a player control the base chance of some event occurring.

You've done a nice job on the mod manager, thank you! If you have any thoughts or suggestions on what'd you like to see in a script builder/verifier let me know. I'm not a c++/unreal dev so don't expect a whole lot in that area. I'm really hopping to get unreal.js as a scripting option at some point and have taken an initial look myself at the blueprints, but as I said never used unreal before so the blueprint system is a bit confusing for a more traditional programmer.

Rizean commented 3 years ago

@NickNo-dev if you have any suggestions on https://github.com/vinfamy/LifePlay/issues/184 would be very grateful!

vinfamy commented 3 years ago

It's just a quirk of the parser. I tried to make that empty line unnecessary but couldn't. It's become a second nature for me now to include that line