Difference between revisions of "Basic code scripting"

From XStoryPlayer Wiki
Jump to: navigation, search
Line 18: Line 18:
 
* /gamestate : Global gamestate
 
* /gamestate : Global gamestate
 
* /settings : Settings for custom fastsex menu
 
* /settings : Settings for custom fastsex menu
 +
 +
 +
For now we like to play around with some settings/code that are easy to do and have quick visual effect.
 +
 +
We assume you are in the ./pack/pack_dungeon/init/stories/dungeon directory
 +
 +
 +
===Changing scene color===
 +
 +
Open the /scenes/dungeon1.dat file. It contains the settings for the dungeon scene.
 +
 +
Change the light object to:
 +
 +
<syntaxhighlight lang="cpp">
 +
light_objecti:LIGHT LIGHT1
 +
{
 +
  group = 0;
 +
 
 +
  ambient = (0.75,0.75,0.75,0);
 +
}
 +
</syntaxhighlight>

Revision as of 13:30, 5 January 2015


All the scripts for the dungeon pack directory can be found in the ./pack/pack_dungeon/init directory.

It contains two sub-directories:

  • /std : These files are the same for all stories (like .dll files in windows)
  • /stories : These files are story specific.


The /stories/dungeon directory contains the following sub-directories:

  • /scenes : Scene settings
  • /chars : Character code
  • /mains : Main player code
  • /objects : Object settings
  • /lib : Defines used in story
  • /gamestate : Global gamestate
  • /settings : Settings for custom fastsex menu


For now we like to play around with some settings/code that are easy to do and have quick visual effect.

We assume you are in the ./pack/pack_dungeon/init/stories/dungeon directory


Changing scene color

Open the /scenes/dungeon1.dat file. It contains the settings for the dungeon scene.

Change the light object to:

light_objecti:LIGHT LIGHT1
{
  group = 0;
 
  ambient = (0.75,0.75,0.75,0);
}