B Tutorial Module System Fast script test

Currently viewing this thread:

Cjkjvfnby

Regular
Best answers
0
May be it will be useful for new members:

Fast way to test changes in script:

Prerquarements:

Run game in debug mode.
Switch for window (Alt+Enter)

Update module scripts with:
Code:
if __name__ == '__main__':
  print "Start"
  import process_scripts
  print "Finished"
Testting:

Change module scripts (for example add display_message to entering location.)
run module_scripts.py in python (F5 for IDLE, ctrl+B in Sublime Text 2) Only scripts file will be builded.
In window click  View (alt +v) - Restore Module Data (scripts will be reloaded) Message "Module data reloaded shown"

And trigger you script via game. (Enter location.)
 

SonKidd

Knight
Best answers
0
I don't really understand this... Could somebody elaborate it a bit to me?

What's Alt+Enter and is this so that you don't need to build all module files but only module_scripts?
 

Caba`drin

Count
M&BWBWF&SNWVC
Best answers
0
SonKidd said:
What's Alt+Enter
Forces Windowed mode while in full screen (or vice versa). Windowed mode is now needed to access "Restore module data" as CTRL-M has been disabled.

SonKidd said:
and is this so that you don't need to build all module files but only module_scripts?
Yes.