Volkov was not made for walking

Information and discussion for custom maps and mods.
Post Reply
SethXXX
Posts: 17
Joined: Sat Aug 30, 2014 9:07 am

Volkov was not made for walking

Post by SethXXX »

Hello community,

I tried to recreate Volkov for use in missions, modifying "gnrl". So far I can start my map with this actor in it, but it crashes every time it moves with the error message being "Exception of type `System.InvalidOperationException`: Can't find Move in voice pool." Shooting while standing still works and the selection sound plays as normal.

My code:

Code: Select all

GNRL:
		Inherits: ^Soldier
		Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
		-Crushable:
		RenderSprites:
			Image: gnrl
		Valued:
			Cost: 2500
		DeliversCash@GRINDABLE:
			Payload: 1250
		Tooltip:
			Name: Volkov
		Health:
			HP: 2500
		Voiced:
			VoiceSet: StavrosVoice
		Mobile:
			Speed: 71
			Voice: Move
		AttackFrontal:
			Voice: Attack
		AttackMove:
			Voice: Move
		Armor:
			Type: Heavy
		Guard:
			Voice: Move
		RevealsShroud:
			Range: 6c0
		Demolition:
			DetonationDelay: 45
			Voice: Demolish
		Passenger:
			PipType: Red
			Voice: Move
		Armament@PRIMARY:
			Weapon: Colt45
		Armament@SECONDARY:
			Weapon: Colt45
		Armament@GARRISONED:
			Name: garrisoned
			Weapon: Colt45
			MuzzleSequence: garrison-muzzle
		WithInfantryBody:
			DefaultAttackSequence: shoot
			StandSequences: stand
		Targetable:
			TargetTypes: Ground, Infantry
"VoiceSet: StavrosVoice" is even in the original code for gnrl. Any ideas why this happens?

Frame_Limiter
Posts: 22
Joined: Tue Feb 16, 2016 4:55 pm

Post by Frame_Limiter »

∙You are stacking "Inherits: ^Soldier" with "Inherits@1: ^CivInfantry".

∙StavrosVoice has no "Demolish" voice. Use "Attack" instead.

∙DeliversCash uses a voice. "Action" is default and missing from StavrosVoice, so use "Move" instead.

∙"Armament:" that is inherited from ^ArmedCivilian should be removed as it isn't being overridden by your new armaments.

∙Including those redundant overrides isn't necessary, they can be removed.


Code: Select all

GNRL:
		UpdatesPlayerStatistics:
		MustBeDestroyed:
		ProximityCaptor:
			Types: Infantry
		DetectCloaked:
			CloakTypes: Hijacker
		RenderSprites:
			Image: gnrl
		Valued:
			Cost: 2500
		DeliversCash@GRINDABLE:
			Payload: 1250
			Voice: Move
		Tooltip:
			Name: Volkov
		Health:
			HP: 2500
		Mobile:
			Speed: 71
		Passenger:
			PipType: Red
		Armor:
			Type: Heavy
		RevealsShroud:
			Range: 6c0
		Demolition:
			DetonationDelay: 45
			Voice: Attack
		-Crushable:
		-Armament:
		Armament@PRIMARY:
			Weapon: Colt45
		Armament@SECONDARY:
			Weapon: Colt45
		Armament@GARRISONED:
			Name: garrisoned
			Weapon: Colt45
			MuzzleSequence: garrison-muzzle
		WithInfantryBody:
			DefaultAttackSequence: shoot
			StandSequences: stand
		Targetable:
			TargetTypes: Ground, Infantry

SethXXX
Posts: 17
Joined: Sat Aug 30, 2014 9:07 am

Post by SethXXX »

thanks a lot, I just realised that I have absolutely no clue how this YAML thing works - back to the drawing board.

As for the weapon: It was intended as a placeholder.
Is it possible to create entirely new weapons in map.yaml (with a new name) or do I have to modify an existing one?

abcdefg30
Posts: 641
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 »

SethXXX wrote: As for the weapon: It was intended as a placeholder.
Is it possible to create entirely new weapons in map.yaml (with a new name) or do I have to modify an existing one?
Yes, it is possible to define new weapons in your custom map. You can have a look at our shipped minigames, like Fort Lonestar if you're not sure how to do this. (Also see our "Map Format" wiki page.)

SethXXX
Posts: 17
Joined: Sat Aug 30, 2014 9:07 am

Post by SethXXX »

as far as I can see there, a new weapon (I looked at "TankNapalm" in the example as it is not defined in the original game files) is just defined under "Weapons" and then assigned to an actor. I did exactly that:

Code: Select all

GNRL:
		UpdatesPlayerStatistics: 
		MustBeDestroyed: 
		ProximityCaptor: 
			Types: Infantry 
		DetectCloaked: 
			CloakTypes: Hijacker 
		RenderSprites: 
			Image: gnrl 
		Valued: 
			Cost: 2500 
		DeliversCash@GRINDABLE: 
			Payload: 1250 
			Voice: Move 
		Tooltip: 
			Name: Volkov 
		Health: 
			HP: 2500 
		Mobile: 
			Speed: 71 
		Passenger: 
			PipType: Red 
		Armor: 
			Type: Heavy 
		RevealsShroud: 
			Range: 6c0 
		Demolition: 
			DetonationDelay: 45 
			Voice: Attack 
		-Crushable: 
		-Armament: 
		Armament@PRIMARY: 
			Weapon: VolkovWeapon 
		Armament@GARRISONED: 
			Name: garrisoned 
			Weapon: VolkovWeapon 
			MuzzleSequence: garrison-muzzle 
		WithInfantryBody: 
			DefaultAttackSequence: shoot 
			StandSequences: stand 
		Targetable: 
			TargetTypes: Ground, Infantry
and below

Code: Select all

Weapons:
		VolkovWeapon:
			Inherits: ^Cannon
			ValidTargets: Ground, Water
			Burst: 2
			ReloadDelay: 25
			Range: 6c0
			Report: silppk.aud
			Projectile: Bullet
				Speed: 1c682
				Blockable: true
			Warhead@1Dam: SpreadDamage
				Spread: 256
				Damage: 100
				ValidTargets: Ground, Water
				Versus:
					None: 100
					Wood: 75
					Light: 60
					Heavy: 25
					Concrete: 25
				DamageTypes: Prone50Percent, TriggerProne, SmallExplosionDeath
but the game won't let me start the map, debug.log says "Failed to load rules for `Test Soviet` with error :Cannot locate type: VolkovWeaponInfo"

Do I have to use an external weapons.yaml maybe? Or should it work equally well in map.yaml? Because the former method doesn't seem to work, when I tried the game ignored my changes altogether.

Sorry for maybe sounding stupid, I have zero experience with coding in general :?
Last edited by SethXXX on Tue Nov 28, 2017 10:12 pm, edited 2 times in total.

abcdefg30
Posts: 641
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 »

Weird, your code looks fine and did even work for me! I uploaded my testmap here: https://resource.openra.net/maps/24134/

SethXXX
Posts: 17
Joined: Sat Aug 30, 2014 9:07 am

Post by SethXXX »

Nevermind, got it to work on a different map :)

EDIT: and now also on the original one. Thank you all for your help!

Post Reply