Jump to content
timmiej93

What's the fastest way to test your script changes?

Recommended Posts

Thank god, this takes forever :P.

Especially frustrating for 1 simple syntax error

 

If it's an error that gets thrown when the script is run, you'll have to load the game. If it's thrown when the game loads, you can just remove all other script files but that one and load the editor. I take any unneeded script files out when I'm dealing with the editor.

Link to comment
Share on other sites

Errors typically get thrown when they are called, with the exception of syntax errors. When you load the mod, I believe the game compiles your scripts. During the compilation it will catch syntax errors. Errors in scope or other semantic errors are usually caught at run-time (during gameplay when the command is called)

 

Scripting is the single most frustrating part of modding. I find that about 80% of my time scripting is waiting for things to load. Stupid error? Forget a ';'? Got to load the whole thing over again. How did those Manhattan mod guys do it? Takes me like 3-4 minutes to load their mod with an SSD. I'd have shot myself somewhere around the 4th or 5th error.

Link to comment
Share on other sites

Errors typically get thrown when they are called, with the exception of syntax errors. When you load the mod, I believe the game compiles your scripts. During the compilation it will catch syntax errors. Errors in scope or other semantic errors are usually caught at run-time (during gameplay when the command is called)

 

Scripting is the single most frustrating part of modding. I find that about 80% of my time scripting is waiting for things to load. Stupid error? Forget a ';'? Got to load the whole thing over again. How did those Manhattan mod guys do it? Takes me like 3-4 minutes to load their mod with an SSD. I'd have shot myself somewhere around the 4th or 5th error.

Maybe that's why it takes so long for mods to get released. Because it takes so much time to fix a script error.

Link to comment
Share on other sites

...and of the remaining 20%, 5% code writing, and 15% crying because my logic is correct but its not working as planned.

 

Welcome to EM4.

 

 

 

Loading can be reduced using test mods. Imo scripting is more like:

- 10% actual scripting

- 5% checking script before testing

- 15% waiting

- 5% actual testing

- 30% fixing

- so that leaves 35% for frustrations right? X3

Link to comment
Share on other sites

What we do to test a specific script is to make a new mod including only what is required for testing said script, make a mission which basically just loads that stuff in the start-up and try the script operations in that.  Shortens load time dramatically and prevents anything else from interfering.  You don't need a real freeplay map or a ton of police crap if you're just testing a fire engine's script.

Link to comment
Share on other sites

With the experience of my EM4 modding, and my friends foray into coding, I'd say "Welcome to programming in general".

 

I've never made scripts for other programs so I cannot relate. :(

 

 

What we do to test a specific script is to make a new mod including only what is required for testing said script, make a mission which basically just loads that stuff in the start-up and try the script operations in that.  Shortens load time dramatically and prevents anything else from interfering.  You don't need a real freeplay map or a ton of police crap if you're just testing a fire engine's script.

 

Thats what I did for the limited water scripts and the tower ladder scripts for example. Saves A LOT of time indeed.

Link to comment
Share on other sites

With the experience of my EM4 modding, and my friends foray into coding, I'd say "Welcome to programming in general".

True. Programming in general typically has you using a compiler that checks for mistakes in syntax. If the mistakes are considered logical (meaning the program runs but does not do what you want it to), then it is up to you too find the error via the use of a debugger or by eye.

EM4's problem is that there is no way to check if the script that one has created is correct. You would need to go ingame and wait a minute or more depending on filesize. MikeyPI's idea is correct and it is one that I personally use just because it is so much faster than waiting 10 minutes to load a mod.

Hopefully EM5 either rectifies this by having a built in script tester, or by removing load times all together.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...