mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
new test sprite/display screencaps for imported avatars if available
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"racename": "",
|
||||
"racenameplural": "",
|
||||
"baseheight": 90,
|
||||
"basemass": 600.0,
|
||||
|
||||
"strength": 65535,
|
||||
"strengthmult": [100,100,100,100,100,100,100],
|
||||
|
||||
"accel": 0.67,
|
||||
|
||||
"speed": 6.0,
|
||||
"speedmult": [100,100,100,100,100,100,100],
|
||||
|
||||
"vertstride": 40,
|
||||
|
||||
"jumppower": 17.6,
|
||||
"jumppowermult": [100,100,100,100,100,100,100],
|
||||
|
||||
"scale": 1.0,
|
||||
"scalemult": [100,100,100,100,100,100,100],
|
||||
|
||||
"encumbrance": 2147483647,
|
||||
"defence": 65535,
|
||||
"reach": 226,
|
||||
|
||||
"toolsize": 40,
|
||||
|
||||
"intelligent": true,
|
||||
"barehandactionminheight": 40,
|
||||
"basebarehanddiggingsize": 16,
|
||||
|
||||
"__comments__": "This RAW is intended to test the theoretical maximum values for properties (strength, defence, etc.)"
|
||||
}
|
||||
48
assets/mods/basegame/sprites/taimu2.properties
Normal file
48
assets/mods/basegame/sprites/taimu2.properties
Normal file
@@ -0,0 +1,48 @@
|
||||
# complete file name is: SPRITESHEET + bodypart name + EXTENSION
|
||||
SPRITESHEET=mods/basegame/sprites/test_werebeastf2/taimu_
|
||||
EXTENSION=.tga
|
||||
# defines frame size and origin point. Origin point is given as: (originx, 0)
|
||||
CONFIG=SIZE 64,98;ORIGINX 40
|
||||
|
||||
! A skeleton also defines what body parts (images) be used.
|
||||
! You can also write multiline text using reverse solidus; this is a feature of .properties
|
||||
! skeleton joints are ordered: foremost-drawn object comes first, which means lowermost object IN THIS LIST
|
||||
! are painted first, and any object that comes before it will paint over it. In other words, this list is
|
||||
! first reversed then being iterated.
|
||||
! Some keywords are considered special within the game, they are:
|
||||
! HEADGEAR, HELD_ITEM, BOOT_L, BOOT_R, GAUNTLET_L, GAUNTLET_R and ARMOUR_* (star means any number starting from zero)
|
||||
BODYPARTS=HEADGEAR 13,14;\
|
||||
HEAD 13,14;\
|
||||
ARM_REST_RIGHT 10,4;\
|
||||
ARM_REST_LEFT 9,3;\
|
||||
LEG_REST_RIGHT 15,6;\
|
||||
LEG_REST_LEFT 8,6;\
|
||||
TORSO_0 18,19;\
|
||||
TORSO_1 18,19;\
|
||||
TAIL_0 30,2;\
|
||||
BUST_0 11,2;\
|
||||
HELD_ITEM 0,0
|
||||
SKELETON_STAND=HEADGEAR 0,78;\
|
||||
ARM_REST_RIGHT -16,66;\
|
||||
HELD_ITEM -11,33;\
|
||||
HEAD 0,78;\
|
||||
BUST_0 0,63;\
|
||||
TORSO_0 0,54;\
|
||||
TORSO_1 0,54;\
|
||||
LEG_REST_RIGHT -5,41;\
|
||||
LEG_REST_LEFT 3,41;\
|
||||
ARM_REST_LEFT 8,66;\
|
||||
TAIL_0 2,40
|
||||
|
||||
! When you move the arms/hands, make sure you move the HELD_ITEM as well
|
||||
|
||||
# RUNNING might need its own skeleton...
|
||||
ANIM_RUN=DELAY 0.18;ROW 2;SKELETON SKELETON_STAND
|
||||
ANIM_RUN_1=LEG_REST_RIGHT 2,2;LEG_REST_LEFT -2,0;TAIL_0 1,0;TORSO_1 0,-999
|
||||
ANIM_RUN_2=ALL 0,2;LEG_REST_RIGHT 0,-2;LEG_REST_LEFT 0,2;TAIL_0 -1,0;TORSO_1 0,-999
|
||||
ANIM_RUN_3=LEG_REST_RIGHT -2,0;LEG_REST_LEFT 2,2;TAIL_0 -1,0;TORSO_1 0,-999
|
||||
ANIM_RUN_4=ALL 0,2;LEG_REST_RIGHT 0,2;LEG_REST_LEFT 0,-2;TAIL_0 1,0;TORSO_1 0,-999
|
||||
|
||||
ANIM_IDLE=DELAY 2;ROW 1;SKELETON SKELETON_STAND
|
||||
ANIM_IDLE_1=TORSO_1 0,-999
|
||||
ANIM_IDLE_2=TORSO_0 0,-999;ARM_REST_LEFT 0,1;ARM_REST_RIGHT 0,1;HELD_ITEM 0,1;BUST_0 0,1;HEAD 0,1
|
||||
48
assets/mods/basegame/sprites/taimu2_glow.properties
Normal file
48
assets/mods/basegame/sprites/taimu2_glow.properties
Normal file
@@ -0,0 +1,48 @@
|
||||
# complete file name is: SPRITESHEET + bodypart name + EXTENSION
|
||||
SPRITESHEET=mods/basegame/sprites/test_werebeastf2/taimuglow_
|
||||
EXTENSION=.tga
|
||||
# defines frame size and origin point. Origin point is given as: (originx, 0)
|
||||
CONFIG=SIZE 64,98;ORIGINX 40
|
||||
|
||||
! A skeleton also defines what body parts (images) be used.
|
||||
! You can also write multiline text using reverse solidus; this is a feature of .properties
|
||||
! skeleton joints are ordered: foremost-drawn object comes first, which means lowermost object IN THIS LIST
|
||||
! are painted first, and any object that comes before it will paint over it. In other words, this list is
|
||||
! first reversed then being iterated.
|
||||
! Some keywords are considered special within the game, they are:
|
||||
! HEADGEAR, HELD_ITEM, BOOT_L, BOOT_R, GAUNTLET_L, GAUNTLET_R and ARMOUR_* (star means any number starting from zero)
|
||||
BODYPARTS=HEADGEAR 13,14;\
|
||||
HEAD 13,14;\
|
||||
ARM_REST_RIGHT 10,4;\
|
||||
ARM_REST_LEFT 9,3;\
|
||||
LEG_REST_RIGHT 15,6;\
|
||||
LEG_REST_LEFT 8,6;\
|
||||
TORSO_0 18,19;\
|
||||
TORSO_1 18,19;\
|
||||
TAIL_0 30,2;\
|
||||
BUST_0 11,2;\
|
||||
HELD_ITEM 0,0
|
||||
SKELETON_STAND=HEADGEAR 0,78;\
|
||||
ARM_REST_RIGHT -16,66;\
|
||||
HELD_ITEM -11,33;\
|
||||
HEAD 0,78;\
|
||||
BUST_0 0,63;\
|
||||
TORSO_0 0,54;\
|
||||
TORSO_1 0,54;\
|
||||
LEG_REST_RIGHT -5,41;\
|
||||
LEG_REST_LEFT 3,41;\
|
||||
ARM_REST_LEFT 8,66;\
|
||||
TAIL_0 2,40
|
||||
|
||||
! When you move the arms/hands, make sure you move the HELD_ITEM as well
|
||||
|
||||
# RUNNING might need its own skeleton...
|
||||
ANIM_RUN=DELAY 0.18;ROW 2;SKELETON SKELETON_STAND
|
||||
ANIM_RUN_1=LEG_REST_RIGHT 2,2;LEG_REST_LEFT -2,0;TAIL_0 1,0;TORSO_1 0,-999
|
||||
ANIM_RUN_2=ALL 0,2;LEG_REST_RIGHT 0,-2;LEG_REST_LEFT 0,2;TAIL_0 -1,0;TORSO_1 0,-999
|
||||
ANIM_RUN_3=LEG_REST_RIGHT -2,0;LEG_REST_LEFT 2,2;TAIL_0 -1,0;TORSO_1 0,-999
|
||||
ANIM_RUN_4=ALL 0,2;LEG_REST_RIGHT 0,2;LEG_REST_LEFT 0,-2;TAIL_0 1,0;TORSO_1 0,-999
|
||||
|
||||
ANIM_IDLE=DELAY 2;ROW 1;SKELETON SKELETON_STAND
|
||||
ANIM_IDLE_1=TORSO_1 0,-999
|
||||
ANIM_IDLE_2=TORSO_0 0,-999;ARM_REST_LEFT 0,1;ARM_REST_RIGHT 0,1;HELD_ITEM 0,1;BUST_0 0,1;HEAD 0,1
|
||||
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_arm_rest_left.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_arm_rest_left.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_arm_rest_right.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_arm_rest_right.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_bust_0.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_bust_0.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_head.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_head.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_leg_rest_left.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_leg_rest_left.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_leg_rest_right.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_leg_rest_right.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_tail_0.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_tail_0.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_torso_0.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_torso_0.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_torso_1.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_torso_1.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimuglow_head.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimuglow_head.tga
LFS
Normal file
Binary file not shown.
@@ -351,6 +351,14 @@ class SavegameCollectionPair(private val player: SavegameCollection?, private va
|
||||
fun getImportedPlayer(): DiskSkimmer? {
|
||||
return if (isImported) player!!.loadable() else null
|
||||
}
|
||||
|
||||
fun getPlayerThumbnailPixmap(width: Int, height: Int, shrinkage: Double): Pixmap? {
|
||||
return player?.loadable()?.getThumbnailPixmap(width, height, shrinkage)
|
||||
}
|
||||
|
||||
fun getWorldThumbnailPixmap(width: Int, height: Int, shrinkage: Double): Pixmap? {
|
||||
return world?.loadable()?.getThumbnailPixmap(width, height, shrinkage)
|
||||
}
|
||||
}
|
||||
|
||||
data class DiskPair(val player: DiskSkimmer, val world: DiskSkimmer) {
|
||||
|
||||
@@ -813,8 +813,8 @@ fun AppUpdateListOfSavegames() {
|
||||
// if multiple valid savegames with same UUID exist, only the most recent one is retained
|
||||
if (!App.savegameWorlds.contains(worldUUID)) {
|
||||
App.savegameWorlds[worldUUID] = collection
|
||||
App.savegameWorldsName[worldUUID] = it.getDiskName(Common.CHARSET)
|
||||
App.sortedSavegameWorlds.add(worldUUID)
|
||||
App.savegameWorldsName[worldUUID] = it.getDiskName(Common.CHARSET)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -848,8 +848,8 @@ fun AppUpdateListOfSavegames() {
|
||||
// if multiple valid savegames with same UUID exist, only the most recent one is retained
|
||||
if (!App.savegamePlayers.contains(playerUUID)) {
|
||||
App.savegamePlayers[playerUUID] = collection
|
||||
App.savegamePlayersName[playerUUID] = it.getDiskName(Common.CHARSET)
|
||||
App.sortedPlayers.add(playerUUID)
|
||||
App.savegamePlayersName[playerUUID] = it.getDiskName(Common.CHARSET)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@ import net.torvald.terrarum.gameactors.AVKey
|
||||
object PlayerBuilderWerebeastTest {
|
||||
operator fun invoke(): IngamePlayer {
|
||||
val p: IngamePlayer = IngamePlayer(
|
||||
ModMgr.getGdxFile("basegame", "sprites/taimu.properties").path(),
|
||||
ModMgr.getGdxFile("basegame", "sprites/taimu_glow.properties").path(),
|
||||
ModMgr.getGdxFile("basegame", "sprites/taimu2.properties").path(),
|
||||
ModMgr.getGdxFile("basegame", "sprites/taimu2_glow.properties").path(),
|
||||
-589141658L // random value thrown
|
||||
)
|
||||
InjectCreatureRaw(p.actorValue, "basegame", "CreatureWerebeastBase.json")
|
||||
InjectCreatureRaw(p.actorValue, "basegame", "CreatureWerebeastBossBase.json")
|
||||
|
||||
|
||||
p.actorValue[AVKey.__PLAYER_QUICKSLOTSEL] = 0
|
||||
@@ -24,14 +24,8 @@ object PlayerBuilderWerebeastTest {
|
||||
p.actorValue[AVKey.ACTION_INTERVAL] = ActorHumanoid.BASE_ACTION_INTERVAL
|
||||
p.actorValue[AVKey.NAME] = "Taimu"
|
||||
|
||||
|
||||
/*p.makeNewSprite(TextureRegionPack(ModMgr.getGdxFile("basegame", "sprites/npc_template_anim_prototype.tga"), 48, 52))
|
||||
p.sprite!!.delays = floatArrayOf(2f, 1f/12f) // second value does nothing -- overridden by ActorHumanoid.updateSprite(float)
|
||||
p.sprite!!.setRowsAndFrames(2, 4)*/
|
||||
|
||||
p.animDesc?.let { p.sprite = AssembledSpriteAnimation(it, p, false) }
|
||||
p.animDescGlow?.let { p.spriteGlow = AssembledSpriteAnimation(it, p, true) }
|
||||
//p.reassembleSprite(p.sprite, p.spriteGlow, null)
|
||||
p.setHitboxDimension(22, p.actorValue.getAsInt(AVKey.BASEHEIGHT)!!, 30, 0)
|
||||
|
||||
p.setPosition(3.0 * TILE_SIZE, 3.0 * TILE_SIZE)
|
||||
|
||||
@@ -542,7 +542,7 @@ class UIItemPlayerCells(
|
||||
savegameStatus = savegamePair.status
|
||||
// pixmapManual = savegamePair.getManualSave()?.player?.getThumbnailPixmap(SAVE_THUMBNAIL_MAIN_WIDTH, SAVE_THUMBNAIL_MAIN_HEIGHT, 2.0)
|
||||
// pixmapAuto = savegamePair.getAutoSave()?.player?.getThumbnailPixmap(SAVE_THUMBNAIL_MAIN_WIDTH, SAVE_THUMBNAIL_MAIN_HEIGHT, 2.0)
|
||||
savegameThumbnailPixmap = savegamePair.getLoadableSave()?.player?.getThumbnailPixmap(SAVE_THUMBNAIL_MAIN_WIDTH, SAVE_THUMBNAIL_MAIN_HEIGHT, 2.0)
|
||||
savegameThumbnailPixmap = savegamePair.getPlayerThumbnailPixmap(SAVE_THUMBNAIL_MAIN_WIDTH, SAVE_THUMBNAIL_MAIN_HEIGHT, 2.0)
|
||||
|
||||
isImported = savegamePair.isImported
|
||||
}
|
||||
|
||||
@@ -217,10 +217,10 @@ class UILoadManage(val full: UILoadSavegame) : UICanvas() {
|
||||
mainButtons.forEach { it.render(batch, camera) }
|
||||
|
||||
// draw thumbnails of the most recent game
|
||||
val tex = screencap ?: CommonResourcePool.getAsTextureRegion("terrarum-defaultsavegamethumb")
|
||||
// val tex = screencap ?: CommonResourcePool.getAsTextureRegion("terrarum-defaultsavegamethumb")
|
||||
|
||||
|
||||
if (full.loadables.saveAvaliable()) {
|
||||
if (screencap != null) {
|
||||
val tx = (Toolkit.drawWidth - screencapW) / 2
|
||||
val tys = full.titleTopGradEnd + SAVE_CELL_HEIGHT + buttonGap
|
||||
val tye = buttonRowY2 - buttonGap
|
||||
@@ -232,7 +232,7 @@ class UILoadManage(val full: UILoadSavegame) : UICanvas() {
|
||||
Toolkit.fillArea(batch, tx, ty, screencapW, screencapH)
|
||||
|
||||
batch.color = Color.WHITE
|
||||
batch.draw(tex, tx.toFloat(), ty.toFloat(), screencapW.toFloat(), screencapH.toFloat())
|
||||
batch.draw(screencap, tx.toFloat(), ty.toFloat(), screencapW.toFloat(), screencapH.toFloat())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.torvald.terrarum.App.printdbg
|
||||
import net.torvald.terrarum.gameactors.AVKey
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.PlayerBuilderTestSubject1
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.PlayerBuilderWerebeastTest
|
||||
import net.torvald.terrarum.savegame.DiskSkimmer
|
||||
import net.torvald.terrarum.savegame.VDUtil
|
||||
import net.torvald.terrarum.savegame.VirtualDisk
|
||||
@@ -55,7 +56,8 @@ class UINewCharacter(val remoCon: UIRemoCon) : UICanvas() {
|
||||
uiLocked = true
|
||||
|
||||
|
||||
val player = PlayerBuilderTestSubject1()
|
||||
// val player = PlayerBuilderTestSubject1()
|
||||
val player = PlayerBuilderWerebeastTest()
|
||||
player.actorValue[AVKey.NAME] = nameInput.getTextOrPlaceholder()
|
||||
|
||||
val disk = VDUtil.createNewDisk(
|
||||
|
||||
@@ -320,7 +320,7 @@ class SpriteAssemblerPreview: Game() {
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val appConfig = Lwjgl3ApplicationConfiguration()
|
||||
appConfig.setWindowedMode(1024, 1024)
|
||||
appConfig.setWindowedMode(1536, 1024)
|
||||
appConfig.setIdleFPS(5)
|
||||
appConfig.setForegroundFPS(5)
|
||||
appConfig.setResizable(false)
|
||||
|
||||
BIN
work_files/graphics/sprites/npc_template_humanoid_savagef2.kra
LFS
Normal file
BIN
work_files/graphics/sprites/npc_template_humanoid_savagef2.kra
LFS
Normal file
Binary file not shown.
Reference in New Issue
Block a user