Problems cloning skeleton (Solution found)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Problems cloning skeleton (Solution found)

Post by Neikun »

I'm using the cloneObject function to clone a skeleton. (trying to make a beefier, story related skeleton)
So I'm trying to clone it, and I'm testing my progress, but I'm getting an error and I don't know what.
It's telling me that there's an unexpected symbol '=" on line 23
Can anyone help me find what's wrong?
Code:

Code: Select all

cloneObject{
	name = "rufalas",
	baseObject ="skeleton_warrior",
	uiName = "Rufalas",
	class = "Monster",
	model = "assets/models/monsters/skeleton_warrior.fbx",
	meshName = "skeleton_warrior_mesh",
},
	animations = {
		idle = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_idle.fbx",
		moveForward = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_walk.fbx",
		turnLeft = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_turn_left.fbx",
		turnRight = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_turn_right.fbx",
		attack = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_attack.fbx",
		attackBack = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_attack_back.fbx",
		getHitFrontLeft = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_front_left.fbx",
		getHitFrontRight = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_front_right.fbx",
		getHitBack = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_back.fbx",
		getHitLeft = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_left.fbx",
		getHitRight = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_right.fbx",
		fall = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_front_left.fbx",
	},
	moveSound = "skeleton_walk",
	footstepSound = "skeleton_footstep",
	attackSound = "skeleton_attack",
	hitSound = "skeleton_hit",
	dieSound = "skeleton_die",
	hitEffect = "hit_dust",
	capsuleHeight = 0.7,
	capsuleRadius = 0.25,
	collisionRadius = 0.6,
	health = 120,
	sight = 4,
	attackPower = 9,
	accuracy = 10,
	protection = 5,
	immunities = { "poison" },
	movementCoolDown = 2,
	noRecoilInterval = { 0.25, 0.5 },
	exp = 90,
	lootDrop = { 100, "legionary_spear", 100, "legionary_shield" },
	healthIncrement = 15,
	attackPowerIncrement = 5,
	protectionIncrement = 1,
	brain = "Melee",
}
Last edited by Neikun on Fri Sep 21, 2012 2:43 am, edited 1 time in total.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Problems cloning skeleton

Post by Neikun »

Hey wait.. since I'm cloning it, maybe I can fix it by deleting all lines I don't plan on editing?
brb testing.

EDIT: Solution found.
There was a close bracket at the end of the animations and no new opening bracket for the rest of the definitions.
To fix this, I deleted all the animation text, including the close bracket(since I won't be touching it)
Now the script reads as one list of definition.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Billick
Posts: 201
Joined: Thu Apr 19, 2012 9:28 pm

Re: Problems cloning skeleton

Post by Billick »

Neikun wrote:Hey wait.. since I'm cloning it, maybe I can fix it by deleting all lines I don't plan on editing?
brb testing.

EDIT: Solution found.
There was a close bracket at the end of the animations and no new opening bracket for the rest of the definitions.
To fix this, I deleted all the animation text, including the close bracket(since I won't be touching it)
Now the script reads as one list of definition.
You can omit any lines that you aren't changing from the original monster. Putting them in shouldn't hurt anything, it just makes your code longer.
Halls of Barrian - current version 1.0.3 - Steam Nexus
Me Grimrock no bozo!
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Problems cloning skeleton (Solution found)

Post by petri »

It's recommended that you set only those fields that are different from the base object and copy nothing else. This way if the base object changes your mod is more likely to work and it's lot cleaner also.
Post Reply