Graphics 2.5D Reference
Model
Functions relating to models. A model is a .tscn scene, which may come with an AnimationPlayer node.
Model functions affect the whole graphics side, so even sprites are affected here.
Functions
ModelCreate | [1, 2] | [Init, Action, Manual, Subentity] | Intermediate |
---|
Creates a model for the current entity. An AnimationPlayer may be set to enable Anim functions.
- Arg 1: Model path
- Arg 2: (Optional) Animation player path
|
ModelScale | [1] | [Init, Action, Manual, Subentity] | Intermediate |
---|
Changes the model's scale uniformly.
- Arg 1: The scale in permil.
|
ModelRotation | [1] | [Init, Action, Manual, Subentity] | Intermediate |
---|
Changes the model's rotation on the Z axis.
- Arg 1: The rotation in tenth of degrees.
|
ModelMove | [1, 2] | [Init, Action, Manual, Subentity] | Advanced |
---|
Moves the model depending on facing. You'll want to activate the ModelLockRelativePosition flag.
- Arg 1: Horizontal Move
- Arg 2: (Optional) Vertical Move
|
ModelMoveAbsolute | [1, 2] | [Init, Action, Manual, Subentity] | Advanced |
---|
Moves the model independant of facing. You'll want to activate the ModelLockRelativePosition flag.
- Arg 1: Horizontal Move
- Arg 2: (Optional) Vertical Move
|
ModelSwitchFacing | [0] | [Init, Action, Manual, Subentity] | Advanced |
---|
Changes the model's facing. You'll want to activate the ModelLockFacing flag. |
Variables
_ModelPositionX | 0 | [] | |
---|
|
_ModelPositionY | 0 | [] | |
---|
|
_ModelRotation | 0 | [] | |
---|
|
_ModelScale | 1000 | [] | |
---|
|
_GraphicsCamPos | (0, 0, 0) | [] | |
---|
|
Flags
ModelLockWorldPosition | |
ModelLockRelativePosition | |
ModelLockFacing | |
Sprites
Config
Functions
Sprite | [1, 2] | [Init, Action, Manual, Subentity] | Basic |
---|
Display a previously set sprite frame. Will use the previously set animation if not specified.
- Arg 1: (Optional) Anim/Spritesheet Name
- Arg 2: Frame ID
|
SpriteProgress | [0, 1] | [Init, Action, Manual, Subentity] | Intermediate |
---|
Advance on the spritesheet. Will use the current animation.
- Arg 1: (Optional) Number of frames to advance
|
SpriteCreate | [0] | [Init, Manual] | Intermediate |
---|
Creates a sprite. Can either be empty, to use spritesheets, or have a link to a SpriteFrames ressource, depending on the interface you want to have.
Using spritesheets will require you to use SpritesheetRegister later, ideally by using the specblocks interface. This will allow you to manage spritesheets from the Castagne Editor.
On the other end, using SpriteFrames will require you to set up every animation using Godot's editor. Please refer to the module documentation for more details. |
SpritesheetRegister | [2, 3, 4, 5, 6, 7] | [Init, Manual] | Intermediate |
---|
Registers a new spritesheet to be used later and selects it. If not specified, the optional parameters are inherited from the currently selected spritesheet.
- Arg 1: Spritesheet Name
- Arg 2: Spritesheet Path
- Arg 3: (Optional) Sprites X
- Arg 4: (Optional) Sprites Y
- Arg 5: (Optional) Origin X
- Arg 6: (Optional) Origin Y
- Arg 7: (Optional) Pixel Size
|
SpritesheetFrames | [2] | [Init, Manual] | Advanced |
---|
Sets the number of frames for the currently selected spritesheet.
- Arg 1: Sprites X
- Arg 2: Sprites Y
|
SpriteOrigin | [2] | [Init, Manual] | Advanced |
---|
Sets a sprite's origin in pixels for the currently selected spritesheet.
- Arg 1: Pos X
- Arg 2: Pos Y
|
SpritePixelSize | [1] | [Init, Manual] | Advanced |
---|
Sets the size of a pixel in units for the currently selected spritesheet. 3D graphics only. |
SpriteOrder | [1, 2] | [Init, Action, Manual, Subentity] | Advanced |
---|
Sets the draw order for sprites, higher being drawn on top of others.
The final value must be between -4096 and 4096.
The offset may be used to have more flexibility in its use, for instance by using it to put one character behind another without affecting the local sprite order changes.
Still in progress, 2D graphics only for now.
- Arg 1: Sprite Order
- Arg 2: (Optional) Sprite Order Offset
|
SpriteOrderOffset | [1] | [Init, Action, Manual, Subentity] | Advanced |
---|
Set the sprite order offset directly. See SpriteOrder for more information.
- Arg 1: Sprite Order Offset
|
Variables
_SpriteFrame | 0 | [] | |
---|
|
_SpriteAnim | Null | [] | |
---|
|
_SpriteOrder | 0 | [] | |
---|
|
_SpriteOrderOffset | 0 | [] | |
---|
|
Animations
Functions relating to the animation system. This will be moved later to graphics.
Functions
Anim | [1, 2] | [Init, Action, Manual, Subentity] | |
---|
Plays an animation frame by frame. The animation updates only when this function is called, and starts at the first frame the function is called. Resets on state change.
- Arg 1: Animation Name
- Arg 2: (Optional) Offset
|
AnimFrame | [2] | [Init, Action, Manual, Subentity] | |
---|
Plays an animation frame by frame. The animation updates only when this function is called, and if not specified will use the amount of frames you were in that state..
- Arg 1: Animation Name
- Arg 2: The frame to display
|
AnimProgress | [0, 1] | [Init, Action, Manual, Subentity] | |
---|
Progresses an already playing animation. Can also be used to scroll.
- Arg 1: (Optional) Amount of frames to progress
|
AnimLoop | [1, 2] | [Init, Action, Manual, Subentity] | |
---|
Loops an animation around by setting it to the start point when reaching the specified frame.
- Arg 1: Loop point (exclusive)
- Arg 2: (Optional) Start point of the loop.
|
Variables
_Anim | Null | [] | |
---|
Currently playing animation. |
_AnimFrame | 0 | [] | |
---|
Current frame of the animation to show. |
_AnimFuncName | | [] | |
---|
Remembers when the animation started, for the Anim function |
_AnimFuncOffset | Null | [] | |
---|
Remembers an offset for the Anim function |
Camera
Config
CameraOffsetX | 0 | [] | |
---|
|
CameraOffsetY | 20000 | [] | |
---|
|
CameraOffsetZ | 62000 | [] | |
---|
|
CameraYBuffer | 30000 | [] | |
---|
|
CameraPosMinX | -105000 | [] | |
---|
|
CameraPosMaxX | 105000 | [] | |
---|
|
CameraPosMinY | -1000000 | [] | |
---|
|
CameraPosMaxY | 1000000 | [] | |
---|
|
VFX Test
Functions
VFXReset | [0] | [Init, Action, Manual, Subentity] | |
---|
Unspecified. |
VFXModel | [1] | [Init, Action, Manual, Subentity] | |
---|
Unspecified. |
VFXSprite | [1, 2] | [Init, Action, Manual, Subentity] | |
---|
Unspecified. |
VFXSpriteCreate | [4, 5] | [Init, Action, Manual, Subentity] | |
---|
Helper function to quickly create a simple sprite VFX. |
VFXTime | [1] | [Init, Action, Manual, Subentity] | |
---|
Unspecified. |
VFXPosition | [1, 2] | [Init, Action, Manual, Subentity] | |
---|
Unspecified. |
VFXRotation | [1] | [Init, Action, Manual, Subentity] | |
---|
Unspecified. |
VFXScale | [1] | [Init, Action, Manual, Subentity] | |
---|
Unspecified. |
VFXAnimation | [0, 1, 2] | [Init, Action, Manual, Subentity] | |
---|
Unspecified. |
VFXCreate | [0] | [Init, Action, Manual, Subentity] | |
---|
Creates the prepared VFX. |
Variables
_PreparingVFX | {} | [] | |
---|
|
_VFXList | [] | [] | |
---|
|
Palettes
Functions
PaletteApply | [0, 1] | [Init, Action, Manual, Subentity] | |
---|
Sets the variables to the values given by the palette settings. |
PaletteSprite | [1] | [Init, Action, Manual, Subentity] | |
---|
Changes the active sprite palette to the one given. |
Variables
_PaletteID | 0 | [InheritToSubentity] | |
---|
Current palette ID. |
_SpritePalettePath | res://castagne/assets/helpers/palette/PaletteManual01.png | [InheritToSubentity] | |
---|
Path to the sprite palette lookup texture. |
_ModelPath | res://castagne/assets/fighters/castagneur/CastagneurModel.tscn | [InheritToSubentity] | |
---|
Path to the model to spawn, set by the palette |
_PaletteExtra | 0 | [InheritToSubentity] | |
---|
Extra palette parameter. |
_Tmp_DefaultSpritePalettePath | res://castagne/assets/helpers/palette/PaletteManual01.png | [InheritToSubentity] | |
---|
|
_Tmp_DefaultModelPath | res://castagne/assets/fighters/castagneur/CastagneurModel.tscn | [InheritToSubentity] | |
---|
|
UI
Config
UIGlobalRootScene | res://castagne/helpers/ui/roots/CUIGlobalRoot-Fighting.tscn | [] | |
---|
|
UIPlayerRootScene | res://castagne/helpers/ui/roots/CUIPlayerRoot-Fighting.tscn | [] | |
---|
|
UIDefaultWidget_Bar | res://castagne/helpers/ui/widgets/default/DefaultWidgetBar.tscn | [] | |
---|
|
UIDefaultWidget_Icons | res://castagne/helpers/ui/widgets/default/DefaultWidgetIcons.tscn | [] | |
---|
|
UIDefaultWidget_IconSwitch | res://castagne/helpers/ui/widgets/default/DefaultWidgetIconSwitch.tscn | [] | |
---|
|
UIDefaultWidget_Text | res://castagne/helpers/ui/widgets/default/DefaultWidgetText.tscn | [] | |
---|
|
Battle Init Data
uiplayerroot-path | |
uiplayerroot-use | |